BucketPolicyStatements
- class aws_cdk.aws_s3.mixins.BucketPolicyStatements(statements)
Bases:
MixinAdds statements to a bucket policy.
- ExampleMetadata:
infused
Example:
s3.CfnBucketPolicy(self, "Policy", bucket=s3.CfnBucket(self, "Bucket").ref, policy_document=iam.PolicyDocument() ).with(s3.mixins.BucketPolicyStatements([ iam.PolicyStatement( actions=["s3:GetObject"], resources=["*"], principals=[iam.AnyPrincipal()] ) ]))
- Parameters:
statements (
Sequence[PolicyStatement])
Methods
- apply_to(policy)
Applies the mixin functionality to the target construct.
- Parameters:
policy (
IConstruct)- Return type:
None
- supports(construct)
Determines whether this mixin can be applied to the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Static Methods
- classmethod is_mixin(x)
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.