Class: AWSCDK::EMR::CfnInstanceGroupConfig::MetricDimensionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
emr/cfn_instance_group_config.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.



956
957
958
959
960
961
# File 'emr/cfn_instance_group_config.rb', line 956

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.



967
968
969
# File 'emr/cfn_instance_group_config.rb', line 967

def key
  @key
end

#valueString (readonly)

The dimension value.



972
973
974
# File 'emr/cfn_instance_group_config.rb', line 972

def value
  @value
end

Class Method Details

.jsii_propertiesObject



974
975
976
977
978
979
# File 'emr/cfn_instance_group_config.rb', line 974

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

Instance Method Details

#to_jsiiObject



981
982
983
984
985
986
987
988
# File 'emr/cfn_instance_group_config.rb', line 981

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