Event target parameters

更新时间:
复制 MD 格式

This topic describes the metadata parameters for an event target.

Request parameters

Parameter

Type

Required

Example

Description

EventBusName

String

Yes

default

The name of the event bus. For more information, see Limits.

RuleName

String

Yes

MNSRule

The name of the event rule. For more information, see Limits.

Description

String

No

The filtering rule for Message Service (MNS).

The description for the event rule.

Status

String

No

ENABLE

The status of the event rule. Valid values:

  • ENABLE: The rule is enabled.

  • DISABLE: The rule is disabled.

Default value: ENABLE.

FilterPattern

String

No

{\"source\": [{\"prefix\": \"acs.\"}],\"type\": [{\"prefix\":\"oss:ObjectReplication\"}],\"subject\":[{\"prefix\":\"acs:oss:cn-hangzhou:123456789098****:my-movie-bucket/\", \"suffix\":\".txt\"}]}

The event pattern, in JSON format. For more information, see Event patterns.

Targets

List<Target>

Yes

A list of event targets.

Id

String

Yes

1

The custom event target ID. The ID must be unique within the current rule.

Type

String

Yes

acs.mns.queue

The type of the event target. For details, see the event target descriptions later in this topic.

Endpoint

String

No

acs:mns:cn-hangzhou:123456789098****:queues/myqueue

The endpoint of the event target. For details, see the endpoint format for each event target later in this topic.

PushRetryStrategy

String

Yes

BACKOFF_RETRY

The policy for retrying failed event deliveries. Valid values:

  • BACKOFF_RETRY: A backoff retry strategy. The system retries up to 3 times. The interval between retries varies randomly from 10 to 20 seconds.

  • EXPONENTIAL_DECAY_RETRY: An exponential decay retry strategy. The system retries up to 176 times over one day. The retry interval increases exponentially to 512 seconds. The specific retry intervals are: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 512, ..., 512 seconds. The final 167 retries use a 512-second interval.

DeadLetterQueue

String

No

The dead-letter queue. Undelivered events or events that exceed the maximum number of retries are sent to this queue. The supported queue types are Message Service (MNS) and ApsaraMQ for RocketMQ.

ARN

String

No

acs:mns:cn-hangzhou:123456789098****:/queues/rule-deadletterqueue or acs:mq:cn-hangzhou:123456789098****:/instances/myinstance/topic/mytopic

The ARN of the Message Service (MNS) or ApsaraMQ for RocketMQ queue to use as the dead-letter queue.

ParamList

List<Param>

Yes

A list of parameters for event transformation.

resourceKey

String

Yes

body

The target parameter that receives the transformed event data.

form

String

Yes

TEMPLATE

The event transformation format. Valid values:

  • ORIGINAL: Complete event. You do not need to define value or template. EventBridge does not transform the event and routes the complete structure of the native CloudEvents to the event target. For more information, see Complete event.

  • JSONPath: Partial event. You do not need to define a template. You only need to define a value. EventBridge uses JSONPath to extract parameters from events in CloudEvents and routes the specified event content to the event target. For more information, see Partial event.

    An example for value is as follows.

    $.data.name
  • CONSTANT: Constant. You do not need to define a template. You only need to define a value. Regardless of the event content, EventBridge routes only the constant defined by value to the event target. For more information, see Constant.

    The example value for value is as follows.

    "test1"
  • TEMPLATE: Template. You must define value and template. EventBridge uses JsonPath to extract parameters from a CloudEvent, stores the parameter values in value, and then routes the event to the event target according to the format defined in template. For more information, see Template.

    The value example is as follows.

    {
        "name":"$.data.name",
        "constant":"Please handle this promptly."
    }

    An example value for template is as follows.

    The instance named ${name} is broken. ${constant}

value

String

Yes

{"key": "value"}

The value or expressions for the event transformation, depending on the form.

template

String

No

The value of ${key} is ${value}!

The template for the event transformation.

Response parameters

Parameter

Type

Example

Description

RuleARN

String

acs:eventbridge:cn-hangzhou:123456789098****:eventbus/default/rule/MNSRule

The ARN of the event rule. This ARN is used for authorization.

DingTalk

When the event target is DingTalk, the value of the Type metadata parameter is acs.dingtalk, the Endpoint parameter indicates the configured DingTalk URL, and the meaning of the resourceKey field in ParamList is described in the following table.

Resource key

Required

Form

Value

Template

URL

Yes

CONSTANT

The DingTalk URL.

Not applicable.

SecretKey

Yes

CONSTANT

The secret key.

Not applicable.

Body

Yes

TEMPLATE

Specifies the variables to populate the template.

The template for the message body sent to DingTalk.

The following is an example JsonPath:

{
    "Id":"KD20k9rpqDRXPq0SXXlqeT****",
    "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

When you use Direct Mail as an event target, the Type parameter in the metadata is set to acs.mail. The Endpoint parameter specifies the service endpoint URL in the acs:mail:${region}:${uid} format. The following table describes the resourceKey fields in ParamList.

ResourceKey

Required

Form

Value

Template

Subject

Yes

CONSTANT

The subject of the email.

Not applicable.

AccountName

Yes

CONSTANT

The sender address.

Not applicable.

AddressType

Yes

CONSTANT

The address type.

Not applicable.

ReplyToAddress

Yes

CONSTANT

The reply-to address.

Not applicable.

ToAddress

Yes

  • CONSTANT

  • JSONPATH

The recipient address.

Not applicable.

IsHtmlBody

Yes

CONSTANT

Specifies whether the message body is in HTML format. Valid values:

  • true: The message body is in HTML format.

  • false: The message body is not in HTML format.

Not applicable.

Body

Yes

TEMPLATE

The key-value pairs used in the template.

The template for the message body.

The following code shows an JsonPath configuration:

{
    "Id":"KD20k9rpqDRXPq0SXXlqeT****",
    "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}"
            }
        }
    ]
}

