This topic provides an overview of the notifications for ECS events. Event notifications are designed to provide information about resource changes. Event types along with their notification types are as follows: system events (including O&M events and exceptions), instance status changes, data disk attaching or detaching, 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 set 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. Valid values:
    • Instance: your ECS instance
    • Disk: your block storage device
  • <event>: the name of the event. Example values:
    • SystemMaintenance.Reboot: instance restart due to system maintenance
    • StateChange: instance status changes
    • PreemptibleInstanceInterruption: release of preemptible instances
    • DiskOperationCompleted: operations on disks completed
    • CreateSnapshotCompleted: snapshot creation completed
  • <status>: the status of the event. For more information about parameter values, see System events.
    Note The <status> field is available only for instance system events and block storage system events.

Notification format

After event notifications are set, ECS sends notifications based on the notification method you specified. The following example shows a non-customized event notification in JSON format. The notification is sent when the status of an ECS instance changes.
Note If the notification method you set 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 value
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: information for reference
  • WARN: warning
  • CRITICAL: critical
name The name of the event. For more information, see Event notification name. Instance:StateChange
product The name of the service. Set the value to ECS. ECS
regionId The ID of the region where the event occurred. For more information about the parameter 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 user account ID. 169070********30
content The event details. For more information about the format, see the following topics: None