MixinApplicator
- class aws_cdk.mixins_preview.core.MixinApplicator(scope, selector=None)
Bases:
object(experimental) Applies mixins to constructs.
- Stability:
experimental
- 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 core # construct_selector: core.IConstructSelector mixin_applicator = core.MixinApplicator(self, construct_selector)
- Parameters:
scope (
IConstruct)selector (
Optional[IConstructSelector])
- Stability:
experimental
Methods
- apply(*mixins)
(experimental) Applies a mixin to selected constructs.
- Parameters:
mixins (
IMixin)- Stability:
experimental
- Return type:
- require_all()
(experimental) Requires all selected constructs to support the applied mixins.
Will only check for future call of
apply(). Set this before callingapply()to take effect.- Stability:
experimental
Example:
Mixins.of(scope).require_all().apply(MyMixin())
- Return type:
- require_any()
(experimental) Requires at least one mixin to be successfully applied.
Will only check for future call of
apply(). Set this before callingapply()to take effect.- Stability:
experimental
Example:
Mixins.of(scope).require_any().apply(MyMixin())
- Return type:
Attributes
- report
(experimental) Returns the successful mixin applications.
- Stability:
experimental
- selected_constructs
(experimental) The constructs that match the selector in the given scope.
- Stability:
experimental