Short Message Service

Selecting Short Message Service as the event target sets the Type parameter in the metadata to acs.sms. The Endpoint parameter specifies the service URL in the acs:sms:${region}:${uid} format. The following table describes the resourceKey fields in ParamList.

resourceKey

Required

Form

Value

Template

PhoneNumbers

Yes

  • CONSTANT

  • JSONPATH

The mobile phone number.

None

SignName

Yes

CONSTANT

The signature name.

None

TemplateCode

Yes

CONSTANT

The template code.

None

TemplateParam

Yes

TEMPLATE

The key-value pairs for the template.

The template for the message body.

The following is a JsonPath example:

{
    "Id":"KD20k9rpqDRXPq0SXXlqeT****",
    "Type":"acs.sms",
    "Endpoint":"acs:sms:cn-hangzhou:164901546557****",
    "ParamList":[
        {
            "Value":"$.data",
            "ResourceKey":"PhoneNumbers",
            "Form":"JSONPATH"
        },
        {
            "Value":"[For testing only] Alibaba Cloud Communications",
            "ResourceKey":"SignName",
            "Form":"CONSTANT"
        },
        {
            "Value":" [For testing only] Alibaba Cloud Communications test template",
            "ResourceKey":"TemplateCode",
            "Form":"CONSTANT"
        },
        {
            "Value":{
                "Mobile":"$.data.mobile",
                "Subject":"$.subject"
            },
            "ResourceKey":"TemplateParam",
            "Form":"TEMPLATE",
            "Template":{
                "Code":"${subject}"
            }
        }
    ]
}

Function Compute

When you select Function Compute as the event target, the Type parameter in the metadata is set to acs.fc.function. The Endpoint parameter specifies the service endpoint in the format acs:fc:${region}:${uid}:services/${serviceName}.${Qualifier}/functions/${functionName}. The following table describes the resourceKey fields in ParamList.

resourceKey

Required

Form

Value

Template

serviceName

Yes

CONSTANT

The service name.

None

functionName

Yes

CONSTANT

The function name.

None

Body

Yes

  • ORIGINAL

  • CONSTANT

  • JSONPATH

  • TEMPLATE

The content for the message body.

The template for the message body, specified as key-value pairs. Used when form is TEMPLATE.

Qualifier

Yes

CONSTANT

The service version or alias.

None

InvocationType

Yes

CONSTANT

The invocation type. Valid values:

  • Sync: Invokes the function synchronously.

  • Async: Invokes the function asynchronously.

None

DataFormat

Yes

CONSTANT

The format of the event data. Valid values:

  • Object

  • ObjectList

None

The following example shows a JsonPath configuration:

{
    "Id":"KD20k9rpqDRXPq0SXXlqeT****",
    "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"
        },
        {
            "ResourceKey": "Qualifier",
            "Form": "CONSTANT",
            "Value": "LATEST"
        },
        {
            "ResourceKey": "InvocationType",
            "Form": "CONSTANT",
            "Value": "Sync"
        },
        {
            "Value":"$.data.name",
            "ResourceKey":"Body",
            "Form":"JSONPATH"
        },
        {
            "ResourceKey": "DataFormat",
            "Form": "CONSTANT",
            "Value": "Object"
        }
    ]
}

Simple Message Queue

When the event target is Simple Message Queue (formerly MNS), the value of the Type metadata parameter is acs.mns.queue, the Endpoint parameter specifies the URL in the format acs:mns:${region}:${uid}:queues/${queue}, and the ParamList parameter's resourceKey field is described in the following table.

ResourceKey

Required

Form

Value

Template

queue

Yes

CONSTANT

The name of the queue.

Not applicable.

Body

Yes

  • ORIGINAL

  • CONSTANT

  • JSONPath

  • TEMPLATE

The message body. Its content depends on the Form parameter.

If Form is set to TEMPLATE, define the template here.

Template example using JsonPath:

{
    "Id":"KD20k9rpqDRXPq0SXXlqeT****",
    "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

When you select Message Queue for Apache RocketMQ as the event target, the Type parameter in the metadata is set to acs.rocketmq. The Endpoint specifies the service endpoint using the format acs:mq:${region}:${uid}:/instances/${instanceId}/topic/${topic}. The following table describes the resourceKey values for the ParamList parameter.

Resource key

Required

Form

Value

Template

instance ID

Yes

CONSTANT

The instance ID.

Not applicable.

topic

Yes

CONSTANT

The topic name.

Not applicable.

message body

Yes

  • ORIGINAL

  • JSONPATH

  • CONSTANT

  • TEMPLATE

The message body.

If the form parameter is set to TEMPLATE, you must specify the template in this field.

properties

No

  • JSONPATH

  • TEMPLATE

The properties.

Not applicable.

keys

No

  • JSONPATH

  • CONSTANT

  • TEMPLATE

The keys.

If the form parameter is set to TEMPLATE, you must specify the template in this field.

tags

No

  • JSONPATH

  • CONSTANT

  • TEMPLATE

The tags.

If the form parameter is set to TEMPLATE, you must specify the template in this field.

The following is an example of a JsonPath configuration:

{
    "Id":"KD20k9rpqDRXPq0SXXlqeT****",
    "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"
        }
    ]
}

