ClusterSnapshotCopyArgs

data class ClusterSnapshotCopyArgs(val copyTags: Output<Boolean>? = null, val destinationRegion: Output<String>? = null, val kmsKeyId: Output<String>? = null, val presignedUrl: Output<String>? = null, val sharedAccounts: Output<List<String>>? = null, val sourceDbClusterSnapshotIdentifier: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val targetDbClusterSnapshotIdentifier: Output<String>? = null, val timeouts: Output<ClusterSnapshotCopyTimeoutsArgs>? = null) : ConvertibleToJava<ClusterSnapshotCopyArgs>

Manages an RDS database cluster snapshot copy. For managing RDS database instance snapshot copies, see the aws.rds.SnapshotCopy resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.rds.Cluster("example", {
clusterIdentifier: "aurora-cluster-demo",
databaseName: "test",
engine: aws.rds.EngineType.AuroraMysql,
masterUsername: "tfacctest",
masterPassword: "avoid-plaintext-passwords",
skipFinalSnapshot: true,
});
const exampleClusterSnapshot = new aws.rds.ClusterSnapshot("example", {
dbClusterIdentifier: example.clusterIdentifier,
dbClusterSnapshotIdentifier: "example",
});
const exampleClusterSnapshotCopy = new aws.rds.ClusterSnapshotCopy("example", {
sourceDbClusterSnapshotIdentifier: exampleClusterSnapshot.dbClusterSnapshotArn,
targetDbClusterSnapshotIdentifier: "example-copy",
});
import pulumi
import pulumi_aws as aws
example = aws.rds.Cluster("example",
cluster_identifier="aurora-cluster-demo",
database_name="test",
engine=aws.rds.EngineType.AURORA_MYSQL,
master_username="tfacctest",
master_password="avoid-plaintext-passwords",
skip_final_snapshot=True)
example_cluster_snapshot = aws.rds.ClusterSnapshot("example",
db_cluster_identifier=example.cluster_identifier,
db_cluster_snapshot_identifier="example")
example_cluster_snapshot_copy = aws.rds.ClusterSnapshotCopy("example",
source_db_cluster_snapshot_identifier=example_cluster_snapshot.db_cluster_snapshot_arn,
target_db_cluster_snapshot_identifier="example-copy")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Rds.Cluster("example", new()
{
ClusterIdentifier = "aurora-cluster-demo",
DatabaseName = "test",
Engine = Aws.Rds.EngineType.AuroraMysql,
MasterUsername = "tfacctest",
MasterPassword = "avoid-plaintext-passwords",
SkipFinalSnapshot = true,
});
var exampleClusterSnapshot = new Aws.Rds.ClusterSnapshot("example", new()
{
DbClusterIdentifier = example.ClusterIdentifier,
DbClusterSnapshotIdentifier = "example",
});
var exampleClusterSnapshotCopy = new Aws.Rds.ClusterSnapshotCopy("example", new()
{
SourceDbClusterSnapshotIdentifier = exampleClusterSnapshot.DbClusterSnapshotArn,
TargetDbClusterSnapshotIdentifier = "example-copy",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := rds.NewCluster(ctx, "example", &rds.ClusterArgs{
ClusterIdentifier: pulumi.String("aurora-cluster-demo"),
DatabaseName: pulumi.String("test"),
Engine: pulumi.String(rds.EngineTypeAuroraMysql),
MasterUsername: pulumi.String("tfacctest"),
MasterPassword: pulumi.String("avoid-plaintext-passwords"),
SkipFinalSnapshot: pulumi.Bool(true),
})
if err != nil {
return err
}
exampleClusterSnapshot, err := rds.NewClusterSnapshot(ctx, "example", &rds.ClusterSnapshotArgs{
DbClusterIdentifier: example.ClusterIdentifier,
DbClusterSnapshotIdentifier: pulumi.String("example"),
})
if err != nil {
return err
}
_, err = rds.NewClusterSnapshotCopy(ctx, "example", &rds.ClusterSnapshotCopyArgs{
SourceDbClusterSnapshotIdentifier: exampleClusterSnapshot.DbClusterSnapshotArn,
TargetDbClusterSnapshotIdentifier: pulumi.String("example-copy"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.rds.Cluster;
import com.pulumi.aws.rds.ClusterArgs;
import com.pulumi.aws.rds.ClusterSnapshot;
import com.pulumi.aws.rds.ClusterSnapshotArgs;
import com.pulumi.aws.rds.ClusterSnapshotCopy;
import com.pulumi.aws.rds.ClusterSnapshotCopyArgs;
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) {
var example = new Cluster("example", ClusterArgs.builder()
.clusterIdentifier("aurora-cluster-demo")
.databaseName("test")
.engine("aurora-mysql")
.masterUsername("tfacctest")
.masterPassword("avoid-plaintext-passwords")
.skipFinalSnapshot(true)
.build());
var exampleClusterSnapshot = new ClusterSnapshot("exampleClusterSnapshot", ClusterSnapshotArgs.builder()
.dbClusterIdentifier(example.clusterIdentifier())
.dbClusterSnapshotIdentifier("example")
.build());
var exampleClusterSnapshotCopy = new ClusterSnapshotCopy("exampleClusterSnapshotCopy", ClusterSnapshotCopyArgs.builder()
.sourceDbClusterSnapshotIdentifier(exampleClusterSnapshot.dbClusterSnapshotArn())
.targetDbClusterSnapshotIdentifier("example-copy")
.build());
}
}
resources:
example:
type: aws:rds:Cluster
properties:
clusterIdentifier: aurora-cluster-demo
databaseName: test
engine: aurora-mysql
masterUsername: tfacctest
masterPassword: avoid-plaintext-passwords
skipFinalSnapshot: true
exampleClusterSnapshot:
type: aws:rds:ClusterSnapshot
name: example
properties:
dbClusterIdentifier: ${example.clusterIdentifier}
dbClusterSnapshotIdentifier: example
exampleClusterSnapshotCopy:
type: aws:rds:ClusterSnapshotCopy
name: example
properties:
sourceDbClusterSnapshotIdentifier: ${exampleClusterSnapshot.dbClusterSnapshotArn}
targetDbClusterSnapshotIdentifier: example-copy

Import

Using pulumi import, import aws_rds_cluster_snapshot_copy using the id. For example:

$ pulumi import aws:rds/clusterSnapshotCopy:ClusterSnapshotCopy example my-snapshot

Constructors

Link copied to clipboard
constructor(copyTags: Output<Boolean>? = null, destinationRegion: Output<String>? = null, kmsKeyId: Output<String>? = null, presignedUrl: Output<String>? = null, sharedAccounts: Output<List<String>>? = null, sourceDbClusterSnapshotIdentifier: Output<String>? = null, tags: Output<Map<String, String>>? = null, targetDbClusterSnapshotIdentifier: Output<String>? = null, timeouts: Output<ClusterSnapshotCopyTimeoutsArgs>? = null)

Properties

Link copied to clipboard
val copyTags: Output<Boolean>? = null

Whether to copy existing tags. Defaults to false.

Link copied to clipboard
val destinationRegion: Output<String>? = null

The Destination region to place snapshot copy.

Link copied to clipboard
val kmsKeyId: Output<String>? = null

KMS key ID.

Link copied to clipboard
val presignedUrl: Output<String>? = null

URL that contains a Signature Version 4 signed request.

Link copied to clipboard
val sharedAccounts: Output<List<String>>? = null

List of AWS Account IDs to share the snapshot with. Use all to make the snapshot public.

Link copied to clipboard

Identifier of the source snapshot.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard

Identifier for the snapshot. The following arguments are optional:

Link copied to clipboard

Functions

Link copied to clipboard
open override fun toJava(): ClusterSnapshotCopyArgs