@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
164 lines • 7.23 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* A contact that will receive notifications from Google Cloud.
*
* To get more information about Contact, see:
*
* * [API documentation](https://docs.cloud.google.com/resource-manager/docs/reference/essentialcontacts/rest/v1/projects.contacts)
* * How-to Guides
* * [Official Documentation](https://docs.cloud.google.com/resource-manager/docs/managing-notification-contacts)
*
* > **Warning:** If you are using User ADCs (Application Default Credentials) with this resource,
* you must specify a `billingProject` and set `userProjectOverride` to true
* in the provider configuration. Otherwise the Essential Contacts API will return a 403 error.
* Your account must have the `serviceusage.services.use` permission on the
* `billingProject` you defined.
*
* ## Example Usage
*
* ### Essential Contact
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const project = gcp.organizations.getProject({});
* const contact = new gcp.essentialcontacts.Contact("contact", {
* parent: project.then(project => project.id),
* email: "foo@bar.com",
* languageTag: "en-GB",
* notificationCategorySubscriptions: ["ALL"],
* });
* ```
*
* ## Import
*
* Contact can be imported using any of these accepted formats:
*
* * `{{name}}`
*
* When using the `pulumi import` command, Contact can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:essentialcontacts/contact:Contact default {{name}}
* ```
*/
export declare class Contact extends pulumi.CustomResource {
/**
* Get an existing Contact 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?: ContactState, opts?: pulumi.CustomResourceOptions): Contact;
/**
* Returns true if the given object is an instance of Contact. 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 Contact;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
readonly deletionPolicy: pulumi.Output<string>;
/**
* The email address to send notifications to. This does not need to be a Google account.
*/
readonly email: pulumi.Output<string>;
/**
* The preferred language for notifications, as a ISO 639-1 language code. See Supported languages for a list of supported languages.
*/
readonly languageTag: pulumi.Output<string>;
/**
* The identifier for the contact. Format: {resourceType}/{resource_id}/contacts/{contact_id}
*/
readonly name: pulumi.Output<string>;
/**
* The categories of notifications that the contact will receive communications for.
*/
readonly notificationCategorySubscriptions: pulumi.Output<string[]>;
/**
* The resource to save this contact for. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id}
*/
readonly parent: pulumi.Output<string>;
/**
* Create a Contact 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: ContactArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Contact resources.
*/
export interface ContactState {
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* The email address to send notifications to. This does not need to be a Google account.
*/
email?: pulumi.Input<string | undefined>;
/**
* The preferred language for notifications, as a ISO 639-1 language code. See Supported languages for a list of supported languages.
*/
languageTag?: pulumi.Input<string | undefined>;
/**
* The identifier for the contact. Format: {resourceType}/{resource_id}/contacts/{contact_id}
*/
name?: pulumi.Input<string | undefined>;
/**
* The categories of notifications that the contact will receive communications for.
*/
notificationCategorySubscriptions?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* The resource to save this contact for. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id}
*/
parent?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a Contact resource.
*/
export interface ContactArgs {
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* The email address to send notifications to. This does not need to be a Google account.
*/
email: pulumi.Input<string>;
/**
* The preferred language for notifications, as a ISO 639-1 language code. See Supported languages for a list of supported languages.
*/
languageTag: pulumi.Input<string>;
/**
* The categories of notifications that the contact will receive communications for.
*/
notificationCategorySubscriptions: pulumi.Input<pulumi.Input<string>[]>;
/**
* The resource to save this contact for. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id}
*/
parent: pulumi.Input<string>;
}
//# sourceMappingURL=contact.d.ts.map