ContextProvider¶
-
class
aws_cdk.core.
ContextProvider
(*args, **kwargs)¶ Bases:
object
(experimental) Base class for the model side of context providers.
Instances of this class communicate with context provider plugins in the ‘cdk toolkit’ via context variables (input), outputting specialized queries for more context variables (output).
ContextProvider needs access to a Construct to hook into the context mechanism.
- Stability
experimental
Static Methods
-
classmethod
get_key
(scope, *, provider, props=None)¶ - Parameters
scope (
Construct
) –provider (
str
) – (experimental) The context provider to query.props (
Optional
[Mapping
[str
,Any
]]) – (experimental) Provider-specific properties.
- Return type
- Returns
the context key or undefined if a key cannot be rendered (due to tokens used in any of the props)
- Stability
experimental
-
classmethod
get_value
(scope, *, dummy_value, provider, props=None)¶ - Parameters
scope (
Construct
) –dummy_value (
Any
) – (experimental) The value to return if the context value was not found and a missing context is reported. This should be a dummy value that should preferably fail during deployment since it represents an invalid state.provider (
str
) – (experimental) The context provider to query.props (
Optional
[Mapping
[str
,Any
]]) – (experimental) Provider-specific properties.
- Stability
experimental
- Return type