UNPKG

@pulumi/aws

Version:

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

98 lines 4.07 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.getClusterSnapshotOutput = exports.getClusterSnapshot = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Use this data source to get information about a DB Cluster Snapshot for use when provisioning DB clusters. * * > **NOTE:** This data source does not apply to snapshots created on DB Instances. * See the `aws.rds.Snapshot` data source for DB Instance snapshots. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const developmentFinalSnapshot = aws.rds.getClusterSnapshot({ * dbClusterIdentifier: "development_cluster", * mostRecent: true, * }); * // Use the last snapshot of the dev database before it was destroyed to create * // a new dev database. * const aurora = new aws.rds.Cluster("aurora", { * clusterIdentifier: "development_cluster", * snapshotIdentifier: developmentFinalSnapshot.then(developmentFinalSnapshot => developmentFinalSnapshot.id), * dbSubnetGroupName: "my_db_subnet_group", * }); * const auroraClusterInstance = new aws.rds.ClusterInstance("aurora", { * clusterIdentifier: aurora.id, * instanceClass: aws.rds.InstanceType.T2_Small, * dbSubnetGroupName: "my_db_subnet_group", * }); * ``` */ function getClusterSnapshot(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("aws:rds/getClusterSnapshot:getClusterSnapshot", { "dbClusterIdentifier": args.dbClusterIdentifier, "dbClusterSnapshotIdentifier": args.dbClusterSnapshotIdentifier, "includePublic": args.includePublic, "includeShared": args.includeShared, "mostRecent": args.mostRecent, "region": args.region, "snapshotType": args.snapshotType, "tags": args.tags, }, opts); } exports.getClusterSnapshot = getClusterSnapshot; /** * Use this data source to get information about a DB Cluster Snapshot for use when provisioning DB clusters. * * > **NOTE:** This data source does not apply to snapshots created on DB Instances. * See the `aws.rds.Snapshot` data source for DB Instance snapshots. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const developmentFinalSnapshot = aws.rds.getClusterSnapshot({ * dbClusterIdentifier: "development_cluster", * mostRecent: true, * }); * // Use the last snapshot of the dev database before it was destroyed to create * // a new dev database. * const aurora = new aws.rds.Cluster("aurora", { * clusterIdentifier: "development_cluster", * snapshotIdentifier: developmentFinalSnapshot.then(developmentFinalSnapshot => developmentFinalSnapshot.id), * dbSubnetGroupName: "my_db_subnet_group", * }); * const auroraClusterInstance = new aws.rds.ClusterInstance("aurora", { * clusterIdentifier: aurora.id, * instanceClass: aws.rds.InstanceType.T2_Small, * dbSubnetGroupName: "my_db_subnet_group", * }); * ``` */ function getClusterSnapshotOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("aws:rds/getClusterSnapshot:getClusterSnapshot", { "dbClusterIdentifier": args.dbClusterIdentifier, "dbClusterSnapshotIdentifier": args.dbClusterSnapshotIdentifier, "includePublic": args.includePublic, "includeShared": args.includeShared, "mostRecent": args.mostRecent, "region": args.region, "snapshotType": args.snapshotType, "tags": args.tags, }, opts); } exports.getClusterSnapshotOutput = getClusterSnapshotOutput; //# sourceMappingURL=getClusterSnapshot.js.map