DependableTrait

class aws_cdk.core.DependableTrait

Bases: object

Trait for IDependable.

Traits are interfaces that are privately implemented by objects. Instead of showing up in the public interface of a class, they need to be queried explicitly. This is used to implement certain framework features that are not intended to be used by Construct consumers, and so should be hidden from accidental use.

stability :stability: experimental

Example::

# Example may have issues. See https://github.com/aws/jsii/issues/826 # Usage roots = DependableTrait.get(construct).dependency_roots

# Definition DependableTrait.implement(construct, get dependencyRoots() { return []; } )

__init__()

Initialize self. See help(type(self)) for accurate signature.

Return type

None

Attributes

dependency_roots

The set of constructs that form the root of this dependable.

All resources under all returned constructs are included in the ordering dependency.

stability :stability: experimental

Return type

List[IConstruct]

Static Methods

classmethod get(instance)

Return the matching DependableTrait for the given class instance.

Parameters

instance (IDependable) –

stability :stability: experimental

Return type

DependableTrait

classmethod implement(instance, trait)

Register instance to have the given DependableTrait.

Should be called in the class constructor.

Parameters

stability :stability: experimental

Return type

None