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

Coming soon!

Coming soon!

import pulumi
import pulumi_aws as aws

development_final_snapshot = aws.rds.get_cluster_snapshot(db_cluster_identifier="development_cluster",
    most_recent=True)
# Use the last snapshot of the dev database before it was destroyed to create
# a new dev database.
aurora_cluster = aws.rds.Cluster("auroraCluster",
    cluster_identifier="development_cluster",
    db_subnet_group_name="my_db_subnet_group",
    lifecycle={
        "ignoreChanges": ["snapshotIdentifier"],
    },
    snapshot_identifier=development_final_snapshot.id)
aurora_cluster_instance = aws.rds.ClusterInstance("auroraClusterInstance",
    cluster_identifier=aurora_cluster.id,
    db_subnet_group_name="my_db_subnet_group",
    instance_class="db.t2.small")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const developmentFinalSnapshot = pulumi.output(aws.rds.getClusterSnapshot({
    dbClusterIdentifier: "development_cluster",
    mostRecent: true,
}, { async: true }));
// Use the last snapshot of the dev database before it was destroyed to create
// a new dev database.
const auroraCluster = new aws.rds.Cluster("aurora", {
    clusterIdentifier: "development_cluster",
    dbSubnetGroupName: "my_db_subnet_group",
    snapshotIdentifier: developmentFinalSnapshot.id,
}, { ignoreChanges: ["snapshotIdentifier"] });
const auroraClusterInstance = new aws.rds.ClusterInstance("aurora", {
    clusterIdentifier: auroraCluster.id,
    dbSubnetGroupName: "my_db_subnet_group",
    instanceClass: "db.t2.small",
});

Using GetClusterSnapshot

function getClusterSnapshot(args: GetClusterSnapshotArgs, opts?: InvokeOptions): Promise<GetClusterSnapshotResult>
function  get_cluster_snapshot(db_cluster_identifier=None, db_cluster_snapshot_identifier=None, include_public=None, include_shared=None, most_recent=None, snapshot_type=None, tags=None, opts=None)
func LookupClusterSnapshot(ctx *Context, args *LookupClusterSnapshotArgs, opts ...InvokeOption) (*LookupClusterSnapshotResult, error)

Note: This function is named LookupClusterSnapshot in the Go SDK.

