This topic provides an overview of ECS event notifications. Event notifications are designed to provide information about resource changes. You can subscribe to notifications for the following types of events: system events (including O&M events and exceptions), instance status changes, attachment or detachment of data disks, and snapshot creation. Event notifications enable you to configure message-processing middleware for events to implement event-driven automated O&M and replace SDK polling.

Event notification name

After you configure event notifications, you can receive the corresponding notifications if these events occur. The name field of a notification indicates the code name of the event. This field is in the following format: <resource type>:<event>:<status>.
  • <resource type>: the name of the corresponding ECS resource. Example values: Instance indicates your ECS instance and Disk indicates your block storage device.
  • <event>: the name of the event. Example values: SystemMaintenance.Reboot, StateChange, PreemptibleInstanceInterruption, DiskOperationCompleted, and CreateSnapshotCompleted.
  • <status>: the status of the event. For more information about the field values, see Overview of system events.
    Note The <status> field is only available for instance system events and block storage system events.

Event notification format

After event notifications are configured, ECS sends notifications based on the method that you specified. The following example shows a non-customized event notification in the JSON format. The notification is sent when the status of an ECS instance changes.
Note If the configured notification method supports format conversion, the actual format takes precedence.
    "eventTime": "20181226T220114.058+0800",
    "id": "9435EAD6-3CF6-4494-8F7A-3A********77",
    "level": "INFO",
    "name": "Instance:StateChange",
    "product": "ECS",
    "regionId": "cn-hangzhou",
    "resourceId": "acs:ecs:cn-hangzhou:169070********30:instance/i-bp1ecr********5go2go",
    "userId": "169070********30",
    "ver": "1.0",
    "content": {
        "resourceId": "i-bp1ecr********5go2go",
        "resourceType": "ALIYUN::ECS::Instance",
        "state": "Stopping"
The following table describes fixed top-level fields of a notification.
Field Description Example
id The ID of the event. 9435EAD6-3CF6-4494-8F7A-3A********77
eventTime The time when the event occurred (UTC+8). 20181226T220114.058+0800
level The level of the event. Valid values:
  • INFO
  • WARN
name The name of the event. For more information, see the Event notification name section. Instance:StateChange
product The name of the product. Set the value to ECS. ECS
regionId The ID of the region where the event occurred. For more information about the field values, see Regions and zones. cn-hangzhou
resourceId The Aliyun Resource Name (ARN) of the resource. acs:ecs:cn-hangzhou:169070********30:instance/i-bp1ecr********5go2go
userId The ID of the Alibaba Cloud account. 169070********30
content The event details, which can contain one or more sub-fields. For more information about the sub-fields, see the following topics: None