Class: AWSCDK::ECS::MemoryUtilizationScalingProps
- Inherits:
-
ApplicationAutoScaling::BaseTargetTrackingProps
- Object
- ApplicationAutoScaling::BaseTargetTrackingProps
- AWSCDK::ECS::MemoryUtilizationScalingProps
- Defined in:
- ecs/memory_utilization_scaling_props.rb
Overview
The properties for enabling scaling based on memory utilization.
Instance Attribute Summary collapse
-
#disable_scale_in ⇒ Boolean?
readonly
Indicates whether scale in by the target tracking policy is disabled.
-
#policy_name ⇒ String?
readonly
A name for the scaling policy.
-
#scale_in_cooldown ⇒ AWSCDK::Duration?
readonly
Period after a scale in activity completes before another scale in activity can start.
-
#scale_out_cooldown ⇒ AWSCDK::Duration?
readonly
Period after a scale out activity completes before another scale out activity can start.
-
#target_utilization_percent ⇒ Numeric
readonly
The target value for memory utilization across all tasks in the service.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(disable_scale_in: nil, policy_name: nil, scale_in_cooldown: nil, scale_out_cooldown: nil, target_utilization_percent:) ⇒ MemoryUtilizationScalingProps
constructor
A new instance of MemoryUtilizationScalingProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(disable_scale_in: nil, policy_name: nil, scale_in_cooldown: nil, scale_out_cooldown: nil, target_utilization_percent:) ⇒ MemoryUtilizationScalingProps
Returns a new instance of MemoryUtilizationScalingProps.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'ecs/memory_utilization_scaling_props.rb', line 12 def initialize(disable_scale_in: nil, policy_name: nil, scale_in_cooldown: nil, scale_out_cooldown: nil, target_utilization_percent:) @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? @policy_name = policy_name Jsii::Type.check_type(@policy_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "policyName") unless @policy_name.nil? @scale_in_cooldown = scale_in_cooldown Jsii::Type.check_type(@scale_in_cooldown, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "scaleInCooldown") unless @scale_in_cooldown.nil? @scale_out_cooldown = scale_out_cooldown Jsii::Type.check_type(@scale_out_cooldown, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "scaleOutCooldown") unless @scale_out_cooldown.nil? @target_utilization_percent = target_utilization_percent Jsii::Type.check_type(@target_utilization_percent, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "targetUtilizationPercent") end |
Instance Attribute Details
#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 scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource.
34 35 36 |
# File 'ecs/memory_utilization_scaling_props.rb', line 34 def disable_scale_in @disable_scale_in end |
#policy_name ⇒ String? (readonly)
Default: - Automatically generated name.
A name for the scaling policy.
39 40 41 |
# File 'ecs/memory_utilization_scaling_props.rb', line 39 def policy_name @policy_name end |
#scale_in_cooldown ⇒ AWSCDK::Duration? (readonly)
Default: Duration.seconds(300) for the following scalable targets: ECS services, Spot Fleet requests, EMR clusters, AppStream 2.0 fleets, Aurora DB clusters, Amazon SageMaker endpoint variants, Custom resources. For all other scalable targets, the default value is Duration.seconds(0): DynamoDB tables, DynamoDB global secondary indexes, Amazon Comprehend document classification endpoints, Lambda provisioned concurrency
Period after a scale in activity completes before another scale in activity can start.
44 45 46 |
# File 'ecs/memory_utilization_scaling_props.rb', line 44 def scale_in_cooldown @scale_in_cooldown end |
#scale_out_cooldown ⇒ AWSCDK::Duration? (readonly)
Default: Duration.seconds(300) for the following scalable targets: ECS services, Spot Fleet requests, EMR clusters, AppStream 2.0 fleets, Aurora DB clusters, Amazon SageMaker endpoint variants, Custom resources. For all other scalable targets, the default value is Duration.seconds(0): DynamoDB tables, DynamoDB global secondary indexes, Amazon Comprehend document classification endpoints, Lambda provisioned concurrency
Period after a scale out activity completes before another scale out activity can start.
49 50 51 |
# File 'ecs/memory_utilization_scaling_props.rb', line 49 def scale_out_cooldown @scale_out_cooldown end |
#target_utilization_percent ⇒ Numeric (readonly)
The target value for memory utilization across all tasks in the service.
53 54 55 |
# File 'ecs/memory_utilization_scaling_props.rb', line 53 def target_utilization_percent @target_utilization_percent end |
Class Method Details
.jsii_properties ⇒ Object
55 56 57 58 59 60 61 62 63 |
# File 'ecs/memory_utilization_scaling_props.rb', line 55 def self.jsii_properties { :disable_scale_in => "disableScaleIn", :policy_name => "policyName", :scale_in_cooldown => "scaleInCooldown", :scale_out_cooldown => "scaleOutCooldown", :target_utilization_percent => "targetUtilizationPercent", } end |
Instance Method Details
#to_jsii ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'ecs/memory_utilization_scaling_props.rb', line 65 def to_jsii result = {} result.merge!(super) result.merge!({ "disableScaleIn" => @disable_scale_in, "policyName" => @policy_name, "scaleInCooldown" => @scale_in_cooldown, "scaleOutCooldown" => @scale_out_cooldown, "targetUtilizationPercent" => @target_utilization_percent, }) result.compact end |