CfnBucketPolicyPropsMixin
- class aws_cdk.mixins_preview.aws_s3express.mixins.CfnBucketPolicyPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::S3Express::BucketPolicyresource 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, andDeleteBucketPolicyAPI 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:
- 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:
props (
Union[CfnBucketPolicyMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- 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
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental