Class: AWSCDK::Autoscaling::BaseTargetTrackingProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Autoscaling::BaseTargetTrackingProps
- Defined in:
- autoscaling/base_target_tracking_props.rb
Overview
Base interface for target tracking props.
Contains the attributes that are common to target tracking policies, except the ones relating to the metric and to the scalable target.
This interface is reused by more specific target tracking props objects.
Direct Known Subclasses
BasicTargetTrackingScalingPolicyProps, CpuUtilizationScalingProps, MetricTargetTrackingProps, NetworkUtilizationScalingProps, RequestCountScalingProps
Instance Attribute Summary collapse
-
#cooldown ⇒ AWSCDK::Duration?
readonly
Period after a scaling completes before another scaling activity can start.
-
#disable_scale_in ⇒ Boolean?
readonly
Indicates whether scale in by the target tracking policy is disabled.
-
#estimated_instance_warmup ⇒ AWSCDK::Duration?
readonly
Estimated time until a newly launched instance can send metrics to CloudWatch.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cooldown: nil, disable_scale_in: nil, estimated_instance_warmup: nil) ⇒ BaseTargetTrackingProps
constructor
A new instance of BaseTargetTrackingProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cooldown: nil, disable_scale_in: nil, estimated_instance_warmup: nil) ⇒ BaseTargetTrackingProps
Returns a new instance of BaseTargetTrackingProps.
15 16 17 18 19 20 21 22 |
# File 'autoscaling/base_target_tracking_props.rb', line 15 def initialize(cooldown: nil, disable_scale_in: nil, estimated_instance_warmup: nil) @cooldown = cooldown Jsii::Type.check_type(@cooldown, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "cooldown") unless @cooldown.nil? @disable_scale_in = disable_scale_in Jsii::Type.check_type(@disable_scale_in, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "disableScaleIn") unless @disable_scale_in.nil? @estimated_instance_warmup = estimated_instance_warmup Jsii::Type.check_type(@estimated_instance_warmup, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "estimatedInstanceWarmup") unless @estimated_instance_warmup.nil? end |
Instance Attribute Details
#cooldown ⇒ AWSCDK::Duration? (readonly)
Default: - The default cooldown configured on the AutoScalingGroup.
Period after a scaling completes before another scaling activity can start.
28 29 30 |
# File 'autoscaling/base_target_tracking_props.rb', line 28 def cooldown @cooldown end |
#disable_scale_in ⇒ Boolean? (readonly)
Default: false
Indicates whether scale in by the target tracking policy is disabled.
If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the autoscaling group. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the group.
38 39 40 |
# File 'autoscaling/base_target_tracking_props.rb', line 38 def disable_scale_in @disable_scale_in end |
#estimated_instance_warmup ⇒ AWSCDK::Duration? (readonly)
Default: - Same as the cooldown.
Estimated time until a newly launched instance can send metrics to CloudWatch.
43 44 45 |
# File 'autoscaling/base_target_tracking_props.rb', line 43 def estimated_instance_warmup @estimated_instance_warmup end |
Class Method Details
.jsii_properties ⇒ Object
45 46 47 48 49 50 51 |
# File 'autoscaling/base_target_tracking_props.rb', line 45 def self.jsii_properties { :cooldown => "cooldown", :disable_scale_in => "disableScaleIn", :estimated_instance_warmup => "estimatedInstanceWarmup", } end |
Instance Method Details
#to_jsii ⇒ Object
53 54 55 56 57 58 59 60 61 |
# File 'autoscaling/base_target_tracking_props.rb', line 53 def to_jsii result = {} result.merge!({ "cooldown" => @cooldown, "disableScaleIn" => @disable_scale_in, "estimatedInstanceWarmup" => @estimated_instance_warmup, }) result.compact end |