UNPKG

@pulumi/aws

Version:

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

177 lines • 9.85 kB
"use strict"; // *** 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, Object.assign(Object.assign({}, 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 ? state.arn : undefined; resourceInputs["associateDefaultSecurityGroup"] = state ? state.associateDefaultSecurityGroup : undefined; resourceInputs["autoReplicateNewDisks"] = state ? state.autoReplicateNewDisks : undefined; resourceInputs["bandwidthThrottling"] = state ? state.bandwidthThrottling : undefined; resourceInputs["createPublicIp"] = state ? state.createPublicIp : undefined; resourceInputs["dataPlaneRouting"] = state ? state.dataPlaneRouting : undefined; resourceInputs["defaultLargeStagingDiskType"] = state ? state.defaultLargeStagingDiskType : undefined; resourceInputs["ebsEncryption"] = state ? state.ebsEncryption : undefined; resourceInputs["ebsEncryptionKeyArn"] = state ? state.ebsEncryptionKeyArn : undefined; resourceInputs["pitPolicies"] = state ? state.pitPolicies : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["replicationServerInstanceType"] = state ? state.replicationServerInstanceType : undefined; resourceInputs["replicationServersSecurityGroupsIds"] = state ? state.replicationServersSecurityGroupsIds : undefined; resourceInputs["stagingAreaSubnetId"] = state ? state.stagingAreaSubnetId : undefined; resourceInputs["stagingAreaTags"] = state ? state.stagingAreaTags : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["timeouts"] = state ? state.timeouts : undefined; resourceInputs["useDedicatedReplicationServer"] = state ? state.useDedicatedReplicationServer : undefined; } else { const args = argsOrState; if ((!args || args.associateDefaultSecurityGroup === undefined) && !opts.urn) { throw new Error("Missing required property 'associateDefaultSecurityGroup'"); } if ((!args || args.bandwidthThrottling === undefined) && !opts.urn) { throw new Error("Missing required property 'bandwidthThrottling'"); } if ((!args || args.createPublicIp === undefined) && !opts.urn) { throw new Error("Missing required property 'createPublicIp'"); } if ((!args || args.dataPlaneRouting === undefined) && !opts.urn) { throw new Error("Missing required property 'dataPlaneRouting'"); } if ((!args || args.defaultLargeStagingDiskType === undefined) && !opts.urn) { throw new Error("Missing required property 'defaultLargeStagingDiskType'"); } if ((!args || args.ebsEncryption === undefined) && !opts.urn) { throw new Error("Missing required property 'ebsEncryption'"); } if ((!args || args.replicationServerInstanceType === undefined) && !opts.urn) { throw new Error("Missing required property 'replicationServerInstanceType'"); } if ((!args || args.replicationServersSecurityGroupsIds === undefined) && !opts.urn) { throw new Error("Missing required property 'replicationServersSecurityGroupsIds'"); } if ((!args || args.stagingAreaSubnetId === undefined) && !opts.urn) { throw new Error("Missing required property 'stagingAreaSubnetId'"); } if ((!args || args.stagingAreaTags === undefined) && !opts.urn) { throw new Error("Missing required property 'stagingAreaTags'"); } if ((!args || args.useDedicatedReplicationServer === undefined) && !opts.urn) { throw new Error("Missing required property 'useDedicatedReplicationServer'"); } resourceInputs["associateDefaultSecurityGroup"] = args ? args.associateDefaultSecurityGroup : undefined; resourceInputs["autoReplicateNewDisks"] = args ? args.autoReplicateNewDisks : undefined; resourceInputs["bandwidthThrottling"] = args ? args.bandwidthThrottling : undefined; resourceInputs["createPublicIp"] = args ? args.createPublicIp : undefined; resourceInputs["dataPlaneRouting"] = args ? args.dataPlaneRouting : undefined; resourceInputs["defaultLargeStagingDiskType"] = args ? args.defaultLargeStagingDiskType : undefined; resourceInputs["ebsEncryption"] = args ? args.ebsEncryption : undefined; resourceInputs["ebsEncryptionKeyArn"] = args ? args.ebsEncryptionKeyArn : undefined; resourceInputs["pitPolicies"] = args ? args.pitPolicies : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["replicationServerInstanceType"] = args ? args.replicationServerInstanceType : undefined; resourceInputs["replicationServersSecurityGroupsIds"] = args ? args.replicationServersSecurityGroupsIds : undefined; resourceInputs["stagingAreaSubnetId"] = args ? args.stagingAreaSubnetId : undefined; resourceInputs["stagingAreaTags"] = args ? args.stagingAreaTags : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["timeouts"] = args ? args.timeouts : undefined; resourceInputs["useDedicatedReplicationServer"] = args ? args.useDedicatedReplicationServer : undefined; 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