检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
GET https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/events 响应示例 状态码: 200 OK { "events" : [ { "id" : "3b659dc0-12fc-40dc-aa05
-12fc-40dc-aa05-a321d9424cb3", "name" : "event-k9r3" } SDK代码示例 SDK代码示例如下。
-12fc-40dc-aa05-a321d9424cb3", "name" : "event-k9r3" } SDK代码示例 SDK代码示例如下。
pip3 install pyyaml pip3 install pycryptodome 安装KooCLI命令行工具 安装KooCLI命令行工具 远程登录购买的ECS云服务器,执行如下命令安装KooCLI: curl -sSL https://hwcloudcli.obs.cn-north
3 runtime = "Python3.6" code_type = "inline" func_code = "aW1wb3J0IGpzb24KZGVmIGhhbmRsZXIgKGV2ZW50LCBjb250ZXh0KToKICAgIG91dHB1dCA9ICdIZWxsbyBtZXNzYWdlOiAnICsganNvbi5kdW1wcyhldmVudCkKICAgIHJldHVybiBvdXRwdXQ
cn-north-7:c53626012ba84727b938ca8bf03108ef:workflow:default:flow_nxy_tp:latest" }, { "workflow_id" : "c0aecc37-8b78-4fc5-81af-14af495dc053
code_type": "inline", "code_filename": "index.zip", "code_size": 884, "digest": "b08fef5e97dd130037978db07f0e9109aa43a191517cd1196bcab822f17dddcf37f7506a15691177962f9803ba6d170a1c87aafb4fa1b9f0d07f9415642b26d2
GET https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/events/{event_id} 响应示例 状态码: 200 OK { "id" : "3b659dc0-12fc-40dc-aa05-a321d9424cb3
workflow_id}/callback { "result": "success", "output": {} } 响应示例 状态码: 200 Success { "execution_id" : "48aff955-ea10-4ffd-b426-190bc192dc13
表5 DIS触发器数据说明 字段名称 字段说明 stream_name 通道名称,必填。 polling_interval 拉取周期,取值1 ~ 60,选填(不填会取默认值30)。
fgs/workflows/{workflow_id}/executions 响应示例 状态码: 200 函数流执行查询返回体 { "executions" : [ { "workflow_id" : "48aff955-ea10-4ffd-b426-190bc192dc14
{ "arg1" : "argument_1", "arg2" : "argument_2" } } 响应示例 状态码: 200 Success { "execution_id" : "48aff955-ea10-4ffd-b426-190bc192dc14
project_id}/fgs/workflows 响应示例 状态码: 200 函数流查询返回体 { "total" : 1, "size" : 1, "workflows" : [ { "id" : "48aff955-ea10-4ffd-b426-190bc192dc14
{ "arg1" : "argument_1", "arg2" : "argument_2" } } 响应示例 状态码: 200 Success { "execution_id" : "48aff955-ea10-4ffd-b426-190bc192dc14
"inline", "code_filename" : "index.js", "code_size" : 272, "digest" : "decbce6939297b0b5ec6d1a23bf9c725870f5e69fc338a89a6a4029264688dc26338f56d08b6535de47f15ad538e22ca66613b9a46f807d50b687bb53fded1c6
inline", "code_filename" : "index.js", "code_size" : 272, "digest" : "decbce6939297b0b5ec6d1a23bf9c725870f5e69fc338a89a6a4029264688dc26338f56d08b6535de47f15ad538e22ca66613b9a46f807d50b687bb53fded1c6
project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id} 响应示例 状态码: 200 OK { "trigger_id" : "9a14fae1-78cf-4185-ac7a-429eb6dc41fb
function_urn}/{trigger_type_code}/{trigger_id} { "trigger_status" : "ACTIVE" } 响应示例 状态码: 200 OK { "trigger_id" : "9a14fae1-78cf-4185-ac7a-429eb6dc41fb
"action_mode" : "" } ], "retries" : [ { "name" : "test" } ] } 响应示例 状态码: 200 Success { "id" : "48aff955-ea10-4ffd-b426-190bc192dc14
DIS触发器相关字段说明 表4 DISTriggerEvent相关字段说明 字段名 字段描述 ShardID 分区ID Message DIS消息体(DISMessage结构) Tag 函数版本 StreamName 通道名称 表5 DISMessage相关字段说明 字段名 字段描述