Class: AWSCDK::Lambda::CapacityProviderFunctionOptions

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

Overview

Options for creating a function associated with a capacity provider.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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.

Parameters:

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

    Specifies the execution environment memory per VCPU, in GiB.

  • latest_published_scaling_config (AWSCDK::Lambda::LatestPublishedScalingConfig, nil) (defaults to: nil)

    The scaling options that are applied to the $LATEST.PUBLISHED version.

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

    Specifies the maximum number of concurrent invokes a single execution environment can handle.

  • publish_to_latest_published (Boolean, nil) (defaults to: nil)

    A boolean determining whether or not to automatically publish to the $LATEST.PUBLISHED version.



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_cpuNumeric? (readonly)

Note:

Default: 2.0

Specifies the execution environment memory per VCPU, in GiB.

Returns:

  • (Numeric, nil)


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_configAWSCDK::Lambda::LatestPublishedScalingConfig? (readonly)

Note:

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_concurrencyNumeric? (readonly)

Note:

Default: Maximum is set to 10

Specifies the maximum number of concurrent invokes a single execution environment can handle.

Returns:

  • (Numeric, nil)


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_publishedBoolean? (readonly)

Note:

Default: - True

A boolean determining whether or not to automatically publish to the $LATEST.PUBLISHED version.

Returns:

  • (Boolean, nil)


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_propertiesObject



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_jsiiObject



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