Class: AWSCDK::ContextProvider

Inherits:
Jsii::Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ ContextProvider

Returns a new instance of ContextProvider.

Raises:

  • (NoMethodError)


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).

Parameters:

Returns:



26
27
28
29
30
31
# File 'context_provider.rb', line 26

def self.get_key(scope, options)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  options = options.is_a?(Hash) ? ::AWSCDK::GetContextKeyOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5HZXRDb250ZXh0S2V5T3B0aW9ucyJ9")), "options")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.ContextProvider", "getKey", [scope, options])
end

.get_value(scope, options) ⇒ AWSCDK::GetContextValueResult

Parameters:

Returns:



36
37
38
39
40
41
# File 'context_provider.rb', line 36

def self.get_value(scope, options)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  options = options.is_a?(Hash) ? ::AWSCDK::GetContextValueOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5HZXRDb250ZXh0VmFsdWVPcHRpb25zIn0=")), "options")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.ContextProvider", "getValue", [scope, options])
end

.jsii_overridable_methodsObject



18
19
20
21
# File 'context_provider.rb', line 18

def self.jsii_overridable_methods
  {
  }
end