Validations
- class aws_cdk.Validations(*args: Any, **kwargs)
Bases:
objectManages validations for CDK constructs.
Example:
# my_app: App # plugin: IPolicyValidationPlugin Validations.of(my_app).add_plugins(plugin)
Methods
- add_plugins(*plugins)
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.
- Parameters:
plugins (
IPolicyValidationPlugin) – the validation plugins to add.- Return type:
None
Static Methods
- classmethod of(scope)
Returns the Validations for the given construct scope.
- Parameters:
scope (
IConstruct) – any construct.- Return type: