Class: AWSCDK::Lambda::CfnCapacityProvider::TargetTrackingScalingPolicyProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lambda::CfnCapacityProvider::TargetTrackingScalingPolicyProperty
- 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
-
#predefined_metric_type ⇒ String
readonly
The predefined metric type to track for scaling decisions.
-
#target_value ⇒ Numeric
readonly
The target value for the metric that the scaling policy attempts to maintain through scaling actions.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(predefined_metric_type:, target_value:) ⇒ TargetTrackingScalingPolicyProperty
constructor
A new instance of TargetTrackingScalingPolicyProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(predefined_metric_type:, target_value:) ⇒ TargetTrackingScalingPolicyProperty
Returns a new instance of TargetTrackingScalingPolicyProperty.
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_type ⇒ String (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_value ⇒ Numeric (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_properties ⇒ Object
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_jsii ⇒ Object
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 |