@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
228 lines (227 loc) • 8.5 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* 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",
* });
* ```
*/
export declare function getClusterSnapshot(args?: GetClusterSnapshotArgs, opts?: pulumi.InvokeOptions): Promise<GetClusterSnapshotResult>;
/**
* A collection of arguments for invoking getClusterSnapshot.
*/
export interface GetClusterSnapshotArgs {
/**
* Returns the list of snapshots created by the specific db_cluster
*/
dbClusterIdentifier?: string;
/**
* Returns information on a specific snapshot_id.
*/
dbClusterSnapshotIdentifier?: string;
/**
* Set this value to true to include manual DB Cluster Snapshots that are public and can be
* copied or restored by any AWS account, otherwise set this value to false. The default is `false`.
*/
includePublic?: boolean;
/**
* Set this value to true to include shared manual DB Cluster Snapshots from other
* AWS accounts that this AWS account has been given permission to copy or restore, otherwise set this value to false.
* The default is `false`.
*/
includeShared?: boolean;
/**
* If more than one result is returned, use the most recent Snapshot.
*/
mostRecent?: boolean;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: string;
/**
* Type of snapshots to be returned. If you don't specify a SnapshotType
* value, then both automated and manual DB cluster snapshots are returned. Shared and public DB Cluster Snapshots are not
* included in the returned results by default. Possible values are, `automated`, `manual`, `shared`, `public` and `awsbackup`.
*/
snapshotType?: string;
/**
* Mapping of tags, each pair of which must exactly match
* a pair on the desired DB cluster snapshot.
*/
tags?: {
[key: string]: string;
};
}
/**
* A collection of values returned by getClusterSnapshot.
*/
export interface GetClusterSnapshotResult {
/**
* Allocated storage size in gigabytes (GB).
*/
readonly allocatedStorage: number;
/**
* List of EC2 Availability Zones that instances in the DB cluster snapshot can be restored in.
*/
readonly availabilityZones: string[];
/**
* Specifies the DB cluster identifier of the DB cluster that this DB cluster snapshot was created from.
*/
readonly dbClusterIdentifier?: string;
/**
* The ARN for the DB Cluster Snapshot.
*/
readonly dbClusterSnapshotArn: string;
readonly dbClusterSnapshotIdentifier?: string;
/**
* Name of the database engine.
*/
readonly engine: string;
/**
* Version of the database engine for this DB cluster snapshot.
*/
readonly engineVersion: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly includePublic?: boolean;
readonly includeShared?: boolean;
/**
* If storageEncrypted is true, the AWS KMS key identifier for the encrypted DB cluster snapshot.
*/
readonly kmsKeyId: string;
/**
* License model information for the restored DB cluster.
*/
readonly licenseModel: string;
readonly mostRecent?: boolean;
/**
* Port that the DB cluster was listening on at the time of the snapshot.
*/
readonly port: number;
readonly region: string;
/**
* Time when the snapshot was taken, in Universal Coordinated Time (UTC).
*/
readonly snapshotCreateTime: string;
readonly snapshotType?: string;
readonly sourceDbClusterSnapshotArn: string;
/**
* Status of this DB Cluster Snapshot.
*/
readonly status: string;
/**
* Whether the DB cluster snapshot is encrypted.
*/
readonly storageEncrypted: boolean;
/**
* Map of tags for the resource.
*/
readonly tags: {
[key: string]: string;
};
/**
* VPC ID associated with the DB cluster snapshot.
*/
readonly vpcId: string;
}
/**
* 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",
* });
* ```
*/
export declare function getClusterSnapshotOutput(args?: GetClusterSnapshotOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetClusterSnapshotResult>;
/**
* A collection of arguments for invoking getClusterSnapshot.
*/
export interface GetClusterSnapshotOutputArgs {
/**
* Returns the list of snapshots created by the specific db_cluster
*/
dbClusterIdentifier?: pulumi.Input<string>;
/**
* Returns information on a specific snapshot_id.
*/
dbClusterSnapshotIdentifier?: pulumi.Input<string>;
/**
* Set this value to true to include manual DB Cluster Snapshots that are public and can be
* copied or restored by any AWS account, otherwise set this value to false. The default is `false`.
*/
includePublic?: pulumi.Input<boolean>;
/**
* Set this value to true to include shared manual DB Cluster Snapshots from other
* AWS accounts that this AWS account has been given permission to copy or restore, otherwise set this value to false.
* The default is `false`.
*/
includeShared?: pulumi.Input<boolean>;
/**
* If more than one result is returned, use the most recent Snapshot.
*/
mostRecent?: pulumi.Input<boolean>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* Type of snapshots to be returned. If you don't specify a SnapshotType
* value, then both automated and manual DB cluster snapshots are returned. Shared and public DB Cluster Snapshots are not
* included in the returned results by default. Possible values are, `automated`, `manual`, `shared`, `public` and `awsbackup`.
*/
snapshotType?: pulumi.Input<string>;
/**
* Mapping of tags, each pair of which must exactly match
* a pair on the desired DB cluster snapshot.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}