Class: AWSCDK::AutoScalingPlans::CfnScalingPlan::TargetTrackingConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AutoScalingPlans::CfnScalingPlan::TargetTrackingConfigurationProperty
- Defined in:
- auto_scaling_plans/cfn_scaling_plan.rb
Overview
TargetTrackingConfiguration is a subproperty of ScalingInstruction that specifies a target tracking configuration for a scalable resource.
Instance Attribute Summary collapse
-
#customized_scaling_metric_specification ⇒ AWSCDK::IResolvable, ...
readonly
A customized metric.
-
#disable_scale_in ⇒ Boolean, ...
readonly
Indicates whether scale in by the target tracking scaling policy is disabled.
-
#estimated_instance_warmup ⇒ Numeric?
readonly
The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.
-
#predefined_scaling_metric_specification ⇒ AWSCDK::IResolvable, ...
readonly
A predefined metric.
-
#scale_in_cooldown ⇒ Numeric?
readonly
The amount of time, in seconds, after a scale-in activity completes before another scale in activity can start.
-
#scale_out_cooldown ⇒ Numeric?
readonly
The amount of time, in seconds, after a scale-out activity completes before another scale-out activity can start.
-
#target_value ⇒ Numeric
readonly
The target value for the metric.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(target_value:, customized_scaling_metric_specification: nil, disable_scale_in: nil, estimated_instance_warmup: nil, predefined_scaling_metric_specification: nil, scale_in_cooldown: nil, scale_out_cooldown: nil) ⇒ TargetTrackingConfigurationProperty
constructor
A new instance of TargetTrackingConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(target_value:, customized_scaling_metric_specification: nil, disable_scale_in: nil, estimated_instance_warmup: nil, predefined_scaling_metric_specification: nil, scale_in_cooldown: nil, scale_out_cooldown: nil) ⇒ TargetTrackingConfigurationProperty
Returns a new instance of TargetTrackingConfigurationProperty.
1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 |
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 1187 def initialize(target_value:, customized_scaling_metric_specification: nil, disable_scale_in: nil, estimated_instance_warmup: nil, predefined_scaling_metric_specification: nil, scale_in_cooldown: nil, scale_out_cooldown: nil) @target_value = target_value Jsii::Type.check_type(@target_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "targetValue") @customized_scaling_metric_specification = customized_scaling_metric_specification.is_a?(Hash) ? ::AWSCDK::AutoScalingPlans::CfnScalingPlan::CustomizedScalingMetricSpecificationProperty.new(**customized_scaling_metric_specification.transform_keys(&:to_sym)) : customized_scaling_metric_specification Jsii::Type.check_type(@customized_scaling_metric_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZ3BsYW5zLkNmblNjYWxpbmdQbGFuLkN1c3RvbWl6ZWRTY2FsaW5nTWV0cmljU3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0=")), "customizedScalingMetricSpecification") unless @customized_scaling_metric_specification.nil? @disable_scale_in = disable_scale_in Jsii::Type.check_type(@disable_scale_in, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "disableScaleIn") unless @disable_scale_in.nil? @estimated_instance_warmup = estimated_instance_warmup Jsii::Type.check_type(@estimated_instance_warmup, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "estimatedInstanceWarmup") unless @estimated_instance_warmup.nil? @predefined_scaling_metric_specification = predefined_scaling_metric_specification.is_a?(Hash) ? ::AWSCDK::AutoScalingPlans::CfnScalingPlan::PredefinedScalingMetricSpecificationProperty.new(**predefined_scaling_metric_specification.transform_keys(&:to_sym)) : predefined_scaling_metric_specification Jsii::Type.check_type(@predefined_scaling_metric_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZ3BsYW5zLkNmblNjYWxpbmdQbGFuLlByZWRlZmluZWRTY2FsaW5nTWV0cmljU3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0=")), "predefinedScalingMetricSpecification") unless @predefined_scaling_metric_specification.nil? @scale_in_cooldown = scale_in_cooldown Jsii::Type.check_type(@scale_in_cooldown, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "scaleInCooldown") unless @scale_in_cooldown.nil? @scale_out_cooldown = scale_out_cooldown Jsii::Type.check_type(@scale_out_cooldown, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "scaleOutCooldown") unless @scale_out_cooldown.nil? end |
Instance Attribute Details
#customized_scaling_metric_specification ⇒ AWSCDK::IResolvable, ... (readonly)
A customized metric.
You can specify either a predefined metric or a customized metric.
1217 1218 1219 |
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 1217 def customized_scaling_metric_specification @customized_scaling_metric_specification end |
#disable_scale_in ⇒ Boolean, ... (readonly)
Indicates whether scale in by the target tracking scaling policy is disabled.
If the value is true , scale in is disabled and the target tracking scaling policy doesn't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking scaling policy can remove capacity from the scalable resource.
The default value is false .
1226 1227 1228 |
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 1226 def disable_scale_in @disable_scale_in end |
#estimated_instance_warmup ⇒ Numeric? (readonly)
The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.
This value is used only if the resource is an Auto Scaling group.
1233 1234 1235 |
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 1233 def estimated_instance_warmup @estimated_instance_warmup end |
#predefined_scaling_metric_specification ⇒ AWSCDK::IResolvable, ... (readonly)
A predefined metric.
You can specify either a predefined metric or a customized metric.
1240 1241 1242 |
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 1240 def predefined_scaling_metric_specification @predefined_scaling_metric_specification end |
#scale_in_cooldown ⇒ Numeric? (readonly)
The amount of time, in seconds, after a scale-in activity completes before another scale in activity can start.
This value is not used if the scalable resource is an Auto Scaling group.
1247 1248 1249 |
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 1247 def scale_in_cooldown @scale_in_cooldown end |
#scale_out_cooldown ⇒ Numeric? (readonly)
The amount of time, in seconds, after a scale-out activity completes before another scale-out activity can start.
This value is not used if the scalable resource is an Auto Scaling group.
1254 1255 1256 |
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 1254 def scale_out_cooldown @scale_out_cooldown end |
#target_value ⇒ Numeric (readonly)
The target value for the metric.
Although this property accepts numbers of type Double, it won't accept values that are either too small or too large. Values must be in the range of -2^360 to 2^360.
1210 1211 1212 |
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 1210 def target_value @target_value end |
Class Method Details
.jsii_properties ⇒ Object
1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 |
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 1256 def self.jsii_properties { :target_value => "targetValue", :customized_scaling_metric_specification => "customizedScalingMetricSpecification", :disable_scale_in => "disableScaleIn", :estimated_instance_warmup => "estimatedInstanceWarmup", :predefined_scaling_metric_specification => "predefinedScalingMetricSpecification", :scale_in_cooldown => "scaleInCooldown", :scale_out_cooldown => "scaleOutCooldown", } end |
Instance Method Details
#to_jsii ⇒ Object
1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 |
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 1268 def to_jsii result = {} result.merge!({ "targetValue" => @target_value, "customizedScalingMetricSpecification" => @customized_scaling_metric_specification, "disableScaleIn" => @disable_scale_in, "estimatedInstanceWarmup" => @estimated_instance_warmup, "predefinedScalingMetricSpecification" => @predefined_scaling_metric_specification, "scaleInCooldown" => @scale_in_cooldown, "scaleOutCooldown" => @scale_out_cooldown, }) result.compact end |