Class: AWSCDK::CloudWatch::Values
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::CloudWatch::Values
- Defined in:
- cloud_watch/values.rb
Overview
A class for providing values for use with VariableInputType.SELECT and VariableInputType.RADIO dashboard variables.
Class Method Summary collapse
-
.from_search(expression, populate_from) ⇒ AWSCDK::CloudWatch::Values
Create values from a search expression.
-
.from_search_components(components) ⇒ AWSCDK::CloudWatch::Values
Create values from the components of search expression.
-
.from_values(*values) ⇒ AWSCDK::CloudWatch::Values
Create values from an array of possible variable values.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#initialize ⇒ Values
constructor
A new instance of Values.
- #to_json ⇒ Object
Constructor Details
#initialize ⇒ Values
Returns a new instance of Values.
8 9 10 |
# File 'cloud_watch/values.rb', line 8 def initialize Jsii::Object.instance_method(:initialize).bind(self).call end |
Class Method Details
.from_search(expression, populate_from) ⇒ AWSCDK::CloudWatch::Values
Create values from a search expression.
23 24 25 26 27 |
# File 'cloud_watch/values.rb', line 23 def self.from_search(expression, populate_from) Jsii::Type.check_type(expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "expression") Jsii::Type.check_type(populate_from, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "populateFrom") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.Values", "fromSearch", [expression, populate_from]) end |
.from_search_components(components) ⇒ AWSCDK::CloudWatch::Values
Create values from the components of search expression.
33 34 35 36 37 |
# File 'cloud_watch/values.rb', line 33 def self.from_search_components(components) components = components.is_a?(Hash) ? ::AWSCDK::CloudWatch::SearchComponents.new(**components.transform_keys(&:to_sym)) : components Jsii::Type.check_type(components, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5TZWFyY2hDb21wb25lbnRzIn0=")), "components") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.Values", "fromSearchComponents", [components]) end |
.from_values(*values) ⇒ AWSCDK::CloudWatch::Values
Create values from an array of possible variable values.
43 44 45 46 47 48 49 |
# File 'cloud_watch/values.rb', line 43 def self.from_values(*values) values.map! { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CloudWatch::VariableValue.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } values.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5WYXJpYWJsZVZhbHVlIn0=")), "values[#{index}]") end Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_cloudwatch.Values", "fromValues", [*values]) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 |
# File 'cloud_watch/values.rb', line 12 def self.jsii_overridable_methods { :to_json => { kind: :method, name: "toJson", is_optional: false }, } end |
Instance Method Details
#to_json ⇒ Object
52 53 54 |
# File 'cloud_watch/values.rb', line 52 def to_json() jsii_call_method("toJson", []) end |