ApsaraMQ for RabbitMQ

When you select ApsaraMQ for RabbitMQ as the event target, the Type parameter is acs.rabbitmq, the Endpoint is a URL in the format acs:amqp:${region}:${uid}:/instances/${instanceId}/vhosts/${vhostName}/exchanges/${exchangeName}, and the resourceKey fields in ParamList are described in the following table.

Parameter

Required

Format

Description

Template

InstanceId

Yes

CONSTANT

The instance ID.

Not applicable.

Vhost

Yes

CONSTANT

The vhost.

Not applicable.

TargetType

Yes

CONSTANT

The target type.

Note

You can specify either the Exchange or Queue parameter, but not both.

Not applicable.

Exchange

No. Required only if TargetType is set to Exchange.

CONSTANT

The name of the exchange.

Not applicable.

Queue

No. Required only if TargetType is set to Queue.

CONSTANT

Note

You can specify either the Exchange or Queue parameter, but not both.

The name of the queue.

Not applicable.

Body

Yes

  • ORIGINAL

  • JSONPATH

  • CONSTANT

  • TEMPLATE

The message body.

If form is set to TEMPLATE, you must define the template here.

MessageId

No. A message ID is generated by default.

  • JSONPATH

  • CONSTANT

  • TEMPLATE

The message ID.

If form is set to TEMPLATE, you must define the template here.

Properties

No

  • JSONPATH

  • TEMPLATE

The properties.

If form is set to TEMPLATE, you must define the template here.

JsonPath examples:

Example 1: The Destination Type is Exchange

{
    "Id":"KD20k9rpqDRXPq0SXXlqeT****",
    "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 Destination Type is Queue

{
    "Id":"EldwXoVAws5Ix8VpVmrDmr****",
    "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"
        }
    ]
}

Message Queue for Apache Kafka

When you select ApsaraMQ for Kafka as the event target, the value of the Type metadata parameter is acs.alikafka, the Endpoint parameter specifies the configured URL in the format acs:alikafka:${regionId}:${accountId}:topics/${topic}, and the resourceKey field in ParamList is described in the following table.

Resource key

Required

Form

Value

Template

instance ID

Yes

CONSTANT

The Kafka instance ID.

Not applicable.

topic

Yes

CONSTANT

The topic name.

Not applicable.

value

Yes

  • CONSTANT

  • ORIGINAL

  • JSONPATH

  • TEMPLATE

The message body.

Specifies the format for the event transformation. Valid values:

  • ORIGINAL: a complete event. You do not need to define the value and template parameters. EventBridge routes the complete, original CloudEvents structure to the event target without transformation. For more information, see Complete event.

  • JSONPATH: Partial event. You do not need to define a template. You only need to define a value. EventBridge uses JSONPath to extract parameters from events in CloudEvents and routes the specified event content to the event target. For more information, see Partial event.

    Example for the value parameter:

    $.data.name
  • CONSTANT: A constant. You do not need to define a template. You only need to define a value. Regardless of the event content, EventBridge only routes the constant defined by value to the event target. For more information, see Constants.

    Example for the value parameter:

    "test1"
  • TEMPLATE: a template. Define both the value and template parameters. EventBridge uses the JsonPath expressions in the value parameter to extract values from a CloudEvents event. It then substitutes these values into the template parameter before routing the result to the event target. For more information, see Template.

    Example for the value parameter:

    {
        "name":"$.data.name",
        "constant":"Please deal with it promptly."
    }

    Example for the template parameter:

    Instance ${name} is broken. ${constant}

key

Yes

JSONPATH

The message key.

See the template for Value.

acks

Yes

CONSTANT

The acknowledgment mode.

Not applicable.

The following example shows a configuration that uses JsonPath:

{
    "id":"1rypRt1I9ET6Aks9Y6NNg6U****",
    "type":"acs.alikafka",
    "endpoint":"acs:alikafka:cn-huhehaote:118609547428****:topics/test-topic",
    "pushSelector":"PARAM_TRANSFORMER",
    "errorsTolerance":"ALL",
    "pushRetryStrategy":"BACKOFF_RETRY",
    "paramList":[
        {
            "value":"alikafka_pre-cn-zpr3fwhe****",
            "resourceKey":"InstanceId",
            "form":"CONSTANT"
        },
        {
            "value":"test-topic",
            "resourceKey":"Topic",
            "form":"CONSTANT"
        },
        {
            "value":"$.data",
            "resourceKey":"Value",
            "form":"JSONPATH"
        },
        {
            "value":"$.data.key",
            "resourceKey":"Key",
            "form":"JSONPATH"
        },
        {
            "value":"0",
            "resourceKey":"Acks",
            "form":"CONSTANT"
        }
    ]
}

Log Service (SLS)

