Package com.pulumi.aws.ebs
Class Snapshot
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.ebs.Snapshot
-
public class Snapshot extends com.pulumi.resources.CustomResource
Creates a Snapshot of an EBS Volume. ## Example Usage <!--Start PulumiCodeChooser --> ```java 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 ```
-
-
Constructor Summary
Constructors Constructor Description Snapshot(java.lang.String name)
Snapshot(java.lang.String name, SnapshotArgs args)
Snapshot(java.lang.String name, SnapshotArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>
arn()
com.pulumi.core.Output<java.lang.String>
dataEncryptionKeyId()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
description()
com.pulumi.core.Output<java.lang.Boolean>
encrypted()
static Snapshot
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, SnapshotState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>
kmsKeyId()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
outpostArn()
com.pulumi.core.Output<java.lang.String>
ownerAlias()
com.pulumi.core.Output<java.lang.String>
ownerId()
com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>
permanentRestore()
com.pulumi.core.Output<java.lang.String>
storageTier()
com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>
tags()
com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>
tagsAll()
com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>
temporaryRestoreDays()
com.pulumi.core.Output<java.lang.String>
volumeId()
com.pulumi.core.Output<java.lang.Integer>
volumeSize()
-
-
-
Constructor Detail
-
Snapshot
public Snapshot(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
Snapshot
public Snapshot(java.lang.String name, SnapshotArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
Snapshot
public Snapshot(java.lang.String name, SnapshotArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- Amazon Resource Name (ARN) of the EBS Snapshot.
-
dataEncryptionKeyId
public com.pulumi.core.Output<java.lang.String> dataEncryptionKeyId()
- Returns:
- The data encryption key identifier for the snapshot.
-
description
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
- Returns:
- A description of what the snapshot is.
-
encrypted
public com.pulumi.core.Output<java.lang.Boolean> encrypted()
- Returns:
- Whether the snapshot is encrypted.
-
kmsKeyId
public com.pulumi.core.Output<java.lang.String> kmsKeyId()
- Returns:
- The ARN for the KMS encryption key.
-
outpostArn
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> outpostArn()
- Returns:
- The Amazon Resource Name (ARN) of the Outpost on which to create a local snapshot.
-
ownerAlias
public com.pulumi.core.Output<java.lang.String> ownerAlias()
- Returns:
- Value from an Amazon-maintained list (`amazon`, `aws-marketplace`, `microsoft`) of snapshot owners.
-
ownerId
public com.pulumi.core.Output<java.lang.String> ownerId()
- Returns:
- The AWS account ID of the EBS snapshot owner.
-
permanentRestore
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> permanentRestore()
- Returns:
- Indicates whether to permanently restore an archived snapshot.
-
storageTier
public com.pulumi.core.Output<java.lang.String> storageTier()
- Returns:
- The name of the storage tier. Valid values are `archive` and `standard`. Default value is `standard`.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- 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.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
-
temporaryRestoreDays
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> temporaryRestoreDays()
- Returns:
- 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.
-
volumeId
public com.pulumi.core.Output<java.lang.String> volumeId()
- Returns:
- The Volume ID of which to make a snapshot.
-
volumeSize
public com.pulumi.core.Output<java.lang.Integer> volumeSize()
- Returns:
- The size of the drive in GiBs.
-
get
public static Snapshot get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable SnapshotState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-