Snapshot

class Snapshot : KotlinCustomResource

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

Properties

Link copied to clipboard
val arn: Output<String>

Amazon Resource Name (ARN) of the EBS Snapshot.

Link copied to clipboard

The data encryption key identifier for the snapshot.

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

A description of what the snapshot is.

Link copied to clipboard
val encrypted: Output<Boolean>

Whether the snapshot is encrypted.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val kmsKeyId: Output<String>

The ARN for the KMS encryption key.

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

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

Link copied to clipboard
val ownerAlias: Output<String>

Value from an Amazon-maintained list (amazon, aws-marketplace, microsoft) of snapshot owners.

Link copied to clipboard
val ownerId: Output<String>

The AWS account ID of the EBS snapshot owner.

Link copied to clipboard

Indicates whether to permanently restore an archived snapshot.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val storageTier: Output<String>

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>>?

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 tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard

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 urn: Output<String>
Link copied to clipboard
val volumeId: Output<String>

The Volume ID of which to make a snapshot.

Link copied to clipboard
val volumeSize: Output<Int>

The size of the drive in GiBs.