This topic describes the types of Elastic Compute Service (ECS) events that can be published to EventBridge.

Event types

The following table describes the types of ECS events that can be published to EventBridge.

Event type Value of the type parameter
Operations performed by Alibaba Cloud on resources ecs:ActionTrail:AliyunServiceEvent
API operation calls ecs:ActionTrail:ApiCall
Operations performed in the console ecs:ActionTrail:ConsoleOperation
Disk retention ecs:Disk:ConvertToPostpaidCompleted
Data disk attachment or detachment ecs:Disk:DiskOperationCompleted
Block storage release due to overdue payments ecs:Disk:OverduePaymentRelease
Limited performance of burstable instances ecs:Instance:BurstablePerformanceRestricted
Hot migration of ECS instances between dedicated hosts ecs:Instance:LiveMigrationAcrossDDH
Performance mode changes of burstable instances ecs:Instance:PerformanceModeChange
Release of preemptible instances ecs:Instance:PreemptibleInstanceInterruption
Status changes of the instance lifecycle ecs:Instance:StateChange
Additional charges for burstable instances ecs:Instance:SurplusCreditIncurCharge
Complete snapshot creation ecs:Snapshot:CreateSnapshotCompleted
Start of snapshot creation ecs:Snapshot:CreateSnapshotInitiated
Snapshot deletion ecs:Snapshot:SnapshotDeleted

For more information about the parameters defined in the CloudEvents specification, see Overview.

Disk retention

When an ECS instance is released, its attached disks are converted into pay-as-you-go data disks and retained. EventBridge receives the following event:

{
    "datacontenttype": "application/json;charset=utf-8",
    "aliyunaccountid": "123456789098****",
    "data": {
        "result": "accomplished",
        "diskId": "d-bp11ba7acc69nkta****"
    },
    "subject": "acs:ecs:cn-hangzhou:123456789098****:disk/d-bp11ba7acc69nkta****",
    "source": "acs.ecs",
    "type": "ecs:Disk:ConvertToPostpaidCompleted",
    "aliyunpublishtime": "2021-01-18T03:58:31.762Z",
    "specversion": "1.0",
    "aliyuneventbusname": "default",
    "id": "70c0414c-b260-4923-b584-1d6e5646****",
    "time": "2021-01-18T11:58:31.125+08:00",
    "aliyunregionid": "cn-hangzhou",
    "aliyunpublishaddr": "172.25.XX.XX"
}

The following table describes the fields in the data parameter.

Field Type Example Description
result String accomplished The result of the task.
Valid values:
  • accomplished: The task was successful.
  • failed: The task failed.
diskId String d-bp11ba7acc69nkta**** The ID of the disk.

Data disk attachment or detachment

When a data disk is attached to or detached from an ECS instance, EventBridge receives the following event:

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"123456789098****",
    "data":{
        "result":"accomplished",
        "diskId":"d-f8zd3pcilr7c2sym****",
        "operation":"DetachDisk"
    },
    "subject":"acs:ecs:cn-heyuan:123456789098****:disk/d-f8zd3pcilr7c2sym****",
    "source":"acs.ecs",
    "type":"ecs:Disk:DiskOperationCompleted",
    "aliyunpublishtime":"2021-01-18T03:24:42.373Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"dd505594-b239-49a5-b6f6-87029b2b****",
    "time":"2021-01-18T11:24:13.502+08:00",
    "aliyunregionid":"cn-hangzhou",
    "aliyunpublishaddr":"172.25.XX.XX"
}

The following table describes the fields in the data parameter.

Field Type Example Description
result String accomplished The result of the task.
Valid values:
  • accomplished: The task was successful.
  • failed: The task failed.
instanceId String d-f8zd3pcilr7c2sym**** The ID of the ECS instance.
diskId String d-wz9ad6x3sistd7fh**** The ID of the disk.

Block storage release due to overdue payments

When an Elastic Block Storage (EBS) device is released for an ECS instance, EventBridge receives the following event:

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"123456789098****",
    "data":{
        "result":"accomplished",
        "instanceId":"i-wz9e60ytsp3lspww****",
        "diskId":"d-wz9ad6x3sistd7fh****"
    },
    "subject":"acs:ecs:cn-shenzhen-st3-a01:123456789098****:disk/d-wz9ad6x3sistd7fh****",
    "source":"acs.ecs",
    "type":"ecs:Disk:OverduePaymentRelease",
    "aliyunpublishtime":"2021-01-18T08:20:51.890Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"a3a1e190-a357-40c5-a1c2-3e343a90****",
    "time":"2021-01-18T16:20:51.199+08:00",
    "aliyunregionid":"cn-hangzhou",
    "aliyunpublishaddr":"172.25.XX.XX"
}

