Each trigger type in Function Compute passes a different event structure to your function handler. Parse the event parameter to extract the fields your business logic needs.
Usage notes
Parse the event payload before use. For sample parsing code, see Example 1: Parse JSON-formatted parameters.
HTTP triggers
HTTP trigger handlers receive request and response objects instead of an event object, so the event formats described in this topic do not apply. For details, see Configure an HTTP trigger.
Time triggers
{
"triggerTime":"2023-12-26T07:49:00Z",
"triggerName":"timer-trigger",
"payload":"awesome-fc"
}| Parameter | Type | Example | Description |
|---|---|---|---|
triggerTime | String | 2023-12-26T07:49:00Z | The time when the function is triggered. |
triggerName | String | timer-trigger | The name of the time trigger. |
payload | String | awesome-fc | The custom value set in the Trigger Message parameter when the trigger was created. |
OSS triggers
{
"events": [
{
"eventName": "ObjectCreated:PutObject",
"eventSource": "acs:oss",
"eventTime": "2022-08-13T06:45:43.000Z",
"eventVersion": "1.0",
"oss": {
"bucket": {
"arn": "acs:oss:cn-hangzhou:123456789:testbucket",
"name": "testbucket",
"ownerIdentity": "164901546557****"
},
"object": {
"deltaSize": 122539,
"eTag": "688A7BF4F233DC9C88A80BF985AB****",
"key": "source/a.png",
"objectMeta": {
"mimeType": "application/zip",
"userMeta": {
"x-oss-meta-last-modified":"20250213"
}
},
"size": 122539
},
"ossSchemaVersion": "1.0",
"ruleId": "9adac8e253828f4f7c0466d941fa3db81161****"
},
"region": "cn-hangzhou",
"requestParameters": {
"sourceIPAddress": "140.205.XX.XX"
},
"responseElements": {
"requestId": "58F9FF2D3DF792092E12044C"
},
"userIdentity": {
"principalId": "164901546557****"
}
}
]
}| Parameter | Type | Example | Description |
|---|---|---|---|
eventName | String | ObjectCreated:PutObject | The event type. |
eventSource | String | acs:oss | The event source. Fixed value: acs:oss. |
eventTime | String | 2022-08-13T06:45:43.000Z | The time when the event occurred, in ISO 8601 format. |
eventVersion | String | 1.0 | The event protocol version. |
oss | Map | — | The event content. |
bucket | Map | — | The bucket details. |
bucket.name | String | testbucket | The bucket name. |
bucket.arn | String | acs:oss:cn-hangzhou:123456789:testbucket | The Alibaba Cloud Resource Name (ARN) of the bucket. |
bucket.ownerIdentity | String | 164901546557**** | The ID of the user who created the bucket. |
object | Map | — | The object details. |
object.size | Int | 122539 | The object size, in bytes. |
object.deltaSize | Int | 122539 | The change in object size, in bytes. For a new object, this equals the object size. For an overwritten object, this is the difference between the new and old object sizes. |
object.eTag | String | 688A7BF4F233DC9C88A80BF985AB**** | The object ETag. |
object.key | String | source/a.png | The object name. |
object.objectMeta | Map | — | The object metadata. |
object.objectMeta.mimeType | String | application/zip | The object content type. For details, see How do I configure the Content-Type header? |
object.objectMeta.userMeta | Map | — | User-defined metadata. Identifies the purpose or attributes of the object. |
x-oss-meta-last-modified | String | 20250213 | A user metadata key-value pair. Keys must start with x-oss-meta-. In this example, "x-oss-meta-last-modified":"20250213" records the date the object was last modified on the source machine. For details, see User metadata. |
ossSchemaVersion | String | 1.0 | The OSS schema version. |
ruleId | String | 9adac8e253828f4f7c0466d941fa3db81161**** | The ID of the rule that matched the event. |
region | String | cn-hangzhou | The region where the bucket resides. |
requestParameters | Map | — | The request parameters. |
requestParameters.sourceIPAddress | String | 140.205.XX.XX | The IP address of the request sender. |
responseElements | Map | — | The response details. |
responseElements.requestId | String | 58F9FF2D3DF792092E12044C | The request ID. |
userIdentity | Map | — | The user identity. |
userIdentity.principalId | String | 164901546557**** | The ID of the Alibaba Cloud account that initiated the request. |
Simple Log Service triggers
{
"parameter": {},
"source": {
"endpoint": "http://cn-hangzhou-intranet.log.aliyuncs.com",
"projectName": "aliyun-fc-cn-hangzhou-2238f0df-a742-524f-9f90-976ba457****",
"logstoreName": "function-log",
"shardId": 0,
"beginCursor": "MTUyOTQ4MDIwOTY1NTk3ODQ2Mw==",
"endCursor": "MTUyOTQ4MDIwOTY1NTk3ODQ2NA=="
},
"jobName": "1f7043ced683de1a4e3d8d70b5a412843d81****",
"taskId": "c2691505-38da-4d1b-998a-f1d4bb8c****",
"cursorTime": 1529486425
}| Parameter | Description | Example |
|---|---|---|
parameter | The invocation parameters configured when the trigger was created. | — |
source | The log block for the function to read from Simple Log Service. Fields: endpoint (the Simple Log Service project region endpoint), projectName (the project name), logstoreName (the Logstore name), shardId (the shard ID), beginCursor (the start offset for data consumption), endCursor (the end offset for data consumption). | See example above. |
jobName | The ETL job name in Simple Log Service. Simple Log Service triggers must correspond to ETL jobs. | 1f7043ced683de1a4e3d8d70b5a412843d81**** |
taskId | The identifier for a specific function invocation within an ETL job. | c2691505-38da-4d1b-998a-f1d4bb8c**** |
cursorTime | The UNIX timestamp of the last log entry that arrived at Simple Log Service. | 1529486425 |
Alibaba Cloud CDN triggers
CDN triggers support four event types: LogFileCreated, CachedObjectsRefreshed / CachedObjectsPushed, CdnDomainStarted / CdnDomainStopped, and CdnDomainAdded / CdnDomainDeleted. All events share a common top-level structure; the eventParameter fields vary by event type.
All CDN events share the following top-level fields:
| Parameter | Type | Example | Description |
|---|---|---|---|
eventName | String | LogFileCreated | The event type. |
eventSource | String | cdn | The event source. |
region | String | cn-hangzhou | The region of Alibaba Cloud CDN. |
eventVersion | String | 1.0.0 | The event protocol version. |
eventTime | String | 2018-06-14T15:31:49+08:00 | The time when the event occurred. |
traceId | String | c6459282-6a4d-4413-894c-e4ea3968**** | The trace ID for troubleshooting, provided by the event source. |
userIdentity.aliUid | String | 164901546557**** | The ID of the Alibaba Cloud account that created the namespace. |
resource.domain | String | example.com | The endpoint. |
eventParameter | Map | — | Event-specific parameters. See the tables below. |
LogFileCreated
Replace filePath with the path of Alibaba Cloud CDN logs or a test file.
{
"events": [
{
"eventName": "LogFileCreated",
"eventSource": "cdn",
"region": "cn-hangzhou",
"eventVersion": "1.0.0",
"eventTime": "2018-06-14T15:31:49+08:00",
"traceId": "c6459282-6a4d-4413-894c-e4ea3968****",
"userIdentity": {
"aliUid": "164901546557****"
},
"resource": {
"domain": "example.com"
},
"eventParameter": {
"domain": "example.com",
"endTime": 1528959900,
"fileSize": 1788115,
"filePath": "http://cdnlog.cn-hangzhou.oss.aliyun-inc.com/www.aliyun.com/2017_12_27/www.aliyun.com_2017_12_27_0800_0900.gz?OSSAccessKeyId=xxxx&Expires=xxxx&Signature=xxxx",
"startTime": 1528959600
}
}
]
}eventParameter fields for LogFileCreated:
| Parameter | Type | Example | Description |
|---|---|---|---|
domain | String | example.com | The endpoint. |
startTime | String | 1528959600 | The start time of the log file. |
endTime | String | 1528959900 | The end time of the log file. |
fileSize | String | 1788115 | The size of the log file. |
filePath | String | http://cdnlog.cn-hangzhou.oss.aliyun-inc.com/... | The location of the log file. |
CachedObjectsRefreshed and CachedObjectsPushed
{
"events": [
{
"eventName": "CachedObjectsRefreshed",
"eventVersion": "1.0.0",
"eventSource": "cdn",
"region": "cn-hangzhou",
"eventTime": "2018-03-16T14:19:55+08:00",
"traceId": "cf89e5a8-7d59-4bb5-a33e-4c3d08e2****",
"resource": {
"domain": "example.com"
},
"eventParameter": {
"objectPath": [
"/2018/03/16/13/33b430c57e7.mp4",
"/2018/03/16/14/4ff6b9bd54d.mp4"
],
"createTime": 1521180769,
"domain": "example.com",
"completeTime": 1521180777,
"objectType": "File",
"taskId": 2089687230
},
"userIdentity": {
"aliUid": "164901546557****"
}
}
]
}eventParameter fields for CachedObjectsRefreshed and CachedObjectsPushed:
| Parameter | Type | Example | Description |
|---|---|---|---|
domain | String | example.com | The endpoint. |
objectPath | String | /2018/03/16/13/33b430c57e7.mp4 | The resource identifier. |
createTime | String | 1521180769 | The start time of the refresh. |
completeTime | String | 1521180777 | The end time of the refresh. |
objectType | String | File | The item that is refreshed. Valid values: File, Directory. |
taskId | String | 2089687230 | The ID of the refresh task. |
CdnDomainStarted and CdnDomainStopped
{
"events": [
{
"eventName": "CdnDomainStarted",
"eventVersion": "1.0.0",
"eventSource": "cdn",
"region": "cn-hangzhou",
"eventTime": "2018-03-16T14:19:55+08:00",
"traceId": "cf89e5a8-7d59-4bb5-a33e-4c3d08e2****",
"resource": {
"domain": "example.com"
},
"eventParameter": {
"domain": "example.com",
"status": "online"
},
"userIdentity": {
"aliUid": "164901546557****"
}
}
]
}eventParameter fields for CdnDomainStarted and CdnDomainStopped:
| Parameter | Type | Example | Description |
|---|---|---|---|
domain | String | example.com | The endpoint. |
status | String | online | The status of the accelerated domain name. |
CdnDomainAdded and CdnDomainDeleted
{
"events": [
{
"eventName": "CdnDomainAdded",
"eventVersion": "1.0.0",
"eventSource": "cdn",
"region": "cn-hangzhou",
"eventTime": "2018-03-16T14:19:55+08:00",
"traceId": "cf89e5a8-7d59-4bb5-a33e-4c3d08e2****",
"resource": {
"domain": "example.com"
},
"eventParameter": {
"domain": "example.com"
},
"userIdentity": {
"aliUid": "164901546557****"
}
}
]
}eventParameter fields for CdnDomainAdded and CdnDomainDeleted:
| Parameter | Type | Example | Description |
|---|---|---|---|
domain | String | example.com | The endpoint. |
Tablestore triggers
{
"Version": "Sync-v1",
"Records": [
{
"Type": "PutRow",
"Info": {
"Timestamp": 1506416585740836
},
"PrimaryKey": [
{
"ColumnName": "pk_0",
"Value": 1506416585881590900
},
{
"ColumnName": "pk_1",
"Value": "2017-09-26 17:03:05.8815909 +0800 CST"
},
{
"ColumnName": "pk_2",
"Value": 1506416585741000
}
],
"Columns": [
{
"Type": "Put",
"ColumnName": "attr_0",
"Value": "hello_table_store",
"Timestamp": 1506416585741
},
{
"Type": "Put",
"ColumnName": "attr_1",
"Value": 1506416585881590900,
"Timestamp": 1506416585741
}
]
}
]
}| Parameter | Description |
|---|---|
Version | The payload version. Example: Sync-v1. Type: String. |
Records | An array of incremental data rows. Each element contains Type (the row operation type; valid values: PutRow, UpdateRow, DeleteRow; type: String) and Info (row metadata, including Timestamp, the time of the last modification in UTC; type: INT64). |
PrimaryKey | An array of primary key columns. Each element contains ColumnName (the column name; type: String) and Value (the column value; type: formated_value, which can be INTEGER, STRING, or BLOB). |
Columns | An array of attribute columns. Each element contains Type (the operation type; valid values: Put, DeleteOneVersion, DeleteAllVersions; type: String), ColumnName (the column name; type: String), Value (the column value; type: formatted_value, which can be INTEGER, BOOLEAN, DOUBLE, STRING, or BLOB), and Timestamp (the time of the last modification in UTC; type: INT64). |
Simple Message Queue (formerly MNS) topic triggers
The event format depends on the Event Format setting configured for the trigger.
STREAM format
Without message attributes — the event is a plain JSON string:
'hello topic'When messages have no attributes, the event content is a JSON-formatted string.
With message attributes — the event includes attribute key-value pairs:
The event content includes key-value pairs from the message attributes. For details, see PublishMessage.
{
"body": "hello topic",
"attrs": {
"Extend": "{\"key\":\"value\"}"
}
}JSON format
Without message attributes:
{
"TopicOwner": "118620210433****",
"Message": "hello topic",
"Subscriber": "118620210433****",
"PublishTime": 1550216480040,
"SubscriptionName": "test-fc-subscribe",
"MessageMD5": "BA4BA9B48AC81F0F9C66F6C909C3****",
"TopicName": "Mytopic",
"MessageId": "2F5B3C082B923D4EAC694B76D928****"
}With message attributes — the event includes the attribute key-value pairs in addition to the standard fields:
The event content includes key-value pairs from the message attributes. For details, see PublishMessage.
{
"key": "value",
"TopicOwner": "118620210433****",
"Message": "hello topic",
"Subscriber": "118620210433****",
"PublishTime": 1550216302888,
"SubscriptionName": "test-fc-subscribe",
"MessageMD5": "BA4BA9B48AC81F0F9C66F6C909C3****",
"TopicName": "Mytopic",
"MessageId": "2F5B3C281B283D4EAC694B742528****"
}JSON format event parameters:
| Parameter | Type | Example | Description |
|---|---|---|---|
key | String | value | The message attribute key-value pairs. |
TopicOwner | String | 118620210433**** | The account ID of the Simple Message Queue (formerly MNS) topic owner. |
Message | String | hello topic | The message body. |
Subscriber | String | 118620210433**** | The account ID of the topic subscriber. |
PublishTime | Int | 1550216302888 | The time when the message was published. |
SubscriptionName | String | test-fc-subscribe | The subscription name. |
MessageMD5 | String | BA4BA9B48AC81F0F9C66F6C909C3**** | The MD5 hash of the message body. |
TopicName | String | Mytopic | The Simple Message Queue (formerly MNS) topic name. |
MessageId | String | 2F5B3C281B283D4EAC694B742528**** | The message ID. |
MNS queue triggers
The event is an array of CloudEvents-formatted messages. For CloudEvents specification fields (specversion, id, source, type, datacontenttype, subject, time, and Alibaba Cloud extension fields), see Overview.
[
{
"id":"c2g71017-6f65-fhcf-a814-a396fc8d****",
"source":"MNS-Function-mnstrigger",
"specversion":"1.0",
"type":"mns:Queue:SendMessage",
"datacontenttype":"application/json; charset=utf-8",
"subject":"acs:mns:cn-hangzhou:164901546557****:queues/zeus",
"time":"2021-04-08T06:28:17.093Z",
"aliyunaccountid":"164901546557****",
"aliyunpublishtime":"2021-10-15T07:06:34.028Z",
"aliyunoriginalaccountid":"164901546557****",
"aliyuneventbusname":"MNS-Function-mnstrigger",
"aliyunregionid":"cn-chengdu",
"aliyunpublishaddr":"42.120.XX.XX",
"data":{
"requestId":"606EA3074344430D4C81****",
"messageId":"C6DB60D1574661357FA227277445****",
"messageBody":"TEST"
}
}
]data fields:
| Parameter | Type | Example | Description |
|---|---|---|---|
requestId | String | 606EA3074344430D4C81**** | The request ID. Each request has a unique ID. |
messageId | String | C6DB60D1574661357FA227277445**** | The message ID. Each message has a unique ID. |
messageBody | String | TEST | The message body. |
ApsaraMQ for RocketMQ triggers
The event is an array of CloudEvents-formatted messages. For CloudEvents specification fields, see Overview.
[
{
"id":"94ebc15f-f0db-4bbe-acce-56fb72fb****",
"source":"RocketMQ-Function-rocketmq-trigger",
"specversion":"1.0",
"type":"mq:Topic:SendMessage",
"datacontenttype":"application/json; charset=utf-8",
"subject":"acs:mq:cn-hangzhou:164901546557****:MQ_INST_164901546557****_BXhFHryi%TopicName",
"time":"2021-04-08T06:01:20.766Z",
"aliyunaccountid":"164901546557****",
"aliyunpublishtime":"2021-10-15T02:05:16.791Z",
"aliyunoriginalaccountid":"164901546557****",
"aliyuneventbusname":"RocketMQ-Function-rocketmq-trigger",
"aliyunregionid":"cn-chengdu",
"aliyunpublishaddr":"42.120.XX.XX",
"data":{
"topic":"TopicName",
"systemProperties":{
"MIN_OFFSET":"0",
"TRACE_ON":"true",
"MAX_OFFSET":"8",
"MSG_REGION":"cn-hangzhou",
"KEYS":"systemProperties.KEYS",
"CONSUME_START_TIME":1628577790396,
"TAGS":"systemProperties.TAGS",
"INSTANCE_ID":"MQ_INST_164901546557****_BXhFHryi"
},
"userProperties":{},
"body":"TEST"
}
}
]data fields:
| Parameter | Type | Example | Description |
|---|---|---|---|
topic | String | TopicName | The topic name. |
systemProperties | Map | — | The system properties. |
systemProperties.MIN_OFFSET | Int | 0 | The earliest offset. |
systemProperties.TRACE_ON | Boolean | true | Whether a message trace exists. Valid values: true, false. |
systemProperties.MAX_OFFSET | Int | 8 | The latest offset. |
systemProperties.MSG_REGION | String | cn-hangzhou | The region where the message was sent. |
systemProperties.KEYS | String | systemProperties.KEYS | The keys used to filter messages. |
systemProperties.CONSUME_START_TIME | Long | 1628577790396 | The start time of message consumption, in milliseconds. |
systemProperties.UNIQ_KEY | String | AC14C305069E1B28CDFA3181CDA2**** | The unique key of the message. |
systemProperties.TAGS | String | systemProperties.TAGS | The tags used to filter messages. |
systemProperties.INSTANCE_ID | String | MQ_INST_123456789098****_BXhFHryi | The ApsaraMQ for RocketMQ instance ID. |
userProperties | Map | — | User-defined properties. |
body | String | TEST | The message body. |
ApsaraMQ for RabbitMQ triggers
The event is an array of CloudEvents-formatted messages. For CloudEvents specification fields, see Overview.
[
{
"id":"bj694332-4cj1-389e-9d8c-b137h30b****",
"source":"RabbitMQ-Function-rabbitmq-trigger",
"specversion":"1.0",
"type":"amqp:Queue:SendMessage",
"datacontenttype":"application/json;charset=utf-8",
"subject":"acs:amqp:cn-hangzhou:164901546557****:/instances/amqp-cn-tl32e756****/vhosts/eb-connect/queues/housekeeping",
"time":"2021-08-12T06:56:40.709Z",
"aliyunaccountid":"164901546557****",
"aliyunpublishtime":"2021-10-15T08:58:55.140Z",
"aliyunoriginalaccountid":"164901546557****",
"aliyuneventbusname":"RabbitMQ-Function-rabbitmq-trigger",
"aliyunregionid":"cn-chengdu",
"aliyunpublishaddr":"42.120.XX.XX",
"data":{
"envelope":{
"deliveryTag":98,
"exchange":"",
"redeliver":false,
"routingKey":"housekeeping"
},
"body":{
"Hello":"RabbitMQ"
},
"props":{
"contentEncoding":"UTF-8",
"messageId":"f7622d51-e198-41de-a072-77c1ead7****"
}
}
}
]data fields:
| Parameter | Type | Example | Description |
|---|---|---|---|
body | Map | — | The message body. |
body.Hello | String | EventBridge | User data. |
props | Map | — | The message attributes. |
props.contentEncoding | String | utf-8 | The encoding format of the message body. |
props.messageId | String | f7622d51-e198-41de-a072-77c1ead7**** | The message ID. Each message has a unique ID. |
envelope | Map | — | The message envelope. |
envelope.deliveryTag | Int | 98 | The delivery tag. |
envelope.exchange | String | — | The exchange that routed the message. |
envelope.redeliver | Boolean | false | Whether the message is a redelivery. Valid values: true, false. |
envelope.routingKey | String | housekeeping | The routing key of the message. |
ApsaraMQ for Kafka triggers
The event is an array of CloudEvents-formatted messages. For CloudEvents specification fields, see Overview.
[
{
"specversion":"1.0",
"id":"8e215af8-ca18-4249-8645-f96c1026****",
"source":"acs:alikafka",
"type":"alikafka:Topic:Message",
"subject":"acs:alikafka_pre-cn-i7m2t7t1****:topic:mytopic",
"datacontenttype":"application/json; charset=utf-8",
"time":"2022-06-23T02:49:51.589Z",
"aliyunaccountid":"164901546557****",
"data":{
"topic":"****",
"partition":7,
"offset":25,
"timestamp":1655952591589,
"headers":{
"headers":[],
"isReadOnly":false
},
"key":"keytest",
"value":"hello kafka msg"
}
}
]data fields:
| Parameter | Type | Example | Description |
|---|---|---|---|
topic | String | TopicName | The topic name. |
partition | Int | 1 | The partition on the ApsaraMQ for Kafka instance. |
offset | Int | 0 | The message offset. |
timestamp | String | 1655952591589 | The timestamp when message consumption started. |
DTS triggers
The event is an array of CloudEvents-formatted messages. For CloudEvents specification fields, see Overview.
[
{
"data": {
"id": 321****,
"topicPartition": {
"hash": 0,
"partition": 0,
"topic": "cn_hangzhou_rm_1234****_test_version2"
},
"offset": 3218099,
"sourceTimestamp": 1654847757,
"operationType": "UPDATE",
"schema": {
"recordFields": [
{
"fieldName": "id",
"rawDataTypeNum": 8,
"isPrimaryKey": true,
"isUniqueKey": false,
"fieldPosition": 0
},
{
"fieldName": "topic",
"rawDataTypeNum": 253,
"isPrimaryKey": false,
"isUniqueKey": false,
"fieldPosition": 1
}
],
"schemaId": "(hangzhou-test-db,hangzhou-test-db,message_info)",
"databaseName": "hangzhou--test-db",
"tableName": "message_info",
"primaryIndexInfo": {
"indexType": "PrimaryKey",
"indexFields": [...],
"cardinality": 0,
"nullable": true,
"isFirstUniqueIndex": false
},
"databaseInfo": {
"databaseType": "MySQL",
"version": "5.7.35-log"
},
"totalRows": 0
},
"beforeImage": { ... },
"afterImage": { ... }
},
"id": "12f701a43741d404fa9a7be89d9acae0-321****",
"source": "DTSstreamDemo",
"specversion": "1.0",
"type": "dts:ConsumeMessage",
"datacontenttype": "application/json; charset=utf-8",
"time": "2022-06-10T07:55:57Z",
"subject": "acs:dts:cn-hangzhou:12345****:kk123abc60g782/dtsabcdet1ro"
}
]data fields:
| Parameter | Type | Description |
|---|---|---|
id | String | The DTS data entry ID. |
topicPartition | Array | The partition details of the topic to which the event is pushed. |
topicPartition.hash | String | The underlying storage parameter of DTS. |
topicPartition.partition | String | The partition. |
topicPartition.topic | String | The topic name. |
offset | Int | The offset of the DTS data entry. |
sourceTimestamp | Int | The timestamp when the DTS data entry was generated. |
operationType | String | The operation type of the DTS data entry. |
schema | Array | The database schema information. |
schema.recordFields | Array | The field details. |
schema.recordFields[].fieldName | String | The field name. |
schema.recordFields[].rawDataTypeNum | Int | The mapped value of the field type. Corresponds to the dataTypeNumber field in deserialized incremental data from the change tracking instance. For details, see Use a Kafka client to consume tracked data. |
schema.recordFields[].isPrimaryKey | Boolean | Whether the field is a primary key. |
schema.recordFields[].isUniqueKey | Boolean | Whether the field has a unique key. |
schema.recordFields[].fieldPosition | String | The field position. |
schema.nameIndex | Array | The indexing information about the fields based on field names. |
schema.schemaId | String | The database schema ID. |
schema.databaseName | String | The database name. |
schema.tableName | String | The table name. |
schema.primaryIndexInfo | String | The primary key index details. |
schema.primaryIndexInfo.indexType | String | The index type. |
schema.primaryIndexInfo.indexFields | Array | The indexed fields. |
schema.primaryIndexInfo.cardinality | String | The cardinality of the primary keys. |
schema.primaryIndexInfo.nullable | Boolean | Whether the primary keys can be null. |
schema.primaryIndexInfo.isFirstUniqueIndex | Boolean | Whether the index is the first unique index. |
schema.uniqueIndexInfo | String | The unique indexes. |
schema.foreignIndexInfo | String | The foreign key indexes. |
schema.normalIndexInfo | String | The regular indexes. |
schema.databaseInfo | Array | The database details. |
schema.databaseInfo.databaseType | String | The database engine. |
schema.databaseInfo.version | String | The database engine version. |
schema.totalRows | Int | The total number of rows in the table. |
beforeImage | String | The field values before the operation. |
values | String | The field values recorded. |
size | Int | The size of the fields recorded. |
afterImage | String | The field values after the operation. |
ApsaraMQ for MQTT triggers
[
{
"props": {
"firstTopic": "testTopic",
"secondTopic": "/testMq4****",
"clientId": "consumerGroupID@@@xxx"
},
"body": "hello mq4Iot pub sub msg"
}
]| Parameter | Type | Example | Description |
|---|---|---|---|
props | Map | — | The message attributes. |
props.firstTopic | String | testTopic | The parent topic used to send and receive messages. |
props.secondTopic | String | /testMq4**** | The child topic. |
props.clientId | String | consumerGroupID@@@xx | The client ID. |
body | String | hello mq4Iot pub sub msg | The message body. |
Self-managed Apache RocketMQ triggers
[
{
"msgId": "7F0000010BDD2A84AEE70DA49B57****",
"topic": "testTopic",
"systemProperties": {
"UNIQ_KEY": "7F0000010BDD2A84AEE70DA49B57****",
"CLUSTER": "DefaultCluster",
"MIN_OFFSET": "0",
"TAGS": "TagA",
"MAX_OFFSET": "128"
},
"userProperties": {},
"body": "Hello RocketMQ"
}
]| Parameter | Type | Example | Description |
|---|---|---|---|
msgId | String | 7F0000010BDD2A84AEE70DA49B57**** | The Apache RocketMQ message ID. |
topic | String | testTopic | The topic name in the Apache RocketMQ cluster. |
systemProperties | Map | — | The system properties. |
systemProperties.UNIQ_KEY | String | 7F0000010BDD2A84AEE70DA49B57**** | The unique key of the message. |
systemProperties.CLUSTER | String | DefaultCluster | The Apache RocketMQ cluster name. |
systemProperties.MIN_OFFSET | Int | 0 | The minimum offset. |
systemProperties.MAX_OFFSET | Int | 128 | The maximum offset. |
systemProperties.TAGS | String | TagA | The tags used to filter messages. |
userProperties | Map | — | User-defined properties. |
body | String | Hello RocketMQ | The message body. |