1. Packages
  2. AWS Classic
  3. API Docs
  4. s3
  5. DirectoryBucket

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.45.0 published on Tuesday, Jul 16, 2024 by Pulumi

aws.s3.DirectoryBucket

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.45.0 published on Tuesday, Jul 16, 2024 by Pulumi

    Provides an Amazon S3 Express directory bucket resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.s3.DirectoryBucket("example", {
        bucket: "example--usw2-az1--x-s3",
        location: {
            name: "usw2-az1",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.s3.DirectoryBucket("example",
        bucket="example--usw2-az1--x-s3",
        location={
            "name": "usw2-az1",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := s3.NewDirectoryBucket(ctx, "example", &s3.DirectoryBucketArgs{
    			Bucket: pulumi.String("example--usw2-az1--x-s3"),
    			Location: &s3.DirectoryBucketLocationArgs{
    				Name: pulumi.String("usw2-az1"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.S3.DirectoryBucket("example", new()
        {
            Bucket = "example--usw2-az1--x-s3",
            Location = new Aws.S3.Inputs.DirectoryBucketLocationArgs
            {
                Name = "usw2-az1",
            },
        });
    
    });
    
    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.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 DirectoryBucket("example", DirectoryBucketArgs.builder()
                .bucket("example--usw2-az1--x-s3")
                .location(DirectoryBucketLocationArgs.builder()
                    .name("usw2-az1")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:s3:DirectoryBucket
        properties:
          bucket: example--usw2-az1--x-s3
          location:
            name: usw2-az1
    

    Create DirectoryBucket Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DirectoryBucket(name: string, args: DirectoryBucketArgs, opts?: CustomResourceOptions);
    @overload
    def DirectoryBucket(resource_name: str,
                        args: DirectoryBucketArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def DirectoryBucket(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        bucket: Optional[str] = None,
                        data_redundancy: Optional[str] = None,
                        force_destroy: Optional[bool] = None,
                        location: Optional[DirectoryBucketLocationArgs] = None,
                        type: Optional[str] = None)
    func NewDirectoryBucket(ctx *Context, name string, args DirectoryBucketArgs, opts ...ResourceOption) (*DirectoryBucket, error)
    public DirectoryBucket(string name, DirectoryBucketArgs args, CustomResourceOptions? opts = null)
    public DirectoryBucket(String name, DirectoryBucketArgs args)
    public DirectoryBucket(String name, DirectoryBucketArgs args, CustomResourceOptions options)
    
    type: aws:s3:DirectoryBucket
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DirectoryBucketArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DirectoryBucketArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DirectoryBucketArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DirectoryBucketArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DirectoryBucketArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var directoryBucketResource = new Aws.S3.DirectoryBucket("directoryBucketResource", new()
    {
        Bucket = "string",
        DataRedundancy = "string",
        ForceDestroy = false,
        Location = new Aws.S3.Inputs.DirectoryBucketLocationArgs
        {
            Name = "string",
            Type = "string",
        },
        Type = "string",
    });
    
    example, err := s3.NewDirectoryBucket(ctx, "directoryBucketResource", &s3.DirectoryBucketArgs{
    	Bucket:         pulumi.String("string"),
    	DataRedundancy: pulumi.String("string"),
    	ForceDestroy:   pulumi.Bool(false),
    	Location: &s3.DirectoryBucketLocationArgs{
    		Name: pulumi.String("string"),
    		Type: pulumi.String("string"),
    	},
    	Type: pulumi.String("string"),
    })
    
    var directoryBucketResource = new DirectoryBucket("directoryBucketResource", DirectoryBucketArgs.builder()
        .bucket("string")
        .dataRedundancy("string")
        .forceDestroy(false)
        .location(DirectoryBucketLocationArgs.builder()
            .name("string")
            .type("string")
            .build())
        .type("string")
        .build());
    
    directory_bucket_resource = aws.s3.DirectoryBucket("directoryBucketResource",
        bucket="string",
        data_redundancy="string",
        force_destroy=False,
        location={
            "name": "string",
            "type": "string",
        },
        type="string")
    
    const directoryBucketResource = new aws.s3.DirectoryBucket("directoryBucketResource", {
        bucket: "string",
        dataRedundancy: "string",
        forceDestroy: false,
        location: {
            name: "string",
            type: "string",
        },
        type: "string",
    });
    
    type: aws:s3:DirectoryBucket
    properties:
        bucket: string
        dataRedundancy: string
        forceDestroy: false
        location:
            name: string
            type: string
        type: string
    

    DirectoryBucket Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The DirectoryBucket resource accepts the following input properties:

    Bucket string
    Name of the bucket. The name must be in the format [bucket_name]--[azid]--x-s3. Use the aws.s3.BucketV2 resource to manage general purpose buckets.
    DataRedundancy string
    Data redundancy. Valid values: SingleAvailabilityZone.
    ForceDestroy bool
    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 DirectoryBucketLocation
    Bucket location. See Location below for more details.
    Type string
    Bucket type. Valid values: Directory.
    Bucket string
    Name of the bucket. The name must be in the format [bucket_name]--[azid]--x-s3. Use the aws.s3.BucketV2 resource to manage general purpose buckets.
    DataRedundancy string
    Data redundancy. Valid values: SingleAvailabilityZone.
    ForceDestroy bool
    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 DirectoryBucketLocationArgs
    Bucket location. See Location below for more details.
    Type string
    Bucket type. Valid values: Directory.
    bucket String
    Name of the bucket. The name must be in the format [bucket_name]--[azid]--x-s3. Use the aws.s3.BucketV2 resource to manage general purpose buckets.
    dataRedundancy String
    Data redundancy. Valid values: SingleAvailabilityZone.
    forceDestroy Boolean
    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 DirectoryBucketLocation
    Bucket location. See Location below for more details.
    type String
    Bucket type. Valid values: Directory.
    bucket string
    Name of the bucket. The name must be in the format [bucket_name]--[azid]--x-s3. Use the aws.s3.BucketV2 resource to manage general purpose buckets.
    dataRedundancy string
    Data redundancy. Valid values: SingleAvailabilityZone.
    forceDestroy boolean
    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 DirectoryBucketLocation
    Bucket location. See Location below for more details.
    type string
    Bucket type. Valid values: Directory.
    bucket str
    Name of the bucket. The name must be in the format [bucket_name]--[azid]--x-s3. Use the aws.s3.BucketV2 resource to manage general purpose buckets.
    data_redundancy str
    Data redundancy. Valid values: SingleAvailabilityZone.
    force_destroy bool
    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 DirectoryBucketLocationArgs
    Bucket location. See Location below for more details.
    type str
    Bucket type. Valid values: Directory.
    bucket String
    Name of the bucket. The name must be in the format [bucket_name]--[azid]--x-s3. Use the aws.s3.BucketV2 resource to manage general purpose buckets.
    dataRedundancy String
    Data redundancy. Valid values: SingleAvailabilityZone.
    forceDestroy Boolean
    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 Property Map
    Bucket location. See Location below for more details.
    type String
    Bucket type. Valid values: Directory.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DirectoryBucket resource produces the following output properties:

    Arn string
    ARN of the bucket.
    Id string
    The provider-assigned unique ID for this managed resource.
    Arn string
    ARN of the bucket.
    Id string
    The provider-assigned unique ID for this managed resource.
    arn String
    ARN of the bucket.
    id String
    The provider-assigned unique ID for this managed resource.
    arn string
    ARN of the bucket.
    id string
    The provider-assigned unique ID for this managed resource.
    arn str
    ARN of the bucket.
    id str
    The provider-assigned unique ID for this managed resource.
    arn String
    ARN of the bucket.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing DirectoryBucket Resource

    Get an existing DirectoryBucket resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DirectoryBucketState, opts?: CustomResourceOptions): DirectoryBucket
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            bucket: Optional[str] = None,
            data_redundancy: Optional[str] = None,
            force_destroy: Optional[bool] = None,
            location: Optional[DirectoryBucketLocationArgs] = None,
            type: Optional[str] = None) -> DirectoryBucket
    func GetDirectoryBucket(ctx *Context, name string, id IDInput, state *DirectoryBucketState, opts ...ResourceOption) (*DirectoryBucket, error)
    public static DirectoryBucket Get(string name, Input<string> id, DirectoryBucketState? state, CustomResourceOptions? opts = null)
    public static DirectoryBucket get(String name, Output<String> id, DirectoryBucketState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    ARN of the bucket.
    Bucket string
    Name of the bucket. The name must be in the format [bucket_name]--[azid]--x-s3. Use the aws.s3.BucketV2 resource to manage general purpose buckets.
    DataRedundancy string
    Data redundancy. Valid values: SingleAvailabilityZone.
    ForceDestroy bool
    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 DirectoryBucketLocation
    Bucket location. See Location below for more details.
    Type string
    Bucket type. Valid values: Directory.
    Arn string
    ARN of the bucket.
    Bucket string
    Name of the bucket. The name must be in the format [bucket_name]--[azid]--x-s3. Use the aws.s3.BucketV2 resource to manage general purpose buckets.
    DataRedundancy string
    Data redundancy. Valid values: SingleAvailabilityZone.
    ForceDestroy bool
    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 DirectoryBucketLocationArgs
    Bucket location. See Location below for more details.
    Type string
    Bucket type. Valid values: Directory.
    arn String
    ARN of the bucket.
    bucket String
    Name of the bucket. The name must be in the format [bucket_name]--[azid]--x-s3. Use the aws.s3.BucketV2 resource to manage general purpose buckets.
    dataRedundancy String
    Data redundancy. Valid values: SingleAvailabilityZone.
    forceDestroy Boolean
    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 DirectoryBucketLocation
    Bucket location. See Location below for more details.
    type String
    Bucket type. Valid values: Directory.
    arn string
    ARN of the bucket.
    bucket string
    Name of the bucket. The name must be in the format [bucket_name]--[azid]--x-s3. Use the aws.s3.BucketV2 resource to manage general purpose buckets.
    dataRedundancy string
    Data redundancy. Valid values: SingleAvailabilityZone.
    forceDestroy boolean
    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 DirectoryBucketLocation
    Bucket location. See Location below for more details.
    type string
    Bucket type. Valid values: Directory.
    arn str
    ARN of the bucket.
    bucket str
    Name of the bucket. The name must be in the format [bucket_name]--[azid]--x-s3. Use the aws.s3.BucketV2 resource to manage general purpose buckets.
    data_redundancy str
    Data redundancy. Valid values: SingleAvailabilityZone.
    force_destroy bool
    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 DirectoryBucketLocationArgs
    Bucket location. See Location below for more details.
    type str
    Bucket type. Valid values: Directory.
    arn String
    ARN of the bucket.
    bucket String
    Name of the bucket. The name must be in the format [bucket_name]--[azid]--x-s3. Use the aws.s3.BucketV2 resource to manage general purpose buckets.
    dataRedundancy String
    Data redundancy. Valid values: SingleAvailabilityZone.
    forceDestroy Boolean
    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 Property Map
    Bucket location. See Location below for more details.
    type String
    Bucket type. Valid values: Directory.

    Supporting Types

    DirectoryBucketLocation, DirectoryBucketLocationArgs

    Name string
    Availability Zone ID.
    Type string
    Location type. Valid values: AvailabilityZone.
    Name string
    Availability Zone ID.
    Type string
    Location type. Valid values: AvailabilityZone.
    name String
    Availability Zone ID.
    type String
    Location type. Valid values: AvailabilityZone.
    name string
    Availability Zone ID.
    type string
    Location type. Valid values: AvailabilityZone.
    name str
    Availability Zone ID.
    type str
    Location type. Valid values: AvailabilityZone.
    name String
    Availability Zone ID.
    type String
    Location type. Valid values: AvailabilityZone.

    Import

    Using pulumi import, import S3 bucket using bucket. For example:

    $ pulumi import aws:s3/directoryBucket:DirectoryBucket example example--usw2-az1--x-s3
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.45.0 published on Tuesday, Jul 16, 2024 by Pulumi