List of usage examples for com.amazonaws.services.autoscaling.model CompleteLifecycleActionRequest setLifecycleHookName
public void setLifecycleHookName(String lifecycleHookName)
The name of the lifecycle hook.
From source file:com.pinterest.arcee.autoscaling.AwsAutoScaleGroupManager.java
License:Apache License
@Override public void completeLifecycleAction(String hookId, String tokenId, String groupName) throws Exception { List<String> lifecycleHooks = getLifecycleHookIds(groupName); if (!lifecycleHooks.contains(hookId)) { return;// w ww .j a v a2s . co m } CompleteLifecycleActionRequest completeLifecycleActionRequest = new CompleteLifecycleActionRequest(); completeLifecycleActionRequest.setLifecycleHookName(hookId); completeLifecycleActionRequest.setLifecycleActionToken(tokenId); completeLifecycleActionRequest.setAutoScalingGroupName(groupName); // CONTINUE action will allow asg proceed to terminate instances earlier than timeout limit completeLifecycleActionRequest.setLifecycleActionResult(AutoScalingConstants.LIFECYCLE_ACTION_CONTINUE); aasClient.completeLifecycleAction(completeLifecycleActionRequest); }