This topic describes the event types that Auto Scaling publishes to EventBridge. As an event source, Auto Scaling integrates with ActionTrail, CloudMonitor, and Cloud Config.
Event types
Auto Scaling can publish the following event types to EventBridge.
Event type | Value of the type parameter |
ess:ScalingActivity:ScaleInError | |
ess:ScalingActivity:ScaleInPartialSuccess | |
ess:ScalingActivity:ScaleInSuccess | |
ess:ScalingActivity:ScaleOutError | |
ess:ScalingActivity:ScaleOutPartialSuccess | |
ess:ScalingActivity:ScaleOutSuccess | |
ess:LifecycleHook:ScaleIn | |
ess:LifecycleHook:ScaleOut | |
ess:LifecycleHook:Test | |
ess:ScalingActivity:ScaleInStart | |
ess:ScalingActivity:ScaleOutStart | |
Management events that the Alibaba Cloud platform performs on resources | ess:ActionTrail:AliyunServiceEvent |
API call | ess:ActionTrail:ApiCall |
Console operation event | ess:ActionTrail:ConsoleOperation |
Scaling group scale-in activity failed | ess:CloudMonitor:AUTOSCALING[SCALEINERROR] |
Scaling group scale-in activity started | ess:CloudMonitor:AUTOSCALING[SCALEINSTART] |
Scaling group scale-in activity successful | ess:CloudMonitor:AUTOSCALING[SCALEINSUCCESS] |
Scaling group scale-in activity partially successful | ess:CloudMonitor:AUTOSCALING[SCALEINWARN] |
Scaling group scale-out activity failed | ess:CloudMonitor:AUTOSCALING[SCALEOUTERROR] |
Scaling group scale-out activity started | ess:CloudMonitor:AUTOSCALING[SCALEOUTSTART] |
Scaling group scale-out activity successful | ess:CloudMonitor:AUTOSCALING[SCALEOUTSUCCESS] |
Scaling group scale-out activity partially successful | ess:CloudMonitor:AUTOSCALING[SCALEOUTWARN] |
Scaling group activity execution rejected | ess:CloudMonitor:AUTOSCALING[SCALEREJECT] |
Scheduled task expiration reminder | ess:CloudMonitor:AUTOSCALING[SCHEDULETASKEXPIRING] |
Resource change delivery | ess:Config:ConfigurationItemChangeNotification |
Non-compliance notification for resource evaluation | ess:Config:NonCompliantNotification |
For more information about the parameters defined in the CloudEvents specification, see Overview.
Scale-in activity failed
The following is a sample event that EventBridge receives when a scale-in activity fails.
{
"id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
"source": "acs.ess",
"specversion": "1.0",
"subject": "arn:acs:ess:cn-hangzhou:123456789xxxxxxx:scalinggroup/asg-xxxxx",
"time": "2020-11-19T21:04:41Z",
"type": "ess:ScalingActivity:ScaleInError",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2020-11-19T21:04:42Z",
"aliyuneventbusname": "default",
"aliyunregionid": "cn-hangzhou",
"aliyunpublishaddr": "172.25.XX.XX",
"data": {
"cause": "A user changed the Desired Capacity, changing the Total Capacity from \"1\" to \"0\".",
"description": "Fail to remove Instances \"i-xxx\" (code:\"LifecycleActionResult.Abandon\", msg:\"Abandon lifecycleActionResult parameter caused the instance to rollback.\").",
"startTime": "2022-09-06T06:29:23.000Z",
"endTime": "2022-09-06T06:30:10.000Z",
"expectNum": 1,
"requestId": "WOSQ2zMxNTcZOoH1bu****",
"scalingActivityId": "asa-xxx",
"totalCapacity": 1
}
}The parameters in the data field are described in the following table.
Parameter | Type | Example | Description |
cause | String | | The reason why the scaling activity was triggered. |
description | String | Fail to remove Instances \"i-xxx\" (code:\"LifecycleActionResult.Abandon\", msg:\"Abandon lifecycleActionResult parameter caused the instance to rollback.\")." | The description of the scaling activity. |
startTime | String | 2022-09-06T06:29:23.000Z | The start time of the scaling activity. |
endTime | String | 2022-09-06T06:30:10.000Z | The end time of the scaling activity. |
expectNum | Int | 1 | The expected capacity value for a scale-out scaling activity. |
requestId | String | WOSQ2zMxNTcZOoH1b**** | The request ID. |
scalingActivityId | String | asa-xxx | The ID of the scaling activity. |
totalCapacity | String | 1 | The capacity of the group after the scaling activity is complete. |
Scale-in activity partially successful
The following is a sample event that EventBridge receives when a scale-in activity is partially successful.
{
"id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
"source": "acs.ess",
"specversion": "1.0",
"subject": "arn:acs:ess:cn-hangzhou:123456789xxxxxxx:scalinggroup/asg-xxxxx",
"time": "2020-11-19T21:04:41Z",
"type": "ess:ScalingActivity:ScaleInPartialSuccess",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2020-11-19T21:04:42Z",
"aliyuneventbusname": "default",
"aliyunregionid": "cn-hangzhou",
"aliyunpublishaddr": "172.25.XX.XX",
"data": {
"cause": "A user changed the Desired Capacity, changing the Total Capacity from \"2\" to \"0\".",
"description": "\"1\" ECS instances are removed",
"startTime": "2022-09-06T06:29:23.000Z",
"endTime": "2022-09-06T06:30:10.000Z",
"expectNum": 1,
"instanceIds": [
"i-xxx"
],
"requestId": "WOSQ2zMxNTcZOoH1bu****",
"scalingActivityId": "asa-xxx",
"totalCapacity": 1
}
}The parameters in the data field are described in the following table.
Parameter | Type | Example | Description |
cause | String | | The reason why the scaling activity was triggered. |
description | String | Fail to remove Instances \"i-xxx\" (code:\"LifecycleActionResult.Abandon\", msg:\"Abandon lifecycleActionResult parameter caused the instance to rollback.\")." | The description of the scaling activity. |
startTime | String | 2022-09-06T06:29:23.000Z | The start time of the scaling activity. |
endTime | String | 2022-09-06T06:30:10.000Z | The end time of the scaling activity. |
expectNum | Int | 1 | Specifies the expected capacity value for the scale-out. |
requestId | String | WOSQ2zMxNTcZOoH1bu**** | The request ID. |
scalingActivityId | String | asa-xxx | The ID of the scaling activity. |
instanceIds | Array | i-xxx | A list of instance IDs that were removed. |
totalCapacity | Int | 1 | The capacity of the group after the scaling activity is complete. |
Scale-in activity successful
The following is a sample event that EventBridge receives when a scale-in activity is successful.
{
"id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
"source": "acs.ess",
"specversion": "1.0",
"subject": "arn:acs:ess:cn-hangzhou:123456789xxxxxxx:scalinggroup/asg-xxxxx",
"time": "2020-11-19T21:04:41Z",
"type": "ess:ScalingActivity:ScaleInSuccess",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2020-11-19T21:04:42Z",
"aliyuneventbusname": "default",
"aliyunregionid": "cn-hangzhou",
"aliyunpublishaddr": "172.25.XX.XX",
"data": {
"cause": "A user changed the Desired Capacity, changing the Total Capacity from \"1\" to \"0\".",
"description": "\"1\" ECS instances are removed",
"startTime": "2022-09-06T06:29:23.000Z",
"endTime": "2022-09-06T06:30:10.000Z",
"expectNum": 1,
"instanceIds": [
"i-xxx"
],
"requestId": "WOSQ2zMxNTcZOoH1bu****",
"scalingActivityId": "asa-xxx",
"totalCapacity": 0
}
}For descriptions of the parameters in the data field, see Parameter descriptions.
Scale-out activity failed
The following is a sample event that EventBridge receives when a scale-out activity fails.
{
"id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
"source": "acs.ess",
"specversion": "1.0",
"subject": "arn:acs:ess:cn-hangzhou:123456789xxxxxxx:scalinggroup/asg-xxxxx",
"time": "2020-11-19T21:04:41Z",
"type": "ess:ScalingActivity:ScaleOutError",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2020-11-19T21:04:42Z",
"aliyuneventbusname": "default",
"aliyunregionid": "cn-hangzhou",
"aliyunpublishaddr": "172.25.XX.XX",
"data": {
"cause": "A user changed the Desired Capacity, changing the Total Capacity from \"0\" to \"1\".",
"description": "Fail to create Instances into scaling group(code:\"LifecycleActionResult.Abandon\", msg:\"Abandon lifecycleActionResult parameter caused the instance to rollback.\").",
"startTime": "2022-09-06T06:29:23.000Z",
"endTime": "2022-09-06T06:30:10.000Z",
"expectNum": 1,
"requestId": "WOSQ2zMxNTcZOoH1bu****",
"scalingActivityId": "asa-xxx",
"totalCapacity": 0
}
}For descriptions of the parameters in the data field, see Parameter descriptions.
Scale-out activity partially successful
The following is a sample event that EventBridge receives when a scale-out activity is partially successful.
{
"id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
"source": "acs.ess",
"specversion": "1.0",
"subject": "arn:acs:ess:cn-hangzhou:123456789xxxxxxx:scalinggroup/asg-xxxxx",
"time": "2020-11-19T21:04:41Z",
"type": "ess:ScalingActivity:ScaleOutPartialSuccess",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2020-11-19T21:04:42Z",
"aliyuneventbusname": "default",
"aliyunregionid": "cn-hangzhou",
"aliyunpublishaddr": "172.25.XX.XX",
"data": {
"cause": "A user changed the Desired Capacity, changing the Total Capacity from \"0\" to \"2\".",
"description": "\"1\" ECS instances are added",
"startTime": "2022-09-06T06:29:23.000Z",
"endTime": "2022-09-06T06:30:10.000Z",
"expectNum": 2,
"instanceIds": [
"i-xxx"
],
"requestId": "WOSQ2zMxNTcZOoH1bu****",
"scalingActivityId": "asa-xxx",
"totalCapacity": 1
}
}For descriptions of the parameters in the data field, see Parameter descriptions.
Scale-out activity successful
The following is a sample event that EventBridge receives when a scale-out activity is successful.
{
"id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
"source": "acs.ess",
"specversion": "1.0",
"subject": "arn:acs:ess:cn-hangzhou:123456789xxxxxxx:scalinggroup/asg-xxxxx",
"time": "2020-11-19T21:04:41Z",
"type": "ess:ScalingActivity:ScaleOutSuccess",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2020-11-19T21:04:42Z",
"aliyuneventbusname": "default",
"aliyunregionid": "cn-hangzhou",
"aliyunpublishaddr": "172.25.XX.XX",
"data": {
"cause": "A user changed the Desired Capacity, changing the Total Capacity from \"0\" to \"1\".",
"description": "\"1\" ECS instances are added",
"startTime": "2022-09-06T06:29:23.000Z",
"endTime": "2022-09-06T06:30:10.000Z",
"expectNum": 1,
"instanceIds": [
"i-xxx"
],
"requestId": "WOSQ2zMxNTcZOoH1bu****",
"scalingActivityId": "asa-xxx",
"totalCapacity": 1
}
}For descriptions of the parameters in the data field, see Parameter descriptions.
Scale-in lifecycle hook
The following is a sample event that EventBridge receives for a scale-in lifecycle hook.
{
"id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
"source": "acs.ess",
"specversion": "1.0",
"subject": "arn:acs:ess:cn-hangzhou:123456789xxxxxxx:scalinggroup/asg-xxxxx",
"time": "2023-05-19T21:04:41Z",
"type": "ess:LifecycleHook:ScaleIn",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2023-05-19T21:04:42Z",
"aliyuneventbusname": "default",
"aliyunregionid": "cn-hangzhou",
"aliyunpublishaddr": "172.25.XX.XX",
"data": {
"instanceIds": [
"i-xxx"
],
"lifecycleHookId": "ash-xxx",
"lifecycleActionToken": "XXXX",
"scalingGroupId": "asg-xxx",
"scalingActivityId": "asa-xxx",
"notificationMetadata": "lifecycleHook metadata example",
"defaultResult": "CONTINUE"
}
}The parameters in the data field are described in the following table.
Parameter | Type | Example | Description |
instanceIds | Array | [ "i-xxx" ] | A list of IDs for the instances being removed. |
lifecycleHookId | String | ash-xxx | The ID of the lifecycle hook. |
lifecycleActionToken | String | XXXX | The identifier for the pending state of the scaling activity. |
scalingGroupId | String | asg-xxx | The ID of the scaling group. |
scalingActivityId | String | asa-xxx | The ID of the scaling activity. |
notificationMetadata | String | lifecycleHook metadata example | The notification information for the lifecycle hook. |
defaultResult | String | CONTINUE | The default result of the lifecycle hook. Valid values:
|
Scale-out lifecycle hook
The following is a sample event that EventBridge receives for a scale-out lifecycle hook.
{
"id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
"source": "acs.ess",
"specversion": "1.0",
"subject": "arn:acs:ess:cn-hangzhou:123456789xxxxxxx:scalinggroup/asg-xxxxx",
"time": "2023-05-19T21:04:41Z",
"type": "ess:LifecycleHook:ScaleOut",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2023-05-19T21:04:42Z",
"aliyuneventbusname": "default",
"aliyunregionid": "cn-hangzhou",
"aliyunpublishaddr": "172.25.XX.XX",
"data": {
"instanceIds": [
"i-xxx"
],
"lifecycleHookId": "ash-xxx",
"lifecycleActionToken": "XXXX",
"scalingGroupId": "asg-xxx",
"scalingActivityId": "asa-xxx",
"notificationMetadata": "lifecycleHook metadata example",
"defaultResult": "CONTINUE"
}
}For descriptions of the parameters in the data field, see Parameter descriptions.
EventBridge lifecycle hook test event
The following is a sample event that EventBridge receives when an EventBridge lifecycle hook test event is pushed.
{
"id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
"source": "acs.ess",
"specversion": "1.0",
"subject": "arn:acs:ess:cn-hangzhou:123456789xxxxxxx:scalinggroup/asg-xxxxx",
"time": "2023-05-19T21:04:41Z",
"type": "ess:LifecycleHook:Test",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2023-05-19T21:04:42Z",
"aliyuneventbusname": "default",
"aliyunregionid": "cn-hangzhou",
"aliyunpublishaddr": "172.25.XX.XX",
"data": {
"scalingGroupId": "asg-xxx"
}
}For descriptions of the parameters in the data field, see Parameter descriptions.
Scale-in activity started
The following is a sample event that EventBridge receives when a scale-in activity starts.
{
"id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
"source": "acs.ess",
"specversion": "1.0",
"subject": "arn:acs:ess:cn-hangzhou:123456789xxxxxxx:scalinggroup/asg-xxxxx",
"time": "2020-11-19T21:04:41Z",
"type": "ess:ScalingActivity:ScaleInStart",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2020-11-19T21:04:42Z",
"aliyuneventbusname": "default",
"aliyunregionid": "cn-hangzhou",
"aliyunpublishaddr": "172.25.XX.XX",
"data": {
"cause": "A user changed the Desired Capacity, changing the Total Capacity from \"1\" to \"0\".",
"description": "\"1\" ECS instances are removed",
"startTime": "2022-09-06T06:29:23.000Z",
"expectNum": 1,
"requestId": "WOSQ2zMxNTcZOoH1bu****",
"scalingActivityId": "asa-xxx",
"totalCapacity": 1
}
}The parameters in the data field are described in the following table.
Parameter | Type | Example value | Description |
cause | string | A user changed the Desired Capacity, changing the Total Capacity from \"1\" to \"0\". | The reason why the scaling activity was triggered. |
description | string | \"1\" ECS instances are removed" | The description of the scaling activity. |
startTime | string | 2022-09-06T06:29:23.000Z | The start time of the scaling activity. |
expectNum | Int | 1 | The expected capacity to be removed by the scaling activity. |
requestId | string | WOSQ2zMxNTcZOoH1bu**** | The request ID of the scaling activity. |
scalingActivityId | string | asa-xxx | The ID of the scaling activity. |
totalCapacity | Int | 1 | The capacity of the group after the scaling activity is complete. |
Scale-out activity started
The following is a sample event that EventBridge receives when a scale-out activity starts.
{
"id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
"source": "acs.ess",
"specversion": "1.0",
"subject": "arn:acs:ess:cn-hangzhou:123456789xxxxxxx:scalinggroup/asg-xxxxx",
"time": "2020-11-19T21:04:41Z",
"type": "ess:ScalingActivity:ScaleOutStart",
"aliyunaccountid": "123456789098****",
"aliyunpublishtime": "2020-11-19T21:04:42Z",
"aliyuneventbusname": "default",
"aliyunregionid": "cn-hangzhou",
"aliyunpublishaddr": "172.25.XX.XX",
"data": {
"cause": "A user changed the Desired Capacity, changing the Total Capacity from \"0\" to \"2\".",
"description": "\"1\" ECS instances are added",
"startTime": "2022-09-06T06:29:23.000Z",
"expectNum": 2,
"requestId": "WOSQ2zMxNTcZOoH1bu****",
"scalingActivityId": "asa-xxx",
"totalCapacity": 1
}
}For descriptions of the parameters in the data field, see Parameter descriptions.