查询一个或多个满足指定条件的生命周期挂钩列表(DescribeLifecycleHooks)。
描述
您可以通过以下三种方式查询生命周期挂钩:
指定一个生命周期挂钩 ID 列表(LifecycleHookIds.N),此时将忽略 ScalingGroupId 和 LifecycleHookName 参数。
指定伸缩组 ID(ScalingGroupId)。
同时指定伸缩组 ID(ScalingGroupId)和生命周期挂钩名称(LifecycleHookName)。
请求参数
返回参数
LifecycleHookModelSet
示例
请求示例
- http://ess.aliyuncs.com/?Action=DescribeLifecycleHooks
- &ScalingGroupId=asg-xxxxx
- &<公共请求参数>
返回示例
XML 格式
- <DescribeLifecycleHooksResponse>
- <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
- <PageNumber>1</PageNumber>
- <PageSize>50</PageSize>
- <TotalCount>1</TotalCount>
- <LifecycleHooks>
- <LifecycleHook>
- <ScalingGroupId>asg-xxx</ScalingGroupId>
- <LifecycleHookId>ash-xxx</LifecycleHookId>
- <LifecycleHookName>Test</LifecycleHookName>
- <DefaultResult>CONTINUE</DefaultResult>
- <HeartbeatTimeout>60</HeartbeatTimeout>
- <LifecycleTransition>SCALE_OUT</LifecycleTransition>
- <NotificationMetadata>Test</NotificationMetadata>
- <NotificationArn>acs:ess:cn-hangzhou:1111111111:queue/queue1</NotificationArn>
- </LifecycleHook>
- </LifecycleHooks>
- </DescribeLifecycleHooksResponse>
JSON 格式
- {
- "lifecycleHooks": [
- {
- "defaultResult": "CONTINUE",
- "heartbeatTimeout": 600,
- "lifecycleHookId": "ash-xxx",
- "lifecycleHookName": "Test",
- "lifecycleTransition": "SCALE_OUT",
- "notificationArn": "acs:ess:cn-hangzhou:1111111111:queue/queue1",
- "notificationMetadata": "Test",
- "scalingGroupId": "asg-xxx"
- }
- ],
- "pageNumber": 1,
- "pageSize": 50,
- "requestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
- "totalCount": 1
- }
错误码
以下为本接口特有的错误码。更多错误码,请访问
API 错误中心。