The following table describes the fields in the data parameter.

Field Type Example Description
result String accomplished The result of the task.
Valid values:
  • accomplished: The task was successful.
  • failed: The task failed.
instanceId String i-wz9e60ytsp3lspww**** The ID of the ECS instance.
diskId String d-wz9ad6x3sistd7fh**** The ID of the disk.

Limited performance of burstable instances

When the processing performance of a burstable instance is limited, EventBridge receives the following event:

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"123456789098****",
    "data":{
        "instanceId":"i-bp1eojtvpmlraj13****",
        "intervalEnd":"2021-01-18T05:00Z",
        "intervalStart":"2021-01-18T04:00Z"
    },
    "subject":"acs:ecs:cn-hangzhou:123456789098****:instance/i-bp1eojtvpmlraj13****",
    "source":"acs.ecs",
    "type":"ecs:Instance:BurstablePerformanceRestricted",
    "aliyunpublishtime":"2021-01-18T04:06:45.441Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"be468204-6cac-4088-9e57-6455d749****",
    "time":"2021-01-18T12:06:45.238+08:00",
    "aliyunregionid":"cn-hangzhou",
    "aliyunpublishaddr":"172.25.XX.XX"
}

The following table describes the fields in the data parameter.

Field Type Example Description
resourceId String i-bp1eojtvpmlraj13**** The ID of the ECS instance.
intervalEnd TimeStamp 2021-01-18T05:00Z The end time of the event interval.
intervalStart TimeStamp 2021-01-18T04:00Z The start time of the event interval.

Hot migration of ECS instances between dedicated hosts

When an ECS instance is hot migrated between dedicated hosts, EventBridge receives the following event:

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"123456789098****",
    "data":{
        "instanceId":"i-bp1eojtvpmlraj13****",
        "sourceDedicatedHostId":"dh-2ze3lma1c2-3e343****",
        "destinationDedicatedHostId":"dh-2ze3lm********t8nr83",
        "startTime":"2018-06-08T01:25:37Z",
        "status":"started"
    },
    "subject":"acs:ecs:cn-hangzhou:123456789098****:instance/i-bp1eojtvpmlraj13****",
    "source":"acs.ecs",
    "type":"ecs:Instance:LiveMigrationAcrossDDH",
    "aliyunpublishtime":"2021-01-18T08:20:51.890Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"a3a1e190-a357-40c5-a1c2-3e343a90****",
    "time":"2021-01-18T16:20:51.199+08:00",
    "aliyunregionid":"cn-hangzhou",
    "aliyunpublishaddr":"172.25.XX.XX"
}

The following table describes the fields in the data parameter.

Field Type Example Description
instanceId String i-bp1eojtvpmlraj13**** The ID of the ECS instance.
sourceDedicatedHostId String dh-2ze3lma1c2-3e343**** The ID of the source dedicated host.
destinationDedicatedHostId String dh-2ze3lm********t8nr83 The ID of the destination dedicated host.
startTime TimeStamp 2021-01-18T16:20:51.199+08:00 The start time of the hot migration.
status String started The status of the hot migration.
Valid values:
  • started: The migration has started.
  • failed: The migration failed.
  • accomplished: The migration was successful.

Performance mode changes of burstable instances

When the performance mode of a burstable ECS instance is changed, EventBridge receives the following event:

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"123456789098****",
    "data":{
        "instanceId":"i-bp1eojtvpmlraj13****",
        "creditSpecification":"Unlimited",
        "operator":"System"
    },
    "subject":"acs:ecs:cn-hangzhou:123456789098****:instance/i-bp1eojtvpmlraj13****",
    "source":"acs.ecs",
    "type":"ecs:Instance:PerformanceModeChange",
    "aliyunpublishtime":"2021-01-18T08:20:51.890Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"a3a1e190-a357-40c5-a1c2-3e343a90****",
    "time":"2021-01-18T16:20:51.199+08:00",
    "aliyunregionid":"cn-hangzhou",
    "aliyunpublishaddr":"172.25.XX.XX"
}

The following table describes the fields in the data parameter.

Field Type Example Description
instanceId String i-bp1eojtvpmlraj13**** The ID of the ECS instance.
creditSpecification String Unlimited The performance mode of the burstable instance.
Valid values:
  • Standard: standard mode
  • Unlimited: unlimited mode
