获取一个服务下某个函数的异步调用配置。
接口说明
配置中的 StatefulAsyncInvocation 即为异步任务的配置项。当 StatefulAsyncInvocation 取值为 true 时,代表您已开启异步任务,所有的异步调用将变为异步任务模式。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
fc:GetFunctionAsyncInvokeConfig |
get |
*全部资源
|
无 | 无 |
请求语法
GET /2021-04-06/services/{serviceName}/functions/{functionName}/async-invoke-config HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| serviceName |
string |
是 |
服务名称。 |
demo-service |
| functionName |
string |
是 |
函数名称。 |
helloworld |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| qualifier |
string |
否 |
服务的版本或别名。 |
test |
| X-Fc-Account-Id |
string |
否 |
您的阿里云账号(主账号)ID。 |
188077086902**** |
| X-Fc-Date |
string |
否 |
函数计算调用时间,格式为EEE,d MMM yyyy HH:mm:ss GMT。 |
Sat, 14 Jul 2017 07:02:38 GMT |
| X-Fc-Trace-Id |
string |
否 |
函数计算调用请求的调用链 ID。 |
asdf**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
异步调用配置。 |
||
| createdTime |
string |
创建时间。 |
2020-09-10T02:45:02Z |
| destinationConfig |
DestinationConfig |
异步调用目标的配置结构体。 |
{"onSuccess": null,"onFailure": {"destination": "acs:mns:cn-shanghai:123:/queues/xxx/messages"}} |
| function |
string |
函数名称。 |
helloworld |
| lastModifiedTime |
string |
最后更改时间。 |
2020-09-10T02:45:02Z |
| maxAsyncEventAgeInSeconds |
integer |
消息最大存活时长。 |
300 |
| maxAsyncRetryAttempts |
integer |
异步调用失败后的最大重试次数。 |
3 |
| qualifier |
string |
服务的版本或别名。 |
test |
| service |
string |
服务名称。 |
demo-service |
| statefulInvocation |
boolean |
是否开启异步任务。
|
true |
示例
正常返回示例
JSON格式
{
"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
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。