Class: AWSCDK::Lambda::CfnVersion::FunctionScalingConfigProperty

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

Overview

Configuration that defines the scaling behavior for a Lambda Managed Instances function, including the minimum and maximum number of execution environments that can be provisioned.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(max_execution_environments: nil, min_execution_environments: nil) ⇒ FunctionScalingConfigProperty

Returns a new instance of FunctionScalingConfigProperty.

Parameters:

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

    The maximum number of execution environments that can be provisioned for the function.

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

    The minimum number of execution environments to maintain for the function.



577
578
579
580
581
582
# File 'lambda/cfn_version.rb', line 577

def initialize(max_execution_environments: nil, min_execution_environments: nil)
  @max_execution_environments = max_execution_environments
  Jsii::Type.check_type(@max_execution_environments, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxExecutionEnvironments") unless @max_execution_environments.nil?
  @min_execution_environments = min_execution_environments
  Jsii::Type.check_type(@min_execution_environments, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minExecutionEnvironments") unless @min_execution_environments.nil?
end

Instance Attribute Details

#max_execution_environmentsNumeric? (readonly)

The maximum number of execution environments that can be provisioned for the function.



588
589
590
# File 'lambda/cfn_version.rb', line 588

def max_execution_environments
  @max_execution_environments
end

#min_execution_environmentsNumeric? (readonly)

The minimum number of execution environments to maintain for the function.



593
594
595
# File 'lambda/cfn_version.rb', line 593

def min_execution_environments
  @min_execution_environments
end

Class Method Details

.jsii_propertiesObject



595
596
597
598
599
600
# File 'lambda/cfn_version.rb', line 595

def self.jsii_properties
  {
    :max_execution_environments => "maxExecutionEnvironments",
    :min_execution_environments => "minExecutionEnvironments",
  }
end

Instance Method Details

#to_jsiiObject



602
603
604
605
606
607
608
609
# File 'lambda/cfn_version.rb', line 602

def to_jsii
  result = {}
  result.merge!({
    "maxExecutionEnvironments" => @max_execution_environments,
    "minExecutionEnvironments" => @min_execution_environments,
  })
  result.compact
end