interface BucketPolicyProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.S3.BucketPolicyProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awss3#BucketPolicyProps |
Java | software.amazon.awscdk.services.s3.BucketPolicyProps |
Python | aws_cdk.aws_s3.BucketPolicyProps |
TypeScript (source) | aws-cdk-lib » aws_s3 » BucketPolicyProps |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_s3 as s3 } from 'aws-cdk-lib';
declare const bucket: s3.Bucket;
const bucketPolicyProps: s3.BucketPolicyProps = {
bucket: bucket,
// the properties below are optional
removalPolicy: cdk.RemovalPolicy.DESTROY,
};
Properties
Name | Type | Description |
---|---|---|
bucket | IBucket | The Amazon S3 bucket that the policy applies to. |
removal | Removal | Policy to apply when the policy is removed from this stack. |
bucket
Type:
IBucket
The Amazon S3 bucket that the policy applies to.
removalPolicy?
Type:
Removal
(optional, default: RemovalPolicy.DESTROY.)
Policy to apply when the policy is removed from this stack.