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. See https://github.com/aws/jsii/issues/826 # Usage roots = DependableTrait.get(construct).dependency_roots # Definition class TraitImplementation(DependableTrait): def __init__(self): self.dependency_roots = [construct_a, construct_b, construct_c] DependableTrait.implement(construct, TraitImplementation())
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
-
classmethod
implement
(instance, trait)¶ (experimental) Register
instance
to have the given DependableTrait.Should be called in the class constructor.
- Parameters
instance (
IDependable
) –trait (
DependableTrait
) –
- Stability
experimental
- Return type
None