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

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

Go to download

The AWS Java SDK for Auto Scaling module holds the client classes that are used for communicating with Auto Scaling Service

There is a newer version: 1.12.772
Show newest version
/*
 * 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 helps you update your instances gradually. 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 are replaced are not rolled back to their previous configuration. *

*/ private String strategy; /** *

* The desired configuration. For example, the desired configuration can specify a new launch template or a new * version of the current launch template. *

*

* Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the settings of the Auto Scaling group to * reflect the new desired configuration. *

* *

* When you specify a new launch template or a new version of the current launch template for your desired * configuration, consider enabling the SkipMatching property in preferences. If it's enabled, Amazon * EC2 Auto Scaling skips replacing instances that already use the specified launch template and version. This can * help you reduce the number of replacements that are required to apply updates. *

*
*/ private DesiredConfiguration desiredConfiguration; /** *

* Set of preferences associated with the instance refresh request. If not provided, the default values are used. *

*/ 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 helps you update your instances gradually. 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 are 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 helps you update your instances gradually. 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 are 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 helps you update your instances gradually. 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 are 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 helps you update your instances gradually. 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 are 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 helps you update your instances gradually. 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 are 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 helps you update your instances gradually. 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 are 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 helps you update your instances gradually. 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 are 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 helps you update your instances gradually. 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 are 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; } /** *

* The desired configuration. For example, the desired configuration can specify a new launch template or a new * version of the current launch template. *

*

* Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the settings of the Auto Scaling group to * reflect the new desired configuration. *

* *

* When you specify a new launch template or a new version of the current launch template for your desired * configuration, consider enabling the SkipMatching property in preferences. If it's enabled, Amazon * EC2 Auto Scaling skips replacing instances that already use the specified launch template and version. This can * help you reduce the number of replacements that are required to apply updates. *

*
* * @param desiredConfiguration * The desired configuration. For example, the desired configuration can specify a new launch template or a * new version of the current launch template.

*

* Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the settings of the Auto Scaling group * to reflect the new desired configuration. *

* *

* When you specify a new launch template or a new version of the current launch template for your desired * configuration, consider enabling the SkipMatching property in preferences. If it's enabled, * Amazon EC2 Auto Scaling skips replacing instances that already use the specified launch template and * version. This can help you reduce the number of replacements that are required to apply updates. *

*/ public void setDesiredConfiguration(DesiredConfiguration desiredConfiguration) { this.desiredConfiguration = desiredConfiguration; } /** *

* The desired configuration. For example, the desired configuration can specify a new launch template or a new * version of the current launch template. *

*

* Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the settings of the Auto Scaling group to * reflect the new desired configuration. *

* *

* When you specify a new launch template or a new version of the current launch template for your desired * configuration, consider enabling the SkipMatching property in preferences. If it's enabled, Amazon * EC2 Auto Scaling skips replacing instances that already use the specified launch template and version. This can * help you reduce the number of replacements that are required to apply updates. *

*
* * @return The desired configuration. For example, the desired configuration can specify a new launch template or a * new version of the current launch template.

*

* Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the settings of the Auto Scaling * group to reflect the new desired configuration. *

* *

* When you specify a new launch template or a new version of the current launch template for your desired * configuration, consider enabling the SkipMatching property in preferences. If it's enabled, * Amazon EC2 Auto Scaling skips replacing instances that already use the specified launch template and * version. This can help you reduce the number of replacements that are required to apply updates. *

*/ public DesiredConfiguration getDesiredConfiguration() { return this.desiredConfiguration; } /** *

* The desired configuration. For example, the desired configuration can specify a new launch template or a new * version of the current launch template. *

*

* Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the settings of the Auto Scaling group to * reflect the new desired configuration. *

* *

* When you specify a new launch template or a new version of the current launch template for your desired * configuration, consider enabling the SkipMatching property in preferences. If it's enabled, Amazon * EC2 Auto Scaling skips replacing instances that already use the specified launch template and version. This can * help you reduce the number of replacements that are required to apply updates. *

*
* * @param desiredConfiguration * The desired configuration. For example, the desired configuration can specify a new launch template or a * new version of the current launch template.

*

* Once the instance refresh succeeds, Amazon EC2 Auto Scaling updates the settings of the Auto Scaling group * to reflect the new desired configuration. *

* *

* When you specify a new launch template or a new version of the current launch template for your desired * configuration, consider enabling the SkipMatching property in preferences. If it's enabled, * Amazon EC2 Auto Scaling skips replacing instances that already use the specified launch template and * version. This can help you reduce the number of replacements that are required to apply updates. *

* @return Returns a reference to this object so that method calls can be chained together. */ public StartInstanceRefreshRequest withDesiredConfiguration(DesiredConfiguration desiredConfiguration) { setDesiredConfiguration(desiredConfiguration); return this; } /** *

* Set of preferences associated with the instance refresh request. If not provided, the default values are used. *

* * @param preferences * Set of preferences associated with the instance refresh request. If not provided, the default values are * used. */ 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. *

* * @return Set of preferences associated with the instance refresh request. If not provided, the default values are * used. */ public RefreshPreferences getPreferences() { return this.preferences; } /** *

* Set of preferences associated with the instance refresh request. If not provided, the default values are used. *

* * @param preferences * Set of preferences associated with the instance refresh request. If not provided, the default values are * used. * @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 (getDesiredConfiguration() != null) sb.append("DesiredConfiguration: ").append(getDesiredConfiguration()).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.getDesiredConfiguration() == null ^ this.getDesiredConfiguration() == null) return false; if (other.getDesiredConfiguration() != null && other.getDesiredConfiguration().equals(this.getDesiredConfiguration()) == 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 + ((getDesiredConfiguration() == null) ? 0 : getDesiredConfiguration().hashCode()); hashCode = prime * hashCode + ((getPreferences() == null) ? 0 : getPreferences().hashCode()); return hashCode; } @Override public StartInstanceRefreshRequest clone() { return (StartInstanceRefreshRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy