AspectOptions
- class aws_cdk.AspectOptions(*, priority=None)
Bases:
object
Options when Applying an Aspect.
- Parameters:
priority (
Union
[int
,float
,None
]) – The priority value to apply on an Aspect. Priority must be a non-negative integer. Aspects that have same priority value are not guaranteed to be executed in a consistent order. Default: AspectPriority.DEFAULT- ExampleMetadata:
infused
Example:
@jsii.implements(IAspect) class MutatingAspect: def visit(self, node): pass @jsii.implements(IAspect) class ValidationAspect: def visit(self, node): pass stack = Stack() Aspects.of(stack).add(MutatingAspect(), priority=AspectPriority.MUTATING) # Run first (mutating aspects) Aspects.of(stack).add(ValidationAspect(), priority=AspectPriority.READONLY)
Attributes
- priority
The priority value to apply on an Aspect. Priority must be a non-negative integer.
Aspects that have same priority value are not guaranteed to be executed in a consistent order.
- Default:
AspectPriority.DEFAULT