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

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:36.741Z") @Stability(Stable) public class CfnBucket extends CfnResource implements IInspectable, ITaggable
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();
 

See Also:
  • 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnBucketProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). 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()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getBucketName

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

      @Stability(Stable) public void setBucketName(@NotNull String value)
      A name for the S3 on Outposts bucket.
    • 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.
    • 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.
    • 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.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      Sets the tags for an S3 on Outposts bucket.

      For more information, see Using Amazon S3 on Outposts .

    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      Sets the tags for an S3 on Outposts bucket.

      For more information, see Using Amazon S3 on Outposts .