UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

32 lines (31 loc) 1 kB
import type { IConstruct } from 'constructs'; import type { IPolicyValidationPlugin } from './validation'; /** * Manages validations for CDK constructs. * * @example * /// fixture=validation-plugin * declare const myApp: App; * declare const plugin: IPolicyValidationPlugin; * Validations.of(myApp).addPlugins(plugin); */ export declare class Validations { private readonly scope; /** * Returns the Validations for the given construct scope. * * @param scope any construct */ static of(scope: IConstruct): Validations; private constructor(); /** * 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. * * @param plugins the validation plugins to add */ addPlugins(...plugins: IPolicyValidationPlugin[]): void; }