Class: AWSCDK::Lambda::CfnCapacityProvider::CapacityProviderScalingConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lambda/cfn_capacity_provider.rb

Overview

Configuration that defines how the capacity provider scales compute instances based on demand and policies.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(max_v_cpu_count: nil, scaling_mode: nil, scaling_policies: nil) ⇒ CapacityProviderScalingConfigProperty

Returns a new instance of CapacityProviderScalingConfigProperty.

Parameters:



729
730
731
732
733
734
735
736
# File 'lambda/cfn_capacity_provider.rb', line 729

def initialize(max_v_cpu_count: nil, scaling_mode: nil, scaling_policies: nil)
  @max_v_cpu_count = max_v_cpu_count
  Jsii::Type.check_type(@max_v_cpu_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxVCpuCount") unless @max_v_cpu_count.nil?
  @scaling_mode = scaling_mode
  Jsii::Type.check_type(@scaling_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scalingMode") unless @scaling_mode.nil?
  @scaling_policies = scaling_policies
  Jsii::Type.check_type(@scaling_policies, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkNmbkNhcGFjaXR5UHJvdmlkZXIuVGFyZ2V0VHJhY2tpbmdTY2FsaW5nUG9saWN5UHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "scalingPolicies") unless @scaling_policies.nil?
end

Instance Attribute Details

#max_v_cpu_countNumeric? (readonly)

The maximum number of vCPUs that the capacity provider can provision across all compute instances.



742
743
744
# File 'lambda/cfn_capacity_provider.rb', line 742

def max_v_cpu_count
  @max_v_cpu_count
end

#scaling_modeString? (readonly)

The scaling mode that determines how the capacity provider responds to changes in demand.



747
748
749
# File 'lambda/cfn_capacity_provider.rb', line 747

def scaling_mode
  @scaling_mode
end

#scaling_policiesAWSCDK::IResolvable, ... (readonly)

A list of target tracking scaling policies for the capacity provider.



752
753
754
# File 'lambda/cfn_capacity_provider.rb', line 752

def scaling_policies
  @scaling_policies
end

Class Method Details

.jsii_propertiesObject



754
755
756
757
758
759
760
# File 'lambda/cfn_capacity_provider.rb', line 754

def self.jsii_properties
  {
    :max_v_cpu_count => "maxVCpuCount",
    :scaling_mode => "scalingMode",
    :scaling_policies => "scalingPolicies",
  }
end

Instance Method Details

#to_jsiiObject



762
763
764
765
766
767
768
769
770
# File 'lambda/cfn_capacity_provider.rb', line 762

def to_jsii
  result = {}
  result.merge!({
    "maxVCpuCount" => @max_v_cpu_count,
    "scalingMode" => @scaling_mode,
    "scalingPolicies" => @scaling_policies,
  })
  result.compact
end