DependableTrait

class aws_cdk.core.DependableTrait

Bases: object

(experimental) 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

experimental

Example:

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
# Usage
roots = DependableTrait.get(construct).dependency_roots

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

Attributes

dependency_roots

(experimental) The set of constructs that form the root of this dependable.

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

Stability

experimental

Return type

List[IConstruct]

Static Methods

classmethod get(instance)

(experimental) Return the matching DependableTrait for the given class instance.

Parameters

instance (IDependable) –

Stability

experimental

Return type

DependableTrait

classmethod implement(instance, trait)

(experimental) Register instance to have the given DependableTrait.

Should be called in the class constructor.

Parameters
Stability

experimental

Return type

None