CfnBucketPolicyPropsMixin

class aws_cdk.mixins_preview.aws_s3express.mixins.CfnBucketPolicyPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::S3Express::BucketPolicy resource defines an Amazon S3 bucket policy to an Amazon S3 directory bucket.

  • Permissions - If you are using an identity other than the root user of the AWS account that owns the bucket, the calling identity must both have the required permissions on the specified bucket and belong to the bucket owner’s account in order to use this operation. For more information about directory bucket policies and permissions, see AWS Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide .

To ensure that bucket owners don’t inadvertently lock themselves out of their own buckets, the root principal in a bucket owner’s AWS account can perform the GetBucketPolicy , PutBucketPolicy , and DeleteBucketPolicy API actions, even if their bucket policy explicitly denies the root principal’s access. Bucket owner root principals can only be blocked from performing these API actions by VPC endpoint policies and AWS Organizations policies.

The required permissions for CloudFormation to use are based on the operations that are performed on the stack.

  • Create

  • s3express:GetBucketPolicy

  • s3express:PutBucketPolicy

  • Read

  • s3express:GetBucketPolicy

  • Update

  • s3express:GetBucketPolicy

  • s3express:PutBucketPolicy

  • Delete

  • s3express:GetBucketPolicy

  • s3express:DeleteBucketPolicy

  • List

  • s3express:GetBucketPolicy

  • s3express:ListAllMyDirectoryBuckets

For more information about example bucket policies, see Example bucket policies for S3 Express One Zone in the Amazon S3 User Guide .

The following operations are related to AWS::S3Express::BucketPolicy :

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3express-bucketpolicy.html

CloudformationResource:

AWS::S3Express::BucketPolicy

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_s3express import mixins as s3express_mixins

# policy_document: Any

cfn_bucket_policy_props_mixin = s3express_mixins.CfnBucketPolicyPropsMixin(s3express_mixins.CfnBucketPolicyMixinProps(
    bucket="bucket",
    policy_document=policy_document
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::S3Express::BucketPolicy.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['bucket', 'policyDocument']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental