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

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.rds.RdsFunctions;
import com.pulumi.aws.rds.inputs.GetClusterSnapshotArgs;
import com.pulumi.aws.rds.Cluster;
import com.pulumi.aws.rds.ClusterArgs;
import com.pulumi.aws.rds.ClusterInstance;
import com.pulumi.aws.rds.ClusterInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var developmentFinalSnapshot = RdsFunctions.getClusterSnapshot(GetClusterSnapshotArgs.builder()
.dbClusterIdentifier("development_cluster")
.mostRecent(true)
.build());
var auroraCluster = new Cluster("auroraCluster", ClusterArgs.builder()
.clusterIdentifier("development_cluster")
.snapshotIdentifier(developmentFinalSnapshot.applyValue(getClusterSnapshotResult -> getClusterSnapshotResult.id()))
.dbSubnetGroupName("my_db_subnet_group")
.build());
var auroraClusterInstance = new ClusterInstance("auroraClusterInstance", ClusterInstanceArgs.builder()
.clusterIdentifier(auroraCluster.id())
.instanceClass("db.t2.small")
.dbSubnetGroupName("my_db_subnet_group")
.build());
}
}

Return

A collection of values returned by getClusterSnapshot.

Parameters

argument

A collection of arguments for invoking getClusterSnapshot.


suspend fun getClusterSnapshot(dbClusterIdentifier: String? = null, dbClusterSnapshotIdentifier: String? = null, includePublic: Boolean? = null, includeShared: Boolean? = null, mostRecent: Boolean? = null, snapshotType: String? = null, tags: Map<String, String>? = null): GetClusterSnapshotResult

Return

A collection of values returned by getClusterSnapshot.

Parameters

dbClusterIdentifier

Returns the list of snapshots created by the specific db_cluster

dbClusterSnapshotIdentifier

Returns information on a specific snapshot_id.

includePublic

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

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

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

snapshotType

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.

tags

Map of tags for the resource.

See also


Return

A collection of values returned by getClusterSnapshot.

Parameters

argument

Builder for com.pulumi.aws.rds.kotlin.inputs.GetClusterSnapshotPlainArgs.

See also