public class LifecycleHook extends AbstractModel
header, skipSign
Constructor and Description |
---|
LifecycleHook() |
LifecycleHook(LifecycleHook 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.
|
Modifier and Type | Method and Description |
---|---|
String |
getAutoScalingGroupId()
Get 伸缩组ID
|
String |
getCreatedTime()
Get 创建时间,采用 UTC 标准计时
|
String |
getDefaultResult()
Get 定义伸缩组在生命周期挂钩超时或 LifecycleCommand 执行失败时应采取的操作,取值范围如下:
- CONTINUE: 默认值,表示继续执行扩缩容活动
- ABANDON: 针对扩容挂钩,挂钩超时或 LifecycleCommand 执行失败的 CVM 实例会直接释放或移出;而针对缩容挂钩,会继续执行缩容活动
|
Long |
getHeartbeatTimeout()
Get 生命周期挂钩超时等待时间(以秒为单位),范围从 30 到 7200 秒。
|
LifecycleCommand |
getLifecycleCommand()
Get 远程命令执行对象
|
String |
getLifecycleHookId()
Get 生命周期挂钩ID
|
String |
getLifecycleHookName()
Get 生命周期挂钩名称
|
String |
getLifecycleTransition()
Get 生命周期挂钩场景,取值范围如下:
- INSTANCE_LAUNCHING: 扩容生命周期挂钩
- INSTANCE_TERMINATING: 缩容生命周期挂钩
|
String |
getLifecycleTransitionType()
Get 进行生命周期挂钩的场景类型,取值范围包括 NORMAL 和 EXTENSION,默认值为 NORMAL。
说明:设置为EXTENSION值,在AttachInstances、DetachInstances、RemoveInstances 接口时会触发生命周期挂钩操作,值为NORMAL则不会在这些接口中触发生命周期挂钩。
|
String |
getNotificationMetadata()
Get 通知目标的附加信息
|
NotificationTarget |
getNotificationTarget()
Get 通知目标
|
void |
setAutoScalingGroupId(String AutoScalingGroupId)
Set 伸缩组ID
|
void |
setCreatedTime(String CreatedTime)
Set 创建时间,采用 UTC 标准计时
|
void |
setDefaultResult(String DefaultResult)
Set 定义伸缩组在生命周期挂钩超时或 LifecycleCommand 执行失败时应采取的操作,取值范围如下:
- CONTINUE: 默认值,表示继续执行扩缩容活动
- ABANDON: 针对扩容挂钩,挂钩超时或 LifecycleCommand 执行失败的 CVM 实例会直接释放或移出;而针对缩容挂钩,会继续执行缩容活动
|
void |
setHeartbeatTimeout(Long HeartbeatTimeout)
Set 生命周期挂钩超时等待时间(以秒为单位),范围从 30 到 7200 秒。
|
void |
setLifecycleCommand(LifecycleCommand LifecycleCommand)
Set 远程命令执行对象
|
void |
setLifecycleHookId(String LifecycleHookId)
Set 生命周期挂钩ID
|
void |
setLifecycleHookName(String LifecycleHookName)
Set 生命周期挂钩名称
|
void |
setLifecycleTransition(String LifecycleTransition)
Set 生命周期挂钩场景,取值范围如下:
- INSTANCE_LAUNCHING: 扩容生命周期挂钩
- INSTANCE_TERMINATING: 缩容生命周期挂钩
|
void |
setLifecycleTransitionType(String LifecycleTransitionType)
Set 进行生命周期挂钩的场景类型,取值范围包括 NORMAL 和 EXTENSION,默认值为 NORMAL。
说明:设置为EXTENSION值,在AttachInstances、DetachInstances、RemoveInstances 接口时会触发生命周期挂钩操作,值为NORMAL则不会在这些接口中触发生命周期挂钩。
|
void |
setNotificationMetadata(String NotificationMetadata)
Set 通知目标的附加信息
|
void |
setNotificationTarget(NotificationTarget NotificationTarget)
Set 通知目标
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, isStream, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
public LifecycleHook()
public LifecycleHook(LifecycleHook source)
public String getLifecycleHookId()
public void setLifecycleHookId(String LifecycleHookId)
LifecycleHookId
- 生命周期挂钩IDpublic String getLifecycleHookName()
public void setLifecycleHookName(String LifecycleHookName)
LifecycleHookName
- 生命周期挂钩名称public String getAutoScalingGroupId()
public void setAutoScalingGroupId(String AutoScalingGroupId)
AutoScalingGroupId
- 伸缩组IDpublic String getDefaultResult()
public void setDefaultResult(String DefaultResult)
DefaultResult
- 定义伸缩组在生命周期挂钩超时或 LifecycleCommand 执行失败时应采取的操作,取值范围如下:
- CONTINUE: 默认值,表示继续执行扩缩容活动
- ABANDON: 针对扩容挂钩,挂钩超时或 LifecycleCommand 执行失败的 CVM 实例会直接释放或移出;而针对缩容挂钩,会继续执行缩容活动public Long getHeartbeatTimeout()
public void setHeartbeatTimeout(Long HeartbeatTimeout)
HeartbeatTimeout
- 生命周期挂钩超时等待时间(以秒为单位),范围从 30 到 7200 秒。public String getLifecycleTransition()
public void setLifecycleTransition(String LifecycleTransition)
LifecycleTransition
- 生命周期挂钩场景,取值范围如下:
- INSTANCE_LAUNCHING: 扩容生命周期挂钩
- INSTANCE_TERMINATING: 缩容生命周期挂钩public String getNotificationMetadata()
public void setNotificationMetadata(String NotificationMetadata)
NotificationMetadata
- 通知目标的附加信息public String getCreatedTime()
public void setCreatedTime(String CreatedTime)
CreatedTime
- 创建时间,采用 UTC 标准计时public NotificationTarget getNotificationTarget()
public void setNotificationTarget(NotificationTarget NotificationTarget)
NotificationTarget
- 通知目标public String getLifecycleTransitionType()
public void setLifecycleTransitionType(String LifecycleTransitionType)
LifecycleTransitionType
- 进行生命周期挂钩的场景类型,取值范围包括 NORMAL 和 EXTENSION,默认值为 NORMAL。
说明:设置为EXTENSION值,在AttachInstances、DetachInstances、RemoveInstances 接口时会触发生命周期挂钩操作,值为NORMAL则不会在这些接口中触发生命周期挂钩。public LifecycleCommand getLifecycleCommand()
public void setLifecycleCommand(LifecycleCommand LifecycleCommand)
LifecycleCommand
- 远程命令执行对象Copyright © 2025. All rights reserved.