public class InvokeResult extends Object implements Serializable
Constructor and Description |
---|
InvokeResult() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getExecutedVersion()
The version of the function that executed.
|
String |
getFunctionError()
If present, indicates that an error occured during function execution.
|
String |
getLogResult()
The last 4 KB of the execution log, base64 encoded.
|
ByteBuffer |
getPayload()
The response from the function, or an error object.
|
Integer |
getStatusCode()
The HTTP status code will be in the 200 range for successful request.
|
int |
hashCode() |
void |
setExecutedVersion(String executedVersion)
The version of the function that executed.
|
void |
setFunctionError(String functionError)
If present, indicates that an error occured during function execution.
|
void |
setLogResult(String logResult)
The last 4 KB of the execution log, base64 encoded.
|
void |
setPayload(ByteBuffer payload)
The response from the function, or an error object.
|
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 |
withExecutedVersion(String executedVersion)
The version of the function that executed.
|
InvokeResult |
withFunctionError(String functionError)
If present, indicates that an error occured during function execution.
|
InvokeResult |
withLogResult(String logResult)
The last 4 KB of the execution log, base64 encoded.
|
InvokeResult |
withPayload(ByteBuffer payload)
The response from the function, or an error object.
|
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 RequestResponse
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 RequestResponse
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 RequestResponse
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 RequestResponse
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 RequestResponse
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 RequestResponse
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()
If present, indicates that an error occured during function execution. Details about the error are included in the response payload.
Handled
- The runtime caught an error thrown by the function
and formatted it into a JSON document.
Unhandled
- The runtime did not handle the error. For
example, the function ran out of memory or timed out.
If present, indicates that an error occured during function execution. Details about the error are included in the response payload.
Handled
- The runtime caught an error thrown by the
function and formatted it into a JSON document.
Unhandled
- The runtime did not handle the error.
For example, the function ran out of memory or timed out.
public void setFunctionError(String functionError)
If present, indicates that an error occured during function execution. Details about the error are included in the response payload.
Handled
- The runtime caught an error thrown by the function
and formatted it into a JSON document.
Unhandled
- The runtime did not handle the error. For
example, the function ran out of memory or timed out.
functionError
- If present, indicates that an error occured during function execution. Details about the error are included in the response payload.
Handled
- The runtime caught an error thrown by
the function and formatted it into a JSON document.
Unhandled
- The runtime did not handle the error.
For example, the function ran out of memory or timed out.
public InvokeResult withFunctionError(String functionError)
If present, indicates that an error occured during function execution. Details about the error are included in the response payload.
Handled
- The runtime caught an error thrown by the function
and formatted it into a JSON document.
Unhandled
- The runtime did not handle the error. For
example, the function ran out of memory or timed out.
Returns a reference to this object so that method calls can be chained together.
functionError
- If present, indicates that an error occured during function execution. Details about the error are included in the response payload.
Handled
- The runtime caught an error thrown by
the function and formatted it into a JSON document.
Unhandled
- The runtime did not handle the error.
For example, the function ran out of memory or timed out.
public String getLogResult()
The last 4 KB of the execution log, base64 encoded.
The last 4 KB of the execution log, base64 encoded.
public void setLogResult(String logResult)
The last 4 KB of the execution log, base64 encoded.
logResult
- The last 4 KB of the execution log, base64 encoded.
public InvokeResult withLogResult(String logResult)
The last 4 KB of the execution log, base64 encoded.
Returns a reference to this object so that method calls can be chained together.
logResult
- The last 4 KB of the execution log, base64 encoded.
public ByteBuffer getPayload()
The response from the function, or an error object.
The response from the function, or an error object.
public void setPayload(ByteBuffer payload)
The response from the function, or an error object.
payload
- The response from the function, or an error object.
public InvokeResult withPayload(ByteBuffer payload)
The response from the function, or an error object.
Returns a reference to this object so that method calls can be chained together.
payload
- The response from the function, or an error object.
public String getExecutedVersion()
The version of the function that executed. When you invoke a function with an alias, indicates which version the alias resolved to.
Constraints:
Length: 1 - 1024
Pattern: (\$LATEST|[0-9]+)
The version of the function that executed. When you invoke a function with an alias, indicates which version the alias resolved to.
public void setExecutedVersion(String executedVersion)
The version of the function that executed. When you invoke a function with an alias, indicates which version the alias resolved to.
Constraints:
Length: 1 - 1024
Pattern: (\$LATEST|[0-9]+)
executedVersion
- The version of the function that executed. When you invoke a function with an alias, indicates which version the alias resolved to.
public InvokeResult withExecutedVersion(String executedVersion)
The version of the function that executed. When you invoke a function with an alias, indicates which version the alias resolved to.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 1024
Pattern: (\$LATEST|[0-9]+)
executedVersion
- The version of the function that executed. When you invoke a function with an alias, indicates which version the alias resolved to.
public String toString()
toString
in class Object
Object.toString()
Copyright © 2019. All rights reserved.