Class: AWSCDK::Autoscaling::CfnScalingPolicy::MetricDimensionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
autoscaling/cfn_scaling_policy.rb

Overview

MetricDimension specifies a name/value pair that is part of the identity of a CloudWatch metric for the Dimensions property of the AWS::AutoScaling::ScalingPolicy CustomizedMetricSpecification property type. 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.



867
868
869
870
871
872
# File 'autoscaling/cfn_scaling_policy.rb', line 867

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.



878
879
880
# File 'autoscaling/cfn_scaling_policy.rb', line 878

def name
  @name
end

#valueString (readonly)

The value of the dimension.



883
884
885
# File 'autoscaling/cfn_scaling_policy.rb', line 883

def value
  @value
end

Class Method Details

.jsii_propertiesObject



885
886
887
888
889
890
# File 'autoscaling/cfn_scaling_policy.rb', line 885

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

Instance Method Details

#to_jsiiObject



892
893
894
895
896
897
898
899
# File 'autoscaling/cfn_scaling_policy.rb', line 892

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