An event is a data record of status changes. This topic describes the details of event parameters in EventBridge.

Event sources can publish only events that comply with the CloudEvents specification to EventBridge. For more information about CloudEvents, see CloudEvents 1.0.

The following example shows an event that an event source publishes to EventBridge:
{
    "data":{
        "meetingName":"swqd",
        "groupId":"456",
        "action":"camera_off",
        "time":1590592527490,
        "userId":"199525",
        "meetingUUID":"hz-20864c8f-b10d-45cd-9935-884bca1b****"
    },
    "id":"45ef4dewdwe1-7c35-447a-bd93-fab****",
    "source":"acs:aliyuncvc",
    "specversion":"1.0",
    "subject":"acs.aliyuncvc:cn-hangzhou:{AccountId}:215672",
    "time":"2020-11-19T21:04:41+08:00",
    "type":"aliyuncvc:MeetingEvent:MemberOperate",
    "aliyunaccountid":"123456789098****",
    "aliyunpublishtime":"2020-11-19T21:04:42.179PRC",
    "aliyuneventbusname":"default",
    "aliyunregionid":"cn-hangzhou",
    "aliyunpublishaddr":"172.25.XX.XX"
}

The following table describes the parameters in the preceding event.

Parameter Type Required Example Description
id String Yes 45ef4dewdwe1-7c35-447a-bd93-fab**** The ID of the event. The value of this parameter is a unique value that identifies an event. Producers must ensure that the values of the source and id parameters are unique for each event. If the event is sent twice due to a network error, two events that have the same id value may be received. Consumers assume that duplicate events exist because they have identical values of the source and id parameters. The event is tracked based on the id parameter when the event is routed to and processed by an event target.
source String Yes acs:aliyuncvc The event source. The event source produces an event and identifies the context in which the event occurs. The value of this parameter includes information such as the type of the event source, the publishing mechanism of the event, or the process of producing the event. Producers must ensure that the values of the source and id parameters are unique for each event.
specversion String Yes 1.0 The version of the CloudEvents specification.
type String Yes aliyuncvc:MeetingEvent:MemberOperate The type of the event. This parameter is related to the event source. This parameter is used to route events, query events, or implement policies. The format of this parameter is defined by the producer and includes information such as the version number.
datacontenttype String No application/json;charset=utf-8 The content type of the data parameter. The value of the datacontenttype parameter must be in the application/json format.
dataschema URI No N/A The format of the data parameter.
subject String No acs.aliyuncvc:cn-hangzhou:{AccountId}:215672 The subject of the event. JSON data contains Alibaba Cloud Resource Names (ARNs) that identify the resources involved in the event. In publish-subscribe scenarios, a subscriber subscribes to events from an event source. However, if the source parameter contains a sub-structure, the source parameter alone is insufficient to identify the event. If the data content cannot be interpreted, the subject parameter can be used to identify the subject of the event in subscription filtering scenarios.
time Timestamp No 2020-11-19T21:04:41+08:00 The time when the event occurred. If the event occurred at an unknown time, the producer of the event in the CloudEvents format can set the time parameter to another value such as the current time. However, all producers of the same source must set the source parameter to the same value.
data Struct No
{
    "meetingName":"swqd",
    "groupId":"456",
    "action":"camera_off",
    "time":1590592527490,
    "userId":"199525",
    "meetingUUID":"hz-20864c8f-b10d-45cd-9935-884bca1b****"
}
The content of the event. This parameter is a JSON object. The event source that produces the event determines the value of this parameter. An event in the CloudEvents format may include the information about the event occurrence within data.
aliyunaccountid String Yes 123456789098**** The ID of the Alibaba Cloud account. This parameter is not defined in the CloudEvents specification, and is added to an event after an event source publishes the event to EventBridge.
aliyunpublishtime Timestamp Yes 2020-11-19T21:04:42.179PRC The time when the event was received. This parameter is not defined in the CloudEvents specification, and is added to an event after an event source publishes the event to EventBridge.
aliyuneventbusname String Yes default The name of the event bus that receives the event. This parameter is not defined in the CloudEvents specification, and is added to an event after an event source publishes the event to EventBridge.
aliyunregionid String Yes cn-hangzhou The region where the event was received. This parameter is not defined in the CloudEvents specification, and is added to an event after an event source publishes the event to EventBridge.
aliyunpublishaddr String Yes 172.25.XX.XX The IP address of the server that receives the event. This parameter is not defined in the CloudEvents specification, and is added to an event after an event source publishes the event to EventBridge.

Events that event sources publish to EventBridge include the following two types:

  • Alibaba Cloud service events

    Alibaba Cloud services automatically connect to EventBridge as event sources. For more information about the types of Alibaba Cloud service events that are supported by EventBridge, see Overview.

  • Custom application events

    If you use your application as an event source, you must connect your application to EventBridge by using the SDK.