When you select Log Service (SLS) as an event target, the Type parameter in the metadata is set to acs.sls. The Endpoint parameter specifies the configured URL in the format acs:sls:${regionId}:${accountId}:project/${project}/logstore/${logstore}. The following table describes the resourceKey fields in ParamList.

Resource key

Required

Form

Value

Template

Project

Yes

constant

The name of the Project.

Not applicable.

LogStore

Yes

constant

The LogStore name.

Not applicable.

Topic

No

  • Constant

  • Template

  • JSONPath

The log topic.

The event transformation format. The following formats are available:

  • Original: Complete Event. You do not need to define the value and template parameters. EventBridge routes the original and complete CloudEvents structure to the event target without any transformation. For more information, see Complete Event.

  • JSONPath: Partial Event. You do not need to define the template parameter and only need to define the value parameter. EventBridge uses a JSONPath expression to extract parameters from a CloudEvents event and routes the specified event content to the event target. For more information, see Partial Event.

    Example for the value parameter:

    $.data.name
  • Constant: Constant. You do not need to define the template parameter and only need to define the value parameter. Regardless of the event content, EventBridge routes only the constant defined in the value parameter to the event target. For more information, see Constant.

    Example for the value parameter:

    "test1"
  • Template: Template. You must define both the value and template parameters. EventBridge extracts parameters from a CloudEvents event by using the JsonPath expressions defined in value, uses these parameters as variables to populate the template, and routes the resulting content to the event target. For more information, see Template.

    Example for the value parameter:

    {
        "name":"$.data.name",
        "constant":"Please handle this promptly."
    }

    Example for the template parameter:

    Instance ${name} is broken. ${constant}

Body

No

  • Constant

  • Original

  • JSONPath

  • Template

The log content.

Same as for the Topic parameter.

ContentType

Yes

constant

The content type.

Valid values: JSON and KeyValue. Default value: JSON.

  • If you select JSON, Log Service (SLS) writes the event content that you specify in the Body parameter to the content key.

  • If you select KeyValue, the structure that you specify in ContentSchema determines the keys and values written to Log Service (SLS).

RoleName

Yes

constant

The role name.

Not applicable.

ContentSchema

No

constant

The structure that defines the keys and values for logs written to Log Service (SLS).

{
    "Key_1":{
        "form":"CONSTANT",
        "value":"myKey01"
    },
    "Value_1":{
        "form":"JSONPATH",
        "value":"$.data.myValue01"
    }
}

In this example, Key_1 and Value_1 define a key-value pair.

JsonPath example:

{
    "id":"MwOpn5yyemTlQjE5JwYjme****",
    "type":"acs.sls",
    "endpoint":"acs:sls:cn-hangzhou:182572506381****:project/${project}/logstore/${logstore}",
    "pushSelector":"PARAM_TRANSFORMER",
    "errorsTolerance":"ALL",
    "pushRetryStrategy":"BACKOFF_RETRY",
    "paramList":[
        {
            "value":"testproject37****",
            "resourceKey":"Project",
            "form":"CONSTANT"
        },
        {
            "value":"testlogstore37****",
            "resourceKey":"LogStore",
            "form":"CONSTANT"
        },
        {
            "value":"$.data.topic",
            "resourceKey":"Topic",
            "form":"JSONPATH"
        },
        {
            "value":"KeyValue",
            "resourceKey":"ContentType",
            "form":"CONSTANT"
        },
        {
            "value":"AliyunEventBridgeSLS-248QJd****",
            "resourceKey":"RoleName",
            "form":"CONSTANT"
        },
        {
            "value":"{\"Key_1\":{\"form\":\"CONSTANT\",\"value\":\"name\"},\"Value_1\":{\"form\":\"CONSTANT\",\"value\":\"age\"}}",
            "resourceKey":"ContentSchema",
            "form":"CONSTANT"
        }
    ]
}

HTTP/HTTPS

When the event target is set to HTTP/HTTPS, the value of the Type metadata parameter is http or https, the Endpoint parameter is the configured URL address, and the meaning of the resourceKey field in ParamList is described in the following table.

Parameter

Required

Form

Value

Template

url

Yes

CONSTANT

The endpoint URL.

Not applicable

Body

Yes

  • ORIGINAL

  • CONSTANT

  • JSONPATH

  • TEMPLATE

Currently, data can only be sent in the body of a POST request. To use headers or query parameters, see Manage API destinations.

If you set the form parameter to TEMPLATE, you must define the corresponding template in this field. The variables in the template are derived from the value parameter.

Network

Yes

CONSTANT

The network type. Valid values:

  • PublicNetwork: The public network.

  • PrivateNetwork: A VPC. If you select this value, you must configure the VPC, vSwitch, and security group.

Not applicable

VPCNameAndId

Optional. This parameter is required if Network is set to PrivateNetwork.

CONSTANT

The VPC where the destination resides. Format: VPCName+"/" + VPCId.

Not applicable

VSwitchesNameAndId

Optional. This parameter is required if Network is set to PrivateNetwork.

CONSTANT

The vSwitches in the VPC where the destination resides. You can specify multiple vSwitches. The value must be a JSON string. Example: [VSwitchName+"/"+VSwitchId , VSwitchName+"/"+VSwitchId ] .

Not applicable

SecurityGroupNameAndId

Optional. This parameter is required if Network is set to PrivateNetwork.

