Class Gateway


  • public class Gateway
    extends com.pulumi.resources.CustomResource
    Manages an AWS Storage Gateway file, tape, or volume gateway in the provider region. > **NOTE:** The Storage Gateway API requires the gateway to be connected to properly return information after activation. If you are receiving `The specified gateway is not connected` errors during resource creation (gateway activation), ensure your gateway instance meets the [Storage Gateway requirements](https://docs.aws.amazon.com/storagegateway/latest/userguide/Requirements.html). ## Example Usage ### Local Cache
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.ec2.VolumeAttachment;
     import com.pulumi.aws.ec2.VolumeAttachmentArgs;
     import com.pulumi.aws.storagegateway.StoragegatewayFunctions;
     import com.pulumi.aws.storagegateway.inputs.GetLocalDiskArgs;
     import com.pulumi.aws.storagegateway.Cache;
     import com.pulumi.aws.storagegateway.CacheArgs;
     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 testVolumeAttachment = new VolumeAttachment("testVolumeAttachment", VolumeAttachmentArgs.builder()
                 .deviceName("/dev/xvdb")
                 .volumeId(testAwsEbsVolume.id())
                 .instanceId(testAwsInstance.id())
                 .build());
     
             final var test = StoragegatewayFunctions.getLocalDisk(GetLocalDiskArgs.builder()
                 .diskNode(testVolumeAttachment.deviceName())
                 .gatewayArn(testAwsStoragegatewayGateway.arn())
                 .build());
     
             var testCache = new Cache("testCache", CacheArgs.builder()
                 .diskId(test.applyValue(_test -> _test.diskId()))
                 .gatewayArn(testAwsStoragegatewayGateway.arn())
                 .build());
     
         }
     }
     
     
    ### FSx File Gateway
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.storagegateway.Gateway;
     import com.pulumi.aws.storagegateway.GatewayArgs;
     import com.pulumi.aws.storagegateway.inputs.GatewaySmbActiveDirectorySettingsArgs;
     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 Gateway("example", GatewayArgs.builder()
                 .smbActiveDirectorySettings(GatewaySmbActiveDirectorySettingsArgs.builder()
                     .domainName("corp.example.com")
                     .password("avoid-plaintext-passwords")
                     .username("Admin")
                     .build())
                 .gatewayIpAddress("1.2.3.4")
                 .gatewayName("example")
                 .gatewayTimezone("GMT")
                 .gatewayType("FILE_FSX_SMB")
                 .build());
     
         }
     }
     
     
    ### S3 File Gateway
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.storagegateway.Gateway;
     import com.pulumi.aws.storagegateway.GatewayArgs;
     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 Gateway("example", GatewayArgs.builder()
                 .gatewayIpAddress("1.2.3.4")
                 .gatewayName("example")
                 .gatewayTimezone("GMT")
                 .gatewayType("FILE_S3")
                 .build());
     
         }
     }
     
     
    ### Tape Gateway
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.storagegateway.Gateway;
     import com.pulumi.aws.storagegateway.GatewayArgs;
     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 Gateway("example", GatewayArgs.builder()
                 .gatewayIpAddress("1.2.3.4")
                 .gatewayName("example")
                 .gatewayTimezone("GMT")
                 .gatewayType("VTL")
                 .mediumChangerType("AWS-Gateway-VTL")
                 .tapeDriveType("IBM-ULT3580-TD5")
                 .build());
     
         }
     }
     
     
    ### Volume Gateway (Cached)
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.storagegateway.Gateway;
     import com.pulumi.aws.storagegateway.GatewayArgs;
     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 Gateway("example", GatewayArgs.builder()
                 .gatewayIpAddress("1.2.3.4")
                 .gatewayName("example")
                 .gatewayTimezone("GMT")
                 .gatewayType("CACHED")
                 .build());
     
         }
     }
     
     
    ### Volume Gateway (Stored)
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.storagegateway.Gateway;
     import com.pulumi.aws.storagegateway.GatewayArgs;
     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 Gateway("example", GatewayArgs.builder()
                 .gatewayIpAddress("1.2.3.4")
                 .gatewayName("example")
                 .gatewayTimezone("GMT")
                 .gatewayType("STORED")
                 .build());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import `aws.storagegateway.Gateway` using the gateway ARN. For example: ```sh $ pulumi import aws:storagegateway/gateway:Gateway example arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678 ``` Certain resource arguments, like `gatewayIpAddress` do not have a Storage Gateway API method for reading the information after creation, either omit the argument from the Pulumi program or use `ignoreChanges` to hide the difference. For example:
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.storagegateway.Gateway;
     import com.pulumi.aws.storagegateway.GatewayArgs;
     import com.pulumi.resources.CustomResourceOptions;
     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 Gateway("example", GatewayArgs.builder()
                 .gatewayIpAddress(sgw.privateIp())
                 .build(), CustomResourceOptions.builder()
                     .ignoreChanges("gatewayIpAddress")
                     .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
    • Constructor Summary

      Constructors 
      Constructor Description
      Gateway​(java.lang.String name)  
      Gateway​(java.lang.String name, GatewayArgs args)  
      Gateway​(java.lang.String name, GatewayArgs args, com.pulumi.resources.CustomResourceOptions options)  
    • Constructor Detail

      • Gateway

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

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

        public Gateway​(java.lang.String name,
                       GatewayArgs 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

      • activationKey

        public com.pulumi.core.Output<java.lang.String> activationKey()
        Returns:
        Gateway activation key during resource creation. Conflicts with `gatewayIpAddress`. Additional information is available in the [Storage Gateway User Guide](https://docs.aws.amazon.com/storagegateway/latest/userguide/get-activation-key.html).
      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        ARN of the gateway.
      • averageDownloadRateLimitInBitsPerSec

        public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> averageDownloadRateLimitInBitsPerSec()
        Returns:
        The average download bandwidth rate limit in bits per second. This is supported for the `CACHED`, `STORED`, and `VTL` gateway types.
      • averageUploadRateLimitInBitsPerSec

        public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> averageUploadRateLimitInBitsPerSec()
        Returns:
        The average upload bandwidth rate limit in bits per second. This is supported for the `CACHED`, `STORED`, and `VTL` gateway types.
      • cloudwatchLogGroupArn

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> cloudwatchLogGroupArn()
        Returns:
        ARN of the Amazon CloudWatch log group to use to monitor and log events in the gateway.
      • ec2InstanceId

        public com.pulumi.core.Output<java.lang.String> ec2InstanceId()
        Returns:
        The ID of the Amazon EC2 instance that was used to launch the gateway.
      • endpointType

        public com.pulumi.core.Output<java.lang.String> endpointType()
        Returns:
        The type of endpoint for your gateway.
      • gatewayId

        public com.pulumi.core.Output<java.lang.String> gatewayId()
        Returns:
        Identifier of the gateway.
      • gatewayIpAddress

        public com.pulumi.core.Output<java.lang.String> gatewayIpAddress()
        Returns:
        Gateway IP address to retrieve activation key during resource creation. Conflicts with `activationKey`. Gateway must be accessible on port 80 from where this provider is running. Additional information is available in the [Storage Gateway User Guide](https://docs.aws.amazon.com/storagegateway/latest/userguide/get-activation-key.html).
      • gatewayName

        public com.pulumi.core.Output<java.lang.String> gatewayName()
        Returns:
        Name of the gateway.
      • gatewayNetworkInterfaces

        public com.pulumi.core.Output<java.util.List<GatewayGatewayNetworkInterface>> gatewayNetworkInterfaces()
        Returns:
        An array that contains descriptions of the gateway network interfaces. See Gateway Network Interface.
      • gatewayTimezone

        public com.pulumi.core.Output<java.lang.String> gatewayTimezone()
        Returns:
        Time zone for the gateway. The time zone is of the format "GMT", "GMT-hr:mm", or "GMT+hr:mm". For example, `GMT-4:00` indicates the time is 4 hours behind GMT. The time zone is used, for example, for scheduling snapshots and your gateway's maintenance schedule.
      • gatewayType

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> gatewayType()
        Returns:
        Type of the gateway. The default value is `STORED`. Valid values: `CACHED`, `FILE_FSX_SMB`, `FILE_S3`, `STORED`, `VTL`.
      • gatewayVpcEndpoint

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> gatewayVpcEndpoint()
        Returns:
        VPC endpoint address to be used when activating your gateway. This should be used when your instance is in a private subnet. Requires HTTP access from client computer running Pulumi. More info on what ports are required by your VPC Endpoint Security group in [Activating a Gateway in a VPC](https://docs.aws.amazon.com/storagegateway/latest/userguide/gateway-private-link.html).
      • hostEnvironment

        public com.pulumi.core.Output<java.lang.String> hostEnvironment()
        Returns:
        The type of hypervisor environment used by the host.
      • maintenanceStartTime

        public com.pulumi.core.Output<GatewayMaintenanceStartTime> maintenanceStartTime()
        Returns:
        The gateway's weekly maintenance start time information, including day and time of the week. The maintenance time is the time in your gateway's time zone. More details below.
      • mediumChangerType

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> mediumChangerType()
        Returns:
        Type of medium changer to use for tape gateway. This provider cannot detect drift of this argument. Valid values: `STK-L700`, `AWS-Gateway-VTL`, `IBM-03584L32-0402`.
      • 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.
      • smbActiveDirectorySettings

        public com.pulumi.core.Output<java.util.Optional<GatewaySmbActiveDirectorySettings>> smbActiveDirectorySettings()
        Returns:
        Nested argument with Active Directory domain join information for Server Message Block (SMB) file shares. Only valid for `FILE_S3` and `FILE_FSX_SMB` gateway types. Must be set before creating `ActiveDirectory` authentication SMB file shares. More details below.
      • smbFileShareVisibility

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> smbFileShareVisibility()
        Returns:
        Specifies whether the shares on this gateway appear when listing shares.
      • smbGuestPassword

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> smbGuestPassword()
        Returns:
        Guest password for Server Message Block (SMB) file shares. Only valid for `FILE_S3` and `FILE_FSX_SMB` gateway types. Must be set before creating `GuestAccess` authentication SMB file shares. This provider can only detect drift of the existence of a guest password, not its actual value from the gateway. This provider can however update the password with changing the argument.
      • smbSecurityStrategy

        public com.pulumi.core.Output<java.lang.String> smbSecurityStrategy()
        Returns:
        Specifies the type of security strategy. Valid values are: `ClientSpecified`, `MandatorySigning`, and `MandatoryEncryption`. See [Setting a Security Level for Your Gateway](https://docs.aws.amazon.com/storagegateway/latest/userguide/managing-gateway-file.html#security-strategy) for more information.
      • 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 `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. > **NOTE:** One of `activationKey` or `gatewayIpAddress` must be provided for resource creation (gateway activation). Neither is required for resource import. If using `gatewayIpAddress`, this provider must be able to make an HTTP (port 80) GET request to the specified IP address from where it is running.
      • 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.
      • tapeDriveType

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> tapeDriveType()
        Returns:
        Type of tape drive to use for tape gateway. This provider cannot detect drift of this argument. Valid values: `IBM-ULT3580-TD5`.
      • get

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