| Package | Description | 
|---|---|
| com.tencentcloudapi.as.v20180419 | |
| com.tencentcloudapi.as.v20180419.models | 
| Modifier and Type | Method and Description | 
|---|---|
| CreateLifecycleHookResponse | AsClient. CreateLifecycleHook(CreateLifecycleHookRequest req)本接口(CreateLifecycleHook)用于创建生命周期挂钩。
 您可以为生命周期挂钩配置消息通知或执行自动化助手命令。
如果您配置了通知消息,弹性伸缩会通知您的TDMQ消息队列,通知内容形如:
```
{
        "Service": "Tencent Cloud Auto Scaling",
        "Time": "2019-03-14T10:15:11Z",
        "AppId": "1251783334",
        "ActivityId": "asa-fznnvrja",
        "AutoScalingGroupId": "asg-ft6y7u8n",
        "LifecycleHookId": "ash-p9i7y6t5",
        "LifecycleHookName": "my-hook",
        "LifecycleActionToken": "3080e1c9-0efe-4dd7-ad3b-90cd6618298f",
        "InstanceId": "ins-y6dr5e43",
        "LifecycleTransition": "INSTANCE_LAUNCHING",
        "NotificationMetadata": ""
}
``` | 
| Constructor and Description | 
|---|
| CreateLifecycleHookRequest(CreateLifecycleHookRequest source)NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
       and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. | 
Copyright © 2025. All rights reserved.