Package com.pulumi.gcp.essentialcontacts
Class Contact
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.gcp.essentialcontacts.Contact
-
public class Contact extends com.pulumi.resources.CustomResource
A contact that will receive notifications from Google Cloud. To get more information about Contact, see: * [API documentation](https://cloud.google.com/resource-manager/docs/reference/essentialcontacts/rest/v1/projects.contacts) * How-to Guides * [Official Documentation](https://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 `billing_project` and set `user_project_override` 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 `billing_project` you defined. ## Example Usage ### Essential Contact ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.organizations.OrganizationsFunctions; import com.pulumi.gcp.organizations.inputs.GetProjectArgs; import com.pulumi.gcp.essentialcontacts.Contact; import com.pulumi.gcp.essentialcontacts.ContactArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var project = OrganizationsFunctions.getProject(); var contact = new Contact("contact", ContactArgs.builder() .parent(project.applyValue(getProjectResult -> getProjectResult.id())) .email("[email protected]") .languageTag("en-GB") .notificationCategorySubscriptions("ALL") .build()); } } ``` ## Import Contact can be imported using any of these accepted formats: ```sh $ pulumi import gcp:essentialcontacts/contact:Contact default {{name}} ```
-
-
Constructor Summary
Constructors Constructor Description Contact(java.lang.String name)
Contact(java.lang.String name, ContactArgs args)
Contact(java.lang.String name, ContactArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>
email()
static Contact
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ContactState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>
languageTag()
com.pulumi.core.Output<java.lang.String>
name()
com.pulumi.core.Output<java.util.List<java.lang.String>>
notificationCategorySubscriptions()
com.pulumi.core.Output<java.lang.String>
parent()
-
-
-
Constructor Detail
-
Contact
public Contact(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
Contact
public Contact(java.lang.String name, ContactArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
Contact
public Contact(java.lang.String name, ContactArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
email
public com.pulumi.core.Output<java.lang.String> email()
- Returns:
- The email address to send notifications to. This does not need to be a Google account.
-
languageTag
public com.pulumi.core.Output<java.lang.String> languageTag()
- Returns:
- The preferred language for notifications, as a ISO 639-1 language code. See Supported languages for a list of supported languages.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- The identifier for the contact. Format: {resourceType}/{resource_id}/contacts/{contact_id}
-
notificationCategorySubscriptions
public com.pulumi.core.Output<java.util.List<java.lang.String>> notificationCategorySubscriptions()
- Returns:
- The categories of notifications that the contact will receive communications for.
-
parent
public com.pulumi.core.Output<java.lang.String> parent()
- Returns:
- The resource to save this contact for. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id} ***
-
get
public static Contact get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ContactState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-