MixinApplicator
- class aws_cdk.MixinApplicator(scope, selector=None)
Bases:
objectApplies mixins to constructs.
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk as cdk # construct_selector: cdk.IConstructSelector mixin_applicator = cdk.MixinApplicator(self, construct_selector)
- Parameters:
scope (
IConstruct)selector (
Optional[IConstructSelector])
Methods
- require_all()
Requires all selected constructs to support the applied mixins.
Will only check for future call of
apply(). Set this before callingapply()to take effect.Example:
Mixins.of(scope).require_all().apply(MyMixin())
- Return type:
- require_any()
Requires at least one mixin to be successfully applied.
Will only check for future call of
apply(). Set this before callingapply()to take effect.Example:
Mixins.of(scope).require_any().apply(MyMixin())
- Return type:
Attributes
- report
Returns the successful mixin applications.
- selected_constructs
The constructs that match the selector in the given scope.