Class CfnBucket
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.s3outposts.CfnBucket
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IBucketRef,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-12-01T16:02:28.892Z")
@Stability(Stable)
public class CfnBucket
extends CfnResource
implements IInspectable, IBucketRef, 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceSpecifies the days since the initiation of an incomplete multipart upload that Amazon S3 on Outposts waits before permanently removing all parts of the upload.static final classA fluent builder forCfnBucket.static interfaceExample:static interfaceThe container for the filter of the lifecycle rule.static interfaceTag used to identify a subset of objects for an Amazon S3Outposts bucket.static interfaceThe container for the lifecycle configuration for the objects stored in an S3 on Outposts bucket.static interfaceA container for an Amazon S3 on Outposts bucket lifecycle rule.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.s3outposts.IBucketRef
IBucketRef.Jsii$Default, IBucketRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnBucket(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnBucket(software.amazon.jsii.JsiiObjectRef objRef) CfnBucket(software.constructs.Construct scope, String id, CfnBucketProps props) Create a newAWS::S3Outposts::Bucket. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForBucket(IBucketRef resource) Returns the ARN of the specified bucket.A name for the S3 on Outposts bucket.A reference to a Bucket resource.Creates a new lifecycle configuration for the S3 on Outposts bucket or replaces an existing lifecycle configuration.The ID of the Outpost of the specified bucket.getTags()Tag Manager which manages the tags for this resource.Sets the tags for an S3 on Outposts bucket.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnBucket.renderProperties(Map<String, Object> props) voidsetBucketName(String value) A name for the S3 on Outposts bucket.voidCreates a new lifecycle configuration for the S3 on Outposts bucket or replaces an existing lifecycle configuration.voidCreates a new lifecycle configuration for the S3 on Outposts bucket or replaces an existing lifecycle configuration.voidsetOutpostId(String value) The ID of the Outpost of the specified bucket.voidsetTagsRaw(List<CfnTag> value) Sets the tags for an S3 on Outposts bucket.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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) Create a newAWS::S3Outposts::Bucket.- 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
-
arnForBucket
- Parameters:
resource- This parameter is required.
-
isCfnBucket
Checks whether the given object is a CfnBucket.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
Returns the ARN of the specified bucket.Example:
arn:aws:s3Outposts:::DOC-EXAMPLE-BUCKET -
getBucketRef
A reference to a Bucket resource.- Specified by:
getBucketRefin interfaceIBucketRef
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getBucketName
A name for the S3 on Outposts bucket. -
setBucketName
A name for the S3 on Outposts bucket. -
getOutpostId
The ID of the Outpost of the specified bucket. -
setOutpostId
The ID of the Outpost of the specified bucket. -
getLifecycleConfiguration
Creates a new lifecycle configuration for the S3 on Outposts bucket or replaces an existing lifecycle configuration.Returns union: either
IResolvableorCfnBucket.LifecycleConfigurationProperty -
setLifecycleConfiguration
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
Sets the tags for an S3 on Outposts bucket.For more information, see Using Amazon S3 on Outposts .
-
setTagsRaw
Sets the tags for an S3 on Outposts bucket.For more information, see Using Amazon S3 on Outposts .
-