UNPKG

@pulumi/aws

Version:

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

128 lines 6.92 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.ClusterSnapshotCopy = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages an RDS database cluster snapshot copy. For managing RDS database instance snapshot copies, see the `aws.rds.SnapshotCopy` resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.rds.Cluster("example", { * clusterIdentifier: "aurora-cluster-demo", * databaseName: "test", * engine: aws.rds.EngineType.AuroraMysql, * masterUsername: "tfacctest", * masterPassword: "avoid-plaintext-passwords", * skipFinalSnapshot: true, * }); * const exampleClusterSnapshot = new aws.rds.ClusterSnapshot("example", { * dbClusterIdentifier: example.clusterIdentifier, * dbClusterSnapshotIdentifier: "example", * }); * const exampleClusterSnapshotCopy = new aws.rds.ClusterSnapshotCopy("example", { * sourceDbClusterSnapshotIdentifier: exampleClusterSnapshot.dbClusterSnapshotArn, * targetDbClusterSnapshotIdentifier: "example-copy", * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_rds_cluster_snapshot_copy` using the `id`. For example: * * ```sh * $ pulumi import aws:rds/clusterSnapshotCopy:ClusterSnapshotCopy example my-snapshot * ``` */ class ClusterSnapshotCopy extends pulumi.CustomResource { /** * Get an existing ClusterSnapshotCopy 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 ClusterSnapshotCopy(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ClusterSnapshotCopy. 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'] === ClusterSnapshotCopy.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["allocatedStorage"] = state ? state.allocatedStorage : undefined; resourceInputs["copyTags"] = state ? state.copyTags : undefined; resourceInputs["dbClusterSnapshotArn"] = state ? state.dbClusterSnapshotArn : undefined; resourceInputs["destinationRegion"] = state ? state.destinationRegion : undefined; resourceInputs["engine"] = state ? state.engine : undefined; resourceInputs["engineVersion"] = state ? state.engineVersion : undefined; resourceInputs["kmsKeyId"] = state ? state.kmsKeyId : undefined; resourceInputs["licenseModel"] = state ? state.licenseModel : undefined; resourceInputs["presignedUrl"] = state ? state.presignedUrl : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["sharedAccounts"] = state ? state.sharedAccounts : undefined; resourceInputs["snapshotType"] = state ? state.snapshotType : undefined; resourceInputs["sourceDbClusterSnapshotIdentifier"] = state ? state.sourceDbClusterSnapshotIdentifier : undefined; resourceInputs["storageEncrypted"] = state ? state.storageEncrypted : undefined; resourceInputs["storageType"] = state ? state.storageType : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["targetDbClusterSnapshotIdentifier"] = state ? state.targetDbClusterSnapshotIdentifier : undefined; resourceInputs["timeouts"] = state ? state.timeouts : undefined; resourceInputs["vpcId"] = state ? state.vpcId : undefined; } else { const args = argsOrState; if ((!args || args.sourceDbClusterSnapshotIdentifier === undefined) && !opts.urn) { throw new Error("Missing required property 'sourceDbClusterSnapshotIdentifier'"); } if ((!args || args.targetDbClusterSnapshotIdentifier === undefined) && !opts.urn) { throw new Error("Missing required property 'targetDbClusterSnapshotIdentifier'"); } resourceInputs["copyTags"] = args ? args.copyTags : undefined; resourceInputs["destinationRegion"] = args ? args.destinationRegion : undefined; resourceInputs["kmsKeyId"] = args ? args.kmsKeyId : undefined; resourceInputs["presignedUrl"] = args ? args.presignedUrl : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["sharedAccounts"] = args ? args.sharedAccounts : undefined; resourceInputs["sourceDbClusterSnapshotIdentifier"] = args ? args.sourceDbClusterSnapshotIdentifier : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["targetDbClusterSnapshotIdentifier"] = args ? args.targetDbClusterSnapshotIdentifier : undefined; resourceInputs["timeouts"] = args ? args.timeouts : undefined; resourceInputs["allocatedStorage"] = undefined /*out*/; resourceInputs["dbClusterSnapshotArn"] = undefined /*out*/; resourceInputs["engine"] = undefined /*out*/; resourceInputs["engineVersion"] = undefined /*out*/; resourceInputs["licenseModel"] = undefined /*out*/; resourceInputs["snapshotType"] = undefined /*out*/; resourceInputs["storageEncrypted"] = undefined /*out*/; resourceInputs["storageType"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["vpcId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ClusterSnapshotCopy.__pulumiType, name, resourceInputs, opts); } } exports.ClusterSnapshotCopy = ClusterSnapshotCopy; /** @internal */ ClusterSnapshotCopy.__pulumiType = 'aws:rds/clusterSnapshotCopy:ClusterSnapshotCopy'; //# sourceMappingURL=clusterSnapshotCopy.js.map