All Products
Search
Document Center

Auto Scaling:RecordLifecycleActionHeartbeat

Last Updated:Aug 28, 2026

Extends the time window during which an Elastic Compute Service (ECS) instance stays in the Pending state after a lifecycle hook is triggered. If the current time window is not long enough for you to complete custom operations, call this operation and specify lifecycleHookId, lifecycleActionToken, and heartbeatTimeout to extend it.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ess:RecordLifecycleActionHeartbeat

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

lifecycleHookId

string

Yes

The ID of the lifecycle hook.

ash-bp1fxuqyi98w0aib****

lifecycleActionToken

string

Yes

The action token of the lifecycle hook. You can obtain the token from the details page of the Simple Message Queue (SMQ, formerly MNS) queue specified for the lifecycle hook.

You can also call the DescribeLifecycleActions operation to obtain this token.

If you specified an SMQ topic for the lifecycle hook, you can also obtain the token from the SMQ topic.

F324B880-900E-4968-85DD-81691113****

heartbeatTimeout

integer

No

The time window during which the ECS instance stays in the Pending state. When the time window ends, Auto Scaling performs the default action. Valid values: 30 to 21600. Unit: seconds.

You can call this operation to extend the Pending-state time window after creating a lifecycle hook. You can also call the CompleteLifecycleAction operation to end the Pending state ahead of schedule.

Default value: 600.

600

RegionId

string

No

The region ID of the scaling group.

cn-hangzhou

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Examples

Success response

JSON format

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.