Snapshot Args
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());
}
}
Content copied to clipboard
Import
EBS Snapshot can be imported using the id
, e.g.,
$ pulumi import aws:ebs/snapshot:Snapshot id snap-049df61146c4d7901
Content copied to clipboard
Properties
Link copied to clipboard
A description of what the snapshot is.
Link copied to clipboard
The Amazon Resource Name (ARN) of the Outpost on which to create a local snapshot.
Link copied to clipboard
Indicates whether to permanently restore an archived snapshot.
Link copied to clipboard
The name of the storage tier. Valid values are archive
and standard
. Default value is standard
.
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.