1. Packages
  2. AWS Classic
  3. API Docs
  4. s3control
  5. Bucket

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

AWS Classic v6.31.0 published on Monday, Apr 15, 2024 by Pulumi

aws.s3control.Bucket

Explore with Pulumi AI

aws logo

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

AWS Classic v6.31.0 published on Monday, Apr 15, 2024 by Pulumi

    Provides a resource to manage an S3 Control Bucket.

    This functionality is for managing S3 on Outposts. To manage S3 Buckets in an AWS Partition, see the aws.s3.BucketV2 resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.s3control.Bucket("example", {
        bucket: "example",
        outpostId: exampleAwsOutpostsOutpost.id,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.s3control.Bucket("example",
        bucket="example",
        outpost_id=example_aws_outposts_outpost["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3control"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := s3control.NewBucket(ctx, "example", &s3control.BucketArgs{
    			Bucket:    pulumi.String("example"),
    			OutpostId: pulumi.Any(exampleAwsOutpostsOutpost.Id),
    		})
    		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.S3Control.Bucket("example", new()
        {
            BucketName = "example",
            OutpostId = exampleAwsOutpostsOutpost.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.s3control.Bucket;
    import com.pulumi.aws.s3control.BucketArgs;
    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 Bucket("example", BucketArgs.builder()        
                .bucket("example")
                .outpostId(exampleAwsOutpostsOutpost.id())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:s3control:Bucket
        properties:
          bucket: example
          outpostId: ${exampleAwsOutpostsOutpost.id}
    

    Create Bucket Resource

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

    Constructor syntax

    new Bucket(name: string, args: BucketArgs, opts?: CustomResourceOptions);
    @overload
    def Bucket(resource_name: str,
               args: BucketArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Bucket(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               bucket: Optional[str] = None,
               outpost_id: Optional[str] = None,
               tags: Optional[Mapping[str, str]] = None)
    func NewBucket(ctx *Context, name string, args BucketArgs, opts ...ResourceOption) (*Bucket, error)
    public Bucket(string name, BucketArgs args, CustomResourceOptions? opts = null)
    public Bucket(String name, BucketArgs args)
    public Bucket(String name, BucketArgs args, CustomResourceOptions options)
    
    type: aws:s3control:Bucket
    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 BucketArgs
    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 BucketArgs
    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 BucketArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BucketArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BucketArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var examplebucketResourceResourceFromS3controlbucket = new Aws.S3Control.Bucket("examplebucketResourceResourceFromS3controlbucket", new()
    {
        BucketName = "string",
        OutpostId = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := s3control.NewBucket(ctx, "examplebucketResourceResourceFromS3controlbucket", &s3control.BucketArgs{
    	Bucket:    pulumi.String("string"),
    	OutpostId: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var examplebucketResourceResourceFromS3controlbucket = new Bucket("examplebucketResourceResourceFromS3controlbucket", BucketArgs.builder()        
        .bucket("string")
        .outpostId("string")
        .tags(Map.of("string", "string"))
        .build());
    
    examplebucket_resource_resource_from_s3controlbucket = aws.s3control.Bucket("examplebucketResourceResourceFromS3controlbucket",
        bucket="string",
        outpost_id="string",
        tags={
            "string": "string",
        })
    
    const examplebucketResourceResourceFromS3controlbucket = new aws.s3control.Bucket("examplebucketResourceResourceFromS3controlbucket", {
        bucket: "string",
        outpostId: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:s3control:Bucket
    properties:
        bucket: string
        outpostId: string
        tags:
            string: string
    

    Bucket 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 Bucket resource accepts the following input properties:

    BucketName string
    Name of the bucket.
    OutpostId string
    Identifier of the Outpost to contain this bucket.
    Tags Dictionary<string, string>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Bucket string
    Name of the bucket.
    OutpostId string
    Identifier of the Outpost to contain this bucket.
    Tags map[string]string
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    bucket String
    Name of the bucket.
    outpostId String
    Identifier of the Outpost to contain this bucket.
    tags Map<String,String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    bucket string
    Name of the bucket.
    outpostId string
    Identifier of the Outpost to contain this bucket.
    tags {[key: string]: string}
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    bucket str
    Name of the bucket.
    outpost_id str
    Identifier of the Outpost to contain this bucket.
    tags Mapping[str, str]
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    bucket String
    Name of the bucket.
    outpostId String
    Identifier of the Outpost to contain this bucket.
    tags Map<String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

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

    Arn string
    Amazon Resource Name (ARN) of the bucket.
    CreationDate string
    UTC creation date in RFC3339 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    PublicAccessBlockEnabled bool
    Boolean whether Public Access Block is enabled.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    Amazon Resource Name (ARN) of the bucket.
    CreationDate string
    UTC creation date in RFC3339 format.
    Id string
    The provider-assigned unique ID for this managed resource.
    PublicAccessBlockEnabled bool
    Boolean whether Public Access Block is enabled.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    Amazon Resource Name (ARN) of the bucket.
    creationDate String
    UTC creation date in RFC3339 format.
    id String
    The provider-assigned unique ID for this managed resource.
    publicAccessBlockEnabled Boolean
    Boolean whether Public Access Block is enabled.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    Amazon Resource Name (ARN) of the bucket.
    creationDate string
    UTC creation date in RFC3339 format.
    id string
    The provider-assigned unique ID for this managed resource.
    publicAccessBlockEnabled boolean
    Boolean whether Public Access Block is enabled.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    Amazon Resource Name (ARN) of the bucket.
    creation_date str
    UTC creation date in RFC3339 format.
    id str
    The provider-assigned unique ID for this managed resource.
    public_access_block_enabled bool
    Boolean whether Public Access Block is enabled.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    Amazon Resource Name (ARN) of the bucket.
    creationDate String
    UTC creation date in RFC3339 format.
    id String
    The provider-assigned unique ID for this managed resource.
    publicAccessBlockEnabled Boolean
    Boolean whether Public Access Block is enabled.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing Bucket Resource

    Get an existing Bucket 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?: BucketState, opts?: CustomResourceOptions): Bucket
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            bucket: Optional[str] = None,
            creation_date: Optional[str] = None,
            outpost_id: Optional[str] = None,
            public_access_block_enabled: Optional[bool] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> Bucket
    func GetBucket(ctx *Context, name string, id IDInput, state *BucketState, opts ...ResourceOption) (*Bucket, error)
    public static Bucket Get(string name, Input<string> id, BucketState? state, CustomResourceOptions? opts = null)
    public static Bucket get(String name, Output<String> id, BucketState 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
    Amazon Resource Name (ARN) of the bucket.
    BucketName string
    Name of the bucket.
    CreationDate string
    UTC creation date in RFC3339 format.
    OutpostId string
    Identifier of the Outpost to contain this bucket.
    PublicAccessBlockEnabled bool
    Boolean whether Public Access Block is enabled.
    Tags Dictionary<string, string>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    Amazon Resource Name (ARN) of the bucket.
    Bucket string
    Name of the bucket.
    CreationDate string
    UTC creation date in RFC3339 format.
    OutpostId string
    Identifier of the Outpost to contain this bucket.
    PublicAccessBlockEnabled bool
    Boolean whether Public Access Block is enabled.
    Tags map[string]string
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    Amazon Resource Name (ARN) of the bucket.
    bucket String
    Name of the bucket.
    creationDate String
    UTC creation date in RFC3339 format.
    outpostId String
    Identifier of the Outpost to contain this bucket.
    publicAccessBlockEnabled Boolean
    Boolean whether Public Access Block is enabled.
    tags Map<String,String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    Amazon Resource Name (ARN) of the bucket.
    bucket string
    Name of the bucket.
    creationDate string
    UTC creation date in RFC3339 format.
    outpostId string
    Identifier of the Outpost to contain this bucket.
    publicAccessBlockEnabled boolean
    Boolean whether Public Access Block is enabled.
    tags {[key: string]: string}
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    Amazon Resource Name (ARN) of the bucket.
    bucket str
    Name of the bucket.
    creation_date str
    UTC creation date in RFC3339 format.
    outpost_id str
    Identifier of the Outpost to contain this bucket.
    public_access_block_enabled bool
    Boolean whether Public Access Block is enabled.
    tags Mapping[str, str]
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    Amazon Resource Name (ARN) of the bucket.
    bucket String
    Name of the bucket.
    creationDate String
    UTC creation date in RFC3339 format.
    outpostId String
    Identifier of the Outpost to contain this bucket.
    publicAccessBlockEnabled Boolean
    Boolean whether Public Access Block is enabled.
    tags Map<String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Import

    Using pulumi import, import S3 Control Buckets using Amazon Resource Name (ARN). For example:

    $ pulumi import aws:s3control/bucket:Bucket example arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-12345678/bucket/example
    

    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.31.0 published on Monday, Apr 15, 2024 by Pulumi