Class Validations

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Validations
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-04-24T20:29:21.130Z") @Stability(Stable) public class Validations extends software.amazon.jsii.JsiiObject
Manages validations for CDK constructs.

Example:

 App myApp;
 IPolicyValidationPlugin plugin;
 Validations.of(myApp).addPlugins(plugin);
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Validations(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    Validations(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Register one or more validation plugins that will be executed during synthesis.
    of(software.constructs.IConstruct scope)
    Returns the Validations for the given construct scope.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • Validations

      protected Validations(software.amazon.jsii.JsiiObjectRef objRef)
    • Validations

      protected Validations(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • of

      @Stability(Stable) @NotNull public static Validations of(@NotNull software.constructs.IConstruct scope)
      Returns the Validations for the given construct scope.

      Parameters:
      scope - any construct. This parameter is required.
    • addPlugins

      @Stability(Stable) public void addPlugins(@NotNull IPolicyValidationPlugin... 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 - the validation plugins to add. This parameter is required.