Class: AWSCDK::ECS::CfnTaskSet::ScaleProperty

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(unit: nil, value: nil) ⇒ ScaleProperty

Returns a new instance of ScaleProperty.

Parameters:

  • unit (String, nil) (defaults to: nil)

    The unit of measure for the scale value.

  • value (Numeric, nil) (defaults to: nil)

    The value, specified as a percent total of a service's desiredCount , to scale the task set.



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

#unitString? (readonly)

The unit of measure for the scale value.



946
947
948
# File 'ecs/cfn_task_set.rb', line 946

def unit
  @unit
end

#valueNumeric? (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_propertiesObject



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_jsiiObject



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