Class: AWSCDK::Lambda::CfnCapacityProvider::TargetTrackingScalingPolicyProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lambda/cfn_capacity_provider.rb

Overview

A scaling policy for the capacity provider that automatically adjusts capacity to maintain a target value for a specific metric.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(predefined_metric_type:, target_value:) ⇒ TargetTrackingScalingPolicyProperty

Returns a new instance of TargetTrackingScalingPolicyProperty.

Parameters:

  • predefined_metric_type (String)

    The predefined metric type to track for scaling decisions.

  • target_value (Numeric)

    The target value for the metric that the scaling policy attempts to maintain through scaling actions.



951
952
953
954
955
956
# File 'lambda/cfn_capacity_provider.rb', line 951

def initialize(predefined_metric_type:, target_value:)
  @predefined_metric_type = predefined_metric_type
  Jsii::Type.check_type(@predefined_metric_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "predefinedMetricType")
  @target_value = target_value
  Jsii::Type.check_type(@target_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "targetValue")
end

Instance Attribute Details

#predefined_metric_typeString (readonly)

The predefined metric type to track for scaling decisions.



962
963
964
# File 'lambda/cfn_capacity_provider.rb', line 962

def predefined_metric_type
  @predefined_metric_type
end

#target_valueNumeric (readonly)

The target value for the metric that the scaling policy attempts to maintain through scaling actions.



967
968
969
# File 'lambda/cfn_capacity_provider.rb', line 967

def target_value
  @target_value
end

Class Method Details

.jsii_propertiesObject



969
970
971
972
973
974
# File 'lambda/cfn_capacity_provider.rb', line 969

def self.jsii_properties
  {
    :predefined_metric_type => "predefinedMetricType",
    :target_value => "targetValue",
  }
end

Instance Method Details

#to_jsiiObject



976
977
978
979
980
981
982
983
# File 'lambda/cfn_capacity_provider.rb', line 976

def to_jsii
  result = {}
  result.merge!({
    "predefinedMetricType" => @predefined_metric_type,
    "targetValue" => @target_value,
  })
  result.compact
end