public class InvokeRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
Invoke operation
.
Invokes a specific Lambda function.
If you are using the versioning feature, you can invoke the specific
function version by providing function version or alias name that is
pointing to the function version using the Qualifier
parameter in the request. If you don't provide the
Qualifier
parameter, the $LATEST
version of
the Lambda function is invoked. For information about the versioning
feature, see
AWS Lambda Function Versioning and Aliases
.
This operation requires permission for the
lambda:InvokeFunction
action.
AWSLambda.invoke(InvokeRequest)
,
Serialized FormNOOP
Constructor and Description |
---|
InvokeRequest() |
Modifier and Type | Method and Description |
---|---|
InvokeRequest |
clone() |
boolean |
equals(Object obj) |
String |
getClientContext()
Using the
ClientContext you can pass client-specific
information to the Lambda function you are invoking. |
String |
getFunctionName()
The Lambda function name.
|
String |
getInvocationType()
By default, the
Invoke API assumes
RequestResponse invocation type. |
String |
getLogType()
You can set this optional parameter to
Tail in the
request only if you specify the InvocationType parameter
with value RequestResponse . |
ByteBuffer |
getPayload()
JSON that you want to provide to your Lambda function as input.
|
String |
getQualifier()
You can use this optional parameter to specify a Lambda function
version or alias name.
|
int |
hashCode() |
void |
setClientContext(String clientContext)
Using the
ClientContext you can pass client-specific
information to the Lambda function you are invoking. |
void |
setFunctionName(String functionName)
The Lambda function name.
|
void |
setInvocationType(InvocationType invocationType)
By default, the
Invoke API assumes
RequestResponse invocation type. |
void |
setInvocationType(String invocationType)
By default, the
Invoke API assumes
RequestResponse invocation type. |
void |
setLogType(LogType logType)
You can set this optional parameter to
Tail in the
request only if you specify the InvocationType parameter
with value RequestResponse . |
void |
setLogType(String logType)
You can set this optional parameter to
Tail in the
request only if you specify the InvocationType parameter
with value RequestResponse . |
void |
setPayload(ByteBuffer payload)
JSON that you want to provide to your Lambda function as input.
|
void |
setPayload(String payload)
JSON that you want to provide to your Lambda function as input.
|
void |
setQualifier(String qualifier)
You can use this optional parameter to specify a Lambda function
version or alias name.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
InvokeRequest |
withClientContext(String clientContext)
Using the
ClientContext you can pass client-specific
information to the Lambda function you are invoking. |
InvokeRequest |
withFunctionName(String functionName)
The Lambda function name.
|
InvokeRequest |
withInvocationType(InvocationType invocationType)
By default, the
Invoke API assumes
RequestResponse invocation type. |
InvokeRequest |
withInvocationType(String invocationType)
By default, the
Invoke API assumes
RequestResponse invocation type. |
InvokeRequest |
withLogType(LogType logType)
You can set this optional parameter to
Tail in the
request only if you specify the InvocationType parameter
with value RequestResponse . |
InvokeRequest |
withLogType(String logType)
You can set this optional parameter to
Tail in the
request only if you specify the InvocationType parameter
with value RequestResponse . |
InvokeRequest |
withPayload(ByteBuffer payload)
JSON that you want to provide to your Lambda function as input.
|
InvokeRequest |
withPayload(String payload)
JSON that you want to provide to your Lambda function as input.
|
InvokeRequest |
withQualifier(String qualifier)
You can use this optional parameter to specify a Lambda function
version or alias name.
|
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public String getFunctionName()
You can specify a function name (for
example, Thumbnail
) or you can specify Amazon Resource
Name (ARN) of the function (for example,
arn:aws:lambda:us-west-2:account-id:function:ThumbNail
).
AWS Lambda also allows you to specify a partial ARN (for example,
account-id:Thumbnail
). Note that the length constraint
applies only to the ARN. If you specify only the function name, it is
limited to 64 character in length.
Constraints:
Length: 1 - 140
Pattern: (arn:aws:lambda:)?([a-z]{2}-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?
You can specify a function name (for
example, Thumbnail
) or you can specify Amazon Resource
Name (ARN) of the function (for example,
arn:aws:lambda:us-west-2:account-id:function:ThumbNail
).
AWS Lambda also allows you to specify a partial ARN (for example,
account-id:Thumbnail
). Note that the length constraint
applies only to the ARN. If you specify only the function name, it is
limited to 64 character in length.
public void setFunctionName(String functionName)
You can specify a function name (for
example, Thumbnail
) or you can specify Amazon Resource
Name (ARN) of the function (for example,
arn:aws:lambda:us-west-2:account-id:function:ThumbNail
).
AWS Lambda also allows you to specify a partial ARN (for example,
account-id:Thumbnail
). Note that the length constraint
applies only to the ARN. If you specify only the function name, it is
limited to 64 character in length.
Constraints:
Length: 1 - 140
Pattern: (arn:aws:lambda:)?([a-z]{2}-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?
functionName
- The Lambda function name. You can specify a function name (for
example, Thumbnail
) or you can specify Amazon Resource
Name (ARN) of the function (for example,
arn:aws:lambda:us-west-2:account-id:function:ThumbNail
).
AWS Lambda also allows you to specify a partial ARN (for example,
account-id:Thumbnail
). Note that the length constraint
applies only to the ARN. If you specify only the function name, it is
limited to 64 character in length.
public InvokeRequest withFunctionName(String functionName)
You can specify a function name (for
example, Thumbnail
) or you can specify Amazon Resource
Name (ARN) of the function (for example,
arn:aws:lambda:us-west-2:account-id:function:ThumbNail
).
AWS Lambda also allows you to specify a partial ARN (for example,
account-id:Thumbnail
). Note that the length constraint
applies only to the ARN. If you specify only the function name, it is
limited to 64 character in length.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 140
Pattern: (arn:aws:lambda:)?([a-z]{2}-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?
functionName
- The Lambda function name. You can specify a function name (for
example, Thumbnail
) or you can specify Amazon Resource
Name (ARN) of the function (for example,
arn:aws:lambda:us-west-2:account-id:function:ThumbNail
).
AWS Lambda also allows you to specify a partial ARN (for example,
account-id:Thumbnail
). Note that the length constraint
applies only to the ARN. If you specify only the function name, it is
limited to 64 character in length.
public String getInvocationType()
Invoke
API assumes
RequestResponse
invocation type. You can optionally
request asynchronous execution by specifying Event
as the
InvocationType
. You can also use this parameter to
request AWS Lambda to not execute the function but do some
verification, such as if the caller is authorized to invoke the
function and if the inputs are valid. You request this by specifying
DryRun
as the InvocationType
. This is useful
in a cross-account scenario when you want to verify access to a
function without running it.
Constraints:
Allowed Values: Event, RequestResponse, DryRun
Invoke
API assumes
RequestResponse
invocation type. You can optionally
request asynchronous execution by specifying Event
as the
InvocationType
. You can also use this parameter to
request AWS Lambda to not execute the function but do some
verification, such as if the caller is authorized to invoke the
function and if the inputs are valid. You request this by specifying
DryRun
as the InvocationType
. This is useful
in a cross-account scenario when you want to verify access to a
function without running it.InvocationType
public void setInvocationType(String invocationType)
Invoke
API assumes
RequestResponse
invocation type. You can optionally
request asynchronous execution by specifying Event
as the
InvocationType
. You can also use this parameter to
request AWS Lambda to not execute the function but do some
verification, such as if the caller is authorized to invoke the
function and if the inputs are valid. You request this by specifying
DryRun
as the InvocationType
. This is useful
in a cross-account scenario when you want to verify access to a
function without running it.
Constraints:
Allowed Values: Event, RequestResponse, DryRun
invocationType
- By default, the Invoke
API assumes
RequestResponse
invocation type. You can optionally
request asynchronous execution by specifying Event
as the
InvocationType
. You can also use this parameter to
request AWS Lambda to not execute the function but do some
verification, such as if the caller is authorized to invoke the
function and if the inputs are valid. You request this by specifying
DryRun
as the InvocationType
. This is useful
in a cross-account scenario when you want to verify access to a
function without running it.InvocationType
public InvokeRequest withInvocationType(String invocationType)
Invoke
API assumes
RequestResponse
invocation type. You can optionally
request asynchronous execution by specifying Event
as the
InvocationType
. You can also use this parameter to
request AWS Lambda to not execute the function but do some
verification, such as if the caller is authorized to invoke the
function and if the inputs are valid. You request this by specifying
DryRun
as the InvocationType
. This is useful
in a cross-account scenario when you want to verify access to a
function without running it.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Event, RequestResponse, DryRun
invocationType
- By default, the Invoke
API assumes
RequestResponse
invocation type. You can optionally
request asynchronous execution by specifying Event
as the
InvocationType
. You can also use this parameter to
request AWS Lambda to not execute the function but do some
verification, such as if the caller is authorized to invoke the
function and if the inputs are valid. You request this by specifying
DryRun
as the InvocationType
. This is useful
in a cross-account scenario when you want to verify access to a
function without running it.InvocationType
public void setInvocationType(InvocationType invocationType)
Invoke
API assumes
RequestResponse
invocation type. You can optionally
request asynchronous execution by specifying Event
as the
InvocationType
. You can also use this parameter to
request AWS Lambda to not execute the function but do some
verification, such as if the caller is authorized to invoke the
function and if the inputs are valid. You request this by specifying
DryRun
as the InvocationType
. This is useful
in a cross-account scenario when you want to verify access to a
function without running it.
Constraints:
Allowed Values: Event, RequestResponse, DryRun
invocationType
- By default, the Invoke
API assumes
RequestResponse
invocation type. You can optionally
request asynchronous execution by specifying Event
as the
InvocationType
. You can also use this parameter to
request AWS Lambda to not execute the function but do some
verification, such as if the caller is authorized to invoke the
function and if the inputs are valid. You request this by specifying
DryRun
as the InvocationType
. This is useful
in a cross-account scenario when you want to verify access to a
function without running it.InvocationType
public InvokeRequest withInvocationType(InvocationType invocationType)
Invoke
API assumes
RequestResponse
invocation type. You can optionally
request asynchronous execution by specifying Event
as the
InvocationType
. You can also use this parameter to
request AWS Lambda to not execute the function but do some
verification, such as if the caller is authorized to invoke the
function and if the inputs are valid. You request this by specifying
DryRun
as the InvocationType
. This is useful
in a cross-account scenario when you want to verify access to a
function without running it.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: Event, RequestResponse, DryRun
invocationType
- By default, the Invoke
API assumes
RequestResponse
invocation type. You can optionally
request asynchronous execution by specifying Event
as the
InvocationType
. You can also use this parameter to
request AWS Lambda to not execute the function but do some
verification, such as if the caller is authorized to invoke the
function and if the inputs are valid. You request this by specifying
DryRun
as the InvocationType
. This is useful
in a cross-account scenario when you want to verify access to a
function without running it.InvocationType
public String getLogType()
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-results
header.
Constraints:
Allowed Values: None, Tail
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-results
header.LogType
public void setLogType(String logType)
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-results
header.
Constraints:
Allowed Values: None, Tail
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-results
header.LogType
public InvokeRequest withLogType(String logType)
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-results
header.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: None, Tail
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-results
header.LogType
public void setLogType(LogType logType)
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-results
header.
Constraints:
Allowed Values: None, Tail
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-results
header.LogType
public InvokeRequest withLogType(LogType logType)
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-results
header.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: None, Tail
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-results
header.LogType
public String getClientContext()
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.
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.
public void setClientContext(String clientContext)
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.
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.
public InvokeRequest withClientContext(String clientContext)
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.
Returns a reference to this object so that method calls can be chained together.
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.
public ByteBuffer getPayload()
public void setPayload(ByteBuffer payload)
payload
- JSON that you want to provide to your Lambda function as input.public InvokeRequest withPayload(ByteBuffer payload)
Returns a reference to this object so that method calls can be chained together.
payload
- JSON that you want to provide to your Lambda function as input.public void setPayload(String payload)
payload
- JSON that you want to provide to your Lambda function as input.public InvokeRequest withPayload(String payload)
Returns a reference to this object so that method calls can be chained together.
payload
- JSON that you want to provide to your Lambda function as input.public String getQualifier()
If you don't
provide this parameter, then the API uses unqualified function ARN
which results in invocation of the $LATEST
version.
Constraints:
Length: 1 - 128
Pattern: (|[a-zA-Z0-9$_-]+)
If you don't
provide this parameter, then the API uses unqualified function ARN
which results in invocation of the $LATEST
version.
public void setQualifier(String qualifier)
If you don't
provide this parameter, then the API uses unqualified function ARN
which results in invocation of the $LATEST
version.
Constraints:
Length: 1 - 128
Pattern: (|[a-zA-Z0-9$_-]+)
qualifier
- You can use this optional parameter to specify a Lambda function
version or alias name. If you specify a function version, the API uses
the qualified function ARN to invoke a specific Lambda function. If
you specify an alias name, the API uses the alias ARN to invoke the
Lambda function version to which the alias points. If you don't
provide this parameter, then the API uses unqualified function ARN
which results in invocation of the $LATEST
version.
public InvokeRequest withQualifier(String qualifier)
If you don't
provide this parameter, then the API uses unqualified function ARN
which results in invocation of the $LATEST
version.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 128
Pattern: (|[a-zA-Z0-9$_-]+)
qualifier
- You can use this optional parameter to specify a Lambda function
version or alias name. If you specify a function version, the API uses
the qualified function ARN to invoke a specific Lambda function. If
you specify an alias name, the API uses the alias ARN to invoke the
Lambda function version to which the alias points. If you don't
provide this parameter, then the API uses unqualified function ARN
which results in invocation of the $LATEST
version.
public String toString()
toString
in class Object
Object.toString()
public InvokeRequest clone()
clone
in class AmazonWebServiceRequest
Copyright © 2016. All rights reserved.