Snapshot Copy Args
data class SnapshotCopyArgs(val copyTags: Output<Boolean>? = null, val destinationRegion: Output<String>? = null, val kmsKeyId: Output<String>? = null, val optionGroupName: Output<String>? = null, val presignedUrl: Output<String>? = null, val sourceDbSnapshotIdentifier: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val targetCustomAvailabilityZone: Output<String>? = null, val targetDbSnapshotIdentifier: Output<String>? = null) : ConvertibleToJava<SnapshotCopyArgs>
Manages an RDS database instance snapshot copy. For managing RDS database cluster snapshots, see the aws.rds.ClusterSnapshot
resource.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.rds.Instance;
import com.pulumi.aws.rds.InstanceArgs;
import com.pulumi.aws.rds.Snapshot;
import com.pulumi.aws.rds.SnapshotArgs;
import com.pulumi.aws.rds.SnapshotCopy;
import com.pulumi.aws.rds.SnapshotCopyArgs;
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 exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
.allocatedStorage(10)
.engine("mysql")
.engineVersion("5.6.21")
.instanceClass("db.t2.micro")
.dbName("baz")
.password("barbarbarbar")
.username("foo")
.maintenanceWindow("Fri:09:00-Fri:09:30")
.backupRetentionPeriod(0)
.parameterGroupName("default.mysql5.6")
.build());
var exampleSnapshot = new Snapshot("exampleSnapshot", SnapshotArgs.builder()
.dbInstanceIdentifier(exampleInstance.identifier())
.dbSnapshotIdentifier("testsnapshot1234")
.build());
var exampleSnapshotCopy = new SnapshotCopy("exampleSnapshotCopy", SnapshotCopyArgs.builder()
.sourceDbSnapshotIdentifier(exampleSnapshot.dbSnapshotArn())
.targetDbSnapshotIdentifier("testsnapshot1234-copy")
.build());
}
}
Content copied to clipboard
Import
Using pulumi import
, import aws_db_snapshot_copy
using the snapshot identifier. For example:
$ pulumi import aws:rds/snapshotCopy:SnapshotCopy example my-snapshot
Content copied to clipboard
Constructors
Link copied to clipboard
fun SnapshotCopyArgs(copyTags: Output<Boolean>? = null, destinationRegion: Output<String>? = null, kmsKeyId: Output<String>? = null, optionGroupName: Output<String>? = null, presignedUrl: Output<String>? = null, sourceDbSnapshotIdentifier: Output<String>? = null, tags: Output<Map<String, String>>? = null, targetCustomAvailabilityZone: Output<String>? = null, targetDbSnapshotIdentifier: Output<String>? = null)