class CfnBucketPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.S3.Mixins.CfnBucketPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awss3/mixins#CfnBucketPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.s3.mixins.CfnBucketPropsMixin |
Python | aws_cdk.mixins_preview.aws_s3.mixins.CfnBucketPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_s3 » mixins » CfnBucketPropsMixin |
Implements
IMixin
Extends
Mixin
The AWS::S3::Bucket resource creates an Amazon S3 bucket in the same AWS Region where you create the AWS CloudFormation stack.
To control how AWS CloudFormation handles the bucket when the stack is deleted, you can set a deletion policy for your bucket. You can choose to retain the bucket or to delete the bucket. For more information, see DeletionPolicy Attribute .
You can only delete empty buckets. Deletion fails for buckets that have contents.
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-bucket.html
Example
import '@aws-cdk/mixins-preview/with';
const bucket = new s3.Bucket(scope, "Bucket")
.with(new CfnBucketPropsMixin({
versioningConfiguration: { status: "Enabled" },
publicAccessBlockConfiguration: {
blockPublicAcls: true,
blockPublicPolicy: true
}
}));
Initializer
new CfnBucketPropsMixin(props: CfnBucketMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Bucket Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::S3::Bucket.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript