Class: AWSCDK::ECS::CfnCapacityProvider::ManagedScalingProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::CfnCapacityProvider::ManagedScalingProperty
- Defined in:
- ecs/cfn_capacity_provider.rb
Overview
The managed scaling settings for the Auto Scaling group capacity provider.
When managed scaling is turned on, Amazon ECS manages the scale-in and scale-out actions of the Auto Scaling group. Amazon ECS manages a target tracking scaling policy using an Amazon ECS managed CloudWatch metric with the specified target_capacity value as the target value for the metric. For more information, see Using managed scaling in the Amazon Elastic Container Service Developer Guide .
If managed scaling is off, the user must manage the scaling of the Auto Scaling group.
Instance Attribute Summary collapse
-
#instance_warmup_period ⇒ Numeric?
readonly
The period of time, in seconds, after a newly launched Amazon EC2 instance can contribute to CloudWatch metrics for Auto Scaling group.
-
#maximum_scaling_step_size ⇒ Numeric?
readonly
The maximum number of Amazon EC2 instances that Amazon ECS will scale out at one time.
-
#minimum_scaling_step_size ⇒ Numeric?
readonly
The minimum number of Amazon EC2 instances that Amazon ECS will scale out at one time.
-
#status ⇒ String?
readonly
Determines whether to use managed scaling for the capacity provider.
-
#target_capacity ⇒ Numeric?
readonly
The target capacity utilization as a percentage for the capacity provider.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(instance_warmup_period: nil, maximum_scaling_step_size: nil, minimum_scaling_step_size: nil, status: nil, target_capacity: nil) ⇒ ManagedScalingProperty
constructor
A new instance of ManagedScalingProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(instance_warmup_period: nil, maximum_scaling_step_size: nil, minimum_scaling_step_size: nil, status: nil, target_capacity: nil) ⇒ ManagedScalingProperty
Returns a new instance of ManagedScalingProperty.
1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 |
# File 'ecs/cfn_capacity_provider.rb', line 1565 def initialize(instance_warmup_period: nil, maximum_scaling_step_size: nil, minimum_scaling_step_size: nil, status: nil, target_capacity: nil) @instance_warmup_period = instance_warmup_period Jsii::Type.check_type(@instance_warmup_period, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "instanceWarmupPeriod") unless @instance_warmup_period.nil? @maximum_scaling_step_size = maximum_scaling_step_size Jsii::Type.check_type(@maximum_scaling_step_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maximumScalingStepSize") unless @maximum_scaling_step_size.nil? @minimum_scaling_step_size = minimum_scaling_step_size Jsii::Type.check_type(@minimum_scaling_step_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minimumScalingStepSize") unless @minimum_scaling_step_size.nil? @status = status Jsii::Type.check_type(@status, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "status") unless @status.nil? @target_capacity = target_capacity Jsii::Type.check_type(@target_capacity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "targetCapacity") unless @target_capacity.nil? end |
Instance Attribute Details
#instance_warmup_period ⇒ Numeric? (readonly)
The period of time, in seconds, after a newly launched Amazon EC2 instance can contribute to CloudWatch metrics for Auto Scaling group.
If this parameter is omitted, the default value of 300 seconds is used.
1584 1585 1586 |
# File 'ecs/cfn_capacity_provider.rb', line 1584 def instance_warmup_period @instance_warmup_period end |
#maximum_scaling_step_size ⇒ Numeric? (readonly)
The maximum number of Amazon EC2 instances that Amazon ECS will scale out at one time.
If this parameter is omitted, the default value of 10000 is used.
1591 1592 1593 |
# File 'ecs/cfn_capacity_provider.rb', line 1591 def maximum_scaling_step_size @maximum_scaling_step_size end |
#minimum_scaling_step_size ⇒ Numeric? (readonly)
The minimum number of Amazon EC2 instances that Amazon ECS will scale out at one time.
The scale in process is not affected by this parameter If this parameter is omitted, the default value of 1 is used.
When additional capacity is required, Amazon ECS will scale up the minimum scaling step size even if the actual demand is less than the minimum scaling step size.
1600 1601 1602 |
# File 'ecs/cfn_capacity_provider.rb', line 1600 def minimum_scaling_step_size @minimum_scaling_step_size end |
#status ⇒ String? (readonly)
Determines whether to use managed scaling for the capacity provider.
1605 1606 1607 |
# File 'ecs/cfn_capacity_provider.rb', line 1605 def status @status end |
#target_capacity ⇒ Numeric? (readonly)
The target capacity utilization as a percentage for the capacity provider.
The specified value must be greater than 0 and less than or equal to 100 . For example, if you want the capacity provider to maintain 10% spare capacity, then that means the utilization is 90%, so use a target_capacity of 90 . The default value of 100 percent results in the Amazon EC2 instances in your Auto Scaling group being completely used.
1612 1613 1614 |
# File 'ecs/cfn_capacity_provider.rb', line 1612 def target_capacity @target_capacity end |
Class Method Details
.jsii_properties ⇒ Object
1614 1615 1616 1617 1618 1619 1620 1621 1622 |
# File 'ecs/cfn_capacity_provider.rb', line 1614 def self.jsii_properties { :instance_warmup_period => "instanceWarmupPeriod", :maximum_scaling_step_size => "maximumScalingStepSize", :minimum_scaling_step_size => "minimumScalingStepSize", :status => "status", :target_capacity => "targetCapacity", } end |
Instance Method Details
#to_jsii ⇒ Object
1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 |
# File 'ecs/cfn_capacity_provider.rb', line 1624 def to_jsii result = {} result.merge!({ "instanceWarmupPeriod" => @instance_warmup_period, "maximumScalingStepSize" => @maximum_scaling_step_size, "minimumScalingStepSize" => @minimum_scaling_step_size, "status" => @status, "targetCapacity" => @target_capacity, }) result.compact end |