Aspects

class aws_cdk.core.Aspects(*args: Any, **kwargs)

Bases: object

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

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.core as cdk

aspects = cdk.Aspects.of(self)

Methods

add(aspect)

Adds an aspect to apply this scope before synthesis.

Parameters

aspect (IAspect) – The aspect to add.

Return type

None

Attributes

aspects

The list of aspects which were directly applied on this scope.

Return type

List[IAspect]

Static Methods

classmethod of(scope)

Returns the Aspects object associated with a construct scope.

Parameters

scope (IConstruct) – The scope for which these aspects will apply.

Return type

Aspects