Example usage for com.amazonaws.services.autoscaling.model DeleteLifecycleHookRequest setAutoScalingGroupName

List of usage examples for com.amazonaws.services.autoscaling.model DeleteLifecycleHookRequest setAutoScalingGroupName

Introduction

In this page you can find the example usage for com.amazonaws.services.autoscaling.model DeleteLifecycleHookRequest setAutoScalingGroupName.

Prototype


public void setAutoScalingGroupName(String autoScalingGroupName) 

Source Link

Document

The name of the Auto Scaling group.

Usage

From source file:com.pinterest.arcee.autoscaling.AwsAutoScaleGroupManager.java

License:Apache License

@Override
public void deleteLifecycleHook(String groupName) throws Exception {
    List<String> lifecycleHooks = getLifecycleHookIds(groupName);
    for (String hookId : lifecycleHooks) {
        DeleteLifecycleHookRequest request = new DeleteLifecycleHookRequest();
        request.setLifecycleHookName(hookId);
        request.setAutoScalingGroupName(groupName);
        aasClient.deleteLifecycleHook(request);
    }//from  w  ww.j  a  va  2  s . c  om
}