Domain name for API request: as.tencentcloudapi.com.
This API (DescribeLifecycleHooks) is used to query the information of lifecycle hooks.
Filter
.Limit
and 20 by default) of lifecycle hooks of the current user will be returned.A maximum of 20 requests can be initiated per second for this API.
Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: as.ap-shanghai-fsi.tencentcloudapi.com
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common parameter. The value used for this API: DescribeLifecycleHooks. |
Version | Yes | String | Common parameter. The value used for this API: 2018-04-19. |
Region | Yes | String | Common parameter. For more information, please see the list of regions supported by the product. |
LifecycleHookIds.N | No | Array of String | Queries by one or more lifecycle hook IDs in the format of ash-8azjzxcl . The maximum quantity per request is 100. This parameter does not support specifying both LifecycleHookIds and Filters at the same time. |
Filters.N | No | Array of Filter | Filter. Filter. The maximum number of Filters per request is 10. The upper limit for Filter.Values is 5. This parameter does not support specifying both LifecycleHookIds and Filters at the same time. |
Limit | No | Integer | Number of returned results. Default value: 20. Maximum value: 100. For more information on Limit , see the relevant section in the API overview. |
Offset | No | Integer | Offset. Default value: 0. For more information on Offset , see the relevant section in the API overview. |
Parameter Name | Type | Description |
---|---|---|
LifecycleHookSet | Array of LifecycleHook | Array of lifecycle hooks |
TotalCount | Integer | Total quantity |
RequestId | String | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
https://as.tencentcloudapi.com/?Action=DescribeLifecycleHooks
&<Common Request Parameter>
{
"Response": {
"TotalCount": 4,
"LifecycleHookSet": [
{
"LifecycleHookName": "terminate-topic",
"LifecycleTransitionType": "NORMAL",
"AutoScalingGroupId": "asg-8fbozqja",
"HeartbeatTimeout": 120,
"NotificationMetadata": "topic",
"NotificationTarget": {
"TargetType": "CMQ_TOPIC",
"TopicName": "one-topic",
"QueueName": ""
},
"CreatedTime": "2019-04-19T02:59:30Z",
"DefaultResult": "ABANDON",
"LifecycleHookId": "ash-oq76wsrx",
"LifecycleTransition": "INSTANCE_TERMINATING"
},
{
"LifecycleHookName": "launch-queue",
"LifecycleTransitionType": "NORMAL",
"AutoScalingGroupId": "asg-8fbozqja",
"HeartbeatTimeout": 120,
"NotificationMetadata": "queue",
"NotificationTarget": {
"TargetType": "CMQ_QUEUE",
"TopicName": "",
"QueueName": "one-queue"
},
"CreatedTime": "2019-04-19T02:57:14Z",
"DefaultResult": "CONTINUE",
"LifecycleHookId": "ash-fbjiexz7",
"LifecycleTransition": "INSTANCE_LAUNCHING"
},
{
"LifecycleHookName": "one-hook",
"LifecycleTransitionType": "NORMAL",
"AutoScalingGroupId": "asg-8fbozqja",
"HeartbeatTimeout": 360,
"NotificationMetadata": "",
"NotificationTarget": {
"TargetType": "",
"TopicName": "",
"QueueName": ""
},
"CreatedTime": "2019-04-19T02:56:02Z",
"DefaultResult": "CONTINUE",
"LifecycleHookId": "ash-heyubibl",
"LifecycleTransition": "INSTANCE_LAUNCHING"
},
{
"LifecycleHookName": "one-hook-default",
"LifecycleTransitionType": "NORMAL",
"AutoScalingGroupId": "asg-8fbozqja",
"HeartbeatTimeout": 300,
"NotificationMetadata": "",
"NotificationTarget": {
"TargetType": "",
"TopicName": "",
"QueueName": ""
},
"CreatedTime": "2019-04-19T02:51:24Z",
"DefaultResult": "CONTINUE",
"LifecycleHookId": "ash-8azjzxj9",
"LifecycleTransition": "INSTANCE_LAUNCHING"
}
],
"RequestId": "dff07f6e-bdbc-4532-baeb-e7fb3aebe248"
}
}
https://as.tencentcloudapi.com/?Action=DescribeLifecycleHooks
&Filters.0.Name=lifecycle-hook-id
&Filters.0.Values.0=ash-oq76wsrx
&Filters.0.Values.1=ash-fbjiexz7
&Filters.1.Name=auto-scaling-group-id
&Filters.1.Values.0=asg-8fbozqja
&<Common Request Parameter>
{
"Response": {
"TotalCount": 2,
"LifecycleHookSet": [
{
"LifecycleHookName": "terminate-topic",
"LifecycleTransitionType": "NORMAL",
"AutoScalingGroupId": "asg-8fbozqja",
"HeartbeatTimeout": 120,
"NotificationMetadata": "topic",
"NotificationTarget": {
"TargetType": "CMQ_TOPIC",
"TopicName": "one-topic",
"QueueName": ""
},
"CreatedTime": "2019-04-19T02:59:30Z",
"DefaultResult": "ABANDON",
"LifecycleHookId": "ash-oq76wsrx",
"LifecycleTransition": "INSTANCE_TERMINATING"
},
{
"LifecycleHookName": "launch-queue",
"LifecycleTransitionType": "NORMAL",
"AutoScalingGroupId": "asg-8fbozqja",
"HeartbeatTimeout": 120,
"NotificationMetadata": "queue",
"NotificationTarget": {
"TargetType": "CMQ_QUEUE",
"TopicName": "",
"QueueName": "one-queue"
},
"CreatedTime": "2019-04-19T02:57:14Z",
"DefaultResult": "CONTINUE",
"LifecycleHookId": "ash-fbjiexz7",
"LifecycleTransition": "INSTANCE_LAUNCHING"
}
],
"RequestId": "2d774a6c-bcaa-4805-b0cd-bd64519e2538"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
InternalError | An internal error occurred. |
InvalidParameter | Invalid parameter. |
InvalidParameter.Conflict | Multiple parameters specified conflict and cannot co-exist. |
InvalidParameterValue.InvalidAutoScalingGroupId | Invalid scaling group ID. |
InvalidParameterValue.InvalidFilter | Invalid filter condition. |
InvalidParameterValue.InvalidLifecycleHookId | Invalid lifecycle hook ID. |
MissingParameter | Parameter missing. |
Was this page helpful?