弹性伸缩 AS-创建生命周期挂钩:请求示例

时间:2023-11-01 16:21:46

请求示例

创建一个名称为test-hook1的生命周期挂钩,伸缩组ID为e5d27f5c-dd76-4a61-b4bc-a67c5686719a,回调操作为ABANDON,超时时间为3600秒, 消息通知 topic_urn为urn:smn:regionId:b53e5554fad0494d96206fb84296510b:gsh,挂钩类型为在实例启动时挂起实例。

POST https://{Endpoint}/autoscaling-api/v1/{project_id}/scaling_lifecycle_hook/e5d27f5c-dd76-4a61-b4bc-a67c5686719a{    "lifecycle_hook_name": "test-hook1",    "default_result": "ABANDON",    "default_timeout": 3600,    "notification_topic_urn": "urn:smn:regionId:b53e5554fad0494d96206fb84296510b:gsh",    "lifecycle_hook_type": "INSTANCE_LAUNCHING"}
support.huaweicloud.com/api-as/as_06_0901.html