CfnBucketLogsMixin
- class aws_cdk.mixins_preview.aws_s3.mixins.CfnBucketLogsMixin(log_type, log_delivery)
Bases:
MixinThe
AWS::S3::Bucketresource creates an Amazon S3 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 . .. epigraph:
You can only delete empty buckets. Deletion fails for buckets that have contents.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-bucket.html
- CloudformationResource:
AWS::S3::Bucket
- 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 aws_logs as logs from aws_cdk.mixins_preview.aws_s3 import mixins as s3_mixins # logs_delivery: logs.ILogsDelivery cfn_bucket_logs_mixin = s3_mixins.CfnBucketLogsMixin("logType", logs_delivery)
Create a mixin to enable vended logs for
AWS::S3::Bucket.- Parameters:
log_type (
str) – Type of logs that are getting vended.log_delivery (
ILogsDelivery) – Object in charge of setting up the delivery source, delivery destination, and delivery connection.
Methods
- apply_to(resource)
Apply vended logs configuration to the construct.
- Parameters:
resource (
IConstruct)- Return type:
None
- supports(construct)
Check if this mixin supports the given construct (has vendedLogs property).
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- S3_SERVER_ACCESS_LOGS = <aws_cdk.mixins_preview.aws_s3.mixins.CfnBucketS3ServerAccessLogs object>
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