interface AspectOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.AspectOptions |
![]() | github.com/aws/aws-cdk-go/awscdk/v2#AspectOptions |
![]() | software.amazon.awscdk.AspectOptions |
![]() | aws_cdk.AspectOptions |
![]() | aws-cdk-lib » AspectOptions |
Options when Applying an Aspect.
Example
class MutatingAspect implements IAspect {
visit(node: IConstruct) {
// Modifies a resource in some way
}
}
class ValidationAspect implements IAspect {
visit(node: IConstruct) {
// Perform some readonly validation on the cosntruct tree
}
}
const stack = new Stack();
Aspects.of(stack).add(new MutatingAspect(), { priority: AspectPriority.MUTATING } ); // Run first (mutating aspects)
Aspects.of(stack).add(new ValidationAspect(), { priority: AspectPriority.READONLY } ); // Run later (readonly aspects)
Properties
Name | Type | Description |
---|---|---|
priority? | number | The priority value to apply on an Aspect. Priority must be a non-negative integer. |
priority?
Type:
number
(optional, default: AspectPriority.DEFAULT)
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.