@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
145 lines • 5.2 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReplicationSet = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* 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
* ```
*/
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, id, state, opts) {
return new ReplicationSet(name, state, { ...opts, id: id });
}
/**
* 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) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === ReplicationSet.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["createdBy"] = state?.createdBy;
resourceInputs["deletionProtected"] = state?.deletionProtected;
resourceInputs["lastModifiedBy"] = state?.lastModifiedBy;
resourceInputs["region"] = state?.region;
resourceInputs["regions"] = state?.regions;
resourceInputs["status"] = state?.status;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
resourceInputs["region"] = args?.region;
resourceInputs["regions"] = args?.regions;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["createdBy"] = undefined /*out*/;
resourceInputs["deletionProtected"] = undefined /*out*/;
resourceInputs["lastModifiedBy"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ReplicationSet.__pulumiType, name, resourceInputs, opts);
}
}
exports.ReplicationSet = ReplicationSet;
/** @internal */
ReplicationSet.__pulumiType = 'aws:ssmincidents/replicationSet:ReplicationSet';
//# sourceMappingURL=replicationSet.js.map