Class CachesIscsiVolume


  • public class CachesIscsiVolume
    extends com.pulumi.resources.CustomResource
    Manages an AWS Storage Gateway cached iSCSI volume. > **NOTE:** The gateway must have cache added (e.g., via the `aws.storagegateway.Cache` resource) before creating volumes otherwise the Storage Gateway API will return an error. > **NOTE:** The gateway must have an upload buffer added (e.g., via the `aws.storagegateway.UploadBuffer` resource) before the volume is operational to clients, however the Storage Gateway API will allow volume creation without error in that case and return volume status as `UPLOAD BUFFER NOT CONFIGURED`. ## Example Usage > **NOTE:** These examples are referencing the `aws.storagegateway.Cache` resource `gateway_arn` attribute to ensure this provider properly adds cache before creating the volume. If you are not using this method, you may need to declare an expicit dependency (e.g. via `depends_on = [aws_storagegateway_cache.example]`) to ensure proper ordering. ### Create Empty Cached iSCSI Volume <!--Start PulumiCodeChooser --> ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.storagegateway.CachesIscsiVolume; import com.pulumi.aws.storagegateway.CachesIscsiVolumeArgs; 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 CachesIscsiVolume("example", CachesIscsiVolumeArgs.builder() .gatewayArn(exampleAwsStoragegatewayCache.gatewayArn()) .networkInterfaceId(exampleAwsInstance.privateIp()) .targetName("example") .volumeSizeInBytes(5368709120) .build()); } } ``` <!--End PulumiCodeChooser --> ### Create Cached iSCSI Volume From Snapshot <!--Start PulumiCodeChooser --> ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.storagegateway.CachesIscsiVolume; import com.pulumi.aws.storagegateway.CachesIscsiVolumeArgs; 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 CachesIscsiVolume("example", CachesIscsiVolumeArgs.builder() .gatewayArn(exampleAwsStoragegatewayCache.gatewayArn()) .networkInterfaceId(exampleAwsInstance.privateIp()) .snapshotId(exampleAwsEbsSnapshot.id()) .targetName("example") .volumeSizeInBytes(exampleAwsEbsSnapshot.volumeSize() * 1024 * 1024 * 1024) .build()); } } ``` <!--End PulumiCodeChooser --> ### Create Cached iSCSI Volume From Source Volume <!--Start PulumiCodeChooser --> ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.storagegateway.CachesIscsiVolume; import com.pulumi.aws.storagegateway.CachesIscsiVolumeArgs; 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 CachesIscsiVolume("example", CachesIscsiVolumeArgs.builder() .gatewayArn(exampleAwsStoragegatewayCache.gatewayArn()) .networkInterfaceId(exampleAwsInstance.privateIp()) .sourceVolumeArn(existing.arn()) .targetName("example") .volumeSizeInBytes(existing.volumeSizeInBytes()) .build()); } } ``` <!--End PulumiCodeChooser --> ## Import Using `pulumi import`, import `aws_storagegateway_cached_iscsi_volume` using the volume Amazon Resource Name (ARN). For example: ```sh $ pulumi import aws:storagegateway/cachesIscsiVolume:CachesIscsiVolume example arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678/volume/vol-12345678 ```
    • 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.lang.Boolean> chapEnabled()  
      com.pulumi.core.Output<java.lang.String> gatewayArn()  
      static CachesIscsiVolume get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, CachesIscsiVolumeState 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.Boolean>> kmsEncrypted()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> kmsKey()  
      com.pulumi.core.Output<java.lang.Integer> lunNumber()  
      com.pulumi.core.Output<java.lang.String> networkInterfaceId()  
      com.pulumi.core.Output<java.lang.Integer> networkInterfacePort()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> snapshotId()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> sourceVolumeArn()  
      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.lang.String> targetArn()  
      com.pulumi.core.Output<java.lang.String> targetName()  
      com.pulumi.core.Output<java.lang.String> volumeArn()  
      com.pulumi.core.Output<java.lang.String> volumeId()  
      com.pulumi.core.Output<java.lang.Integer> volumeSizeInBytes()  
      • 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

      • CachesIscsiVolume

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

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

        public CachesIscsiVolume​(java.lang.String name,
                                 CachesIscsiVolumeArgs 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:
        Volume Amazon Resource Name (ARN), e.g., `arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678/volume/vol-12345678`.
      • chapEnabled

        public com.pulumi.core.Output<java.lang.Boolean> chapEnabled()
        Returns:
        Whether mutual CHAP is enabled for the iSCSI target.
      • gatewayArn

        public com.pulumi.core.Output<java.lang.String> gatewayArn()
        Returns:
        The Amazon Resource Name (ARN) of the gateway.
      • kmsEncrypted

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> kmsEncrypted()
        Returns:
        Set to `true` to use Amazon S3 server side encryption with your own AWS KMS key, or `false` to use a key managed by Amazon S3.
      • kmsKey

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> kmsKey()
        Returns:
        The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server side encryption. Is required when `kms_encrypted` is set.
      • lunNumber

        public com.pulumi.core.Output<java.lang.Integer> lunNumber()
        Returns:
        Logical disk number.
      • networkInterfaceId

        public com.pulumi.core.Output<java.lang.String> networkInterfaceId()
        Returns:
        The network interface of the gateway on which to expose the iSCSI target. Only IPv4 addresses are accepted.
      • networkInterfacePort

        public com.pulumi.core.Output<java.lang.Integer> networkInterfacePort()
        Returns:
        The port used to communicate with iSCSI targets.
      • snapshotId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> snapshotId()
        Returns:
        The snapshot ID of the snapshot to restore as the new cached volumeE.g., `snap-1122aabb`.
      • sourceVolumeArn

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> sourceVolumeArn()
        Returns:
        The ARN for an existing volume. Specifying this ARN makes the new volume into an exact copy of the specified existing volume's latest recovery point. The `volume_size_in_bytes` value for this new volume must be equal to or larger than the size of the existing volume, in bytes.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Key-value map of resource tags. .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.
      • targetArn

        public com.pulumi.core.Output<java.lang.String> targetArn()
        Returns:
        Target Amazon Resource Name (ARN), e.g., `arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678/target/iqn.1997-05.com.amazon:TargetName`.
      • targetName

        public com.pulumi.core.Output<java.lang.String> targetName()
        Returns:
        The name of the iSCSI target used by initiators to connect to the target and as a suffix for the target ARN. The target name must be unique across all volumes of a gateway.
      • volumeArn

        public com.pulumi.core.Output<java.lang.String> volumeArn()
        Returns:
        Volume Amazon Resource Name (ARN), e.g., `arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678/volume/vol-12345678`.
      • volumeId

        public com.pulumi.core.Output<java.lang.String> volumeId()
        Returns:
        Volume ID, e.g., `vol-12345678`.
      • volumeSizeInBytes

        public com.pulumi.core.Output<java.lang.Integer> volumeSizeInBytes()
        Returns:
        The size of the volume in bytes.
      • get

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