UNPKG

@pulumi/aws

Version:

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

104 lines 5.21 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.ClusterSnapshot = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a DocumentDB database cluster snapshot for DocumentDB clusters. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.docdb.ClusterSnapshot("example", { * dbClusterIdentifier: exampleAwsDocdbCluster.id, * dbClusterSnapshotIdentifier: "resourcetestsnapshot1234", * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_docdb_cluster_snapshot` using the cluster snapshot identifier. For example: * * ```sh * $ pulumi import aws:docdb/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, Object.assign(Object.assign({}, 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["availabilityZones"] = state ? state.availabilityZones : undefined; resourceInputs["dbClusterIdentifier"] = state ? state.dbClusterIdentifier : undefined; resourceInputs["dbClusterSnapshotArn"] = state ? state.dbClusterSnapshotArn : undefined; resourceInputs["dbClusterSnapshotIdentifier"] = state ? state.dbClusterSnapshotIdentifier : undefined; resourceInputs["engine"] = state ? state.engine : undefined; resourceInputs["engineVersion"] = state ? state.engineVersion : undefined; resourceInputs["kmsKeyId"] = state ? state.kmsKeyId : undefined; resourceInputs["port"] = state ? state.port : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["snapshotType"] = state ? state.snapshotType : undefined; resourceInputs["sourceDbClusterSnapshotArn"] = state ? state.sourceDbClusterSnapshotArn : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["storageEncrypted"] = state ? state.storageEncrypted : undefined; resourceInputs["vpcId"] = state ? state.vpcId : undefined; } else { const args = argsOrState; if ((!args || args.dbClusterIdentifier === undefined) && !opts.urn) { throw new Error("Missing required property 'dbClusterIdentifier'"); } if ((!args || args.dbClusterSnapshotIdentifier === undefined) && !opts.urn) { throw new Error("Missing required property 'dbClusterSnapshotIdentifier'"); } resourceInputs["dbClusterIdentifier"] = args ? args.dbClusterIdentifier : undefined; resourceInputs["dbClusterSnapshotIdentifier"] = args ? args.dbClusterSnapshotIdentifier : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["availabilityZones"] = undefined /*out*/; resourceInputs["dbClusterSnapshotArn"] = undefined /*out*/; resourceInputs["engine"] = undefined /*out*/; resourceInputs["engineVersion"] = undefined /*out*/; resourceInputs["kmsKeyId"] = undefined /*out*/; resourceInputs["port"] = undefined /*out*/; resourceInputs["snapshotType"] = undefined /*out*/; resourceInputs["sourceDbClusterSnapshotArn"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["storageEncrypted"] = 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:docdb/clusterSnapshot:ClusterSnapshot'; //# sourceMappingURL=clusterSnapshot.js.map