SnapshotArgs

data class SnapshotArgs(val description: Output<String>? = null, val outpostArn: Output<String>? = null, val permanentRestore: Output<Boolean>? = null, val storageTier: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val temporaryRestoreDays: Output<Int>? = null, val volumeId: Output<String>? = null) : ConvertibleToJava<SnapshotArgs>

Creates a Snapshot of an EBS Volume.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ebs.Volume;
import com.pulumi.aws.ebs.VolumeArgs;
import com.pulumi.aws.ebs.Snapshot;
import com.pulumi.aws.ebs.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 example = new Volume("example", VolumeArgs.builder()
.availabilityZone("us-west-2a")
.size(40)
.tags(Map.of("Name", "HelloWorld"))
.build());
var exampleSnapshot = new Snapshot("exampleSnapshot", SnapshotArgs.builder()
.volumeId(example.id())
.tags(Map.of("Name", "HelloWorld_snap"))
.build());
}
}

Import

EBS Snapshot can be imported using the id, e.g.,

$ pulumi import aws:ebs/snapshot:Snapshot id snap-049df61146c4d7901

Constructors

Link copied to clipboard
constructor(description: Output<String>? = null, outpostArn: Output<String>? = null, permanentRestore: Output<Boolean>? = null, storageTier: Output<String>? = null, tags: Output<Map<String, String>>? = null, temporaryRestoreDays: Output<Int>? = null, volumeId: Output<String>? = null)

Properties

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

A description of what the snapshot is.

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

The Amazon Resource Name (ARN) of the Outpost on which to create a local snapshot.

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

Indicates whether to permanently restore an archived snapshot.

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

The name of the storage tier. Valid values are archive and standard. Default value is standard.

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

A map of tags to assign to the snapshot. 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
val temporaryRestoreDays: Output<Int>? = null

Specifies the number of days for which to temporarily restore an archived snapshot. Required for temporary restores only. The snapshot will be automatically re-archived after this period.

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

The Volume ID of which to make a snapshot.

Functions

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