Class ReplicationSet


  • public class ReplicationSet
    extends com.pulumi.resources.CustomResource
    Provides a resource for managing a replication set in AWS Systems Manager Incident Manager. > **NOTE:** Deleting a replication set also deletes all Incident Manager related data including response plans, incident records, contacts and escalation plans. ## Example Usage ### Basic Usage Create a replication set.
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.ssmincidents.ReplicationSet;
     import com.pulumi.aws.ssmincidents.ReplicationSetArgs;
     import com.pulumi.aws.ssmincidents.inputs.ReplicationSetRegionArgs;
     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 replicationSetName = new ReplicationSet("replicationSetName", ReplicationSetArgs.builder()
                 .regions(ReplicationSetRegionArgs.builder()
                     .name("us-west-2")
                     .build())
                 .tags(Map.of("exampleTag", "exampleValue"))
                 .build());
     
         }
     }
     
     
    Add a Region to a replication set. (You can add only one Region at a time.)
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.ssmincidents.ReplicationSet;
     import com.pulumi.aws.ssmincidents.ReplicationSetArgs;
     import com.pulumi.aws.ssmincidents.inputs.ReplicationSetRegionArgs;
     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 replicationSetName = new ReplicationSet("replicationSetName", ReplicationSetArgs.builder()
                 .regions(            
                     ReplicationSetRegionArgs.builder()
                         .name("us-west-2")
                         .build(),
                     ReplicationSetRegionArgs.builder()
                         .name("ap-southeast-2")
                         .build())
                 .build());
     
         }
     }
     
     
    Delete a Region from a replication set. (You can delete only one Region at a time.)
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.ssmincidents.ReplicationSet;
     import com.pulumi.aws.ssmincidents.ReplicationSetArgs;
     import com.pulumi.aws.ssmincidents.inputs.ReplicationSetRegionArgs;
     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 replicationSetName = new ReplicationSet("replicationSetName", ReplicationSetArgs.builder()
                 .regions(ReplicationSetRegionArgs.builder()
                     .name("us-west-2")
                     .build())
                 .build());
     
         }
     }
     
     
    ### Basic Usage with an AWS Customer Managed Key Create a replication set with a KMS customer manager key:
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.kms.Key;
     import com.pulumi.aws.ssmincidents.ReplicationSet;
     import com.pulumi.aws.ssmincidents.ReplicationSetArgs;
     import com.pulumi.aws.ssmincidents.inputs.ReplicationSetRegionArgs;
     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 exampleKey = new Key("exampleKey");
     
             var replicationSetName = new ReplicationSet("replicationSetName", ReplicationSetArgs.builder()
                 .regions(ReplicationSetRegionArgs.builder()
                     .name("us-west-2")
                     .kmsKeyArn(exampleKey.arn())
                     .build())
                 .tags(Map.of("exampleTag", "exampleValue"))
                 .build());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import an Incident Manager replication. For example: ```sh $ pulumi import aws:ssmincidents/replicationSet:ReplicationSet replicationSetName import ```
    • 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> arn()  
      com.pulumi.core.Output<java.lang.String> createdBy()  
      com.pulumi.core.Output<java.lang.Boolean> deletionProtected()  
      static ReplicationSet get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ReplicationSetState 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> lastModifiedBy()  
      com.pulumi.core.Output<java.util.List<ReplicationSetRegion>> region()  
      com.pulumi.core.Output<java.util.List<ReplicationSetRegion>> regions()  
      com.pulumi.core.Output<java.lang.String> status()  
      com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()  
      com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()  
      • 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

      • ReplicationSet

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

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

        public ReplicationSet​(java.lang.String name,
                              @Nullable
                              ReplicationSetArgs 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

      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        The ARN of the replication set.
      • createdBy

        public com.pulumi.core.Output<java.lang.String> createdBy()
        Returns:
        The ARN of the user who created the replication set.
      • deletionProtected

        public com.pulumi.core.Output<java.lang.Boolean> deletionProtected()
        Returns:
        If `true`, the last region in a replication set cannot be deleted.
      • lastModifiedBy

        public com.pulumi.core.Output<java.lang.String> lastModifiedBy()
        Returns:
        A timestamp showing when the replication set was last modified.
      • region

        public com.pulumi.core.Output<java.util.List<ReplicationSetRegion>> region()
        Returns:
        The replication set's Regions. Use `regions` instead.
      • regions

        public com.pulumi.core.Output<java.util.List<ReplicationSetRegion>> regions()
        Returns:
        The replication set's Regions.
      • status

        public com.pulumi.core.Output<java.lang.String> status()
        Returns:
        The current status of the Region. * Valid Values: `ACTIVE` | `CREATING` | `UPDATING` | `DELETING` | `FAILED`
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. For information about the maximum allowed number of Regions and tag value constraints, see [CreateReplicationSet in the *AWS Systems Manager Incident Manager API Reference*](https://docs.aws.amazon.com/incident-manager/latest/APIReference/API_CreateReplicationSet.html). > **NOTE:** The Region specified by a provider must always be one of the Regions specified for the replication set. This is especially important when you perform complex update operations. > **NOTE:** After a replication set is created, you can add or delete only one Region at a time. > **NOTE:** Incident Manager does not support updating the customer managed key associated with a replication set. Instead, for a replication set with multiple Regions, you must first delete a Region from the replication set, then re-add it with a different customer managed key in separate deploy operations. For a replication set with only one Region, the entire replication set must be deleted and recreated. To do this, comment out the replication set and all response plans, and then run the deploy command to recreate the replication set with the new customer managed key. > **NOTE:** You must either use AWS-owned keys on all regions of a replication set, or customer managed keys. To change between an AWS owned key and a customer managed key, a replication set and it associated data must be deleted and recreated. > **NOTE:** If possible, create all the customer managed keys you need (using the deploy command) before you create the replication set, or create the keys and replication set in the same deploy command. Otherwise, to delete a replication set, you must run one deploy command to delete the replication set and another to delete the AWS KMS keys used by the replication set. Deleting the AWS KMS keys before deleting the replication set results in an error. In that case, you must manually reenable the deleted key using the AWS Management Console before you can delete the replication set.
      • tagsAll

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()
        Returns:
        A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
      • get

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