Class SnapshotImport


  • public class SnapshotImport
    extends com.pulumi.resources.CustomResource
    Imports a disk image from S3 as 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.SnapshotImport;
     import com.pulumi.aws.ebs.SnapshotImportArgs;
     import com.pulumi.aws.ebs.inputs.SnapshotImportDiskContainerArgs;
     import com.pulumi.aws.ebs.inputs.SnapshotImportDiskContainerUserBucketArgs;
     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 SnapshotImport("example", SnapshotImportArgs.builder()
                 .diskContainer(SnapshotImportDiskContainerArgs.builder()
                     .userBucket(SnapshotImportDiskContainerUserBucketArgs.builder()
                         .s3Bucket("disk-images")
                         .s3Key("source.vhd")
                         .build())
                     .format("VHD")
                     .build())
                 .roleName("disk-image-import")
                 .tags(Map.of("Name", "HelloWorld"))
                 .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<SnapshotImportClientData>> clientData()  
      com.pulumi.core.Output<java.lang.String> dataEncryptionKeyId()  
      com.pulumi.core.Output<java.lang.String> description()  
      com.pulumi.core.Output<SnapshotImportDiskContainer> diskContainer()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> encrypted()  
      static SnapshotImport get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, SnapshotImportState 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.util.Optional<java.lang.String>> roleName()  
      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

      • SnapshotImport

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

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

        public SnapshotImport​(java.lang.String name,
                              SnapshotImportArgs 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.
      • clientData

        public com.pulumi.core.Output<java.util.Optional<SnapshotImportClientData>> clientData()
        Returns:
        The client-specific data. Detailed below.
      • 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.lang.String> description()
        Returns:
        The description string for the import snapshot task.
      • diskContainer

        public com.pulumi.core.Output<SnapshotImportDiskContainer> diskContainer()
        Returns:
        Information about the disk container. Detailed below.
      • encrypted

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> encrypted()
        Returns:
        Specifies whether the destination snapshot of the imported image should be encrypted. The default KMS key for EBS is used unless you specify a non-default KMS key using KmsKeyId.
      • kmsKeyId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> kmsKeyId()
        Returns:
        An identifier for the symmetric KMS key to use when creating the encrypted snapshot. This parameter is only required if you want to use a non-default KMS key; if this parameter is not specified, the default KMS key for EBS is used. If a KmsKeyId is specified, the Encrypted flag must also be set.
      • 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 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.
      • 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.
      • roleName

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> roleName()
        Returns:
        The name of the IAM Role the VM Import/Export service will assume. This role needs certain permissions. See https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-role. Default: `vmimport`
      • 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.
      • 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 SnapshotImport get​(java.lang.String name,
                                         com.pulumi.core.Output<java.lang.String> id,
                                         @Nullable
                                         SnapshotImportState 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.