public class InvokeResult extends Object implements Serializable
Upon success, returns an empty response. Otherwise, throws an exception.
Constructor and Description |
---|
InvokeResult() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getFunctionError()
Indicates whether an error occurred while executing the Lambda function.
|
String |
getLogResult()
It is the base64-encoded logs for the Lambda function invocation.
|
ByteBuffer |
getPayload()
It is the JSON representation of the object returned by the Lambda
function.
|
Integer |
getStatusCode()
The HTTP status code will be in the 200 range for successful request.
|
int |
hashCode() |
void |
setFunctionError(String functionError)
Indicates whether an error occurred while executing the Lambda function.
|
void |
setLogResult(String logResult)
It is the base64-encoded logs for the Lambda function invocation.
|
void |
setPayload(ByteBuffer payload)
It is the JSON representation of the object returned by the Lambda
function.
|
void |
setStatusCode(Integer statusCode)
The HTTP status code will be in the 200 range for successful request.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
InvokeResult |
withFunctionError(String functionError)
Indicates whether an error occurred while executing the Lambda function.
|
InvokeResult |
withLogResult(String logResult)
It is the base64-encoded logs for the Lambda function invocation.
|
InvokeResult |
withPayload(ByteBuffer payload)
It is the JSON representation of the object returned by the Lambda
function.
|
InvokeResult |
withStatusCode(Integer statusCode)
The HTTP status code will be in the 200 range for successful request.
|
public Integer getStatusCode()
The HTTP status code will be in the 200 range for successful request. For
the RequestResonse
invocation type this status code will be
200. For the Event
invocation type this status code will be
202. For the DryRun
invocation type the status code will be
204.
The HTTP status code will be in the 200 range for successful
request. For the RequestResonse
invocation type this
status code will be 200. For the Event
invocation
type this status code will be 202. For the DryRun
invocation type the status code will be 204.
public void setStatusCode(Integer statusCode)
The HTTP status code will be in the 200 range for successful request. For
the RequestResonse
invocation type this status code will be
200. For the Event
invocation type this status code will be
202. For the DryRun
invocation type the status code will be
204.
statusCode
-
The HTTP status code will be in the 200 range for successful
request. For the RequestResonse
invocation type
this status code will be 200. For the Event
invocation type this status code will be 202. For the
DryRun
invocation type the status code will be
204.
public InvokeResult withStatusCode(Integer statusCode)
The HTTP status code will be in the 200 range for successful request. For
the RequestResonse
invocation type this status code will be
200. For the Event
invocation type this status code will be
202. For the DryRun
invocation type the status code will be
204.
Returns a reference to this object so that method calls can be chained together.
statusCode
-
The HTTP status code will be in the 200 range for successful
request. For the RequestResonse
invocation type
this status code will be 200. For the Event
invocation type this status code will be 202. For the
DryRun
invocation type the status code will be
204.
public String getFunctionError()
Indicates whether an error occurred while executing the Lambda function.
If an error occurred this field will have one of two values;
Handled
or Unhandled
. Handled
errors are errors that are reported by the function while the
Unhandled
errors are those detected and reported by AWS
Lambda. Unhandled errors include out of memory errors and function
timeouts. For information about how to report an Handled
error, see Programming Model.
Indicates whether an error occurred while executing the Lambda
function. If an error occurred this field will have one of two
values; Handled
or Unhandled
.
Handled
errors are errors that are reported by the
function while the Unhandled
errors are those
detected and reported by AWS Lambda. Unhandled errors include out
of memory errors and function timeouts. For information about how
to report an Handled
error, see Programming Model.
public void setFunctionError(String functionError)
Indicates whether an error occurred while executing the Lambda function.
If an error occurred this field will have one of two values;
Handled
or Unhandled
. Handled
errors are errors that are reported by the function while the
Unhandled
errors are those detected and reported by AWS
Lambda. Unhandled errors include out of memory errors and function
timeouts. For information about how to report an Handled
error, see Programming Model.
functionError
-
Indicates whether an error occurred while executing the Lambda
function. If an error occurred this field will have one of two
values; Handled
or Unhandled
.
Handled
errors are errors that are reported by
the function while the Unhandled
errors are those
detected and reported by AWS Lambda. Unhandled errors include
out of memory errors and function timeouts. For information
about how to report an Handled
error, see Programming Model.
public InvokeResult withFunctionError(String functionError)
Indicates whether an error occurred while executing the Lambda function.
If an error occurred this field will have one of two values;
Handled
or Unhandled
. Handled
errors are errors that are reported by the function while the
Unhandled
errors are those detected and reported by AWS
Lambda. Unhandled errors include out of memory errors and function
timeouts. For information about how to report an Handled
error, see Programming Model.
Returns a reference to this object so that method calls can be chained together.
functionError
-
Indicates whether an error occurred while executing the Lambda
function. If an error occurred this field will have one of two
values; Handled
or Unhandled
.
Handled
errors are errors that are reported by
the function while the Unhandled
errors are those
detected and reported by AWS Lambda. Unhandled errors include
out of memory errors and function timeouts. For information
about how to report an Handled
error, see Programming Model.
public String getLogResult()
It is the base64-encoded logs for the Lambda function invocation. This is
present only if the invocation type is RequestResponse
and
the logs were requested.
It is the base64-encoded logs for the Lambda function invocation.
This is present only if the invocation type is
RequestResponse
and the logs were requested.
public void setLogResult(String logResult)
It is the base64-encoded logs for the Lambda function invocation. This is
present only if the invocation type is RequestResponse
and
the logs were requested.
logResult
-
It is the base64-encoded logs for the Lambda function
invocation. This is present only if the invocation type is
RequestResponse
and the logs were requested.
public InvokeResult withLogResult(String logResult)
It is the base64-encoded logs for the Lambda function invocation. This is
present only if the invocation type is RequestResponse
and
the logs were requested.
Returns a reference to this object so that method calls can be chained together.
logResult
-
It is the base64-encoded logs for the Lambda function
invocation. This is present only if the invocation type is
RequestResponse
and the logs were requested.
public ByteBuffer getPayload()
It is the JSON representation of the object returned by the Lambda
function. This is present only if the invocation type is
RequestResponse
.
In the event of a function error this field contains a message describing
the error. For the Handled
errors the Lambda function will
report this message. For Unhandled
errors AWS Lambda reports
the message.
It is the JSON representation of the object returned by the
Lambda function. This is present only if the invocation type is
RequestResponse
.
In the event of a function error this field contains a message
describing the error. For the Handled
errors the
Lambda function will report this message. For
Unhandled
errors AWS Lambda reports the message.
public void setPayload(ByteBuffer payload)
It is the JSON representation of the object returned by the Lambda
function. This is present only if the invocation type is
RequestResponse
.
In the event of a function error this field contains a message describing
the error. For the Handled
errors the Lambda function will
report this message. For Unhandled
errors AWS Lambda reports
the message.
payload
-
It is the JSON representation of the object returned by the
Lambda function. This is present only if the invocation type
is RequestResponse
.
In the event of a function error this field contains a message
describing the error. For the Handled
errors the
Lambda function will report this message. For
Unhandled
errors AWS Lambda reports the message.
public InvokeResult withPayload(ByteBuffer payload)
It is the JSON representation of the object returned by the Lambda
function. This is present only if the invocation type is
RequestResponse
.
In the event of a function error this field contains a message describing
the error. For the Handled
errors the Lambda function will
report this message. For Unhandled
errors AWS Lambda reports
the message.
Returns a reference to this object so that method calls can be chained together.
payload
-
It is the JSON representation of the object returned by the
Lambda function. This is present only if the invocation type
is RequestResponse
.
In the event of a function error this field contains a message
describing the error. For the Handled
errors the
Lambda function will report this message. For
Unhandled
errors AWS Lambda reports the message.
public String toString()
toString
in class Object
Object.toString()
Copyright © 2017. All rights reserved.