UNPKG

@pulumi/aws

Version:

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

128 lines 6.31 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, { ...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?.allocatedStorage; resourceInputs["copyTags"] = state?.copyTags; resourceInputs["dbClusterSnapshotArn"] = state?.dbClusterSnapshotArn; resourceInputs["destinationRegion"] = state?.destinationRegion; resourceInputs["engine"] = state?.engine; resourceInputs["engineVersion"] = state?.engineVersion; resourceInputs["kmsKeyId"] = state?.kmsKeyId; resourceInputs["licenseModel"] = state?.licenseModel; resourceInputs["presignedUrl"] = state?.presignedUrl; resourceInputs["region"] = state?.region; resourceInputs["sharedAccounts"] = state?.sharedAccounts; resourceInputs["snapshotType"] = state?.snapshotType; resourceInputs["sourceDbClusterSnapshotIdentifier"] = state?.sourceDbClusterSnapshotIdentifier; resourceInputs["storageEncrypted"] = state?.storageEncrypted; resourceInputs["storageType"] = state?.storageType; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["targetDbClusterSnapshotIdentifier"] = state?.targetDbClusterSnapshotIdentifier; resourceInputs["timeouts"] = state?.timeouts; resourceInputs["vpcId"] = state?.vpcId; } else { const args = argsOrState; if (args?.sourceDbClusterSnapshotIdentifier === undefined && !opts.urn) { throw new Error("Missing required property 'sourceDbClusterSnapshotIdentifier'"); } if (args?.targetDbClusterSnapshotIdentifier === undefined && !opts.urn) { throw new Error("Missing required property 'targetDbClusterSnapshotIdentifier'"); } resourceInputs["copyTags"] = args?.copyTags; resourceInputs["destinationRegion"] = args?.destinationRegion; resourceInputs["kmsKeyId"] = args?.kmsKeyId; resourceInputs["presignedUrl"] = args?.presignedUrl; resourceInputs["region"] = args?.region; resourceInputs["sharedAccounts"] = args?.sharedAccounts; resourceInputs["sourceDbClusterSnapshotIdentifier"] = args?.sourceDbClusterSnapshotIdentifier; resourceInputs["tags"] = args?.tags; resourceInputs["targetDbClusterSnapshotIdentifier"] = args?.targetDbClusterSnapshotIdentifier; resourceInputs["timeouts"] = args?.timeouts; 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