Class: AWSCDK::Scheduler::CfnSchedule::CapacityProviderStrategyItemProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
scheduler/cfn_schedule.rb

Overview

The details of a capacity provider strategy.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(capacity_provider:, base: nil, weight: nil) ⇒ CapacityProviderStrategyItemProperty

Returns a new instance of CapacityProviderStrategyItemProperty.

Parameters:

  • capacity_provider (String)

    The short name of the capacity provider.

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

    The base value designates how many tasks, at a minimum, to run on the specified capacity provider.

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

    The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider.



710
711
712
713
714
715
716
717
# File 'scheduler/cfn_schedule.rb', line 710

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

#baseNumeric? (readonly)

Note:

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.



731
732
733
# File 'scheduler/cfn_schedule.rb', line 731

def base
  @base
end

#capacity_providerString (readonly)

The short name of the capacity provider.



723
724
725
# File 'scheduler/cfn_schedule.rb', line 723

def capacity_provider
  @capacity_provider
end

#weightNumeric? (readonly)

Note:

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.



739
740
741
# File 'scheduler/cfn_schedule.rb', line 739

def weight
  @weight
end

Class Method Details

.jsii_propertiesObject



741
742
743
744
745
746
747
# File 'scheduler/cfn_schedule.rb', line 741

def self.jsii_properties
  {
    :capacity_provider => "capacityProvider",
    :base => "base",
    :weight => "weight",
  }
end

Instance Method Details

#to_jsiiObject



749
750
751
752
753
754
755
756
757
# File 'scheduler/cfn_schedule.rb', line 749

def to_jsii
  result = {}
  result.merge!({
    "capacityProvider" => @capacity_provider,
    "base" => @base,
    "weight" => @weight,
  })
  result.compact
end