java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:35.064Z") @Stability(Stable) public class CfnBucket extends CfnResource implements IInspectable
A CloudFormation AWS::S3Outposts::Bucket.

The AWS::S3Outposts::Bucket resource specifies a new Amazon S3 on Outposts bucket. To create an S3 on Outposts bucket, you must have S3 on Outposts capacity provisioned on your Outpost. For more information, see Using Amazon S3 on Outposts .

S3 on Outposts buckets support the following:

  • Tags
  • Lifecycle configuration rules for deleting expired objects

For a complete list of restrictions and Amazon S3 feature limitations on S3 on Outposts, see Amazon S3 on Outposts Restrictions and Limitations .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.s3outposts.*;
 Object filter;
 CfnBucket cfnBucket = CfnBucket.Builder.create(this, "MyCfnBucket")
         .bucketName("bucketName")
         .outpostId("outpostId")
         // the properties below are optional
         .lifecycleConfiguration(LifecycleConfigurationProperty.builder()
                 .rules(List.of(RuleProperty.builder()
                         .status("status")
                         // the properties below are optional
                         .abortIncompleteMultipartUpload(AbortIncompleteMultipartUploadProperty.builder()
                                 .daysAfterInitiation(123)
                                 .build())
                         .expirationDate("expirationDate")
                         .expirationInDays(123)
                         .filter(filter)
                         .id("id")
                         .build()))
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnBucket

      protected CfnBucket(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnBucket

      protected CfnBucket(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnBucket

      @Stability(Stable) public CfnBucket(@NotNull Construct scope, @NotNull String id, @NotNull CfnBucketProps props)
      Create a new AWS::S3Outposts::Bucket.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      Returns the ARN of the specified bucket.

      Example: arn:aws:s3Outposts:::DOC-EXAMPLE-BUCKET

    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Sets the tags for an S3 on Outposts bucket. For more information, see Using Amazon S3 on Outposts .

      Use tags to organize your AWS bill to reflect your own cost structure. To do this, sign up to get your AWS account bill with tag key values included. Then, to see the cost of combined resources, organize your billing information according to resources with the same tag key values. For example, you can tag several resources with a specific application name, and then organize your billing information to see the total cost of that application across several services. For more information, see Cost allocation and tags .

      Within a bucket, if you add a tag that has the same key as an existing tag, the new value overwrites the old value. For more information, see Using cost allocation and bucket tags .

      To use this resource, you must have permissions to perform the s3-outposts:PutBucketTagging . The S3 on Outposts bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing access permissions to your Amazon S3 resources .

    • getBucketName

      @Stability(Stable) @NotNull public String getBucketName()
      A name for the S3 on Outposts bucket.

      If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID for the bucket name. The bucket name must contain only lowercase letters, numbers, periods (.), and dashes (-) and must follow Amazon S3 bucket restrictions and limitations . For more information, see Bucket naming rules .

      If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you need to replace the resource, specify a new name.

    • setBucketName

      @Stability(Stable) public void setBucketName(@NotNull String value)
      A name for the S3 on Outposts bucket.

      If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID for the bucket name. The bucket name must contain only lowercase letters, numbers, periods (.), and dashes (-) and must follow Amazon S3 bucket restrictions and limitations . For more information, see Bucket naming rules .

      If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you need to replace the resource, specify a new name.

    • getOutpostId

      @Stability(Stable) @NotNull public String getOutpostId()
      The ID of the Outpost of the specified bucket.
    • setOutpostId

      @Stability(Stable) public void setOutpostId(@NotNull String value)
      The ID of the Outpost of the specified bucket.
    • getLifecycleConfiguration

      @Stability(Stable) @Nullable public Object getLifecycleConfiguration()
      Creates a new lifecycle configuration for the S3 on Outposts bucket or replaces an existing lifecycle configuration.

      Outposts buckets only support lifecycle configurations that delete/expire objects after a certain period of time and abort incomplete multipart uploads.

    • setLifecycleConfiguration

      @Stability(Stable) public void setLifecycleConfiguration(@Nullable IResolvable value)
      Creates a new lifecycle configuration for the S3 on Outposts bucket or replaces an existing lifecycle configuration.

      Outposts buckets only support lifecycle configurations that delete/expire objects after a certain period of time and abort incomplete multipart uploads.

    • setLifecycleConfiguration

      @Stability(Stable) public void setLifecycleConfiguration(@Nullable CfnBucket.LifecycleConfigurationProperty value)
      Creates a new lifecycle configuration for the S3 on Outposts bucket or replaces an existing lifecycle configuration.

      Outposts buckets only support lifecycle configurations that delete/expire objects after a certain period of time and abort incomplete multipart uploads.