Class S3Location


  • public class S3Location
    extends com.pulumi.resources.CustomResource
    Manages an S3 Location within AWS DataSync. ## Example Usage ### Basic Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.datasync.S3Location;
     import com.pulumi.aws.datasync.S3LocationArgs;
     import com.pulumi.aws.datasync.inputs.S3LocationS3ConfigArgs;
     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 S3Location("example", S3LocationArgs.builder()
                 .s3Config(S3LocationS3ConfigArgs.builder()
                     .bucketAccessRoleArn(exampleAwsIamRole.arn())
                     .build())
                 .s3BucketArn(exampleAwsS3Bucket.arn())
                 .subdirectory("/example/prefix")
                 .build());
     
         }
     }
     
     
    ### S3 Bucket on AWS Outposts
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.datasync.S3Location;
     import com.pulumi.aws.datasync.S3LocationArgs;
     import com.pulumi.aws.datasync.inputs.S3LocationS3ConfigArgs;
     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 destination = new S3Location("destination", S3LocationArgs.builder()
                 .s3Config(S3LocationS3ConfigArgs.builder()
                     .bucketAccessRoleArn(example.arn())
                     .build())
                 .agentArns(exampleAwsDatasyncAgent.arn())
                 .s3BucketArn(exampleAwsS3AccessPoint.arn())
                 .s3StorageClass("OUTPOSTS")
                 .subdirectory("/example/prefix")
                 .build());
     
         }
     }
     
     
    ## Import ### Identity Schema #### Required - `arn` (String) ARN of the DataSync S3 location. Using `pulumi import`, import `aws.datasync.S3Location` using the DataSync Task ARN. For example: ```sh $ pulumi import aws:datasync/s3Location:S3Location example arn:aws:datasync:us-east-1:123456789012:location/loc-12345678901234567 ```
    • 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.util.Optional<java.util.List<java.lang.String>>> agentArns()  
      com.pulumi.core.Output<java.lang.String> arn()  
      static S3Location get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, S3LocationState 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.lang.String> region()  
      com.pulumi.core.Output<java.lang.String> s3BucketArn()  
      com.pulumi.core.Output<S3LocationS3Config> s3Config()  
      com.pulumi.core.Output<java.lang.String> s3StorageClass()  
      com.pulumi.core.Output<java.lang.String> subdirectory()  
      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> uri()  
      • 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

      • S3Location

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

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

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

      • agentArns

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> agentArns()
        Returns:
        (Amazon S3 on Outposts only) ARN of the DataSync agent on the Outpost.
      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        ARN of the DataSync Location.
      • 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.
      • s3BucketArn

        public com.pulumi.core.Output<java.lang.String> s3BucketArn()
        Returns:
        ARN of the S3 bucket, or the Amazon S3 access point if the S3 bucket is located on an AWS Outposts resource.
      • s3Config

        public com.pulumi.core.Output<S3LocationS3Config> s3Config()
        Returns:
        Configuration block containing information for connecting to S3.
      • s3StorageClass

        public com.pulumi.core.Output<java.lang.String> s3StorageClass()
        Returns:
        Amazon S3 storage class that you want to store your files in when this location is used as a task destination. [Valid values](https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html#using-storage-classes)
      • subdirectory

        public com.pulumi.core.Output<java.lang.String> subdirectory()
        Returns:
        Prefix to perform actions as source or destination.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Key-value pairs of resource tags to assign to the DataSync Location. If configured with a provider `defaultTags` 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 `defaultTags` configuration block.
      • uri

        public com.pulumi.core.Output<java.lang.String> uri()
      • get

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