Class: AWSCDK::Greengrass::CfnFunctionDefinition::FunctionConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Greengrass::CfnFunctionDefinition::FunctionConfigurationProperty
- Defined in:
- greengrass/cfn_function_definition.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.
776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 |
# File 'greengrass/cfn_function_definition.rb', line 776 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::CfnFunctionDefinition::EnvironmentProperty.new(**environment.transform_keys(&:to_sym)) : environment Jsii::Type.check_type(@environment, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ncmVlbmdyYXNzLkNmbkZ1bmN0aW9uRGVmaW5pdGlvbi5FbnZpcm9ubWVudFByb3BlcnR5In1dfX0=")), "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 .
799 800 801 |
# File 'greengrass/cfn_function_definition.rb', line 799 def encoding_type @encoding_type end |
#environment ⇒ AWSCDK::IResolvable, ... (readonly)
The environment configuration of the function.
804 805 806 |
# File 'greengrass/cfn_function_definition.rb', line 804 def environment @environment end |
#exec_args ⇒ String? (readonly)
The execution arguments.
809 810 811 |
# File 'greengrass/cfn_function_definition.rb', line 809 def exec_args @exec_args end |
#executable ⇒ String? (readonly)
The name of the function executable.
814 815 816 |
# File 'greengrass/cfn_function_definition.rb', line 814 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.
821 822 823 |
# File 'greengrass/cfn_function_definition.rb', line 821 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.
828 829 830 |
# File 'greengrass/cfn_function_definition.rb', line 828 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.
835 836 837 |
# File 'greengrass/cfn_function_definition.rb', line 835 def timeout @timeout end |
Class Method Details
.jsii_properties ⇒ Object
837 838 839 840 841 842 843 844 845 846 847 |
# File 'greengrass/cfn_function_definition.rb', line 837 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
849 850 851 852 853 854 855 856 857 858 859 860 861 |
# File 'greengrass/cfn_function_definition.rb', line 849 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 |