Class Annotations

java.lang.Object
software.amazon.jsii.JsiiObject
com.hashicorp.cdktf.Annotations
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.93.0 (build 1706ca5)", date="2024-01-18T16:17:07.066Z") @Stability(Experimental) public class Annotations extends software.amazon.jsii.JsiiObject
(experimental) Includes API for attaching annotations such as warning messages to constructs.
  • 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
    Annotations(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    Annotations(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addError(String message)
    (experimental) Adds an { "error": } metadata entry to this construct.
    void
    addInfo(String message)
    (experimental) Adds an info metadata entry to this construct.
    void
    addWarning(String message)
    (experimental) Adds a warning metadata entry to this construct.
    of(software.constructs.IConstruct scope)
    (experimental) Returns the annotations API for a 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

    • Annotations

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

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

    • of

      @Stability(Experimental) @NotNull public static Annotations of(@NotNull software.constructs.IConstruct scope)
      (experimental) Returns the annotations API for a construct scope.

      Parameters:
      scope - The scope. This parameter is required.
    • addError

      @Stability(Experimental) public void addError(@NotNull String message)
      (experimental) Adds an { "error": } metadata entry to this construct.

      The toolkit will fail synthesis when errors are reported.

      Parameters:
      message - The error message. This parameter is required.
    • addInfo

      @Stability(Experimental) public void addInfo(@NotNull String message)
      (experimental) Adds an info metadata entry to this construct.

      The CLI will display the info message when apps are synthesized.

      Parameters:
      message - The info message. This parameter is required.
    • addWarning

      @Stability(Experimental) public void addWarning(@NotNull String message)
      (experimental) Adds a warning metadata entry to this construct.

      The CLI will display the warning when an app is synthesized. In a future release the CLI might introduce a --strict flag which will then fail the synthesis if it encounters a warning.

      Parameters:
      message - The warning message. This parameter is required.