com.pulumi.aws.ebs.Snapshot Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.ebs;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.ebs.SnapshotArgs;
import com.pulumi.aws.ebs.inputs.SnapshotState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Creates a Snapshot of an EBS Volume.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Using `pulumi import`, import EBS Snapshot using the `id`. For example:
*
* ```sh
* $ pulumi import aws:ebs/snapshot:Snapshot id snap-049df61146c4d7901
* ```
*
*/
@ResourceType(type="aws:ebs/snapshot:Snapshot")
public class Snapshot extends com.pulumi.resources.CustomResource {
/**
* Amazon Resource Name (ARN) of the EBS Snapshot.
*
*/
@Export(name="arn", refs={String.class}, tree="[0]")
private Output arn;
/**
* @return Amazon Resource Name (ARN) of the EBS Snapshot.
*
*/
public Output arn() {
return this.arn;
}
/**
* The data encryption key identifier for the snapshot.
*
*/
@Export(name="dataEncryptionKeyId", refs={String.class}, tree="[0]")
private Output dataEncryptionKeyId;
/**
* @return The data encryption key identifier for the snapshot.
*
*/
public Output dataEncryptionKeyId() {
return this.dataEncryptionKeyId;
}
/**
* A description of what the snapshot is.
*
*/
@Export(name="description", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> description;
/**
* @return A description of what the snapshot is.
*
*/
public Output> description() {
return Codegen.optional(this.description);
}
/**
* Whether the snapshot is encrypted.
*
*/
@Export(name="encrypted", refs={Boolean.class}, tree="[0]")
private Output encrypted;
/**
* @return Whether the snapshot is encrypted.
*
*/
public Output encrypted() {
return this.encrypted;
}
/**
* The ARN for the KMS encryption key.
*
*/
@Export(name="kmsKeyId", refs={String.class}, tree="[0]")
private Output kmsKeyId;
/**
* @return The ARN for the KMS encryption key.
*
*/
public Output kmsKeyId() {
return this.kmsKeyId;
}
/**
* The Amazon Resource Name (ARN) of the Outpost on which to create a local snapshot.
*
*/
@Export(name="outpostArn", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> outpostArn;
/**
* @return The Amazon Resource Name (ARN) of the Outpost on which to create a local snapshot.
*
*/
public Output> outpostArn() {
return Codegen.optional(this.outpostArn);
}
/**
* Value from an Amazon-maintained list (`amazon`, `aws-marketplace`, `microsoft`) of snapshot owners.
*
*/
@Export(name="ownerAlias", refs={String.class}, tree="[0]")
private Output ownerAlias;
/**
* @return Value from an Amazon-maintained list (`amazon`, `aws-marketplace`, `microsoft`) of snapshot owners.
*
*/
public Output ownerAlias() {
return this.ownerAlias;
}
/**
* The AWS account ID of the EBS snapshot owner.
*
*/
@Export(name="ownerId", refs={String.class}, tree="[0]")
private Output ownerId;
/**
* @return The AWS account ID of the EBS snapshot owner.
*
*/
public Output ownerId() {
return this.ownerId;
}
/**
* Indicates whether to permanently restore an archived snapshot.
*
*/
@Export(name="permanentRestore", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> permanentRestore;
/**
* @return Indicates whether to permanently restore an archived snapshot.
*
*/
public Output> permanentRestore() {
return Codegen.optional(this.permanentRestore);
}
/**
* The name of the storage tier. Valid values are `archive` and `standard`. Default value is `standard`.
*
*/
@Export(name="storageTier", refs={String.class}, tree="[0]")
private Output storageTier;
/**
* @return The name of the storage tier. Valid values are `archive` and `standard`. Default value is `standard`.
*
*/
public Output storageTier() {
return this.storageTier;
}
/**
* 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.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return 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.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
@Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]")
private Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy