Auto Scaling events

更新时间:
复制 MD 格式

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

Scale-in activity failed

ess:ScalingActivity:ScaleInError

Scale-in activity partially successful

ess:ScalingActivity:ScaleInPartialSuccess

Scale-in activity successful

ess:ScalingActivity:ScaleInSuccess

Scale-out activity failed

ess:ScalingActivity:ScaleOutError

Scale-out activity partially successful

ess:ScalingActivity:ScaleOutPartialSuccess

Scale-out activity successful

ess:ScalingActivity:ScaleOutSuccess

Scale-in lifecycle hook

ess:LifecycleHook:ScaleIn

Scale-out lifecycle hook

ess:LifecycleHook:ScaleOut

EventBridge lifecycle hook test event

ess:LifecycleHook:Test

Scale-in activity started

ess:ScalingActivity:ScaleInStart

Scale-out activity started

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

A user changed the Desired Capacity, changing the Total Capacity from \"1\" to \"0\"."

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

A user changed the Desired Capacity, changing the Total Capacity from \"1\" to \"0\"."

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:

  • CONTINUE: Continues the response to the scale-out or scale-in activity.

  • ABANDON: Directly releases the ECS instances created during a scale-out activity, or directly removes the ECS instances from the scaling group during a scale-in activity.

  • ROLLBACK: For a scale-in activity, this rejects the release of the ECS instances and performs a rollback. For a scale-out activity, this directly releases the created ECS instances, which has the same effect as ABANDON.

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.