Class: AWSCDK::Pipes::CfnPipe::CapacityProviderStrategyItemProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Pipes::CfnPipe::CapacityProviderStrategyItemProperty
- Defined in:
- pipes/cfn_pipe.rb
Overview
The details of a capacity provider strategy.
To learn more, see CapacityProviderStrategyItem in the Amazon ECS API Reference.
Instance Attribute Summary collapse
-
#base ⇒ Numeric?
readonly
The base value designates how many tasks, at a minimum, to run on the specified capacity provider.
-
#capacity_provider ⇒ String
readonly
The short name of the capacity provider.
-
#weight ⇒ Numeric?
readonly
The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(capacity_provider:, base: nil, weight: nil) ⇒ CapacityProviderStrategyItemProperty
constructor
A new instance of CapacityProviderStrategyItemProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(capacity_provider:, base: nil, weight: nil) ⇒ CapacityProviderStrategyItemProperty
Returns a new instance of CapacityProviderStrategyItemProperty.
1101 1102 1103 1104 1105 1106 1107 1108 |
# File 'pipes/cfn_pipe.rb', line 1101 def initialize(capacity_provider:, base: nil, weight: nil) @capacity_provider = capacity_provider Jsii::Type.check_type(@capacity_provider, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "capacityProvider") @base = base Jsii::Type.check_type(@base, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "base") unless @base.nil? @weight = weight Jsii::Type.check_type(@weight, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "weight") unless @weight.nil? end |
Instance Attribute Details
#base ⇒ Numeric? (readonly)
Default: - 0
The base value designates how many tasks, at a minimum, to run on the specified capacity provider.
Only one capacity provider in a capacity provider strategy can have a base defined. If no value is specified, the default value of 0 is used.
1122 1123 1124 |
# File 'pipes/cfn_pipe.rb', line 1122 def base @base end |
#capacity_provider ⇒ String (readonly)
The short name of the capacity provider.
1114 1115 1116 |
# File 'pipes/cfn_pipe.rb', line 1114 def capacity_provider @capacity_provider end |
#weight ⇒ Numeric? (readonly)
Default: - 0
The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider.
The weight value is taken into consideration after the base value, if defined, is satisfied.
1130 1131 1132 |
# File 'pipes/cfn_pipe.rb', line 1130 def weight @weight end |
Class Method Details
.jsii_properties ⇒ Object
1132 1133 1134 1135 1136 1137 1138 |
# File 'pipes/cfn_pipe.rb', line 1132 def self.jsii_properties { :capacity_provider => "capacityProvider", :base => "base", :weight => "weight", } end |
Instance Method Details
#to_jsii ⇒ Object
1140 1141 1142 1143 1144 1145 1146 1147 1148 |
# File 'pipes/cfn_pipe.rb', line 1140 def to_jsii result = {} result.merge!({ "capacityProvider" => @capacity_provider, "base" => @base, "weight" => @weight, }) result.compact end |