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.Snapshotdata 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
LookupClusterSnapshotin the Go SDK.
public static class GetClusterSnapshot {
public static Task<GetClusterSnapshotResult> InvokeAsync(GetClusterSnapshotArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Db
Cluster stringIdentifier Returns the list of snapshots created by the specific db_cluster
- Db
Cluster stringSnapshot Identifier 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.- 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 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,sharedandpublic.- Dictionary<string, string>
A map of tags for the resource.
- Db
Cluster stringIdentifier Returns the list of snapshots created by the specific db_cluster
- Db
Cluster stringSnapshot Identifier 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.- 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 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,sharedandpublic.- map[string]string
A map of tags for the resource.
- db
Cluster stringIdentifier Returns the list of snapshots created by the specific db_cluster
- db
Cluster stringSnapshot Identifier Returns information on a specific snapshot_id.
- include
Public 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.- 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.- most
Recent boolean If more than one result is returned, use the most recent Snapshot.
- snapshot
Type 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,sharedandpublic.- {[key: string]: string}
A map of tags for the resource.
- db_
cluster_ stridentifier Returns the list of snapshots created by the specific db_cluster
- db_
cluster_ strsnapshot_ identifier 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.- 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,sharedandpublic.- Dict[str, str]
A map of tags for the resource.
GetClusterSnapshot Result
The following output properties are available:
- Allocated
Storage int Specifies the allocated storage size in gigabytes (GB).
- Availability
Zones List<string> List of EC2 Availability Zones that instances in the DB cluster snapshot can be restored in.
- Db
Cluster stringSnapshot Arn The Amazon Resource Name (ARN) for the DB Cluster Snapshot.
- Engine string
Specifies the name of the database engine.
- Engine
Version string Version of the database engine for this DB cluster snapshot.
- Id string
The provider-assigned unique ID for this managed resource.
- Kms
Key stringId If storage_encrypted is true, the AWS KMS key identifier for the encrypted DB cluster snapshot.
- License
Model 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.
- Snapshot
Create stringTime Time when the snapshot was taken, in Universal Coordinated Time (UTC).
- Source
Db stringCluster Snapshot Arn - Status string
The status of this DB Cluster Snapshot.
- Storage
Encrypted bool Specifies whether the DB cluster snapshot is encrypted.
- Dictionary<string, string>
A map of tags for the resource.
- Vpc
Id string The VPC ID associated with the DB cluster snapshot.
- Db
Cluster stringIdentifier Specifies the DB cluster identifier of the DB cluster that this DB cluster snapshot was created from.
- Db
Cluster stringSnapshot Identifier - Include
Public bool - bool
- Most
Recent bool - Snapshot
Type string
- Allocated
Storage int Specifies the allocated storage size in gigabytes (GB).
- Availability
Zones []string List of EC2 Availability Zones that instances in the DB cluster snapshot can be restored in.
- Db
Cluster stringSnapshot Arn The Amazon Resource Name (ARN) for the DB Cluster Snapshot.
- Engine string
Specifies the name of the database engine.
- Engine
Version string Version of the database engine for this DB cluster snapshot.
- Id string
The provider-assigned unique ID for this managed resource.
- Kms
Key stringId If storage_encrypted is true, the AWS KMS key identifier for the encrypted DB cluster snapshot.
- License
Model 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.
- Snapshot
Create stringTime Time when the snapshot was taken, in Universal Coordinated Time (UTC).
- Source
Db stringCluster Snapshot Arn - Status string
The status of this DB Cluster Snapshot.
- Storage
Encrypted bool Specifies whether the DB cluster snapshot is encrypted.
- map[string]string
A map of tags for the resource.
- Vpc
Id string The VPC ID associated with the DB cluster snapshot.
- Db
Cluster stringIdentifier Specifies the DB cluster identifier of the DB cluster that this DB cluster snapshot was created from.
- Db
Cluster stringSnapshot Identifier - Include
Public bool - bool
- Most
Recent bool - Snapshot
Type string
- allocated
Storage number Specifies the allocated storage size in gigabytes (GB).
- availability
Zones string[] List of EC2 Availability Zones that instances in the DB cluster snapshot can be restored in.
- db
Cluster stringSnapshot Arn The Amazon Resource Name (ARN) for the DB Cluster Snapshot.
- engine string
Specifies the name of the database engine.
- engine
Version string Version of the database engine for this DB cluster snapshot.
- id string
The provider-assigned unique ID for this managed resource.
- kms
Key stringId If storage_encrypted is true, the AWS KMS key identifier for the encrypted DB cluster snapshot.
- license
Model 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.
- snapshot
Create stringTime Time when the snapshot was taken, in Universal Coordinated Time (UTC).
- source
Db stringCluster Snapshot Arn - status string
The status of this DB Cluster Snapshot.
- storage
Encrypted boolean Specifies whether the DB cluster snapshot is encrypted.
- {[key: string]: string}
A map of tags for the resource.
- vpc
Id string The VPC ID associated with the DB cluster snapshot.
- db
Cluster stringIdentifier Specifies the DB cluster identifier of the DB cluster that this DB cluster snapshot was created from.
- db
Cluster stringSnapshot Identifier - include
Public boolean - boolean
- most
Recent boolean - snapshot
Type 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_ strsnapshot_ arn 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_ strid 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_ strtime Time when the snapshot was taken, in Universal Coordinated Time (UTC).
- source_
db_ strcluster_ snapshot_ arn - status str
The status of this DB Cluster Snapshot.
- storage_
encrypted bool Specifies whether the DB cluster snapshot is encrypted.
- Dict[str, str]
A map of tags for the resource.
- vpc_
id str The VPC ID associated with the DB cluster snapshot.
- db_
cluster_ stridentifier Specifies the DB cluster identifier of the DB cluster that this DB cluster snapshot was created from.
- db_
cluster_ strsnapshot_ identifier - include_
public bool - 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
awsTerraform Provider.