interface AspectOptions
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AspectOptions |
Go | github.com/aws/aws-cdk-go/awscdk/v2#AspectOptions |
Java | software.amazon.awscdk.AspectOptions |
Python | aws_cdk.AspectOptions |
TypeScript (source) | 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.

.NET
Go
Java
Python
TypeScript (