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

Methods


add_error

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

messageRequired

  • Type: str
The error message.

add_info

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

messageRequired

  • Type: str
The info message.

add_warning

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: str
The warning message.

Static Functions


of

Returns the annotations API for a construct scope.

scopeRequired

  • Type: constructs.IConstruct
The scope.