class Validations
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Validations |
Go | github.com/aws/aws-cdk-go/awscdk/v2#Validations |
Java | software.amazon.awscdk.Validations |
Python | aws_cdk.Validations |
TypeScript (source) | aws-cdk-lib » Validations |
Manages validations for CDK constructs.
Example
/// fixture=validation-plugin
declare const myApp: App;
declare const plugin: IPolicyValidationPlugin;
Validations.of(myApp).addPlugins(plugin);
Methods
| Name | Description |
|---|---|
| add | Register one or more validation plugins that will be executed during synthesis. |
| static of(scope) | Returns the Validations for the given construct scope. |
addPlugins(...plugins)
public addPlugins(...plugins: IPolicyValidationPlugin[]): void
Parameters
- plugins
IPolicy— the validation plugins to add.Validation Plugin
Register one or more validation plugins that will be executed during synthesis.
Plugins can only be registered within a Stage or App scope. If any plugin reports a violation, synthesis will be interrupted and the report displayed to the user.
static of(scope)
public static of(scope: IConstruct): Validations
Parameters
- scope
IConstruct— any construct.
Returns
Returns the Validations for the given construct scope.

.NET
Go
Java
Python
TypeScript (