Class: AWSCDK::Greengrass::CfnFunctionDefinitionVersion::FunctionConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Greengrass::CfnFunctionDefinitionVersion::FunctionConfigurationProperty
- Defined in:
- greengrass/cfn_function_definition_version.rb
Overview
The group-specific configuration settings for a Lambda function.
These settings configure the function's behavior in the Greengrass group. For more information, see Controlling Execution of Greengrass Lambda Functions by Using Group-Specific Configuration in the Developer Guide .
In an CloudFormation template, FunctionConfiguration is a property of the Function property type.
Instance Attribute Summary collapse
-
#encoding_type ⇒ String?
readonly
The expected encoding type of the input payload for the function.
-
#environment ⇒ AWSCDK::IResolvable, ...
readonly
The environment configuration of the function.
-
#exec_args ⇒ String?
readonly
The execution arguments.
-
#executable ⇒ String?
readonly
The name of the function executable.
-
#memory_size ⇒ Numeric?
readonly
The memory size (in KB) required by the function.
-
#pinned ⇒ Boolean, ...
readonly
Indicates whether the function is pinned (or long-lived ).
-
#timeout ⇒ Numeric?
readonly
The allowed execution time (in seconds) after which the function should terminate.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(encoding_type: nil, environment: nil, exec_args: nil, executable: nil, memory_size: nil, pinned: nil, timeout: nil) ⇒ FunctionConfigurationProperty
constructor
A new instance of FunctionConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(encoding_type: nil, environment: nil, exec_args: nil, executable: nil, memory_size: nil, pinned: nil, timeout: nil) ⇒ FunctionConfigurationProperty
Returns a new instance of FunctionConfigurationProperty.
706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 |
# File 'greengrass/cfn_function_definition_version.rb', line 706 def initialize(encoding_type: nil, environment: nil, exec_args: nil, executable: nil, memory_size: nil, pinned: nil, timeout: nil) @encoding_type = encoding_type Jsii::Type.check_type(@encoding_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "encodingType") unless @encoding_type.nil? @environment = environment.is_a?(Hash) ? ::AWSCDK::Greengrass::CfnFunctionDefinitionVersion::EnvironmentProperty.new(**environment.transform_keys(&:to_sym)) : environment Jsii::Type.check_type(@environment, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ncmVlbmdyYXNzLkNmbkZ1bmN0aW9uRGVmaW5pdGlvblZlcnNpb24uRW52aXJvbm1lbnRQcm9wZXJ0eSJ9XX19")), "environment") unless @environment.nil? @exec_args = exec_args Jsii::Type.check_type(@exec_args, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "execArgs") unless @exec_args.nil? @executable = executable Jsii::Type.check_type(@executable, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "executable") unless @executable.nil? @memory_size = memory_size Jsii::Type.check_type(@memory_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "memorySize") unless @memory_size.nil? @pinned = pinned Jsii::Type.check_type(@pinned, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "pinned") unless @pinned.nil? @timeout = timeout Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "timeout") unless @timeout.nil? end |
Instance Attribute Details
#encoding_type ⇒ String? (readonly)
The expected encoding type of the input payload for the function.
Valid values are json (default) and binary .
729 730 731 |
# File 'greengrass/cfn_function_definition_version.rb', line 729 def encoding_type @encoding_type end |
#environment ⇒ AWSCDK::IResolvable, ... (readonly)
The environment configuration of the function.
734 735 736 |
# File 'greengrass/cfn_function_definition_version.rb', line 734 def environment @environment end |
#exec_args ⇒ String? (readonly)
The execution arguments.
739 740 741 |
# File 'greengrass/cfn_function_definition_version.rb', line 739 def exec_args @exec_args end |
#executable ⇒ String? (readonly)
The name of the function executable.
744 745 746 |
# File 'greengrass/cfn_function_definition_version.rb', line 744 def executable @executable end |
#memory_size ⇒ Numeric? (readonly)
The memory size (in KB) required by the function.
This property applies only to Lambda functions that run in a Greengrass container.
751 752 753 |
# File 'greengrass/cfn_function_definition_version.rb', line 751 def memory_size @memory_size end |
#pinned ⇒ Boolean, ... (readonly)
Indicates whether the function is pinned (or long-lived ).
Pinned functions start when the core starts and process all requests in the same container. The default value is false.
758 759 760 |
# File 'greengrass/cfn_function_definition_version.rb', line 758 def pinned @pinned end |
#timeout ⇒ Numeric? (readonly)
The allowed execution time (in seconds) after which the function should terminate.
For pinned functions, this timeout applies for each request.
765 766 767 |
# File 'greengrass/cfn_function_definition_version.rb', line 765 def timeout @timeout end |
Class Method Details
.jsii_properties ⇒ Object
767 768 769 770 771 772 773 774 775 776 777 |
# File 'greengrass/cfn_function_definition_version.rb', line 767 def self.jsii_properties { :encoding_type => "encodingType", :environment => "environment", :exec_args => "execArgs", :executable => "executable", :memory_size => "memorySize", :pinned => "pinned", :timeout => "timeout", } end |
Instance Method Details
#to_jsii ⇒ Object
779 780 781 782 783 784 785 786 787 788 789 790 791 |
# File 'greengrass/cfn_function_definition_version.rb', line 779 def to_jsii result = {} result.merge!({ "encodingType" => @encoding_type, "environment" => @environment, "execArgs" => @exec_args, "executable" => @executable, "memorySize" => @memory_size, "pinned" => @pinned, "timeout" => @timeout, }) result.compact end |