事件网格 EG-事件内容转换:常量

时间:2025-02-12 15:03:24

常量

事件只能触发事件目标,但是不会传送事件内容到事件目标,事件网格将您设置的常量路由到事件目标。示例如下:

转换前的事件

规则配置

转换后的事件

{    "events":[{"id": "4b26115b-73cf74a******",        "specversion": "1.0","source": "HC.OBS","type": "object:put","datacontenttype": "application/json","subject": "xxx.jpg","time": "2022-01-17T12:07:48.955Z","data": {"name": "test01","state": "enable"}    }]}

参数

test01

当事件目标为“FunctionGraph(函数计算)”,规则配置参数需为JSON格式,示例如下:

{"name": "test01"}
test01
说明:

当事件目标为“FunctionGraph(函数计算)”,转换后的事件结果如下:

{"name": "test01"}
support.huaweicloud.com/usermanual-eg/eg-ug-020.html