获取某个函数下所有触发器的详细信息。
GET
https://fc.jdcloud-api.com/v1/regions/{regionId}/services/{serviceName}/functions/{functionName}/triggers
名称 | 类型 | 是否必需 | 示例值 | 描述 |
---|---|---|---|---|
regionId | String | True | cn-north-1 | 地域ID,函数当前支持如下地域: cn-north-1(华北-北京) cn-south-1(华南-广州) |
serviceName | String | True | myService | 服务名称。 |
functionName | String | True | myFunction | 函数名称。 |
无
名称 | 类型 | 描述 |
---|---|---|
result | Result | 响应结果。 |
requestId | String | 请求ID。 |
名称 | 类型 | 描述 |
---|---|---|
triggers | Trigger[] | 触发器配置。 |
totalCount | Integer | 本次查询可匹配到的总记录数。 |
名称 | 类型 | 描述 |
---|---|---|
triggerName | String | 触发器名称。 |
triggerType | String | 触发器类型。 |
triggerConfig | String | 触发器配置。 |
description | String | 触发器描述。 |
sourceJrn | String | 描述信息,默认为空。 |
createTime | String | 触发器创建时间。 |
updateTime | String | 触发器更新时间。 |
status | String | 触发器状态,为Enable、Disable。 |
GET
调用方法、签名算法及公共请求参数请参考京东云OpenAPI公共说明。
请求示例
v1/regions/cn-north-1/services/myservice/functions/myfunction/triggers
返回示例
{
"requestId": "a1e8740893a2903cf062309de11c98dc",
"result": {
"totalCount": 1,
"triggers": [
{
"trigger_name": "mytrigger",
"trigger_type": "oss",
"trigger_config": "{\"region\":\"cn-north-1\",\"bucket\":\"example\",\"events\":[\"s3:ObjectCreated:*\"],\"filter\":{\"key\":{\"prefix\":\"source\",\"suffix\":\".zip\"}}}",
"description": "example description",
"source_jrn": "jrn:s3:cn-north-1::example",
"create_time": "2023-05-04T18:51:58Z",
"update_time": "2023-05-04T18:51:59Z",
"status": "enable"
}
]
}
}
HTTP状态码 | 错误码 | 描述 | 错误解析 |
---|---|---|---|
200 | OK | ||
400 | INVALID_ARGUMENT | Invalid parameter | 参数错误 |
404 | NOT_FOUND | Function not found | 函数不存在 |
404 | NOT_FOUND | Service not found | 服务不存在 |
500 | INTERNAL | Internal server error | 系统内部错误,请稍后重试。如果多次尝试失败,请提交工单。 |
我们的产品专家为您找到最合适的产品/解决⽅案
1v1线上咨询获取售前专业咨询
专业产品顾问,随时随地沟通