@Generated(value="software.amazon.awssdk:codegen") public final class InvokeRequest extends LambdaRequest implements ToCopyableBuilder<InvokeRequest.Builder,InvokeRequest>
Modifier and Type | Class and Description |
---|---|
static interface |
InvokeRequest.Builder |
Modifier and Type | Method and Description |
---|---|
static InvokeRequest.Builder |
builder() |
String |
clientContext()
Using the
ClientContext you can pass client-specific information to the Lambda function you are
invoking. |
boolean |
equals(Object obj) |
String |
functionName()
The name of the Lambda function.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz)
Used to retrieve the value of a field from any class that extends
SdkRequest . |
int |
hashCode() |
InvocationType |
invocationType()
Choose from the following options.
|
String |
invocationTypeAsString()
Choose from the following options.
|
LogType |
logType()
You can set this optional parameter to
Tail in the request only if you specify the
InvocationType parameter with value RequestResponse . |
String |
logTypeAsString()
You can set this optional parameter to
Tail in the request only if you specify the
InvocationType parameter with value RequestResponse . |
SdkBytes |
payload()
JSON that you want to provide to your Lambda function as input.
|
String |
qualifier()
Specify a version or alias to invoke a published version of the function.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends InvokeRequest.Builder> |
serializableBuilderClass() |
InvokeRequest.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
overrideConfiguration
copy
public String functionName()
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.
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.
public InvocationType invocationType()
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.
If the service returns an enum value that is not available in the current SDK version, invocationType
will return InvocationType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from invocationTypeAsString()
.
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.
InvocationType
public String invocationTypeAsString()
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.
If the service returns an enum value that is not available in the current SDK version, invocationType
will return InvocationType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from invocationTypeAsString()
.
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.
InvocationType
public LogType logType()
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.
If the service returns an enum value that is not available in the current SDK version, logType
will
return LogType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
logTypeAsString()
.
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.LogType
public String logTypeAsString()
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.
If the service returns an enum value that is not available in the current SDK version, logType
will
return LogType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
logTypeAsString()
.
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.LogType
public String clientContext()
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 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.
ClientContext
information is returned only if you use the synchronous (RequestResponse
)
invocation type.
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 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.
ClientContext
information is returned only if you use the synchronous (
RequestResponse
) invocation type.
public SdkBytes payload()
JSON that you want to provide to your Lambda function as input.
public String qualifier()
Specify a version or alias to invoke a published version of the function.
public InvokeRequest.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<InvokeRequest.Builder,InvokeRequest>
toBuilder
in class LambdaRequest
public static InvokeRequest.Builder builder()
public static Class<? extends InvokeRequest.Builder> serializableBuilderClass()
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
SdkRequest
SdkRequest
. The field name
specified should match the member name from the corresponding service-2.json model specified in the
codegen-resources folder for a given service. The class specifies what class to cast the returned value to.
If the returned value is also a modeled class, the SdkRequest.getValueForField(String, Class)
method will
again be available.getValueForField
in class SdkRequest
fieldName
- The name of the member to be retrieved.clazz
- The class to cast the returned object to.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.