@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-14T16:25:25.260Z") public class CfnBucket extends CfnResource implements IInspectable
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:
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();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnBucket.AbortIncompleteMultipartUploadProperty
Specifies 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 class |
CfnBucket.Builder
A fluent builder for
CfnBucket . |
static interface |
CfnBucket.FilterAndOperatorProperty
Example:
|
static interface |
CfnBucket.FilterProperty
Example:
|
static interface |
CfnBucket.FilterTagProperty
Example:
|
static interface |
CfnBucket.LifecycleConfigurationProperty
The container for the lifecycle configuration for the objects stored in an S3 on Outposts bucket.
|
static interface |
CfnBucket.RuleProperty
A container for an Amazon S3 on Outposts bucket lifecycle rule.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnBucket(Construct scope,
java.lang.String id,
CfnBucketProps props)
Create a new `AWS::S3Outposts::Bucket`.
|
protected |
CfnBucket(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnBucket(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn()
Returns the ARN of the specified bucket.
|
java.lang.String |
getBucketName()
A name for the S3 on Outposts bucket.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getLifecycleConfiguration()
Creates a new lifecycle configuration for the S3 on Outposts bucket or replaces an existing lifecycle configuration.
|
java.lang.String |
getOutpostId()
The ID of the Outpost of the specified bucket.
|
TagManager |
getTags()
Sets the tags for an S3 on Outposts bucket.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setBucketName(java.lang.String value)
A name for the S3 on Outposts bucket.
|
void |
setLifecycleConfiguration(CfnBucket.LifecycleConfigurationProperty value)
Creates a new lifecycle configuration for the S3 on Outposts bucket or replaces an existing lifecycle configuration.
|
void |
setLifecycleConfiguration(IResolvable value)
Creates a new lifecycle configuration for the S3 on Outposts bucket or replaces an existing lifecycle configuration.
|
void |
setOutpostId(java.lang.String value)
The ID of the Outpost of the specified bucket.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnBucket(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnBucket(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnBucket(Construct scope, java.lang.String id, CfnBucketProps props)
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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
Example: arn:aws:s3Outposts:::DOC-EXAMPLE-BUCKET
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
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 .
public java.lang.String getBucketName()
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.
public void setBucketName(java.lang.String value)
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.
public java.lang.String getOutpostId()
public void setOutpostId(java.lang.String value)
public java.lang.Object getLifecycleConfiguration()
Outposts buckets only support lifecycle configurations that delete/expire objects after a certain period of time and abort incomplete multipart uploads.
public void setLifecycleConfiguration(IResolvable value)
Outposts buckets only support lifecycle configurations that delete/expire objects after a certain period of time and abort incomplete multipart uploads.
public void setLifecycleConfiguration(CfnBucket.LifecycleConfigurationProperty value)
Outposts buckets only support lifecycle configurations that delete/expire objects after a certain period of time and abort incomplete multipart uploads.