Skip to main content
Includes API for attaching annotations such as warning messages to constructs.

Methods


AddError

Adds an { “error”: < message > } metadata entry to this construct. The toolkit will fail synthesis when errors are reported.

MessageRequired

  • Type: string
The error message.

AddInfo

Adds an info metadata entry to this construct. The CLI will display the info message when apps are synthesized.

MessageRequired

  • Type: string
The info message.

AddWarning

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.

MessageRequired

  • Type: string
The warning message.

Static Functions


Of

Returns the annotations API for a construct scope.

ScopeRequired

  • Type: Constructs.IConstruct
The scope.