Class: AWSCDK::ECS::CfnTaskSet::ScaleProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::CfnTaskSet::ScaleProperty
- Defined in:
- ecs/cfn_task_set.rb
Overview
A floating-point percentage of the desired number of tasks to place and keep running in the task set.
Instance Attribute Summary collapse
-
#unit ⇒ String?
readonly
The unit of measure for the scale value.
-
#value ⇒ Numeric?
readonly
The value, specified as a percent total of a service's
desiredCount, to scale the task set.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(unit: nil, value: nil) ⇒ ScaleProperty
constructor
A new instance of ScaleProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(unit: nil, value: nil) ⇒ ScaleProperty
Returns a new instance of ScaleProperty.
935 936 937 938 939 940 |
# File 'ecs/cfn_task_set.rb', line 935 def initialize(unit: nil, value: nil) @unit = unit Jsii::Type.check_type(@unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "unit") unless @unit.nil? @value = value Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "value") unless @value.nil? end |
Instance Attribute Details
#unit ⇒ String? (readonly)
The unit of measure for the scale value.
946 947 948 |
# File 'ecs/cfn_task_set.rb', line 946 def unit @unit end |
#value ⇒ Numeric? (readonly)
The value, specified as a percent total of a service's desiredCount , to scale the task set.
Accepted values are numbers between 0 and 100.
953 954 955 |
# File 'ecs/cfn_task_set.rb', line 953 def value @value end |
Class Method Details
.jsii_properties ⇒ Object
955 956 957 958 959 960 |
# File 'ecs/cfn_task_set.rb', line 955 def self.jsii_properties { :unit => "unit", :value => "value", } end |
Instance Method Details
#to_jsii ⇒ Object
962 963 964 965 966 967 968 969 |
# File 'ecs/cfn_task_set.rb', line 962 def to_jsii result = {} result.merge!({ "unit" => @unit, "value" => @value, }) result.compact end |