Creates or modifies an asynchronous invocation configuration for a function.
Operation Description
The maximum validity period of messages.
Authorization information
Request syntax
PUT /2021-04-06/services/{serviceName}/functions/{functionName}/async-invoke-config
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
serviceName | string | Yes | The information about the asynchronous invocation configuration. | demo-service |
functionName | string | Yes | The configurations of the destination of an asynchronous invocation. | helloworld |
qualifier | string | No | The latest version of Function Compute API. | test |
body | object | No | Alibaba Cloud provides SDKs for multiple programming languages to help you integrate Alibaba Cloud services by using APIs. We recommend that you use an SDK to call API operations. This frees you from manual signature verification. | |
destinationConfig | DestinationConfig | No | You can search for API operations, call and debug API operations online, and dynamically generate executable sample code for SDKs. | |
maxAsyncEventAgeInSeconds | long | No | Alibaba Cloud CLI | 300 |
maxAsyncRetryAttempts | long | No | The information about the asynchronous invocation configuration. | 3 |
statefulInvocation | boolean | No | The version or alias of the service. | true |
X-Fc-Account-Id | string | No | The name of the service. | 188077086902**** |
X-Fc-Date | string | No | The creation time. | The information about the asynchronous invocation configuration. |
X-Fc-Trace-Id | string | No | The maximum number of retries allowed after an asynchronous invocation fails. Default value: 3. Valid values: 0 to 8. | ksdfjkdmkki*** |
Response parameters
Examples
Sample success responses
JSON
format
{
"createdTime": "2020-09-10T02:45:02Z",
"destinationConfig": {
"onSuccess": {
"destination": "acs:fc:cn-shanghai:xxx:services/s1/functions/f1"
},
"onFailure": {
"destination": "acs:fc:cn-shanghai:xxx:services/s1/functions/f1"
}
},
"function": "helloworld",
"lastModifiedTime": "2020-09-10T02:45:02Z",
"maxAsyncEventAgeInSeconds": 300,
"maxAsyncRetryAttempts": 3,
"qualifier": "test",
"service": "demo-service",
"statefulInvocation": true
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2021-06-29 | The input parameters of the API operation change. | |||||||||||||||
| ||||||||||||||||
2021-06-29 | The input parameters of the API operation change. | |||||||||||||||
| ||||||||||||||||
2021-06-29 | The input parameters of the API operation change. | |||||||||||||||
|