AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
This is the response object from the Invoke operation.
Namespace: Amazon.Lambda.Model
Assembly: AWSSDK.Lambda.dll
Version: 3.x.y.z
public class InvokeResponse : AmazonWebServiceResponse
The InvokeResponse type exposes the following members
Name | Description | |
---|---|---|
InvokeResponse() |
Name | Type | Description | |
---|---|---|---|
ContentLength | System.Int64 | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
ExecutedVersion | System.String |
Gets and sets the property ExecutedVersion. The version of the function that executed. When you invoke a function with an alias, this indicates which version the alias resolved to. |
|
FunctionError | System.String |
Gets and sets the property FunctionError. If present, indicates that an error occurred during function execution. Details about the error are included in the response payload. |
|
HttpStatusCode | System.Net.HttpStatusCode | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
LogResult | System.String |
Gets and sets the property LogResult. The last 4 KB of the execution log, which is base64-encoded. |
|
Payload | System.IO.MemoryStream |
Gets and sets the property Payload. The response from the function, or an error object. |
|
ResponseMetadata | Amazon.Runtime.ResponseMetadata | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
StatusCode | System.Int32 |
Gets and sets the property StatusCode.
The HTTP status code is in the 200 range for a successful request. For the |
The following example invokes version 1 of a function named my-function with an empty event payload.
var response = client.Invoke(new InvokeRequest { FunctionName = "my-function", Qualifier = "1" }); MemoryStream payload = response.Payload; int statusCode = response.StatusCode;
The following example invokes version 1 of a function named my-function asynchronously.
var response = client.Invoke(new InvokeRequest { FunctionName = "my-function", InvocationType = "Event", Qualifier = "1" }); MemoryStream payload = response.Payload; int statusCode = response.StatusCode;
.NET Core App:
Supported in: 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5, 4.0, 3.5