Class: AWSCDK::Lambda::CapacityProviderFunctionOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lambda::CapacityProviderFunctionOptions
- Defined in:
- lambda/capacity_provider_function_options.rb
Overview
Options for creating a function associated with a capacity provider.
Instance Attribute Summary collapse
-
#execution_environment_memory_gib_per_v_cpu ⇒ Numeric?
readonly
Specifies the execution environment memory per VCPU, in GiB.
-
#latest_published_scaling_config ⇒ AWSCDK::Lambda::LatestPublishedScalingConfig?
readonly
The scaling options that are applied to the $LATEST.PUBLISHED version.
-
#per_execution_environment_max_concurrency ⇒ Numeric?
readonly
Specifies the maximum number of concurrent invokes a single execution environment can handle.
-
#publish_to_latest_published ⇒ Boolean?
readonly
A boolean determining whether or not to automatically publish to the $LATEST.PUBLISHED version.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(execution_environment_memory_gib_per_v_cpu: nil, latest_published_scaling_config: nil, per_execution_environment_max_concurrency: nil, publish_to_latest_published: nil) ⇒ CapacityProviderFunctionOptions
constructor
A new instance of CapacityProviderFunctionOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(execution_environment_memory_gib_per_v_cpu: nil, latest_published_scaling_config: nil, per_execution_environment_max_concurrency: nil, publish_to_latest_published: nil) ⇒ CapacityProviderFunctionOptions
Returns a new instance of CapacityProviderFunctionOptions.
11 12 13 14 15 16 17 18 19 20 |
# File 'lambda/capacity_provider_function_options.rb', line 11 def initialize(execution_environment_memory_gib_per_v_cpu: nil, latest_published_scaling_config: nil, per_execution_environment_max_concurrency: nil, publish_to_latest_published: nil) @execution_environment_memory_gib_per_v_cpu = execution_environment_memory_gib_per_v_cpu Jsii::Type.check_type(@execution_environment_memory_gib_per_v_cpu, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "executionEnvironmentMemoryGiBPerVCpu") unless @execution_environment_memory_gib_per_v_cpu.nil? @latest_published_scaling_config = latest_published_scaling_config.is_a?(Hash) ? ::AWSCDK::Lambda::LatestPublishedScalingConfig.new(**latest_published_scaling_config.transform_keys(&:to_sym)) : latest_published_scaling_config Jsii::Type.check_type(@latest_published_scaling_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkxhdGVzdFB1Ymxpc2hlZFNjYWxpbmdDb25maWcifQ==")), "latestPublishedScalingConfig") unless @latest_published_scaling_config.nil? @per_execution_environment_max_concurrency = per_execution_environment_max_concurrency Jsii::Type.check_type(@per_execution_environment_max_concurrency, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "perExecutionEnvironmentMaxConcurrency") unless @per_execution_environment_max_concurrency.nil? @publish_to_latest_published = publish_to_latest_published Jsii::Type.check_type(@publish_to_latest_published, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "publishToLatestPublished") unless @publish_to_latest_published.nil? end |
Instance Attribute Details
#execution_environment_memory_gib_per_v_cpu ⇒ Numeric? (readonly)
Default: 2.0
Specifies the execution environment memory per VCPU, in GiB.
26 27 28 |
# File 'lambda/capacity_provider_function_options.rb', line 26 def execution_environment_memory_gib_per_v_cpu @execution_environment_memory_gib_per_v_cpu end |
#latest_published_scaling_config ⇒ AWSCDK::Lambda::LatestPublishedScalingConfig? (readonly)
Default: - No scaling limitations are applied to the $LATEST.PUBLISHED version.
The scaling options that are applied to the $LATEST.PUBLISHED version.
31 32 33 |
# File 'lambda/capacity_provider_function_options.rb', line 31 def latest_published_scaling_config @latest_published_scaling_config end |
#per_execution_environment_max_concurrency ⇒ Numeric? (readonly)
Default: Maximum is set to 10
Specifies the maximum number of concurrent invokes a single execution environment can handle.
36 37 38 |
# File 'lambda/capacity_provider_function_options.rb', line 36 def per_execution_environment_max_concurrency @per_execution_environment_max_concurrency end |
#publish_to_latest_published ⇒ Boolean? (readonly)
Default: - True
A boolean determining whether or not to automatically publish to the $LATEST.PUBLISHED version.
41 42 43 |
# File 'lambda/capacity_provider_function_options.rb', line 41 def publish_to_latest_published @publish_to_latest_published end |
Class Method Details
.jsii_properties ⇒ Object
43 44 45 46 47 48 49 50 |
# File 'lambda/capacity_provider_function_options.rb', line 43 def self.jsii_properties { :execution_environment_memory_gib_per_v_cpu => "executionEnvironmentMemoryGiBPerVCpu", :latest_published_scaling_config => "latestPublishedScalingConfig", :per_execution_environment_max_concurrency => "perExecutionEnvironmentMaxConcurrency", :publish_to_latest_published => "publishToLatestPublished", } end |
Instance Method Details
#to_jsii ⇒ Object
52 53 54 55 56 57 58 59 60 61 |
# File 'lambda/capacity_provider_function_options.rb', line 52 def to_jsii result = {} result.merge!({ "executionEnvironmentMemoryGiBPerVCpu" => @execution_environment_memory_gib_per_v_cpu, "latestPublishedScalingConfig" => @latest_published_scaling_config, "perExecutionEnvironmentMaxConcurrency" => @per_execution_environment_max_concurrency, "publishToLatestPublished" => @publish_to_latest_published, }) result.compact end |