Class: AWSCDK::Autoscaling::NetworkUtilizationScalingProps
- Inherits:
-
BaseTargetTrackingProps
- Object
- BaseTargetTrackingProps
- AWSCDK::Autoscaling::NetworkUtilizationScalingProps
- Defined in:
- autoscaling/network_utilization_scaling_props.rb
Overview
Properties for enabling scaling based on network utilization.
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.
-
#target_bytes_per_second ⇒ Numeric
readonly
Target average bytes/seconds on each instance.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cooldown: nil, disable_scale_in: nil, estimated_instance_warmup: nil, target_bytes_per_second:) ⇒ NetworkUtilizationScalingProps
constructor
A new instance of NetworkUtilizationScalingProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cooldown: nil, disable_scale_in: nil, estimated_instance_warmup: nil, target_bytes_per_second:) ⇒ NetworkUtilizationScalingProps
Returns a new instance of NetworkUtilizationScalingProps.
11 12 13 14 15 16 17 18 19 20 |
# File 'autoscaling/network_utilization_scaling_props.rb', line 11 def initialize(cooldown: nil, disable_scale_in: nil, estimated_instance_warmup: nil, target_bytes_per_second:) @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? @target_bytes_per_second = target_bytes_per_second Jsii::Type.check_type(@target_bytes_per_second, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "targetBytesPerSecond") 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.
26 27 28 |
# File 'autoscaling/network_utilization_scaling_props.rb', line 26 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.
36 37 38 |
# File 'autoscaling/network_utilization_scaling_props.rb', line 36 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.
41 42 43 |
# File 'autoscaling/network_utilization_scaling_props.rb', line 41 def estimated_instance_warmup @estimated_instance_warmup end |
#target_bytes_per_second ⇒ Numeric (readonly)
Target average bytes/seconds on each instance.
45 46 47 |
# File 'autoscaling/network_utilization_scaling_props.rb', line 45 def target_bytes_per_second @target_bytes_per_second end |
Class Method Details
.jsii_properties ⇒ Object
47 48 49 50 51 52 53 54 |
# File 'autoscaling/network_utilization_scaling_props.rb', line 47 def self.jsii_properties { :cooldown => "cooldown", :disable_scale_in => "disableScaleIn", :estimated_instance_warmup => "estimatedInstanceWarmup", :target_bytes_per_second => "targetBytesPerSecond", } end |
Instance Method Details
#to_jsii ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 |
# File 'autoscaling/network_utilization_scaling_props.rb', line 56 def to_jsii result = {} result.merge!(super) result.merge!({ "cooldown" => @cooldown, "disableScaleIn" => @disable_scale_in, "estimatedInstanceWarmup" => @estimated_instance_warmup, "targetBytesPerSecond" => @target_bytes_per_second, }) result.compact end |