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

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

Introduction

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

Prototype


public void setLifecycleHookName(String lifecycleHookName) 

Source Link

Document

The name of the lifecycle hook.

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 www  .  ja v  a2  s.  c  o m
}