UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

257 lines (256 loc) • 13.8 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * 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. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const replicationSetName = new aws.ssmincidents.ReplicationSet("replicationSetName", { * regions: [{ * name: "us-west-2", * }], * tags: { * exampleTag: "exampleValue", * }, * }); * ``` * * Add a Region to a replication set. (You can add only one Region at a time.) * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const replicationSetName = new aws.ssmincidents.ReplicationSet("replicationSetName", {regions: [ * { * name: "us-west-2", * }, * { * name: "ap-southeast-2", * }, * ]}); * ``` * * Delete a Region from a replication set. (You can delete only one Region at a time.) * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const replicationSetName = new aws.ssmincidents.ReplicationSet("replicationSetName", {regions: [{ * name: "us-west-2", * }]}); * ``` * * ## Basic Usage with an AWS Customer Managed Key * * Create a replication set with an AWS Key Management Service (AWS KMS) customer manager key: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const exampleKey = new aws.kms.Key("example_key", {}); * const replicationSetName = new aws.ssmincidents.ReplicationSet("replicationSetName", { * regions: [{ * name: "us-west-2", * kmsKeyArn: exampleKey.arn, * }], * tags: { * exampleTag: "exampleValue", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import an Incident Manager replication. For example: * * ```sh * $ pulumi import aws:ssmincidents/replicationSet:ReplicationSet replicationSetName import * ``` */ export declare class ReplicationSet extends pulumi.CustomResource { /** * Get an existing ReplicationSet 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?: ReplicationSetState, opts?: pulumi.CustomResourceOptions): ReplicationSet; /** * Returns true if the given object is an instance of ReplicationSet. 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 ReplicationSet; /** * The ARN of the replication set. */ readonly arn: pulumi.Output<string>; /** * The ARN of the user who created the replication set. */ readonly createdBy: pulumi.Output<string>; /** * If `true`, the last region in a replication set cannot be deleted. */ readonly deletionProtected: pulumi.Output<boolean>; /** * A timestamp showing when the replication set was last modified. */ readonly lastModifiedBy: pulumi.Output<string>; /** * The replication set's Regions. Use `regions` instead. * * @deprecated region is deprecated. Use regions instead. */ readonly region: pulumi.Output<outputs.ssmincidents.ReplicationSetRegion[]>; /** * The replication set's Regions. */ readonly regions: pulumi.Output<outputs.ssmincidents.ReplicationSetRegion[]>; /** * The current status of the Region. * * Valid Values: `ACTIVE` | `CREATING` | `UPDATING` | `DELETING` | `FAILED` */ readonly status: pulumi.Output<string>; /** * 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. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Create a ReplicationSet 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?: ReplicationSetArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ReplicationSet resources. */ export interface ReplicationSetState { /** * The ARN of the replication set. */ arn?: pulumi.Input<string>; /** * The ARN of the user who created the replication set. */ createdBy?: pulumi.Input<string>; /** * If `true`, the last region in a replication set cannot be deleted. */ deletionProtected?: pulumi.Input<boolean>; /** * A timestamp showing when the replication set was last modified. */ lastModifiedBy?: pulumi.Input<string>; /** * The replication set's Regions. Use `regions` instead. * * @deprecated region is deprecated. Use regions instead. */ region?: pulumi.Input<pulumi.Input<inputs.ssmincidents.ReplicationSetRegion>[]>; /** * The replication set's Regions. */ regions?: pulumi.Input<pulumi.Input<inputs.ssmincidents.ReplicationSetRegion>[]>; /** * The current status of the Region. * * Valid Values: `ACTIVE` | `CREATING` | `UPDATING` | `DELETING` | `FAILED` */ status?: pulumi.Input<string>; /** * 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. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; } /** * The set of arguments for constructing a ReplicationSet resource. */ export interface ReplicationSetArgs { /** * The replication set's Regions. Use `regions` instead. * * @deprecated region is deprecated. Use regions instead. */ region?: pulumi.Input<pulumi.Input<inputs.ssmincidents.ReplicationSetRegion>[]>; /** * The replication set's Regions. */ regions?: pulumi.Input<pulumi.Input<inputs.ssmincidents.ReplicationSetRegion>[]>; /** * 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. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; }