Class: Aws::Lambda::Types::InvocationRequest
- Inherits:
-
Struct
- Object
- Struct
- Aws::Lambda::Types::InvocationRequest
- Includes:
- Structure
- Defined in:
- lib/aws-sdk-lambda/types.rb
Overview
When making an API call, you may pass InvocationRequest data as a hash:
{
function_name: "NamespacedFunctionName", # required
invocation_type: "Event", # accepts Event, RequestResponse, DryRun
log_type: "None", # accepts None, Tail
client_context: "String",
payload: "data",
qualifier: "Qualifier",
}
Instance Attribute Summary collapse
-
#client_context ⇒ String
Using the ‘ClientContext` you can pass client-specific information to the Lambda function you are invoking.
-
#function_name ⇒ String
The name of the lambda function.
-
#invocation_type ⇒ String
Choose from the following options.
-
#log_type ⇒ String
You can set this optional parameter to ‘Tail` in the request only if you specify the `InvocationType` parameter with value `RequestResponse`.
-
#payload ⇒ String
JSON that you want to provide to your Lambda function as input.
-
#qualifier ⇒ String
Specify a version or alias to invoke a published version of the function.
Instance Attribute Details
#client_context ⇒ String
Using the ‘ClientContext` you can pass client-specific information to the Lambda function you are invoking. You can then process the client information in your Lambda function as you choose through the context variable. For an example of a `ClientContext` JSON, see
- PutEvents][1
-
in the *Amazon Mobile Analytics API Reference and
User Guide*.
The ClientContext JSON must be base64-encoded and has a maximum size of 3583 bytes.
<note markdown=“1”> ‘ClientContext` information is returned only if you use the synchronous (`RequestResponse`) invocation type.
</note>
[1]: docs.aws.amazon.com/mobileanalytics/latest/ug/PutEvents.html
1358 1359 1360 1361 1362 1363 1364 1365 1366 |
# File 'lib/aws-sdk-lambda/types.rb', line 1358 class InvocationRequest < Struct.new( :function_name, :invocation_type, :log_type, :client_context, :payload, :qualifier) include Aws::Structure end |
#function_name ⇒ String
The name of the lambda function.
**Name formats**
-
**Function name** - ‘MyFunction`.
-
**Function ARN** - ‘arn:aws:lambda:us-west-2:123456789012:function:MyFunction`.
-
**Partial ARN** - ‘123456789012:function:MyFunction`.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
1358 1359 1360 1361 1362 1363 1364 1365 1366 |
# File 'lib/aws-sdk-lambda/types.rb', line 1358 class InvocationRequest < Struct.new( :function_name, :invocation_type, :log_type, :client_context, :payload, :qualifier) include Aws::Structure end |
#invocation_type ⇒ String
Choose from the following options.
-
‘RequestResponse` (default) - Invoke the function synchronously. Keep the connection open until the function returns a response or times out.
-
‘Event` - Invoke the function asynchronously. Send events that fail multiple times to the function’s dead-letter queue (if configured).
-
‘DryRun` - Validate parameter values and verify that the user or role has permission to invoke the function.
1358 1359 1360 1361 1362 1363 1364 1365 1366 |
# File 'lib/aws-sdk-lambda/types.rb', line 1358 class InvocationRequest < Struct.new( :function_name, :invocation_type, :log_type, :client_context, :payload, :qualifier) include Aws::Structure end |
#log_type ⇒ String
You can set this optional parameter to ‘Tail` in the request only if you specify the `InvocationType` parameter with value `RequestResponse`. In this case, AWS Lambda returns the base64-encoded last 4 KB of log data produced by your Lambda function in the `x-amz-log-result` header.
1358 1359 1360 1361 1362 1363 1364 1365 1366 |
# File 'lib/aws-sdk-lambda/types.rb', line 1358 class InvocationRequest < Struct.new( :function_name, :invocation_type, :log_type, :client_context, :payload, :qualifier) include Aws::Structure end |
#payload ⇒ String
JSON that you want to provide to your Lambda function as input.
1358 1359 1360 1361 1362 1363 1364 1365 1366 |
# File 'lib/aws-sdk-lambda/types.rb', line 1358 class InvocationRequest < Struct.new( :function_name, :invocation_type, :log_type, :client_context, :payload, :qualifier) include Aws::Structure end |
#qualifier ⇒ String
Specify a version or alias to invoke a published version of the function.
1358 1359 1360 1361 1362 1363 1364 1365 1366 |
# File 'lib/aws-sdk-lambda/types.rb', line 1358 class InvocationRequest < Struct.new( :function_name, :invocation_type, :log_type, :client_context, :payload, :qualifier) include Aws::Structure end |