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.Nullable<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 client = new AmazonLambdaClient(); var response = client.AddLayerVersionPermission(new AddLayerVersionPermissionRequest { Action = "lambda:GetLayerVersion", LayerName = "my-layer", Principal = "223456789012", StatementId = "xaccount", VersionNumber = 1 }); string revisionId = response.RevisionId; string statement = response.Statement;
The following example invokes version 1 of a function named my-function asynchronously.
var client = new AmazonLambdaClient(); var response = client.AddPermission(new AddPermissionRequest { Action = "lambda:InvokeFunction", FunctionName = "my-function", Principal = "223456789012", StatementId = "xaccount" }); string statement = response.Statement;
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.7.2 and newer