CreateLifecycleHook

Last Updated At: 2026-08-03 00:05:14

1. Interface Description

Interface request domain name: as.api3.convergecloud.com.

This API is used to create a lifecycle hook.

  • You can configure message notifications for the lifecycle hook, and Auto Scaling will notify TDMQ for CMQ. Notification content format:

{

    "Service": "Cloud Platform Auto Scaling",

    "Time": "2019-03-14T10:15:11Z",

    "AppId": "1251783334",

    "ActivityId": "asa-fznnvrja",

    "AutoScalingGroupId": "asg-rrrrtttt",

    "LifecycleHookId": "ash-xxxxyyyy",

    "LifecycleHookName": "my-hook",

    "LifecycleActionToken": "3080e1c9-0efe-4dd7-ad3b-90cd6618298f",

    "InstanceId": "ins-aaaabbbb",

    "LifecycleTransition": "INSTANCE_LAUNCHING",

    "NotificationMetadata": ""

}

Default interface request rate limit: 20 times per second.

Interface update time: 2019-10-31 18:27:50.

The interface only verifies the signature but does not authenticate.

2. Input Parameters

The following list of request parameters only lists interface request parameters and some public parameters, For a complete list of public parameters see public request parameters.

Parameter name Required Allow NULL Type Description
Action Yes No String Public parameter, The value of this interface: CreateLifecycleHook
Version Yes No String Public parameter, The value of this interface: 2018-04-19
Region No No String Public parameter,Regional information A list of supported geographies is available through the DescribeRegions interface
AutoScalingGroupId Yes No String ID of the scaling group.
Example: asg-8fbozqja
DefaultResult No No String The action that is taken when the lifecycle hook of the scaling group times out. Valid values: CONTINUE and ABANDON. Default value: CONTINUE.
Example: CONTINUE
HeartbeatTimeout No No Int64 Timeout period of the lifecycle hook. Unit: seconds. Valid values: 30 to 3600. Default value: 300.
Example: 300
LifecycleHookName Yes No String Name of the lifecycle hook. The name can contain only letters, digits, underscores (_), hyphens (-), and decimal points (.) and must be up to 128 bytes in length,
Example: one-hook-default
LifecycleTransition Yes No String Scenario where the lifecycle hook is used. Valid values: INSTANCE_LAUNCHING and INSTANCE_TERMINATING.
Example: INSTANCE_LAUNCHING
NotificationMetadata No No String Additional information that Auto Scaling sends to the notification target. By default, this parameter is left empty. The maximum length cannot exceed 1,024 bytes.
Example: ""
NotificationTarget No No NotificationTarget Notification target
Example:View

3. Output Parameters

Parameter name Type Description
LifecycleHookId String Lifecycle hook ID.
Example: ash-8azjzxj9
RequestId String Unique request id, Each request will return. The RequestId of the request needs to be provided when locating the problem.

4. Error Code

The following lists only the error codes related to the interface business logic, For other error codes, see public ErrorCode.

Error Code Description
InvalidParameterValue.LifecycleHookNameDuplicated The lifecycle hook name already exists.
InvalidParameter.Conflict Multiple parameters specified conflict and cannot co-exist.
InvalidParameter Parameter error.
MissingParameter Parameter missing.
InvalidParameterValue.Filter Invalid filter.
InternalError Internal error.
InvalidParameterValue The parameter value is invalid.
InternalError.CallTDMQError TDMQ interface call failed.
ResourceNotFound.ResourceNotFoundTDMQPulsarTopicNotFound TDMQ-Pulsar theme does not exist.