检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
跨账号事件发送流程 本章节介绍跨账号事件发送的整个流程。 将账号A产生的事件发送到账号B,事件规则对自定义事件进行过滤和转换,通过转换后的事件触发事件目标。 前提条件 已开通事件网格服务并授权。 创建账号A和账号B。 账号A和账号B必须同地域。 步骤一:账号B创建事件通道 登录账号
从事件源接收的事件 过滤规则 过滤后的事件 { "events":[{ "id": "4b26115b-778e-11ec-******", "specversion": "1.0", "source": "HC.OBS", "type": "object
{ "projects": [ { "domain_id": "65382450e8f64ac0870cd180d14e684b", "is_domain": false, "parent_id
8961-edb168******/0de095e33e00d36e2fd2c0019a******:ROCKETMQ:zhang_roc" } 参数 {"name":"$.data.context.name"} 模板 My name is ${name} My name is test01
", "channelName" : "default", "deliverList" : [ { "subscriptionId" : "83799a5c-4e3e-49e5-b2cf-a5aa38758ee0", "subscriptionName" :
4c3a-9604-5e4e9c98ea2e", "description" : null, "name" : "test", "type" : "ROCKETMQ", "detail" : { "instance_id" : "", "group"
表1 事件参数说明 参数 类型 是否必选 示例值 说明 id String 是 4b26115b-778e-*******-833e-cf74af 事件ID。标识事件的唯一值。 specversion String 是 1.0 CloudEvents协议版本。
4c3a-9604-5e4e9c98ea2e", "description" : null, "name" : "test", "type" : "RABBITMQ", "detail" : { "instance_id" : "ac14144e-9v3c-
"name":"bucket-input-my", "arn":"", "ownerIdentity":{"ID":"f9e40463cxxxxxxxx9efd3a7ec854e
"name":"bucket-input-my", "arn":"", "ownerIdentity":{"ID":"f9e40463cxxxxxxxx9efd3a7ec854e
ROCKETMQ:source-rocketmq", "specversion": "1.0", "id": "e6cc599b-0664-4078-87dd-5630087d5f7e", "source": "source-rocketmq", "time":
POST https://{endpoint}/v1/{project_id}/sources { "name" : "first-source", "description" : "first event source", "channal_id" : "bd14144e-
Effect": "Allow", "Principal": { "IAM": [] }, "Action": "eg:channels:putEvents", "Resource": "urn:eg:cn-north-7:eeb7f0f587674635a3669e1d63013316
datacontenttype": "application/json", "data": { "context": "11111" }, "subject": "RABBITMQ:cn-north-4:f003dc69-2fc3-4c44-9062-0b9a2c6cb8cc/0ef1e7a03280f3ed2f69c00c652a5744