Class Access


  • public class Access
    extends com.pulumi.resources.CustomResource
    Provides a AWS Transfer Access resource. > **NOTE:** We suggest using explicit JSON encoding or `aws.iam.getPolicyDocument` when assigning a value to `policy`. They seamlessly translate configuration to JSON, enabling you to maintain consistency within your configuration without the need for context switches. Also, you can sidestep potential complications arising from formatting discrepancies, whitespace inconsistencies, and other nuances inherent to JSON. ## Example Usage ### Basic S3
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.transfer.Access;
     import com.pulumi.aws.transfer.AccessArgs;
     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 Access("example", AccessArgs.builder()
                 .externalId("S-1-1-12-1234567890-123456789-1234567890-1234")
                 .serverId(exampleAwsTransferServer.id())
                 .role(exampleAwsIamRole.arn())
                 .homeDirectory(String.format("/%s/", exampleAwsS3Bucket.id()))
                 .build());
     
         }
     }
     
     
    ### Basic EFS
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.transfer.Access;
     import com.pulumi.aws.transfer.AccessArgs;
     import com.pulumi.aws.transfer.inputs.AccessPosixProfileArgs;
     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 test = new Access("test", AccessArgs.builder()
                 .posixProfile(AccessPosixProfileArgs.builder()
                     .gid(1000)
                     .uid(1000)
                     .build())
                 .externalId("S-1-1-12-1234567890-123456789-1234567890-1234")
                 .serverId(testAwsTransferServer.id())
                 .role(testAwsIamRole.arn())
                 .homeDirectory(String.format("/%s/", testAwsEfsFileSystem.id()))
                 .build());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import Transfer Accesses using the `serverId` and `externalId`. For example: ```sh $ pulumi import aws:transfer/access:Access example s-12345678/S-1-1-12-1234567890-123456789-1234567890-1234 ```
    • 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
      Access​(java.lang.String name)  
      Access​(java.lang.String name, AccessArgs args)  
      Access​(java.lang.String name, AccessArgs 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> externalId()  
      static Access get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, AccessState 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>> homeDirectory()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<AccessHomeDirectoryMapping>>> homeDirectoryMappings()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> homeDirectoryType()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> policy()  
      com.pulumi.core.Output<java.util.Optional<AccessPosixProfile>> posixProfile()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> role()  
      com.pulumi.core.Output<java.lang.String> serverId()  
      • 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

      • Access

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

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

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

      • externalId

        public com.pulumi.core.Output<java.lang.String> externalId()
        Returns:
        SID of a group in the directory connected to the Transfer Server (e.g., `S-1-1-12-1234567890-123456789-1234567890-1234`)
      • homeDirectory

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> homeDirectory()
        Returns:
        Landing directory (folder) for a user when they log in to the server using their SFTP client. It should begin with a `/`. The first item in the path is the name of the home bucket (accessible as `${Transfer:HomeBucket}` in the policy) and the rest is the home directory (accessible as `${Transfer:HomeDirectory}` in the policy). For example, `/example-bucket-1234/username` would set the home bucket to `example-bucket-1234` and the home directory to `username`.
      • homeDirectoryMappings

        public com.pulumi.core.Output<java.util.Optional<java.util.List<AccessHomeDirectoryMapping>>> homeDirectoryMappings()
        Returns:
        Logical directory mappings that specify what S3 paths and keys should be visible to your user and how you want to make them visible. See `homeDirectoryMappings` Block below.
      • homeDirectoryType

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> homeDirectoryType()
        Returns:
        Type of landing directory (folder) you mapped for your users' home directory. Valid values are `PATH` and `LOGICAL`.
      • policy

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> policy()
        Returns:
        IAM JSON policy document that scopes down user access to portions of their Amazon S3 bucket. IAM variables you can use inside this policy include `${Transfer:UserName}`, `${Transfer:HomeDirectory}`, and `${Transfer:HomeBucket}`. These are evaluated on-the-fly when navigating the bucket.
      • posixProfile

        public com.pulumi.core.Output<java.util.Optional<AccessPosixProfile>> posixProfile()
        Returns:
        Full POSIX identity, including user ID (Uid), group ID (Gid), and any secondary groups IDs (SecondaryGids), that controls your users' access to your Amazon EFS file systems. See `posixProfile` Block below.
      • 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.
      • role

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> role()
        Returns:
        ARN of an IAM role that allows the service to controls your user’s access to your Amazon S3 bucket.
      • serverId

        public com.pulumi.core.Output<java.lang.String> serverId()
        Returns:
        Server ID of the Transfer Server (e.g., `s-12345678`)
      • get

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