BucketBlockPublicAccess

class aws_cdk.aws_s3.mixins.BucketBlockPublicAccess(public_access_config=None)

Bases: Mixin

S3-specific mixin for blocking public-access.

ExampleMetadata:

fixture=README-mixins infused

Example:

# Applies an Aspect immediately as a Mixin
versioning_mixin = Shims.as_mixin(EnableBucketVersioning())
Mixins.of(scope).apply(versioning_mixin)

# Delays application of a Mixin to the synthesis phase
public_access_aspect = Shims.as_aspect(BucketBlockPublicAccess())
Aspects.of(scope).add(public_access_aspect)
Parameters:

public_access_config (Optional[BlockPublicAccess])

Methods

apply_to(construct)

Applies the mixin functionality to the target construct.

Parameters:

construct (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 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.