public static class GetClusterSnapshot {
    public static Task<GetClusterSnapshotResult> InvokeAsync(GetClusterSnapshotArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

DbClusterIdentifier string

Returns the list of snapshots created by the specific db_cluster

DbClusterSnapshotIdentifier string

Returns information on a specific snapshot_id.

IncludePublic bool

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.

IncludeShared bool

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.

MostRecent bool

If more than one result is returned, use the most recent Snapshot.

SnapshotType string

The 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 and public.

Tags Dictionary<string, string>

A map of tags for the resource.

DbClusterIdentifier string

Returns the list of snapshots created by the specific db_cluster

DbClusterSnapshotIdentifier string

Returns information on a specific snapshot_id.

IncludePublic bool

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.

IncludeShared bool

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.

MostRecent bool

If more than one result is returned, use the most recent Snapshot.

SnapshotType string

The 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 and public.

Tags map[string]string

A map of tags for the resource.

dbClusterIdentifier string

Returns the list of snapshots created by the specific db_cluster

dbClusterSnapshotIdentifier string

Returns information on a specific snapshot_id.

includePublic boolean

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.

includeShared 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.

mostRecent boolean

If more than one result is returned, use the most recent Snapshot.

snapshotType string

The 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 and public.

tags {[key: string]: string}

A map of tags for the resource.

db_cluster_identifier str

Returns the list of snapshots created by the specific db_cluster

db_cluster_snapshot_identifier str

Returns information on a specific snapshot_id.

include_public bool

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.

include_shared bool

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.

most_recent bool

If more than one result is returned, use the most recent Snapshot.

snapshot_type str

The 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 and public.

tags Dict[str, str]

A map of tags for the resource.

GetClusterSnapshot Result

The following output properties are available:

AllocatedStorage int

Specifies the allocated storage size in gigabytes (GB).

AvailabilityZones List<string>

List of EC2 Availability Zones that instances in the DB cluster snapshot can be restored in.

DbClusterSnapshotArn string

The Amazon Resource Name (ARN) for the DB Cluster Snapshot.

Engine string

Specifies the name of the database engine.

EngineVersion string

Version of the database engine for this DB cluster snapshot.

Id string

The provider-assigned unique ID for this managed resource.

KmsKeyId string

If storage_encrypted is true, the AWS KMS key identifier for the encrypted DB cluster snapshot.

LicenseModel string

License model information for the restored DB cluster.

Port int

Port that the DB cluster was listening on at the time of the snapshot.

SnapshotCreateTime string

Time when the snapshot was taken, in Universal Coordinated Time (UTC).

SourceDbClusterSnapshotArn string
Status string

The status of this DB Cluster Snapshot.

StorageEncrypted bool

Specifies whether the DB cluster snapshot is encrypted.

Tags Dictionary<string, string>

A map of tags for the resource.

VpcId string

The VPC ID associated with the DB cluster snapshot.

DbClusterIdentifier string

Specifies the DB cluster identifier of the DB cluster that this DB cluster snapshot was created from.

DbClusterSnapshotIdentifier string
IncludePublic bool
IncludeShared bool
MostRecent bool
SnapshotType string
AllocatedStorage int

Specifies the allocated storage size in gigabytes (GB).

AvailabilityZones []string

List of EC2 Availability Zones that instances in the DB cluster snapshot can be restored in.

DbClusterSnapshotArn string

The Amazon Resource Name (ARN) for the DB Cluster Snapshot.

Engine string

Specifies the name of the database engine.

EngineVersion string

Version of the database engine for this DB cluster snapshot.

Id string

The provider-assigned unique ID for this managed resource.

KmsKeyId string

If storage_encrypted is true, the AWS KMS key identifier for the encrypted DB cluster snapshot.

LicenseModel string

License model information for the restored DB cluster.

Port int

Port that the DB cluster was listening on at the time of the snapshot.

SnapshotCreateTime string

Time when the snapshot was taken, in Universal Coordinated Time (UTC).

SourceDbClusterSnapshotArn string
Status string

The status of this DB Cluster Snapshot.

StorageEncrypted bool

Specifies whether the DB cluster snapshot is encrypted.

Tags map[string]string

A map of tags for the resource.

VpcId string

The VPC ID associated with the DB cluster snapshot.

DbClusterIdentifier string

Specifies the DB cluster identifier of the DB cluster that this DB cluster snapshot was created from.

DbClusterSnapshotIdentifier string
IncludePublic bool
IncludeShared bool
MostRecent bool
SnapshotType string
allocatedStorage number

Specifies the allocated storage size in gigabytes (GB).

availabilityZones string[]

List of EC2 Availability Zones that instances in the DB cluster snapshot can be restored in.

dbClusterSnapshotArn string

The Amazon Resource Name (ARN) for the DB Cluster Snapshot.

engine string

Specifies the name of the database engine.

engineVersion string

Version of the database engine for this DB cluster snapshot.

id string

The provider-assigned unique ID for this managed resource.

kmsKeyId string

If storage_encrypted is true, the AWS KMS key identifier for the encrypted DB cluster snapshot.

licenseModel string

License model information for the restored DB cluster.

port number

Port that the DB cluster was listening on at the time of the snapshot.

snapshotCreateTime string

Time when the snapshot was taken, in Universal Coordinated Time (UTC).

sourceDbClusterSnapshotArn string
status string

The status of this DB Cluster Snapshot.

storageEncrypted boolean

Specifies whether the DB cluster snapshot is encrypted.

tags {[key: string]: string}

A map of tags for the resource.

vpcId string

The VPC ID associated with the DB cluster snapshot.

dbClusterIdentifier string

Specifies the DB cluster identifier of the DB cluster that this DB cluster snapshot was created from.

dbClusterSnapshotIdentifier string
includePublic boolean
includeShared boolean
mostRecent boolean
snapshotType string
allocated_storage float

Specifies the allocated storage size in gigabytes (GB).

availability_zones List[str]

List of EC2 Availability Zones that instances in the DB cluster snapshot can be restored in.

db_cluster_snapshot_arn str

The Amazon Resource Name (ARN) for the DB Cluster Snapshot.

engine str

Specifies the name of the database engine.

engine_version str

Version of the database engine for this DB cluster snapshot.

id str

The provider-assigned unique ID for this managed resource.

kms_key_id str

If storage_encrypted is true, the AWS KMS key identifier for the encrypted DB cluster snapshot.

license_model str

License model information for the restored DB cluster.

port float

Port that the DB cluster was listening on at the time of the snapshot.

snapshot_create_time str

Time when the snapshot was taken, in Universal Coordinated Time (UTC).

source_db_cluster_snapshot_arn str
status str

The status of this DB Cluster Snapshot.

storage_encrypted bool

Specifies whether the DB cluster snapshot is encrypted.

tags Dict[str, str]

A map of tags for the resource.

vpc_id str

The VPC ID associated with the DB cluster snapshot.

db_cluster_identifier str

Specifies the DB cluster identifier of the DB cluster that this DB cluster snapshot was created from.

db_cluster_snapshot_identifier str
include_public bool
include_shared bool
most_recent bool
snapshot_type str

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.