CONSTANT

The security group for the VPC where the destination resides. Format: SecurityGroupName+"/" + SecurityGroupId.

Not applicable

Token

Optional.

CONSTANT

The token used for signature verification. The header key is fixed to "x-eventbridge-signature-token", and the header value is the value you specify.

Not applicable

JsonPath examples

Example 1: Setting the network type to public network

{
    "Id":"KD20k9rpqDRXPq0SXXlqeT****",
    "Type":"https",
    "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: Setting the network type to VPC

{
    "Id":"ZOiNcqqzTGSrDJanZQ72vj****",
    "Type":"http",
    "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

  • When an RDS for MySQL database is the event target, the value of the Type parameter in the metadata is acs.rds.mysql. The Endpoint has the format acs:rds:${region}:${uid}:dbinstance/${dbinstanceid}. The following table describes the resourceKey fields in ParamList.

    Resource key

    Required

    Form

    Value

    Template

    InstanceId

    Yes

    CONSTANT

    The instance ID.

    N/A

    DBName

    Yes

    CONSTANT

    The database name.

    N/A

    AccountName

    Yes

    CONSTANT

    The account name.

    N/A

    AccountPassword

    Yes

    CONSTANT

    The account password.

    N/A

    ExecuteSQL

    Yes

    • ORIGINAL

    • CONSTANT

    • JSONPATH

    • TEMPLATE

    A custom SQL statement.

    If you set Form to TEMPLATE, configure the template here.

    VpcId

    Yes

    CONSTANT

    The VPC ID.

    N/A

    VSwitchIds

    Yes

    CONSTANT

    The vSwitch IDs.

    N/A

    SecurityGroupId

    Yes

    CONSTANT

    The security group ID.

    N/A

    JsonPath example:

    {
        "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"
            }
        ]
    }
  • When a self-managed MySQL database is the event target, the value of the Type parameter in the metadata is mysql. The format for Endpoint is database endpoint${ConnectionStringAndPort}. The following table describes the resourceKey fields in ParamList.

    Resource key

    Required

    Form

    Value

    Template

    ConnectionStringAndPort

    Yes

    CONSTANT

    The database endpoint.

    N/A

    DBName

    Yes

    CONSTANT

    The database name.

    N/A

    AccountName

    Yes

    CONSTANT

    The account name.

    N/A

    AccountPassword

    Yes

    CONSTANT

    The account password.

    N/A

    ExecuteSQL

    Yes

    • ORIGINAL

    • CONSTANT

    • JSONPATH

    • TEMPLATE

    A custom SQL statement.

    N/A

    Network

    Yes

    CONSTANT

    The network type. Valid values:

    • PublicNetwork: The public network.

    • PrivateNetwork: Virtual Private Cloud (VPC). If you select this option, you must specify the VPC, vSwitch, and security group information.

    N/A

    VpcId

    Yes, if Network is set to PrivateNetwork.

    CONSTANT

    The VPC ID.

    N/A

    VSwitchIds

    Yes, if Network is set to PrivateNetwork.

    CONSTANT

    The vSwitch IDs.

    N/A

    SecurityGroupId

    Yes, if Network is set to PrivateNetwork.

    CONSTANT

    The security group ID.

    N/A

    Example 1: Network configuration: public network

    {
        "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: Network configuration: VPC

    {
        "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":"ConnectionStringAndPort",
                "Form":"CONSTANT"
            },
            {
                "Value":"my-db",
                "ResourceKey":"DBName",
                "Form":"CONSTANT"
            },
            {
                "Value":"dmsTest",
                "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"
            }
        ]
    }

EventBridge

When you select EventBridge as the event target, the Type parameter in the metadata is set to acs.eventbridge, and the Endpoint parameter is in the format acs:eventbridge:${region}:${AccountId}:eventbus/${EventBusName}. The following table describes the resourceKey fields within the ParamList parameter.

ResourceKey

Required

Form

Value

Template

RegionId

Yes

CONSTANT

The region ID of the event target.

Not applicable.

AccountType

Yes

CONSTANT

The account type. Valid values:

  • AnotherAccount: another Alibaba Cloud account.

  • SameAccount: the current Alibaba Cloud account.

Not applicable.

AccountId

No. The current account is used by default.

CONSTANT

The ID of the destination Alibaba Cloud account. This parameter is optional if the AccountType parameter is set to SameAccount.

Not applicable.

EventBusName

Yes

CONSTANT

The name of the destination event bus.

Not applicable.

RAMRoleName

No, but required for cross-account delivery.

CONSTANT

The name of the RAM role. For more information, see Route events to EventBridge. This parameter is optional if the AccountType parameter is set to SameAccount.

Not applicable.

Body

Yes

ORIGINAL: Delivers the complete event.

Not applicable.

Not applicable.

The following are JsonPath examples:

Example 1: Deliver an event to an event bus in the current account.

{
    "Id":"KD20k9rpqDRXPq0SXXlqeT****",
    "Type":"acs.eventbridge",
    "Endpoint":"acs:eventbridge:cn-hangzhou:xxxxx:eventbus/xxxxx",
    "ParamList":[
        {
            "Value":"cn-hangzhou",
            "ResourceKey":"RegionId",
            "Form":"CONSTANT"
        },
        {
            "Value":"SameAccount",
            "ResourceKey":"AccountType",
            "Form":"CONSTANT"
        },
        {
            "Value":"xxxxx",
            "ResourceKey":"EventBusName",
            "Form":"CONSTANT"
        },
        {
            "ResourceKey":"Body",
            "Form":"ORIGINAL"
        }
    ]
}

