@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
177 lines • 9.05 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.ReplicationConfigurationTemplate = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides an Elastic Disaster Recovery replication configuration template resource. Before using DRS, your account must be [initialized](https://docs.aws.amazon.com/drs/latest/userguide/getting-started-initializing.html).
*
* > **NOTE:** Your configuration must use the PIT policy shown in the basic configuration due to AWS rules. The only value that you can change is the `retentionDuration` of `ruleId` 3.
*
* ## Example Usage
*
* ### Basic configuration
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.drs.ReplicationConfigurationTemplate("example", {
* associateDefaultSecurityGroup: false,
* bandwidthThrottling: 12,
* createPublicIp: false,
* dataPlaneRouting: "PRIVATE_IP",
* defaultLargeStagingDiskType: "GP2",
* ebsEncryption: "DEFAULT",
* ebsEncryptionKeyArn: "arn:aws:kms:us-east-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
* replicationServerInstanceType: "t3.small",
* replicationServersSecurityGroupsIds: exampleAwsSecurityGroup.map(__item => __item.id),
* stagingAreaSubnetId: exampleAwsSubnet.id,
* useDedicatedReplicationServer: false,
* pitPolicies: [
* {
* enabled: true,
* interval: 10,
* retentionDuration: 60,
* units: "MINUTE",
* ruleId: 1,
* },
* {
* enabled: true,
* interval: 1,
* retentionDuration: 24,
* units: "HOUR",
* ruleId: 2,
* },
* {
* enabled: true,
* interval: 1,
* retentionDuration: 3,
* units: "DAY",
* ruleId: 3,
* },
* ],
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import DRS Replication Configuration Template using the `id`. For example:
*
* ```sh
* $ pulumi import aws:drs/replicationConfigurationTemplate:ReplicationConfigurationTemplate example templateid
* ```
*/
class ReplicationConfigurationTemplate extends pulumi.CustomResource {
/**
* Get an existing ReplicationConfigurationTemplate 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 ReplicationConfigurationTemplate(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ReplicationConfigurationTemplate. 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'] === ReplicationConfigurationTemplate.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["associateDefaultSecurityGroup"] = state?.associateDefaultSecurityGroup;
resourceInputs["autoReplicateNewDisks"] = state?.autoReplicateNewDisks;
resourceInputs["bandwidthThrottling"] = state?.bandwidthThrottling;
resourceInputs["createPublicIp"] = state?.createPublicIp;
resourceInputs["dataPlaneRouting"] = state?.dataPlaneRouting;
resourceInputs["defaultLargeStagingDiskType"] = state?.defaultLargeStagingDiskType;
resourceInputs["ebsEncryption"] = state?.ebsEncryption;
resourceInputs["ebsEncryptionKeyArn"] = state?.ebsEncryptionKeyArn;
resourceInputs["pitPolicies"] = state?.pitPolicies;
resourceInputs["region"] = state?.region;
resourceInputs["replicationServerInstanceType"] = state?.replicationServerInstanceType;
resourceInputs["replicationServersSecurityGroupsIds"] = state?.replicationServersSecurityGroupsIds;
resourceInputs["stagingAreaSubnetId"] = state?.stagingAreaSubnetId;
resourceInputs["stagingAreaTags"] = state?.stagingAreaTags;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["timeouts"] = state?.timeouts;
resourceInputs["useDedicatedReplicationServer"] = state?.useDedicatedReplicationServer;
}
else {
const args = argsOrState;
if (args?.associateDefaultSecurityGroup === undefined && !opts.urn) {
throw new Error("Missing required property 'associateDefaultSecurityGroup'");
}
if (args?.bandwidthThrottling === undefined && !opts.urn) {
throw new Error("Missing required property 'bandwidthThrottling'");
}
if (args?.createPublicIp === undefined && !opts.urn) {
throw new Error("Missing required property 'createPublicIp'");
}
if (args?.dataPlaneRouting === undefined && !opts.urn) {
throw new Error("Missing required property 'dataPlaneRouting'");
}
if (args?.defaultLargeStagingDiskType === undefined && !opts.urn) {
throw new Error("Missing required property 'defaultLargeStagingDiskType'");
}
if (args?.ebsEncryption === undefined && !opts.urn) {
throw new Error("Missing required property 'ebsEncryption'");
}
if (args?.replicationServerInstanceType === undefined && !opts.urn) {
throw new Error("Missing required property 'replicationServerInstanceType'");
}
if (args?.replicationServersSecurityGroupsIds === undefined && !opts.urn) {
throw new Error("Missing required property 'replicationServersSecurityGroupsIds'");
}
if (args?.stagingAreaSubnetId === undefined && !opts.urn) {
throw new Error("Missing required property 'stagingAreaSubnetId'");
}
if (args?.stagingAreaTags === undefined && !opts.urn) {
throw new Error("Missing required property 'stagingAreaTags'");
}
if (args?.useDedicatedReplicationServer === undefined && !opts.urn) {
throw new Error("Missing required property 'useDedicatedReplicationServer'");
}
resourceInputs["associateDefaultSecurityGroup"] = args?.associateDefaultSecurityGroup;
resourceInputs["autoReplicateNewDisks"] = args?.autoReplicateNewDisks;
resourceInputs["bandwidthThrottling"] = args?.bandwidthThrottling;
resourceInputs["createPublicIp"] = args?.createPublicIp;
resourceInputs["dataPlaneRouting"] = args?.dataPlaneRouting;
resourceInputs["defaultLargeStagingDiskType"] = args?.defaultLargeStagingDiskType;
resourceInputs["ebsEncryption"] = args?.ebsEncryption;
resourceInputs["ebsEncryptionKeyArn"] = args?.ebsEncryptionKeyArn;
resourceInputs["pitPolicies"] = args?.pitPolicies;
resourceInputs["region"] = args?.region;
resourceInputs["replicationServerInstanceType"] = args?.replicationServerInstanceType;
resourceInputs["replicationServersSecurityGroupsIds"] = args?.replicationServersSecurityGroupsIds;
resourceInputs["stagingAreaSubnetId"] = args?.stagingAreaSubnetId;
resourceInputs["stagingAreaTags"] = args?.stagingAreaTags;
resourceInputs["tags"] = args?.tags;
resourceInputs["timeouts"] = args?.timeouts;
resourceInputs["useDedicatedReplicationServer"] = args?.useDedicatedReplicationServer;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ReplicationConfigurationTemplate.__pulumiType, name, resourceInputs, opts);
}
}
exports.ReplicationConfigurationTemplate = ReplicationConfigurationTemplate;
/** @internal */
ReplicationConfigurationTemplate.__pulumiType = 'aws:drs/replicationConfigurationTemplate:ReplicationConfigurationTemplate';
//# sourceMappingURL=replicationConfigurationTemplate.js.map