Class: AWSCDK::Interfaces::AWSIot::CustomMetricReference

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
interfaces/aws_iot/custom_metric_reference.rb

Overview

A reference to a CustomMetric resource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metric_name:) ⇒ CustomMetricReference

Returns a new instance of CustomMetricReference.

Parameters:

  • metric_name (String)

    The MetricName of the CustomMetric resource.



8
9
10
11
# File 'interfaces/aws_iot/custom_metric_reference.rb', line 8

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

Instance Attribute Details

#metric_nameString (readonly)

The MetricName of the CustomMetric resource.

Returns:

  • (String)


16
17
18
# File 'interfaces/aws_iot/custom_metric_reference.rb', line 16

def metric_name
  @metric_name
end

Class Method Details

.jsii_propertiesObject



18
19
20
21
22
# File 'interfaces/aws_iot/custom_metric_reference.rb', line 18

def self.jsii_properties
  {
    :metric_name => "metricName",
  }
end

Instance Method Details

#to_jsiiObject



24
25
26
27
28
29
30
# File 'interfaces/aws_iot/custom_metric_reference.rb', line 24

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