Class: AWSCDK::CloudWatch::SearchComponents

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_watch/search_components.rb

Overview

Search components for use with Values.fromSearchComponents.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dimensions:, metric_name:, namespace:, populate_from:) ⇒ SearchComponents

Returns a new instance of SearchComponents.

Parameters:

  • dimensions (Array<String>)

    The list of dimensions to be used in the search expression.

  • metric_name (String)

    The metric name to be used in the search expression.

  • namespace (String)

    The namespace to be used in the search expression.

  • populate_from (String)

    The dimension name, that the search expression retrieves, whose values will be used to populate the values to choose from.



11
12
13
14
15
16
17
18
19
20
# File 'cloud_watch/search_components.rb', line 11

def initialize(dimensions:, metric_name:, namespace:, populate_from:)
  @dimensions = dimensions
  Jsii::Type.check_type(@dimensions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "dimensions")
  @metric_name = metric_name
  Jsii::Type.check_type(@metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName")
  @namespace = namespace
  Jsii::Type.check_type(@namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "namespace")
  @populate_from = populate_from
  Jsii::Type.check_type(@populate_from, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "populateFrom")
end

Instance Attribute Details

#dimensionsArray<String> (readonly)

The list of dimensions to be used in the search expression.

Returns:

  • (Array<String>)


25
26
27
# File 'cloud_watch/search_components.rb', line 25

def dimensions
  @dimensions
end

#metric_nameString (readonly)

The metric name to be used in the search expression.

Returns:

  • (String)


29
30
31
# File 'cloud_watch/search_components.rb', line 29

def metric_name
  @metric_name
end

#namespaceString (readonly)

The namespace to be used in the search expression.

Returns:

  • (String)


33
34
35
# File 'cloud_watch/search_components.rb', line 33

def namespace
  @namespace
end

#populate_fromString (readonly)

The dimension name, that the search expression retrieves, whose values will be used to populate the values to choose from.

Returns:

  • (String)


37
38
39
# File 'cloud_watch/search_components.rb', line 37

def populate_from
  @populate_from
end

Class Method Details

.jsii_propertiesObject



39
40
41
42
43
44
45
46
# File 'cloud_watch/search_components.rb', line 39

def self.jsii_properties
  {
    :dimensions => "dimensions",
    :metric_name => "metricName",
    :namespace => "namespace",
    :populate_from => "populateFrom",
  }
end

Instance Method Details

#to_jsiiObject



48
49
50
51
52
53
54
55
56
57
# File 'cloud_watch/search_components.rb', line 48

def to_jsii
  result = {}
  result.merge!({
    "dimensions" => @dimensions,
    "metricName" => @metric_name,
    "namespace" => @namespace,
    "populateFrom" => @populate_from,
  })
  result.compact
end