Class SnapshotCopy


  • public class SnapshotCopy
    extends com.pulumi.resources.CustomResource
    Creates a Snapshot of a snapshot. ## 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 com.pulumi.aws.ebs.SnapshotCopy;
     import com.pulumi.aws.ebs.SnapshotCopyArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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());
     
             var exampleCopy = new SnapshotCopy("exampleCopy", SnapshotCopyArgs.builder()
                 .sourceSnapshotId(exampleSnapshot.id())
                 .sourceRegion("us-west-2")
                 .tags(Map.of("Name", "HelloWorld_copy_snap"))
                 .build());
     
         }
     }
     
     
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • 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.util.Optional<java.lang.Integer>> completionDurationMinutes()  
      com.pulumi.core.Output<java.lang.String> dataEncryptionKeyId()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> encrypted()  
      static SnapshotCopy get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, SnapshotCopyState 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.util.Optional<java.lang.String>> kmsKeyId()  
      com.pulumi.core.Output<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> region()  
      com.pulumi.core.Output<java.lang.String> sourceRegion()  
      com.pulumi.core.Output<java.lang.String> sourceSnapshotId()  
      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()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SnapshotCopy

        public SnapshotCopy​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • SnapshotCopy

        public SnapshotCopy​(java.lang.String name,
                            SnapshotCopyArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • SnapshotCopy

        public SnapshotCopy​(java.lang.String name,
                            SnapshotCopyArgs 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:
        ARN of the EBS Snapshot.
      • completionDurationMinutes

        public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> completionDurationMinutes()
        Returns:
        Specifies a completion duration to initiate a time-based snapshot copy. Time-based snapshot copy operations complete within the specified duration. Value must be between 15 and 2880 minutes, in 15 minute increments only.
      • 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.util.Optional<java.lang.Boolean>> encrypted()
        Returns:
        Whether the snapshot is encrypted.
      • kmsKeyId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> kmsKeyId()
        Returns:
        The ARN for the KMS encryption key.
      • outpostArn

        public com.pulumi.core.Output<java.lang.String> outpostArn()
      • 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 snapshot owner.
      • permanentRestore

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> permanentRestore()
        Returns:
        Indicates whether to permanently restore an archived snapshot.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • sourceRegion

        public com.pulumi.core.Output<java.lang.String> sourceRegion()
        Returns:
        The region of the source snapshot.
      • sourceSnapshotId

        public com.pulumi.core.Output<java.lang.String> sourceSnapshotId()
        Returns:
        The ARN for the snapshot to be copied.
      • 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 for the snapshot.
      • 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 `defaultTags` 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()
      • volumeSize

        public com.pulumi.core.Output<java.lang.Integer> volumeSize()
        Returns:
        The size of the drive in GiBs.
      • get

        public static SnapshotCopy get​(java.lang.String name,
                                       com.pulumi.core.Output<java.lang.String> id,
                                       @Nullable
                                       SnapshotCopyState 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.