Example 2: Deliver an event to an event bus in another account.

{
    "Id":"KD20k9rpqDRXPq0SXXlqeT****",
    "Type":"acs.eventbridge",
    "Endpoint":"acs:eventbridge:cn-hangzhou:xxxxx:eventbus/xxxxx",
    "ParamList":[
        {
            "Value":"cn-hangzhou",
            "ResourceKey":"RegionId",
            "Form":"CONSTANT"
        },
        {
            "Value":"AnotherAccount",
            "ResourceKey":"AccountType",
            "Form":"CONSTANT"
        },
        {
            "Value":"xxxxx",
            "ResourceKey":"AccountId",
            "Form":"CONSTANT"
        },
        {
            "Value":"xxxxx",
            "ResourceKey":"EventBusName",
            "Form":"CONSTANT"
        },
        {
            "Value":"xxxxx",
            "ResourceKey":"RAMRoleName",
            "Form":"CONSTANT"
        },
        {
            "ResourceKey":"Body",
            "Form":"ORIGINAL"
        }
    ]
}

API trigger

When you select an API destination as the event target, the Type metadata parameter is acs.api.destination, and the Endpoint format is acs:api-destination:${region}:${AccountId}:name/${APIName}. The following table describes the resourceKey fields in the ParamList parameter.

resourceKey

Required

form

value

template

Name

Yes

CONSTANT

The name of the API destination.

Not applicable.

HeaderParameters

No

TEMPLATE

The request header parameters.

User-defined template.

BodyParameters

No

TEMPLATE

The request body parameters.

User-defined template.

QueryStringParameters

No

TEMPLATE

The query string parameters.

User-defined template.

The following example uses JsonPath:

{
    "id":"gwrxsJKAnLxSEo4GHhV69q****",
    "type":"acs.api.destination",
    "endpoint":"acs:api-destination:cn-hangzhou:11860954742****:name/api-key-test",
    "pushSelector":"PARAM_TRANSFORMER",
    "errorsTolerance":"ALL",
    "pushRetryStrategy":"BACKOFF_RETRY",
    "paramList":[
        {
            "resourceKey":"Name",
            "form":"CONSTANT",
            "value":"api-key-test"
        },
        {
            "resourceKey":"HeaderParameters",
            "form":"TEMPLATE",
            "value":"{\"headerKey1\":\"Content-Type\",\"headerValue1\":\"multipart/form-data\",\"headerKey2\":\"name\",\"headerValue2\":\"$.data.name\",\"headerKey3\":\"$.data.number\",\"headerValue3\":\"name\"}",
            "template":"{\"${headerKey1}\":\"${headerValue1}\",\"${headerKey2}\":\"${headerValue2}\",\"${headerKey3}\":\"${headerValue3}\"}"
        },
        {
            "resourceKey":"BodyParameters",
            "form":"TEMPLATE",
            "value":"{\"bodyKey1\":\"name\",\"bodyValue1\":\"$.data.name\"}",
            "template":"{\"${bodyKey1}\":\"${bodyValue1}\"}"
        },
        {
            "resourceKey":"QueryStringParameters",
            "form":"TEMPLATE",
            "value":"{\"queryKey1\":\"name\",\"queryValue1\":\"$.data.name\",\"queryKey2\":\"$.data.name\",\"queryValue2\":\"name\"}",
            "template":"{\"${queryKey1}\":\"${queryValue1}\",\"${queryKey2}\":\"${queryValue2}\"}"
        }
    ]
}

CloudFlow

When you set the event target to CloudFlow, the Type parameter in the metadata is set to acs.fnf, and the Endpoint parameter uses the format acs:fnf:${region}:${AccountId}:flow/${flow}. The following table describes the resourceKey field within the ParamList parameter.

resourceKey

Required

form

value

template

FlowName

Yes

CONSTANT

The flow name.

Not applicable

ExecutionName

No

  • JSONPath

  • CONSTANT

  • TEMPLATE

The execution name.

The event transformation format. Valid values:

  • ORIGINAL: Transmits the complete event. You do not need to define the value or template parameters. EventBridge routes the entire native CloudEvents structure to the target without transformation. For more information, see complete event.

  • JSONPath: Partial event. You do not need to define a template. You only need to define a value. EventBridge uses JSONPath to extract parameters from events in CloudEvents and routes the specified event content to the event target. For more information, see Partial event.

    Example for the value parameter:

    $.data.name
  • CONSTANT: A constant. You do not need to define a template. You only need to define a value. Regardless of the event content, EventBridge routes only the constant defined by value to the event target. For more information, see Constant.

    Example for the value parameter:

    "test1"
  • TEMPLATE: Creates custom content from a template. You must define both the value and template parameters. EventBridge uses the JsonPath expressions in the value parameter to extract data from an event, and then uses that data to populate the template before routing it to the target. For more information, see template.

    Example for the value parameter:

    {
        "name":"$.data.name",
        "constant":"Please handle this promptly."
    }

    Example for the template parameter:

    The instance ${name} has failed. ${constant}

Input

No

