Skip to main content
Aspects can be applied to CDK tree scopes and can operate on the tree before synthesis.

Methods

NameDescription
addAdds an aspect to apply this scope before synthesis.

add

def add(
  aspect: IAspect
) -> None
Adds an aspect to apply this scope before synthesis.

aspectRequired

The aspect to add.

Static Functions

NameDescription
ofReturns the Aspects object associated with a construct scope.

of

import cdktn

cdktn.Aspects.of(
  scope: IConstruct
)
Returns the Aspects object associated with a construct scope.

scopeRequired

  • Type: constructs.IConstruct
The scope for which these aspects will apply.

Properties

NameTypeDescription
alltyping.List[IAspect]The list of aspects which were directly applied on this scope.

allRequired

all: typing.List[IAspect]
The list of aspects which were directly applied on this scope.