public static final class CreateLifecycleHookRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
CreateLifecycleHookRequest |
build() |
CreateLifecycleHookRequest.Builder |
defaultResult(String defaultResult)
The action that you want Auto Scaling to perform after the lifecycle hook times out.
|
CreateLifecycleHookRequest.Builder |
heartbeatTimeout(Integer heartbeatTimeout)
The period of time before the lifecycle hook times out.
|
CreateLifecycleHookRequest.Builder |
lifecycleHookName(String lifecycleHookName)
The name of the lifecycle hook.
|
CreateLifecycleHookRequest.Builder |
lifecycleTransition(String lifecycleTransition)
The type of the scaling activity to which the lifecycle hook applies.
|
CreateLifecycleHookRequest.Builder |
notificationArn(String notificationArn)
The Alibaba Cloud Resource Name (ARN) of the notification method that is used by Auto Scaling to send notifications when the lifecycle hook takes effect.
|
CreateLifecycleHookRequest.Builder |
notificationMetadata(String notificationMetadata)
The notification metadata that is sent when the lifecycle hook takes effect.
|
CreateLifecycleHookRequest.Builder |
ownerAccount(String ownerAccount)
OwnerAccount.
|
CreateLifecycleHookRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
CreateLifecycleHookRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
CreateLifecycleHookRequest.Builder |
scalingGroupId(String scalingGroupId)
The ID of the scaling group.
|
public CreateLifecycleHookRequest.Builder defaultResult(String defaultResult)
* CONTINUE: Auto Scaling continues to respond to scale-in or scale-out requests. * ABANDON: Auto Scaling releases Elastic Compute Service (ECS) instances that are created during scale-out activities, or removes ECS instances from the scaling group during scale-in activities. If multiple lifecycle hooks in a scaling group are triggered during scale-in activities and you set the DefaultResult parameter to ABANDON for one of the lifecycle hooks, Auto Scaling immediately performs the action after the lifecycle hook whose DefaultResult is set to ABANDON times out. As a result, other lifecycle hooks time out ahead of schedule. In other cases, Auto Scaling performs the action only after all lifecycle hooks time out. Default value: CONTINUE.
public CreateLifecycleHookRequest.Builder heartbeatTimeout(Integer heartbeatTimeout)
After you create a lifecycle hook, you can call the RecordLifecycleActionHeartbeat operation to prolong the timeout period of the lifecycle hook. You can also call the CompleteLifecycleAction operation to end the timeout period of the lifecycle hook ahead of schedule. Default value: 600.
public CreateLifecycleHookRequest.Builder lifecycleHookName(String lifecycleHookName)
If you do not specify this parameter, the value of the LifecycleHookId parameter is used.
public CreateLifecycleHookRequest.Builder lifecycleTransition(String lifecycleTransition)
* SCALE_OUT * SCALE_IN
public CreateLifecycleHookRequest.Builder notificationArn(String notificationArn)
* If you use a Message Service (MNS) queue as the notification method, specify the value in the acs:mns:{region-id}:{account-id}:queue/{queuename} format. * If you use an MNS topic as the notification method, specify the value in the acs:mns:{region-id}:{account-id}:topic/{topicname} format. * If you use an OOS template as the notification method, specify the value in the acs:oos:{region-id}:{account-id}:template/{templatename} format. The variables in the preceding parameter formats have the following meanings: * region-id: the region ID of the scaling group. * account-id: the ID of the Alibaba Cloud account. The ID of the RAM user is not supported. * queuename: the name of the MNS queue. * topicname: the name of the MNS topic. * templatename: the name of the OOS template.
public CreateLifecycleHookRequest.Builder notificationMetadata(String notificationMetadata)
If you use the NotificationArn parameter to specify a public or customOOS template, the value of the NotificationMetadata parameter must be a JSON string that contains the OOS template parameters. For example, your OOS template includes the following parameters: `{"dbInstanceId": "dds-bp17661e0135****", "modifyMode": "Append"}`, `dbInstanceId`, and `modifyMode`. Some parameters defined in your OOS template have default values. When you specify the NotificationMetadata parameter, specify parameters that do not have default values. If you specify parameters that have default values, the default values are overwritten. However, the default values of the following parameters must be retained to obtain information about scaling activities that are in progress: * `regionId`: the region ID of the scaling activity that is in progress. Default value: ${regionId}. * `instanceIds`: the IDs of ECS instances that are scaled in in the scaling activity. Default value: ${instanceIds}. * `lifecycleHookId`: the ID of the lifecycle hook. Default value: ${lifecycleHookId}. * `lifecycleActionToken`: the token of the lifecycle action. You can use the token to end the timeout period of the lifecycle hook ahead of schedule. Default value: ${lifecycleActionToken} * `scalingGroupId`: the ID of the scaling group in which the scaling activity is executed. Default value: ${scalingGroupId}. > You can obtain template parameter information in the [OOS console](https://oos.console.aliyun.com/).
public CreateLifecycleHookRequest.Builder ownerAccount(String ownerAccount)
public CreateLifecycleHookRequest.Builder ownerId(Long ownerId)
public CreateLifecycleHookRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public CreateLifecycleHookRequest.Builder scalingGroupId(String scalingGroupId)
public CreateLifecycleHookRequest build()
Copyright © 2024. All rights reserved.