Class DirectoryBucket


  • public class DirectoryBucket
    extends com.pulumi.resources.CustomResource
    Provides an Amazon S3 Express directory bucket resource. ## Example Usage ### Availability Zone
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.s3.DirectoryBucket;
     import com.pulumi.aws.s3.DirectoryBucketArgs;
     import com.pulumi.aws.s3.inputs.DirectoryBucketLocationArgs;
     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 DirectoryBucket("example", DirectoryBucketArgs.builder()
                 .location(DirectoryBucketLocationArgs.builder()
                     .name("usw2-az1")
                     .build())
                 .bucket("example--usw2-az1--x-s3")
                 .build());
     
         }
     }
     
     
    ### Dedicated Local Zone
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.s3.DirectoryBucket;
     import com.pulumi.aws.s3.DirectoryBucketArgs;
     import com.pulumi.aws.s3.inputs.DirectoryBucketLocationArgs;
     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 exampleLocalZone = new DirectoryBucket("exampleLocalZone", DirectoryBucketArgs.builder()
                 .location(DirectoryBucketLocationArgs.builder()
                     .name("usw2-xxx-lz1")
                     .type("LocalZone")
                     .build())
                 .bucket("example--usw2-xxx-lz1--x-s3")
                 .build());
     
         }
     }
     
     
    ## Import ### Identity Schema #### Required * `bucket` (String) Name of the S3 Directory Bucket. #### Optional * `accountId` (String) AWS Account where this resource is managed. * `region` (String) Region where this resource is managed. Using `pulumi import`, import S3 bucket using `bucket`. For example: ```sh $ pulumi import aws:s3/directoryBucket:DirectoryBucket example example--usw2-az1--x-s3 ```
    • 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.String> bucket()  
      com.pulumi.core.Output<java.lang.String> dataRedundancy()  
      com.pulumi.core.Output<java.lang.Boolean> forceDestroy()  
      static DirectoryBucket get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, DirectoryBucketState 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<DirectoryBucketLocation> location()  
      com.pulumi.core.Output<java.lang.String> region()  
      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> type()  
      • 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

      • DirectoryBucket

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

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

        public DirectoryBucket​(java.lang.String name,
                               DirectoryBucketArgs 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 bucket.
      • bucket

        public com.pulumi.core.Output<java.lang.String> bucket()
        Returns:
        Name of the bucket. The name must be in the format `[bucketName]--[azid]--x-s3`. Use the `aws.s3.Bucket` resource to manage general purpose buckets.
      • dataRedundancy

        public com.pulumi.core.Output<java.lang.String> dataRedundancy()
        Returns:
        Data redundancy. Valid values: `SingleAvailabilityZone`, `SingleLocalZone`. The default value depends on the value of the `location.type` attribute.
      • forceDestroy

        public com.pulumi.core.Output<java.lang.Boolean> forceDestroy()
        Returns:
        Boolean that indicates all objects should be deleted from the bucket *when the bucket is destroyed* so that the bucket can be destroyed without error. These objects are *not* recoverable. This only deletes objects when the bucket is destroyed, *not* when setting this parameter to `true`. Once this parameter is set to `true`, there must be a successful `pulumi up` run before a destroy is required to update this value in the resource state. Without a successful `pulumi up` after this parameter is set, this flag will have no effect. If setting this field in the same operation that would require replacing the bucket or destroying the bucket, this flag will not work. Additionally when importing a bucket, a successful `pulumi up` is required to set this value in state before it will take effect on a destroy operation.
      • location

        public com.pulumi.core.Output<DirectoryBucketLocation> location()
        Returns:
        Bucket location. See Location below for more details.
      • 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.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Map of tags to assign to the bucket. 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:
        Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
      • type

        public com.pulumi.core.Output<java.lang.String> type()
        Returns:
        Bucket type. Valid values: `Directory`.
      • get

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