List of usage examples for com.amazonaws.services.autoscaling.model CompleteLifecycleActionRequest setAutoScalingGroupName
public void setAutoScalingGroupName(String autoScalingGroupName)
The name of the Auto Scaling group.
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;/*from ww w . j a v a2 s .c o 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); }