@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
114 lines • 5.52 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.ClusterSnapshot = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages an RDS database cluster snapshot for Aurora clusters. For managing RDS database instance snapshots, see the `aws.rds.Snapshot` resource.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.rds.ClusterSnapshot("example", {
* dbClusterIdentifier: exampleAwsRdsCluster.id,
* dbClusterSnapshotIdentifier: "resourcetestsnapshot1234",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `aws_db_cluster_snapshot` using the cluster snapshot identifier. For example:
*
* ```sh
* $ pulumi import aws:rds/clusterSnapshot:ClusterSnapshot example my-cluster-snapshot
* ```
*/
class ClusterSnapshot extends pulumi.CustomResource {
/**
* Get an existing ClusterSnapshot 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 ClusterSnapshot(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ClusterSnapshot. 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'] === ClusterSnapshot.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["allocatedStorage"] = state?.allocatedStorage;
resourceInputs["availabilityZones"] = state?.availabilityZones;
resourceInputs["dbClusterIdentifier"] = state?.dbClusterIdentifier;
resourceInputs["dbClusterSnapshotArn"] = state?.dbClusterSnapshotArn;
resourceInputs["dbClusterSnapshotIdentifier"] = state?.dbClusterSnapshotIdentifier;
resourceInputs["engine"] = state?.engine;
resourceInputs["engineVersion"] = state?.engineVersion;
resourceInputs["kmsKeyId"] = state?.kmsKeyId;
resourceInputs["licenseModel"] = state?.licenseModel;
resourceInputs["port"] = state?.port;
resourceInputs["region"] = state?.region;
resourceInputs["sharedAccounts"] = state?.sharedAccounts;
resourceInputs["snapshotType"] = state?.snapshotType;
resourceInputs["sourceDbClusterSnapshotArn"] = state?.sourceDbClusterSnapshotArn;
resourceInputs["status"] = state?.status;
resourceInputs["storageEncrypted"] = state?.storageEncrypted;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["vpcId"] = state?.vpcId;
}
else {
const args = argsOrState;
if (args?.dbClusterIdentifier === undefined && !opts.urn) {
throw new Error("Missing required property 'dbClusterIdentifier'");
}
if (args?.dbClusterSnapshotIdentifier === undefined && !opts.urn) {
throw new Error("Missing required property 'dbClusterSnapshotIdentifier'");
}
resourceInputs["dbClusterIdentifier"] = args?.dbClusterIdentifier;
resourceInputs["dbClusterSnapshotIdentifier"] = args?.dbClusterSnapshotIdentifier;
resourceInputs["region"] = args?.region;
resourceInputs["sharedAccounts"] = args?.sharedAccounts;
resourceInputs["tags"] = args?.tags;
resourceInputs["allocatedStorage"] = undefined /*out*/;
resourceInputs["availabilityZones"] = undefined /*out*/;
resourceInputs["dbClusterSnapshotArn"] = undefined /*out*/;
resourceInputs["engine"] = undefined /*out*/;
resourceInputs["engineVersion"] = undefined /*out*/;
resourceInputs["kmsKeyId"] = undefined /*out*/;
resourceInputs["licenseModel"] = undefined /*out*/;
resourceInputs["port"] = undefined /*out*/;
resourceInputs["snapshotType"] = undefined /*out*/;
resourceInputs["sourceDbClusterSnapshotArn"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["storageEncrypted"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
resourceInputs["vpcId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ClusterSnapshot.__pulumiType, name, resourceInputs, opts);
}
}
exports.ClusterSnapshot = ClusterSnapshot;
/** @internal */
ClusterSnapshot.__pulumiType = 'aws:rds/clusterSnapshot:ClusterSnapshot';
//# sourceMappingURL=clusterSnapshot.js.map
;