Class: AWSCDK::EMR::CfnCluster::MetricDimensionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
emr/cfn_cluster.rb

Overview

MetricDimension is a subproperty of the CloudWatchAlarmDefinition property type.

MetricDimension specifies a CloudWatch dimension, which is specified with a Key Value pair. The key is known as a Name in CloudWatch. By default, Amazon EMR uses one dimension whose Key is JobFlowID and Value is a variable representing the cluster ID, which is ${emr.clusterId} . This enables the automatic scaling rule for EMR to bootstrap when the cluster ID becomes available during cluster creation.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, value:) ⇒ MetricDimensionProperty

Returns a new instance of MetricDimensionProperty.

Parameters:

  • key (String)

    The dimension name.

  • value (String)

    The dimension value.



2352
2353
2354
2355
2356
2357
# File 'emr/cfn_cluster.rb', line 2352

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

Instance Attribute Details

#keyString (readonly)

The dimension name.



2363
2364
2365
# File 'emr/cfn_cluster.rb', line 2363

def key
  @key
end

#valueString (readonly)

The dimension value.



2368
2369
2370
# File 'emr/cfn_cluster.rb', line 2368

def value
  @value
end

Class Method Details

.jsii_propertiesObject



2370
2371
2372
2373
2374
2375
# File 'emr/cfn_cluster.rb', line 2370

def self.jsii_properties
  {
    :key => "key",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



2377
2378
2379
2380
2381
2382
2383
2384
# File 'emr/cfn_cluster.rb', line 2377

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