All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.autoscaling.model.StartInstanceRefreshRequest Maven / Gradle / Ivy

/*
 * Copyright 2016-2021 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;

import com.amazonaws.AmazonWebServiceRequest;

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

    /**
     * 

* The name of the Auto Scaling group. *

*/ private String autoScalingGroupName; /** *

* The strategy to use for the instance refresh. The only valid value is Rolling. *

*

* A rolling update is an update that is applied to all instances in an Auto Scaling group until all instances have * been updated. A rolling update can fail due to failed health checks or if instances are on standby or are * protected from scale in. If the rolling update process fails, any instances that were already replaced are not * rolled back to their previous configuration. *

*/ private String strategy; /** *

* Set of preferences associated with the instance refresh request. *

*

* If not provided, the default values are used. For MinHealthyPercentage, the default value is * 90. For InstanceWarmup, the default is to use the value specified for the health check * grace period for the Auto Scaling group. *

*

* For more information, see RefreshPreferences in the Amazon EC2 Auto Scaling API Reference. *

*/ private RefreshPreferences preferences; /** *

* The name of the Auto Scaling group. *

* * @param autoScalingGroupName * The name of the Auto Scaling group. */ public void setAutoScalingGroupName(String autoScalingGroupName) { this.autoScalingGroupName = autoScalingGroupName; } /** *

* The name of the Auto Scaling group. *

* * @return The name of the Auto Scaling group. */ public String getAutoScalingGroupName() { return this.autoScalingGroupName; } /** *

* The name of the Auto Scaling group. *

* * @param autoScalingGroupName * The name of the Auto Scaling group. * @return Returns a reference to this object so that method calls can be chained together. */ public StartInstanceRefreshRequest withAutoScalingGroupName(String autoScalingGroupName) { setAutoScalingGroupName(autoScalingGroupName); return this; } /** *

* The strategy to use for the instance refresh. The only valid value is Rolling. *

*

* A rolling update is an update that is applied to all instances in an Auto Scaling group until all instances have * been updated. A rolling update can fail due to failed health checks or if instances are on standby or are * protected from scale in. If the rolling update process fails, any instances that were already replaced are not * rolled back to their previous configuration. *

* * @param strategy * The strategy to use for the instance refresh. The only valid value is Rolling.

*

* A rolling update is an update that is applied to all instances in an Auto Scaling group until all * instances have been updated. A rolling update can fail due to failed health checks or if instances are on * standby or are protected from scale in. If the rolling update process fails, any instances that were * already replaced are not rolled back to their previous configuration. * @see RefreshStrategy */ public void setStrategy(String strategy) { this.strategy = strategy; } /** *

* The strategy to use for the instance refresh. The only valid value is Rolling. *

*

* A rolling update is an update that is applied to all instances in an Auto Scaling group until all instances have * been updated. A rolling update can fail due to failed health checks or if instances are on standby or are * protected from scale in. If the rolling update process fails, any instances that were already replaced are not * rolled back to their previous configuration. *

* * @return The strategy to use for the instance refresh. The only valid value is Rolling.

*

* A rolling update is an update that is applied to all instances in an Auto Scaling group until all * instances have been updated. A rolling update can fail due to failed health checks or if instances are on * standby or are protected from scale in. If the rolling update process fails, any instances that were * already replaced are not rolled back to their previous configuration. * @see RefreshStrategy */ public String getStrategy() { return this.strategy; } /** *

* The strategy to use for the instance refresh. The only valid value is Rolling. *

*

* A rolling update is an update that is applied to all instances in an Auto Scaling group until all instances have * been updated. A rolling update can fail due to failed health checks or if instances are on standby or are * protected from scale in. If the rolling update process fails, any instances that were already replaced are not * rolled back to their previous configuration. *

* * @param strategy * The strategy to use for the instance refresh. The only valid value is Rolling.

*

* A rolling update is an update that is applied to all instances in an Auto Scaling group until all * instances have been updated. A rolling update can fail due to failed health checks or if instances are on * standby or are protected from scale in. If the rolling update process fails, any instances that were * already replaced are not rolled back to their previous configuration. * @return Returns a reference to this object so that method calls can be chained together. * @see RefreshStrategy */ public StartInstanceRefreshRequest withStrategy(String strategy) { setStrategy(strategy); return this; } /** *

* The strategy to use for the instance refresh. The only valid value is Rolling. *

*

* A rolling update is an update that is applied to all instances in an Auto Scaling group until all instances have * been updated. A rolling update can fail due to failed health checks or if instances are on standby or are * protected from scale in. If the rolling update process fails, any instances that were already replaced are not * rolled back to their previous configuration. *

* * @param strategy * The strategy to use for the instance refresh. The only valid value is Rolling.

*

* A rolling update is an update that is applied to all instances in an Auto Scaling group until all * instances have been updated. A rolling update can fail due to failed health checks or if instances are on * standby or are protected from scale in. If the rolling update process fails, any instances that were * already replaced are not rolled back to their previous configuration. * @return Returns a reference to this object so that method calls can be chained together. * @see RefreshStrategy */ public StartInstanceRefreshRequest withStrategy(RefreshStrategy strategy) { this.strategy = strategy.toString(); return this; } /** *

* Set of preferences associated with the instance refresh request. *

*

* If not provided, the default values are used. For MinHealthyPercentage, the default value is * 90. For InstanceWarmup, the default is to use the value specified for the health check * grace period for the Auto Scaling group. *

*

* For more information, see RefreshPreferences in the Amazon EC2 Auto Scaling API Reference. *

* * @param preferences * Set of preferences associated with the instance refresh request.

*

* If not provided, the default values are used. For MinHealthyPercentage, the default value is * 90. For InstanceWarmup, the default is to use the value specified for the health * check grace period for the Auto Scaling group. *

*

* For more information, see RefreshPreferences in the Amazon EC2 Auto Scaling API Reference. */ public void setPreferences(RefreshPreferences preferences) { this.preferences = preferences; } /** *

* Set of preferences associated with the instance refresh request. *

*

* If not provided, the default values are used. For MinHealthyPercentage, the default value is * 90. For InstanceWarmup, the default is to use the value specified for the health check * grace period for the Auto Scaling group. *

*

* For more information, see RefreshPreferences in the Amazon EC2 Auto Scaling API Reference. *

* * @return Set of preferences associated with the instance refresh request.

*

* If not provided, the default values are used. For MinHealthyPercentage, the default value is * 90. For InstanceWarmup, the default is to use the value specified for the * health check grace period for the Auto Scaling group. *

*

* For more information, see RefreshPreferences in the Amazon EC2 Auto Scaling API Reference. */ public RefreshPreferences getPreferences() { return this.preferences; } /** *

* Set of preferences associated with the instance refresh request. *

*

* If not provided, the default values are used. For MinHealthyPercentage, the default value is * 90. For InstanceWarmup, the default is to use the value specified for the health check * grace period for the Auto Scaling group. *

*

* For more information, see RefreshPreferences in the Amazon EC2 Auto Scaling API Reference. *

* * @param preferences * Set of preferences associated with the instance refresh request.

*

* If not provided, the default values are used. For MinHealthyPercentage, the default value is * 90. For InstanceWarmup, the default is to use the value specified for the health * check grace period for the Auto Scaling group. *

*

* For more information, see RefreshPreferences in the Amazon EC2 Auto Scaling API Reference. * @return Returns a reference to this object so that method calls can be chained together. */ public StartInstanceRefreshRequest withPreferences(RefreshPreferences preferences) { setPreferences(preferences); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAutoScalingGroupName() != null) sb.append("AutoScalingGroupName: ").append(getAutoScalingGroupName()).append(","); if (getStrategy() != null) sb.append("Strategy: ").append(getStrategy()).append(","); if (getPreferences() != null) sb.append("Preferences: ").append(getPreferences()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartInstanceRefreshRequest == false) return false; StartInstanceRefreshRequest other = (StartInstanceRefreshRequest) obj; if (other.getAutoScalingGroupName() == null ^ this.getAutoScalingGroupName() == null) return false; if (other.getAutoScalingGroupName() != null && other.getAutoScalingGroupName().equals(this.getAutoScalingGroupName()) == false) return false; if (other.getStrategy() == null ^ this.getStrategy() == null) return false; if (other.getStrategy() != null && other.getStrategy().equals(this.getStrategy()) == false) return false; if (other.getPreferences() == null ^ this.getPreferences() == null) return false; if (other.getPreferences() != null && other.getPreferences().equals(this.getPreferences()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAutoScalingGroupName() == null) ? 0 : getAutoScalingGroupName().hashCode()); hashCode = prime * hashCode + ((getStrategy() == null) ? 0 : getStrategy().hashCode()); hashCode = prime * hashCode + ((getPreferences() == null) ? 0 : getPreferences().hashCode()); return hashCode; } @Override public StartInstanceRefreshRequest clone() { return (StartInstanceRefreshRequest) super.clone(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy