This topic describes the parameters in the metadata of an event target.
Parameters
The following table describes the parameters in the metadata of an event target.
Parameter | Type | Description |
---|---|---|
resourceKey | String | The key of the resource that is used in event transformation. |
resourceName | String | The name of the resource that is used in event transformation. |
forms | String | The transformation method. The following transformation methods are supported:
|
DingTalk
The following table describes the parameters that you can set if you select DingTalk as the event target.
resourceKey | resourceName | forms |
---|---|---|
URL | Address | CONSTANT |
SecretKey | Secret Key | CONSTANT |
Body | Pushed Content | TEMPLATE |
The following code shows an example of JSONPath:
{
"id":"KD20k9rpqDRXPq0SXXlqeTn6kZ",
"type":"acs.dingtalk",
"endpoint":"https://oapi.dingtalk.com/robot/send?access_token=1560abe367f48877c69bb6a9916244979927abbbbf82f4fe8801692cd6ea****",
"paramList":[
{
"value":"https://oapi.dingtalk.com/robot/send?access_token=1560abe367f48877c69bb6a9916244979927abbbbf82f4fe8801692cd6ea****",
"resourceKey":"URL",
"form":"CONSTANT"
},
{
"value":"SEC1eca5209e0c6c23165b9504967522d47b0d0004e1caf3a75f6ddfda7359d****",
"resourceKey":"SecretKey",
"form":"CONSTANT"
},
{
"value":{
"content":"$.data.content"
},
"resourceKey":"Body",
"form":"TEMPLATE",
"template":{
"msgtype":"text",
"text":{
"content":"@1851111***** ${content}"
},
"at":{
}
}
}
]
}
Direct Mail
The following table describes the parameters that you can set if you select Direct Mail as the event target.
resourceKey | resourceName | forms |
---|---|---|
Subject | Subject | CONSTANT |
AccountName | Sender Address | CONSTANT |
AddressType | Address Type | CONSTANT |
ReplyToAddress | Return Address | CONSTANT |
ToAddress | Recipient |
|
IsHtmlBody | HTML Body | CONSTANT |
Body | Body | TEMPLATE |
The following code shows an example of JSONPath:
{
"id":"KD20k9rpqDRXPq0SXXlqeTn6kZ",
"type":"acs.mail",
"endpoint":"acs:mail:cn-hangzhou:164901546557****",
"paramList":[
{
"value":"test",
"resourceKey":"Subject",
"form":"CONSTANT"
},
{
"value":"example.com",
"resourceKey":"AccountName",
"form":"CONSTANT"
},
{
"value":"1",
"resourceKey":"AddressType",
"form":"CONSTANT"
},
{
"value":"true",
"resourceKey":"ReplyToAddress",
"form":"CONSTANT"
},
{
"value":"$.data.name",
"resourceKey":"ToAddress",
"form":"JSONPATH"
},
{
"value":"true",
"resourceKey":"IsHtmlBody",
"form":"CONSTANT"
},
{
"value":{
"mobile":"$.data.mobile",
"subject":"$.subject"
},
"resourceKey":"Body",
"form":"TEMPLATE",
"template":{
"code":"${subject}"
}
}
]
}
SMS
The following table describes the parameters that you can set if you select Short Message Service (SMS) as the event target.
resourceKey | resourceName | forms |
---|---|---|
PhoneNumbers | Phone Number |
|
SignName | Signature | CONSTANT |
TemplateCode | Template Code | CONSTANT |
TemplateParam | Template Parameters | TEMPLATE |
The following code shows an example of JSONPath:
{
"id":"KD20k9rpqDRXPq0SXXlqeTn6kZ",
"type":"acs.sms",
"endpoint":"acs:sms:cn-hangzhou:164901546557****",
"paramList":[
{
"value":"$.data",
"resourceKey":"PhoneNumbers",
"form":"JSONPATH"
},
{
"value":"[Test] Alibaba Cloud Communication",
"resourceKey":"SignName",
"form":"CONSTANT"
},
{
"value":"[Test] Alibaba Cloud Communication Test Template",
"resourceKey":"TemplateCode",
"form":"CONSTANT"
},
{
"value":{
"mobile":"$.data.mobile",
"subject":"$.subject"
},
"resourceKey":"TemplateParam",
"form":"TEMPLATE",
"template":{
"code":"${subject}"
}
}
]
}
Function Compute
The following table describes the parameters that you can set if you select Function Compute as the event target.
resourceKey | resourceName | forms |
---|---|---|
serviceName | Service | CONSTANT |
functionName | Function | CONSTANT |
Body | Event |
|
The following code shows an example of JSONPath:
{
"id":"KD20k9rpqDRXPq0SXXlqeTn6kZ",
"type":"acs.fc.function",
"endpoint":"acs:fc:cn-hangzhou:164901546557****:services/guide-hello_world.LATEST/functions/hello_world",
"paramList":[
{
"value":"guide-hello_world",
"resourceKey":"serviceName",
"form":"CONSTANT"
},
{
"value":"hello_world",
"resourceKey":"functionName",
"form":"CONSTANT"
},
{
"value":"$.data.name",
"resourceKey":"Body",
"form":"JSONPATH"
},
{
"value":"LATEST",
"resourceKey":"Qualifier",
"form":"CONSTANT"
}
]
}
MNS
The following table describes the parameters that you can set if you select Message Service (MNS) as the event target.
resourceKey | resourceName | forms |
---|---|---|
queue | Queue | CONSTANT |
Body | Message Content |
|
The following code shows an example of JSONPath:
{
"id":"KD20k9rpqDRXPq0SXXlqeTn6kZ",
"type":"acs.mns.queue",
"endpoint":"acs:mns:cn-hangzhou:164901546557****:queues/MyQueue",
"paramList":[
{
"value":"MyQueue",
"resourceKey":"queue",
"form":"CONSTANT"
},
{
"value":{
"source":"$.source"
},
"resourceKey":"Body",
"form":"TEMPLATE",
"template":"The event comes from ${source} is abnormal."
}
]
}
Message Queue for Apache RocketMQ
The following table describes the parameters that you can set if you select Message Queue for Apache RocketMQ as the event target.
resourceKey | resourceName | forms |
---|---|---|
InstanceId | Instance ID | CONSTANT |
Topic | Topic | CONSTANT |
Body | Body |
|
Properties | Properties |
|
Keys | Keys |
|
Tags | Tags |
|
The following code shows an example of JSONPath:
{
"id":"KD20k9rpqDRXPq0SXXlqeTn6kZ",
"type":"acs.rocketmq",
"endpoint":"acs:mq:cn-hangzhou:164901546557****:/instances/${instanceId}/topic/${topic}",
"paramList":[
{
"value":"MQ_INST_164901546557****_BAAQ4gWo",
"resourceKey":"InstanceId",
"form":"CONSTANT"
},
{
"value":"test-topic1",
"resourceKey":"Topic",
"form":"CONSTANT"
},
{
"value":"$.data.name",
"resourceKey":"Body",
"form":"JSONPATH"
},
{
"value":"$.data.userProperties",
"resourceKey":"Properties",
"form":"JSONPATH"
},
{
"value":"$.data.systemProperties.KEYS",
"resourceKey":"Keys",
"form":"JSONPATH"
},
{
"value":"$.data.systemProperties.TAGS",
"resourceKey":"Tags",
"form":"JSONPATH"
}
]
}
Message Queue for RabbitMQ
The following table describes the parameters that you can set if you select Message Queue for RabbitMQ as the event target.
resourceKey | resourceName | forms |
---|---|---|
InstanceId | Instance ID | CONSTANT |
Vhost | Vhost | CONSTANT |
TargetType | Destination Type | CONSTANT |
Exchange | Exchange | CONSTANT
Note You can set only one of the Exchange and Queue parameters.
|
Routing Key | Routing Key |
|
Queue | Queue | CONSTANT
Note You can set only one of the Exchange and Queue parameters.
|
Body | Body |
|
MessageId | Message ID |
|
Properties | Properties |
|
The following code shows examples of JSONPath:
Example 1: The TargetType resource is set to Exchange.
{
"id":"KD20k9rpqDRXPq0SXXlqeTn6kZ",
"type":"acs.rabbitmq",
"endpoint":"acs:amqp:cn-hangzhou:164901546557****:/instances/${instanceId}/vhosts/${vhostName}/exchanges/${exchangeName}",
"paramList":[
{
"value":"amqp-cn-i7m29o3s****",
"resourceKey":"InstanceId",
"form":"CONSTANT"
},
{
"value":"test.host",
"resourceKey":"Vhost",
"form":"CONSTANT"
},
{
"value":"Exchange",
"resourceKey":"TargetType",
"form":"CONSTANT"
},
{
"value":"amq.direct",
"resourceKey":"Exchange",
"form":"CONSTANT"
},
{
"value":"$.data.name",
"resourceKey":"RoutingKey",
"form":"JSONPATH"
},
{
"value":"$.data.name",
"resourceKey":"Body",
"form":"JSONPATH"
},
{
"value":"$.data.message",
"resourceKey":"MessageId",
"form":"JSONPATH"
},
{
"value":"$.data.userProperties",
"resourceKey":"Properties",
"form":"JSONPATH"
}
]
}
Example 2: The TargetType resource is set to Queue.
{
"id":"EldwXoVAws5Ix8VpVmrDmrxQTR",
"type":"acs.rabbitmq",
"endpoint":"acs:amqp:cn-hangzhou:164901546557****:/instances/${instanceId}/vhosts/${vhostName}/exchanges/${exchangeName}",
"paramList":[
{
"value":"amqp-cn-i7m29o3s****",
"resourceKey":"InstanceId",
"form":"CONSTANT"
},
{
"value":"test.host",
"resourceKey":"Vhost",
"form":"CONSTANT"
},
{
"value":"Queue",
"resourceKey":"TargetType",
"form":"CONSTANT"
},
{
"value":"test.event",
"resourceKey":"Queue",
"form":"CONSTANT"
},
{
"value":"$.data.body",
"resourceKey":"Body",
"form":"JSONPATH"
},
{
"value":"$.data.message",
"resourceKey":"MessageId",
"form":"JSONPATH"
},
{
"value":"$.data.userproperties",
"resourceKey":"Properties",
"form":"JSONPATH"
}
]
}
HTTP/HTTPS
The following table describes the parameters that you can set if you select HTTP or HTTPS as the event target.
resourceKey | resourceName | forms |
---|---|---|
url | URL | CONSTANT |
Body | Body |
|
Network | Network Type | CONSTANT |
VPCNameAndId | VPC | CONSTANT |
VSwitchesNameAndId | vSwitch | CONSTANT |
SecurityGroupNameAndId | Security Group | CONSTANT |
Token | Token | CONSTANT |
The following code shows examples of JSONPath:
Example 1: The Network resource is set to PublicNetwork.
{
"id":"KD20k9rpqDRXPq0SXXlqeTn6kZ",
"type":"http(s)",
"endpoint":"http(s)://www.****.com/product/aliware/eventbridge",
"paramList":[
{
"value":"http(s)://www.****.com/product/aliware/eventbridge",
"resourceKey":"url",
"form":"CONSTANT"
},
{
"value":"",
"resourceKey":"Body",
"form":"ORIGINAL"
},
{
"value":"PublicNetwork",
"resourceKey":"Network",
"form":"CONSTANT"
}
]
}
Example 2: The Network resource is set to PrivateNetwork.
{
"id":"ZOiNcqqzTGSrDJanZQ72vjL9Se",
"type":"http(s)",
"endpoint":"http(s)://192.168.XX.XX:8080",
"paramList":[
{
"value":"http(s)://192.168.XX.XX:8080",
"resourceKey":"url",
"form":"CONSTANT"
},
{
"value":"",
"resourceKey":"Body",
"form":"ORIGINAL"
},
{
"value":"PrivateNetwork",
"resourceKey":"Network",
"form":"CONSTANT"
},
{
"value":"catalog-system/vpc-bp1ohdo84u2lt9wzq****",
"resourceKey":"VPCNameAndId",
"form":"CONSTANT"
},
{
"value":"[\"eb/vsw-bp10rbrt6rb6vrd89****\"]",
"resourceKey":"VSwitchesNameAndId",
"form":"CONSTANT"
},
{
"value":"sg-catalog-eventlistener/sg-bp14zrnfyik5av27****",
"resourceKey":"SecurityGroupNameAndId",
"form":"CONSTANT"
},
{
"value":"",
"resourceKey":"Token",
"form":"CONSTANT"
}
]
}
Databases
- The following table describes the parameters that you can set if you select ApsaraDB
RDS for MySQL as the event target.
resourceKey resourceName forms concurrency Concurrency N/A InstanceId Instance ID CONSTANT DBName Database Name CONSTANT AccountName Database Account CONSTANT AccountPassword Database Password CONSTANT ExecuteSQL Custom SQL - ORIGINAL
- CONSTANT
- JSONPATH
- TEMPLATE
VpcId VPC CONSTANT VSwitchIds vSwitch CONSTANT SecurityGroupId Security Group CONSTANT The following code shows an example of JSONPath:
{ "id":"BRTt1sNe3IvdvejN07k5Sb****", "type":"acs.rds.mysql", "endpoint":"acs:rds:cn-zhangjiakou:164901546557****:dbinstance/${dbinstanceid}", "concurrentConfig":{ "concurrency":10 }, "paramList":[ { "value":"rm-8vban2a66q93o****", "resourceKey":"InstanceId", "form":"CONSTANT" }, { "value":"db-test", "resourceKey":"DBName", "form":"CONSTANT" }, { "value":"db_name", "resourceKey":"AccountName", "form":"CONSTANT" }, { "value":"Aliyun****", "resourceKey":"AccountPassword", "form":"CONSTANT" }, { "value":"{\n \"tableName\": \"customer\",\n \"column1\": \"$.data.tableName\",\n \"column1_value\": \"$.data.id\"\n}", "template":"INSERT INTO ${tableName} \n (${column1}) VALUES('${column1_value}')", "resourceKey":"ExecuteSQL", "form":"TEMPLATE" }, { "value":"vpc-8vbeokru8z8erie8e****", "resourceKey":"VpcId", "form":"CONSTANT" }, { "value":"vsw-8vb9alm00nf29ijxt****", "resourceKey":"VSwitchIds", "form":"CONSTANT" } { "value":"sg-8vbb59f5vq1ydiwr****", "resourceKey":"SecurityGroupId", "form":"CONSTANT" } ] }
- The following table describes the parameters that you can set if you select a self-managed
MySQL database as the event target.
resourceKey resourceName forms concurrency Concurrency N/A Network Network CONSTANT VpcId VPC CONSTANT VSwitchIds vSwitch CONSTANT ConnectionStringAndPort Database Address CONSTANT DBName Database Name CONSTANT AccountName Database Account CONSTANT AccountPassword Database Password CONSTANT ExecuteSQL Custom SQL - ORIGINAL
- CONSTANT
- JSONPATH
- TEMPLATE
Example 1: The Network resource is set to PublicNetwork.
{ "id":"HmfVOvdG4k1NK9qJiqrxtv****", "type":"mysql", "endpoint":"192.168.XX.XX:3306", "concurrentConfig":{ "concurrency":10 }, "paramList":[ { "value":"192.168.XX.XX:3306", "resourceKey":"ConnectionStringAndPort", "form":"CONSTANT" }, { "value":"db-test", "resourceKey":"DBName", "form":"CONSTANT" }, { "value":"dbTest", "resourceKey":"AccountName", "form":"CONSTANT" }, { "value":"Mydb****", "resourceKey":"AccountPassword", "form":"CONSTANT" }, { "value":"{\n \"tableName\": \"user\",\n \"column1\": \"$.data.tableName\",\n \"column1_value\": \"$.data.id\"\n}", "template":"INSERT INTO ${tableName} \n (${column1}) VALUES('${column1_value}')", "resourceKey":"ExecuteSQL", "form":"TEMPLATE" }, ] }
Example 2: The Network resource is set to PrivateNetwork.
{ "id":"HmfVOvdG4k1NK9qJiqrxtv****", "type":"mysql", "endpoint":"192.168.XX.XX:3306", "concurrentConfig":{ "concurrency":10 }, "paramList":[ { "value":"vpc-8vbeokru8z8erie8e****", "resourceKey":"VpcId", "form":"CONSTANT" }, { "value":"vsw-8vbo9jk84z0obm24f****", "resourceKey":"VSwitchIds", "form":"CONSTANT" }, { "value":"192.168.XX.XX:3306", "resourceKey":"ConnectionStringAndPorte", "form":"CONSTANT" }, { "value":"my-db", "resourceKey":"DBName", "form":"CONSTANT" }, { "value":"dmsTest", "resourceKey":"AccountName", "form":"TEMPLATE" }, { "value":"Mydb****", "resourceKey":"AccountPassword", "form":"CONSTANT" }, { "value":"{\n \"tableName\": \"user\",\n \"column1\": \"$.data.tableName\",\n \"column1_value\": \"$.data.id\"\n}", "template": "INSERT INTO ${tableName} \n (${column1}) VALUES('${column1_value}')", "resourceKey":"ExecuteSQL", "form":"TEMPLATE" } ] }