Class: AWSCDK::AutoScalingPlans::CfnScalingPlan::MetricDimensionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
auto_scaling_plans/cfn_scaling_plan.rb

Overview

MetricDimension is a subproperty of CustomizedScalingMetricSpecification that specifies a dimension for a customized metric to use with a scaling plan. Dimensions are arbitrary name/value pairs that can be associated with a CloudWatch metric. Duplicate dimensions are not allowed.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, value:) ⇒ MetricDimensionProperty

Returns a new instance of MetricDimensionProperty.

Parameters:

  • name (String)

    The name of the dimension.

  • value (String)

    The value of the dimension.



759
760
761
762
763
764
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 759

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

Instance Attribute Details

#nameString (readonly)

The name of the dimension.



770
771
772
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 770

def name
  @name
end

#valueString (readonly)

The value of the dimension.



775
776
777
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 775

def value
  @value
end

Class Method Details

.jsii_propertiesObject



777
778
779
780
781
782
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 777

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

Instance Method Details

#to_jsiiObject



784
785
786
787
788
789
790
791
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 784

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