Class: AWSCDK::Events::CfnRule::CapacityProviderStrategyItemProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Events::CfnRule::CapacityProviderStrategyItemProperty
- Defined in:
- events/cfn_rule.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.
897 898 899 900 901 902 903 904 |
# File 'events/cfn_rule.rb', line 897 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)
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.
917 918 919 |
# File 'events/cfn_rule.rb', line 917 def base @base end |
#capacity_provider ⇒ String (readonly)
The short name of the capacity provider.
910 911 912 |
# File 'events/cfn_rule.rb', line 910 def capacity_provider @capacity_provider end |
#weight ⇒ Numeric? (readonly)
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.
924 925 926 |
# File 'events/cfn_rule.rb', line 924 def weight @weight end |
Class Method Details
.jsii_properties ⇒ Object
926 927 928 929 930 931 932 |
# File 'events/cfn_rule.rb', line 926 def self.jsii_properties { :capacity_provider => "capacityProvider", :base => "base", :weight => "weight", } end |
Instance Method Details
#to_jsii ⇒ Object
934 935 936 937 938 939 940 941 942 |
# File 'events/cfn_rule.rb', line 934 def to_jsii result = {} result.merge!({ "capacityProvider" => @capacity_provider, "base" => @base, "weight" => @weight, }) result.compact end |