JSONPath

The execution input.

See the description for the TEMPLATE option of the ExecutionName parameter.

RoleName

Yes

CONSTANT

The role name.

Not applicable

The following is a sample JsonPath configuration:

{
    "id":"KLUGLVJeuWDw1bIJ6lgURl****",
    "type":"acs.fnf",
    "endpoint":"acs:fnf:cn-hangzhou:118609547428****:flow/${flow}",
    "pushSelector":"PARAM_TRANSFORMER",
    "errorsTolerance":"ALL",
    "pushRetryStrategy":"BACKOFF_RETRY",
    "paramList":[
        {
            "value":"serverless",
            "resourceKey":"FlowName",
            "form":"CONSTANT"
        },
        {
            "value":"$.data",
            "resourceKey":"ExecutionName",
            "form":"JSONPATH"
        },
        {
            "value":"$.data",
            "resourceKey":"Input",
            "form":"JSONPATH"
        },
        {
            "value":"AliyunEventBridgeFNF-FZwEeE****",
            "resourceKey":"RoleName",
            "form":"CONSTANT"
        }
    ]
}

Container Service for Kubernetes (ACK)

When the event target is Container Service for Kubernetes, the Type in the metadata parameters is acs.k8s, the Endpoint value is kubernetes, and the meaning of the resourceKey field in ParamList is shown in the table below.

Resource key

Required

Form

Value

template

KubeConfig

Yes

CONSTANT

The cluster configuration file.

None

YamlContent

Yes

CONSTANT

The YAML configuration.

The event transformation format. Valid values:

  • ORIGINAL: complete event. You do not need to specify value or template. EventBridge routes the complete, native CloudEvents structure to the event target without transformation. For more information, see complete event.

  • JSONPATH: Partial event. You do not need to define a template. You only need to define a value. EventBridge uses JSONPath to extract parameters from events in CloudEvents and routes the specified event content to the event target. For more information, see Partial event.

    Sample value:

    $.data.name
  • CONSTANT: Constant. You do not need to define a template. You only need to define a value. Regardless of the event content, EventBridge routes only the constant defined in value to the event target. For more information, see Constants.

    Sample value:

    "test1"
  • TEMPLATE: template. You must specify both value and template. EventBridge uses the JsonPath expressions in value to extract data from an event. It then substitutes this data into variables in the template and routes the result to the event target. For more information, see template.

    Sample value:

    {
        "name":"$.data.name",
        "constant":"Please deal with it timely."
    }

    Sample template:

    The instance is broken, whose name is ${name}, ${constant}

Network

Yes

CONSTANT

The type of network access.

None

QPSLimit

Yes

CONSTANT

The QPS limit.

None

The following is a sample JsonPath configuration:

{
    "id":"Grdzk1cR4DNjmHa0oPJp8j****",
    "type":"acs.k8s",
    "endpoint":"kubernetes",
    "pushSelector":"PARAM_TRANSFORMER",
    "errorsTolerance":"ALL",
    "pushRetryStrategy":"BACKOFF_RETRY",
    "paramList":[
        {
            "form":"CONSTANT",
            "value":"PublicNetwork",
            "resourceKey":"Network"
        },
        {
            "form":"CONSTANT",
            "value":5,
            "resourceKey":"QPSLimit"
        },
        {
            "form":"CONSTANT",
            "value":"test1",
            "resourceKey":"KubeConfig"
        },
        {
            "form":"CONSTANT",
            "resourceKey":"YamlContent",
            "value":"test2"
        }
    ]
}

Serverless App Engine

When you select Serverless App Engine as the event target, the Type parameter in the metadata is acs.sae, and the Endpoint format is http://sae.cn-huhehaote.aliyuncs.com/pop/v1/sam/job/execJob. The following table describes the resourceKey field in ParamList.

Parameter

Required

Format

Value

Template

RegionId

Yes

CONSTANT

The region ID.

The format for the event transformation. Valid values:

  • ORIGINAL: Complete event. You do not need to define value or template. EventBridge does not transform the event and routes the complete structure of the native CloudEvents to the event target. For more information, see Complete event.

  • JSONPath: Partial event. You do not need to define a template. You only need to define a value. EventBridge uses JSONPath to extract parameters from events in CloudEvents and routes the specified event content to the event target. For more information, see Partial event.

    The example for value is as follows.

    $.data.name
  • CONSTANT: A constant. You do not need to define a template. You only need to define a value. Regardless of the event content, EventBridge routes only the constant defined by value to the event target. For more information, see Constant.

    An example value for value is as follows.

    "test1"
  • TEMPLATE: The template. You must define the value and template parameters. EventBridge uses JsonPath to extract parameters from a CloudEvents event, stores the parameter values in value, and then routes the data to the event target according to the format defined in template. For more information, see Template.

    The example for value is as follows.

    {
        "name":"$.data.name",
        "constant":"Please address it promptly."
    }

    An example value for template is as follows.

    The instance named ${name} is broken. ${constant}

AppId

Yes

CONSTANT

The job template ID.

See the description in the template column for the RegionId parameter.

EventId

Yes

JSONPATH

The event ID.

See the description in the template column for the RegionId parameter.

Parameters

Yes

CONSTANT

The CommandArgs and Envs parameters for the execJob operation.

See the description in the template column for the RegionId parameter.

