SnapshotArgs

data class SnapshotArgs(val dbInstanceIdentifier: Output<String>? = null, val dbSnapshotIdentifier: Output<String>? = null, val sharedAccounts: Output<List<String>>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<SnapshotArgs>

Manages an RDS database instance snapshot. 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 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 bar = new Instance("bar", InstanceArgs.builder()
.allocatedStorage(10)
.engine("mysql")
.engineVersion("5.6.21")
.instanceClass("db.t2.micro")
.name("baz")
.password("barbarbarbar")
.username("foo")
.maintenanceWindow("Fri:09:00-Fri:09:30")
.backupRetentionPeriod(0)
.parameterGroupName("default.mysql5.6")
.build());
var test = new Snapshot("test", SnapshotArgs.builder()
.dbInstanceIdentifier(bar.id())
.dbSnapshotIdentifier("testsnapshot1234")
.build());
}
}

Import

aws_db_snapshot can be imported by using the snapshot identifier, e.g.,

$ pulumi import aws:rds/snapshot:Snapshot example my-snapshot

Constructors

Link copied to clipboard
constructor(dbInstanceIdentifier: Output<String>? = null, dbSnapshotIdentifier: Output<String>? = null, sharedAccounts: Output<List<String>>? = null, tags: Output<Map<String, String>>? = null)

Properties

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

The DB Instance Identifier from which to take the snapshot.

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

The Identifier for the snapshot.

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

List of AWS Account ids to share snapshot with, use all to make snaphot public.

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.

Functions

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