operator String System The operator that triggers the event.
Valid values:
  • System: The system automatically changes the performance mode of the burstable instance. The performance mode of your burstable instance is automatically changed if the instance depletes its CPU credits, the No Fees for Stopped Instances (VPC-Connected) feature is triggered, or you have overdue payments within your account.
  • User: You change the performance mode of the burstable instance in the ECS console or by calling API operations.

Release of preemptible instances

When a preemptible ECS instance is automatically released due to fluctuations in market prices or insufficient resources, EventBridge receives the following event:

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"123456789098****",
    "data":{
        "instanceId":"i-bp1eojtvpmlraj13****",
        "action":"delete"
    },
    "subject":"acs:ecs:cn-hangzhou:123456789098****:instance/i-bp1eojtvpmlraj13****",
    "source":"acs.ecs",
    "type":"ecs:Instance:PreemptibleInstanceInterruption",
    "aliyunpublishtime":"2021-01-18T08:20:51.890Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"a3a1e190-a357-40c5-a1c2-3e343a90****",
    "time":"2021-01-18T16:20:51.199+08:00",
    "aliyunregionid":"cn-hangzhou",
    "aliyunpublishaddr":"172.25.XX.XX"
}

The following table describes the fields in the data parameter.

Field Type Example Description
instanceId String i-abc1792gcdoonr9a**** The ID of the ECS instance.
action String delete The action.

Status changes of the instance lifecycle

When the lifecycle status of an ECS instance changes, EventBridge receives the following event:

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"123456789098****",
    "data":{
        "resourceId":"i-bp1dkbnzouipluli****",
        "state":"Starting",
        "resourceType":"ALIYUN::ECS::Instance"
    },
    "subject":"acs:ecs:cn-hangzhou:123456789098****:instance/i-bp1dkbnzouipluli****",
    "source":"acs.ecs",
    "type":"ecs:Instance:StateChange",
    "aliyunpublishtime":"2021-01-18T03:24:42.181Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"2883c69f-902f-4005-8f50-6d060b3c****",
    "time":"2021-01-18T11:24:09.905+08:00",
    "aliyunregionid":"cn-hangzhou",
    "aliyunpublishaddr":"172.25.XX.XX"
}

The following table describes the fields in the data parameter.

Field Type Example Description
resourceId String i-bp1dkbnzouipluli**** The ID of the resource.
state String Starting The status of the ECS instance.
Valid values:
  • Pending: The instance is being prepared.
  • Starting: The instance is being started.
  • Running: The instance is running.
  • Stopping: The instance is being stopped or restarted.
  • Stopped: The instance is stopped.
  • Deleted: The instance is released.
resourceType String ALIYUN::ECS::Instance The type of the resource.

Additional charges for burstable instances

When a burstable ECS instance requires additional charges, EventBridge receives the following event:

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"123456789098****",
    "data":{
        "instanceId":"i-abc1792gcdoonr9a****",
        "creditSpecification":"Unlimited",
        "intervalStart":"2019-06-14T00:00:00Z",
        "intervalEnd":"2019-06-14T01:00:00Z"
    },
    "subject":"acs:ecs:cn-hangzhou:123456789098****:instance/i-abc1792gcdoonr9a****",
    "source":"acs.ecs",
    "type":"ecs:Instance:SurplusCreditIncurCharge",
    "aliyunpublishtime":"2021-01-18T08:20:51.890Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"a3a1e190-a357-40c5-a1c2-3e343a90****",
    "time":"2021-01-18T16:20:51.199+08:00",
    "aliyunregionid":"cn-hangzhou",
    "aliyunpublishaddr":"172.25.XX.XX"
}

The following table describes the fields in the data parameter.

Field Type Example Description
instanceId String i-abc1792gcdoonr9a**** The ID of the ECS instance.
creditSpecification String Unlimited The performance mode of the burstable instance.
Valid values:
  • Standard: standard mode
  • Unlimited: unlimited mode
intervalStart TimeStamp 2019-06-14T00:00:00Z The start time of the event interval.
intervalEnd TimeStamp 2019-06-14T01:00:00Z The end time of the event interval.

Complete snapshot creation

When a snapshot is created, EventBridge receives the following event:

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"123456789098****",
    "data":{
        "result":"accomplished",
        "snapshotId":"s-bp1civqxj9bbvxqn****",
        "snapshotType":"user",
        "snapshotName":"cust38997127_hins16008704_20210118112203",
        "diskId":"d-bp11151k3ad3a8qn****",
        "startTime":"2021-01-18T03:22:08Z",
        "endTime":"2021-01-18T03:24:09Z"
    },
    "subject":"acs:ecs:cn-hangzhou:123456789098****:snapshot/s-bp1civqxj9bbvxqn****",
    "source":"acs.ecs",
    "type":"ecs:Snapshot:CreateSnapshotCompleted",
    "aliyunpublishtime":"2021-01-18T03:24:42.208Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"ea1dd7e0-3973-4626-91fa-bd09af40****",
    "time":"2021-01-18T11:24:09.212+08:00",
    "aliyunregionid":"cn-hangzhou",
    "aliyunpublishaddr":"172.25.XX.XX"
}