The following example shows a JsonPath configuration:

{
    "id":"xp0dEW4mVbS5tDQzIBiZrY****",
    "type":"acs.sae",
    "endpoint":"http://sae.cn-huhehaote.aliyuncs.com/pop/v1/sam/job/execJob",
    "pushSelector":"PARAM_TRANSFORMER",
    "errorsTolerance":"ALL",
    "pushRetryStrategy":"BACKOFF_RETRY",
    "paramList":[
        {
            "value":"cn-huhehaote",
            "resourceKey":"RegionId",
            "form":"CONSTANT"
        },
        {
            "value":"3F2504E0-4F89-11D3-9A0C-0305E82C****",
            "resourceKey":"AppId",
            "form":"CONSTANT"
        },
        {
            "value":"$.id",
            "resourceKey":"EventId",
            "form":"JSONPATH"
        },
        {
            "value":"[\"a\",\"b\"]",
            "resourceKey":"Parameters",
            "form":"CONSTANT"
        }
    ]
}

Event analysis

For an Event Analysis event target, the Type parameter is acs.eventbridge.olap, and the Endpoint uses the ${SchemaURI} format. The following table describes the resourceKey parameters in ParamList.

resourceKey

Required

form

value

template

UseSchema

Yes

CONSTANT

Specifies the method for schema binding and mapping. Valid values:

  • FromEvent: Uses the schema from the dataschema field of the event.

  • FromRule: Uses the schema from the rule.

Not applicable.

SchemaGroup

Yes

CONSTANT

The name of the schema group.

Not applicable.

SchemaID

Yes

CONSTANT

The schema ID.

Not applicable.

SchemaVersion

Yes

CONSTANT

The schema version.

Not applicable.

The following is a JsonPath example:

{
    "id":"DLuVyP3JcAAb3q2CibqZI6****",
    "type":"acs.eventbridge.olap",
    "endpoint":"${SchemaURI}",
    "pushSelector":"PARAM_TRANSFORMER",
    "errorsTolerance":"ALL",
    "pushRetryStrategy":"BACKOFF_RETRY",
    "paramList":[
        {
            "value":"FromRule",
            "resourceKey":"UseSchema",
            "form":"CONSTANT"
        },
        {
            "value":"DEFAULT_SCHEMA_GROUP",
            "resourceKey":"SchemaGroup",
            "form":"CONSTANT"
        },
        {
            "value":"test",
            "resourceKey":"SchemaID",
            "form":"CONSTANT"
        },
        {
            "value":"1",
            "resourceKey":"SchemaVersion",
            "form":"CONSTANT"
        }
    ]
}

DataHub

When the event target is DataHub, the Type metadata parameter is acs.datahub, the Endpoint format is acs:datahub:${region}:${AccountId}:project/${project}/topic/${topic}, and the meaning of the resourceKey field in ParamList is described in the following table.

Parameter

Required

Format

Description

Template

Project

Yes

CONSTANT

The project name.

Not applicable.

Topic

Yes

CONSTANT

The topic name.

Not applicable.

TopicType

Yes

CONSTANT

The data type of the topic. Valid values:

  • TUPLE: Supports structured records with multiple columns.

  • BLOB: Supports single blocks of binary data.

Not applicable.

TopicSchema

This parameter is required if TopicType is set to TUPLE. You do not need to specify this parameter if TopicType is set to BLOB.

TEMPLATE

The topic schema.

TEMPLATE. Example:

{
    "resourceKey":"TopicSchema",
    "value":"{\"k1-0\":\"a\",\"k2-1\":\"$.data.name\",\"k3-2\":\"v\"}",
    "form":"TEMPLATE",
    "template":"{\"k1\":\"${k1-0}\",\"k2\":\"${k2-1}\",\"k3\":\"${k3-2}\"}"
}

In the template, k represents the i-th field of the topic. Its value is a variable (for example, ${k1-0}) defined in the value parameter. This variable can be a constant or a JSONPath expression that extracts data from the event.

RoleName

Yes

CONSTANT

The role name.

Not applicable.

The following example shows a JsonPath configuration:

{
    "id":"ZXoGuhjAT5UfqngBPapXro****",
    "type":"acs.datahub",
    "endpoint":"acs:datahub:cn-hangzhou:175299981560****:project/demo_project/topic/demo_topic",
    "errorsTolerance":"ALL",
    "pushRetryStrategy":"BACKOFF_RETRY",
    "paramList":[
        {
            "Form":"CONSTANT",
            "Value":"demo_project",
            "ResourceKey":"Project"
        },
        {
            "Form":"CONSTANT",
            "Value":"demo_topic",
            "ResourceKey":"Topic"
        },
        {
            "Form":"CONSTANT",
            "Value":"TUPLE",
            "ResourceKey":"TopicType"
        },
        {
            "Form":"TEMPLATE",
            "Value":"{\"k1-0\":\"1\",\"k2-1\":\"2\",\"k3-2\":\"3\"}",
            "Template":"{\"k1\":\"${k1-0}\",\"k2\":\"${k2-1}\",\"k3\":\"${k3-2}\"}",
            "ResourceKey":"TopicSchema"
        },
        {
            "Form":"CONSTANT",
            "Value":"AliyunEventBridgeDataHubRole-2HwuVf****",
            "ResourceKey":"RoleName"
        }
    ]
}