/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.autoscaling.model; import java.io.Serializable; import javax.annotation.Generated; /** *

* Describes information used to specify a lifecycle hook for an Auto Scaling group. *

*

* For more information, see Amazon * EC2 Auto Scaling lifecycle hooks in the Amazon EC2 Auto Scaling User Guide. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class LifecycleHookSpecification implements Serializable, Cloneable { /** *

* The name of the lifecycle hook. *

*/ private String lifecycleHookName; /** *

* The lifecycle transition. For Auto Scaling groups, there are two major lifecycle transitions. *

* */ private String lifecycleTransition; /** *

* Additional information that you want to include any time Amazon EC2 Auto Scaling sends a message to the * notification target. *

*/ private String notificationMetadata; /** *

* The maximum time, in seconds, that can elapse before the lifecycle hook times out. The range is from * 30 to 7200 seconds. The default value is 3600 seconds (1 hour). *

*/ private Integer heartbeatTimeout; /** *

* The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure * occurs. The default value is ABANDON. *

*

* Valid values: CONTINUE | ABANDON *

*/ private String defaultResult; /** *

* The Amazon Resource Name (ARN) of the notification target that Amazon EC2 Auto Scaling sends notifications to * when an instance is in a wait state for the lifecycle hook. You can specify an Amazon SNS topic or an Amazon SQS * queue. *

*/ private String notificationTargetARN; /** *

* The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target. For * information about creating this role, see Configure a notification target for a lifecycle hook in the Amazon EC2 Auto Scaling User Guide. *

*

* Valid only if the notification target is an Amazon SNS topic or an Amazon SQS queue. *

*/ private String roleARN; /** *

* The name of the lifecycle hook. *

* * @param lifecycleHookName * The name of the lifecycle hook. */ public void setLifecycleHookName(String lifecycleHookName) { this.lifecycleHookName = lifecycleHookName; } /** *

* The name of the lifecycle hook. *

* * @return The name of the lifecycle hook. */ public String getLifecycleHookName() { return this.lifecycleHookName; } /** *

* The name of the lifecycle hook. *

* * @param lifecycleHookName * The name of the lifecycle hook. * @return Returns a reference to this object so that method calls can be chained together. */ public LifecycleHookSpecification withLifecycleHookName(String lifecycleHookName) { setLifecycleHookName(lifecycleHookName); return this; } /** *

* The lifecycle transition. For Auto Scaling groups, there are two major lifecycle transitions. *

* * * @param lifecycleTransition * The lifecycle transition. For Auto Scaling groups, there are two major lifecycle transitions.

*