class CfnDirectoryBucketPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.S3Express.Mixins.CfnDirectoryBucketPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awss3express/mixins#CfnDirectoryBucketPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.s3express.mixins.CfnDirectoryBucketPropsMixin |
Python | aws_cdk.mixins_preview.aws_s3express.mixins.CfnDirectoryBucketPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_s3express » mixins » CfnDirectoryBucketPropsMixin |
Implements
IMixin
Extends
Mixin
The AWS::S3Express::DirectoryBucket resource defines an Amazon S3 directory 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.
Permissions - The required permissions for CloudFormation to use are based on the operations that are performed on the stack.
Create
s3express:CreateBucket
s3express:ListAllMyDirectoryBuckets
Read
s3express:ListAllMyDirectoryBuckets
ec2:DescribeAvailabilityZones
Delete
s3express:DeleteBucket
s3express:ListAllMyDirectoryBuckets
List
s3express:ListAllMyDirectoryBuckets
PutBucketEncryption
s3express:PutEncryptionConfiguration
To set a directory bucket default encryption with SSE-KMS, you must also have the kms:GenerateDataKey and kms:Decrypt permissions in IAM identity-based policies and AWS KMS key policies for the target AWS KMS key.
GetBucketEncryption
s3express:GetBucketEncryption
DeleteBucketEncryption
s3express:PutEncryptionConfiguration
The following operations are related to AWS::S3Express::DirectoryBucket :
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as s3express_mixins } from '@aws-cdk/mixins-preview/aws-s3express';
const cfnDirectoryBucketPropsMixin = new s3express_mixins.CfnDirectoryBucketPropsMixin({
bucketEncryption: {
serverSideEncryptionConfiguration: [{
bucketKeyEnabled: false,
serverSideEncryptionByDefault: {
kmsMasterKeyId: 'kmsMasterKeyId',
sseAlgorithm: 'sseAlgorithm',
},
}],
},
bucketName: 'bucketName',
dataRedundancy: 'dataRedundancy',
lifecycleConfiguration: {
rules: [{
abortIncompleteMultipartUpload: {
daysAfterInitiation: 123,
},
expirationInDays: 123,
id: 'id',
objectSizeGreaterThan: 'objectSizeGreaterThan',
objectSizeLessThan: 'objectSizeLessThan',
prefix: 'prefix',
status: 'status',
}],
},
locationName: 'locationName',
tags: [{
key: 'key',
value: 'value',
}],
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnDirectoryBucketPropsMixin(props: CfnDirectoryBucketMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Directory Bucket Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::S3Express::DirectoryBucket.
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