Class ContactChannel


  • public class ContactChannel
    extends com.pulumi.resources.CustomResource
    Resource for managing an AWS SSM Contacts Contact Channel. > **NOTE:** The contact channel needs to be activated in the AWS Systems Manager console, otherwise it can't be used to engage the contact. See the [Contacts section of the Incident Manager User Guide](https://docs.aws.amazon.com/incident-manager/latest/userguide/contacts.html) for more information. ## Example Usage ### Basic Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.ssmcontacts.ContactChannel;
     import com.pulumi.aws.ssmcontacts.ContactChannelArgs;
     import com.pulumi.aws.ssmcontacts.inputs.ContactChannelDeliveryAddressArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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) {
             var example = new ContactChannel("example", ContactChannelArgs.builder()
                 .deliveryAddress(ContactChannelDeliveryAddressArgs.builder()
                     .simpleAddress("email@example.com")
                     .build())
                 .contactId("arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias")
                 .name("Example contact channel")
                 .type("EMAIL")
                 .build());
     
         }
     }
     
     
    ### Usage with SSM Contact
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.ssmcontacts.Contact;
     import com.pulumi.aws.ssmcontacts.ContactArgs;
     import com.pulumi.aws.ssmcontacts.ContactChannel;
     import com.pulumi.aws.ssmcontacts.ContactChannelArgs;
     import com.pulumi.aws.ssmcontacts.inputs.ContactChannelDeliveryAddressArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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) {
             var exampleContact = new Contact("exampleContact", ContactArgs.builder()
                 .alias("example_contact")
                 .type("PERSONAL")
                 .build());
     
             var example = new ContactChannel("example", ContactChannelArgs.builder()
                 .deliveryAddress(ContactChannelDeliveryAddressArgs.builder()
                     .simpleAddress("email@example.com")
                     .build())
                 .contactId(exampleContact.arn())
                 .name("Example contact channel")
                 .type("EMAIL")
                 .build());
     
         }
     }
     
     
    ## Import ### Identity Schema #### Required - `arn` (String) ARN of the contact channel. Using `pulumi import`, import SSM Contact Channel using the `arn`. For example: ```sh $ pulumi import aws:ssmcontacts/contactChannel:ContactChannel example arn:aws:ssm-contacts:us-west-2:123456789012:contact-channel/example ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> activationStatus()  
      com.pulumi.core.Output<java.lang.String> arn()  
      com.pulumi.core.Output<java.lang.String> contactId()  
      com.pulumi.core.Output<ContactChannelDeliveryAddress> deliveryAddress()  
      static ContactChannel get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ContactChannelState 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> name()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.lang.String> type()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ContactChannel

        public ContactChannel​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • ContactChannel

        public ContactChannel​(java.lang.String name,
                              ContactChannelArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • ContactChannel

        public ContactChannel​(java.lang.String name,
                              ContactChannelArgs 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

      • activationStatus

        public com.pulumi.core.Output<java.lang.String> activationStatus()
        Returns:
        Whether the contact channel is activated. The contact channel must be activated to use it to engage the contact. One of `ACTIVATED` or `NOT_ACTIVATED`.
      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        ARN of the contact channel.
      • contactId

        public com.pulumi.core.Output<java.lang.String> contactId()
        Returns:
        ARN of the AWS SSM Contact that the contact channel belongs to.
      • deliveryAddress

        public com.pulumi.core.Output<ContactChannelDeliveryAddress> deliveryAddress()
        Returns:
        Block that contains contact engagement details. See details below.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Name of the contact channel. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (`_`), hyphens (`-`), periods (`.`), and spaces.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • type

        public com.pulumi.core.Output<java.lang.String> type()
        Returns:
        Type of the contact channel. One of `SMS`, `VOICE` or `EMAIL`.
      • get

        public static ContactChannel get​(java.lang.String name,
                                         com.pulumi.core.Output<java.lang.String> id,
                                         @Nullable
                                         ContactChannelState 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.