Class: AWSCDK::ContextProvider
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::ContextProvider
- Defined in:
- context_provider.rb
Overview
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.
Class Method Summary collapse
-
.get_key(scope, options) ⇒ AWSCDK::GetContextKeyResult
The context key or undefined if a key cannot be rendered (due to tokens used in any of the props).
- .get_value(scope, options) ⇒ AWSCDK::GetContextValueResult
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#initialize(*args) ⇒ ContextProvider
constructor
A new instance of ContextProvider.
Constructor Details
#initialize(*args) ⇒ ContextProvider
Returns a new instance of ContextProvider.
14 15 16 |
# File 'context_provider.rb', line 14 def initialize(*args) raise NoMethodError, "aws-cdk-lib.ContextProvider does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.get_key(scope, options) ⇒ AWSCDK::GetContextKeyResult
Returns the context key or undefined if a key cannot be rendered (due to tokens used in any of the props).
26 27 28 29 30 31 |
# File 'context_provider.rb', line 26 def self.get_key(scope, ) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") = .is_a?(Hash) ? ::AWSCDK::GetContextKeyOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5HZXRDb250ZXh0S2V5T3B0aW9ucyJ9")), "options") Jsii::Kernel.instance.call_static("aws-cdk-lib.ContextProvider", "getKey", [scope, ]) end |
.get_value(scope, options) ⇒ AWSCDK::GetContextValueResult
36 37 38 39 40 41 |
# File 'context_provider.rb', line 36 def self.get_value(scope, ) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") = .is_a?(Hash) ? ::AWSCDK::GetContextValueOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5HZXRDb250ZXh0VmFsdWVPcHRpb25zIn0=")), "options") Jsii::Kernel.instance.call_static("aws-cdk-lib.ContextProvider", "getValue", [scope, ]) end |
.jsii_overridable_methods ⇒ Object
18 19 20 21 |
# File 'context_provider.rb', line 18 def self.jsii_overridable_methods { } end |