The following table describes the fields in the data parameter.

Field Type Example Description
result String USER The result of the task.
Valid values:
  • accomplished: The task was successful.
  • failed: The task failed.
snapshotId String s-bp13al3gx35awyr8**** The ID of the snapshot.
snapshotType String user The type of the snapshot.
Valid values:
  • user: You manually create the snapshot.
  • auto: The system automatically creates the snapshot.
snapshotName String System 20190917 The name of the snapshot.
diskId String d-bp1dsz8qsstbk9ph**** The ID of the disk.
startTime TimeStamp 2021-01-18T03:22:08Z The time when the snapshot started to be created.
endTime TimeStamp 2021-01-18T03:22:08Z The time when the snapshot was created.

Start of snapshot creation

When a snapshot starts to be created, EventBridge receives the following event:

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"123456789098****",
    "data":{
        "snapshotId":"s-bp1hew62f61pjk77****",
        "snapshotType":"user",
        "snapshotName":"cust24417935_hins11712633_20210118112409",
        "diskId":"d-bp11gspuopjn701i****"
    },
    "subject":"acs:ecs:cn-hangzhou:123456789098****:snapshot/s-bp1hew62f61pjk77****",
    "source":"acs.ecs",
    "type":"ecs:Snapshot:CreateSnapshotInitiated",
    "aliyunpublishtime":"2021-01-18T03:24:42.515Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"ab7ade3e-ca91-49d6-aeb0-d3711699****",
    "time":"2021-01-18T11:24:10.604+08:00",
    "aliyunregionid":"cn-hangzhou",
    "aliyunpublishaddr":"172.25.XX.XX"
}

The following table describes the fields in the data parameter.

Field Type Example Description
snapshotId String s-bp1hew62f61pjk77**** The ID of the snapshot.
snapshotType String user The type of the snapshot.
Valid values:
  • user: You manually create the snapshot.
  • auto: The system automatically creates the snapshot.
snapshotName String cust24417935_hins11712633_20210118112409 The name of the snapshot.
diskId String d-bp11gspuopjn701i**** The ID of the disk.

Snapshot deletion

When a snapshot is deleted, EventBridge receives the following event:

{
    "datacontenttype": "application/json;charset=utf-8",
    "aliyunaccountid": "123456789098****",
    "data": {
        "reason": "USER",
        "snapshotId": "s-bp13al3gx35awyr8****",
        "snapshotType": "user",
        "snapshotName": "System 20190917",
        "diskId": "d-bp1dsz8qsstbk9ph****"
    },
    "subject": "acs:ecs:cn-hangzhou:123456789098****:snapshot/s-bp13al3gx35awyr8****",
    "source": "acs.ecs",
    "type": "ecs:Snapshot:SnapshotDeleted",
    "aliyunpublishtime": "2021-01-18T03:24:42.223Z",
    "specversion": "1.0",
    "aliyuneventbusname": "default",
    "id": "32fddb32-89bc-4a13-bd88-73525788****",
    "time": "2021-01-18T11:24:13.765+08:00",
    "aliyunregionid": "cn-hangzhou",
    "aliyunpublishaddr": "172.25.XX.XX"
}

The following table describes the fields in the data parameter.

Field Type Example Description
reason String USER The reason for the task.
Valid values:
  • USER: You manually delete the snapshot.
  • DEVICE_CONFIG: The snapshot is released with the disk.
  • ROTATED: The snapshot is automatically deleted when the upper limit of retained automatic snapshots is reached.
  • EXPIRED: The snapshot is deleted because it expires.
  • SERVICE_RELEASED: The snapshot is deleted because the snapshot service is released due to overdue payments.
  • CREATE_FAILURE: The snapshot is automatically deleted because it fails to be created.
  • OTHERS: The snapshot is deleted due to other reasons that are not classified.
snapshotId String s-bp13al3gx35awyr8**** The ID of the snapshot.
snapshotType String user The type of the snapshot.
Valid values:
  • user: You manually create the snapshot.
  • auto: The system automatically creates the snapshot.
snapshotName String System 20190917 The name of the snapshot.
diskId String d-bp1dsz8qsstbk9ph**** The ID of the disk.