@pulumi/opsgenie
Version:
A Pulumi package for creating and managing opsgenie cloud resources.
119 lines (118 loc) • 4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a User Contact.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as opsgenie from "@pulumi/opsgenie";
*
* const sms = new opsgenie.UserContact("sms", {
* username: exampleuser.username,
* to: "39-123",
* method: "sms",
* });
* const email = new opsgenie.UserContact("email", {
* username: exampleuser.username,
* to: "fahri@opsgenie.com",
* method: "email",
* });
* const voice = new opsgenie.UserContact("voice", {
* username: exampleuser.username,
* to: "39-123",
* method: "voice",
* });
* ```
*
* ## Import
*
* Users can be imported using the `username/contact_id`, e.g.
*
* ```sh
* $ pulumi import opsgenie:index/userContact:UserContact testcontact username/contact_id`
* ```
*/
export declare class UserContact extends pulumi.CustomResource {
/**
* Get an existing UserContact resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: UserContactState, opts?: pulumi.CustomResourceOptions): UserContact;
/**
* Returns true if the given object is an instance of UserContact. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is UserContact;
/**
* Enable contact of the user in OpsGenie. Default value is true.
*/
readonly enabled: pulumi.Output<boolean | undefined>;
/**
* This parameter is the contact method of user and should be one of email, sms or voice. Please note that adding mobile is not supported from API.
*/
readonly method: pulumi.Output<string>;
/**
* to field is the address of given method.
*/
readonly to: pulumi.Output<string>;
/**
* The username for contact.(reference)
*/
readonly username: pulumi.Output<string>;
/**
* Create a UserContact resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: UserContactArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering UserContact resources.
*/
export interface UserContactState {
/**
* Enable contact of the user in OpsGenie. Default value is true.
*/
enabled?: pulumi.Input<boolean>;
/**
* This parameter is the contact method of user and should be one of email, sms or voice. Please note that adding mobile is not supported from API.
*/
method?: pulumi.Input<string>;
/**
* to field is the address of given method.
*/
to?: pulumi.Input<string>;
/**
* The username for contact.(reference)
*/
username?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a UserContact resource.
*/
export interface UserContactArgs {
/**
* Enable contact of the user in OpsGenie. Default value is true.
*/
enabled?: pulumi.Input<boolean>;
/**
* This parameter is the contact method of user and should be one of email, sms or voice. Please note that adding mobile is not supported from API.
*/
method: pulumi.Input<string>;
/**
* to field is the address of given method.
*/
to: pulumi.Input<string>;
/**
* The username for contact.(reference)
*/
username: pulumi.Input<string>;
}