/*
* Copyright 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.
*/
/*
* Do not modify this file. This file is generated from the autoscaling-2011-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.AutoScaling.Model
{
///
/// Container for the parameters to the StartInstanceRefresh operation.
/// Starts an instance refresh. During an instance refresh, Amazon EC2 Auto Scaling performs
/// a rolling update of instances in an Auto Scaling group. Instances are terminated first
/// and then replaced, which temporarily reduces the capacity available within your Auto
/// Scaling group.
///
///
///
/// This operation is part of the instance
/// refresh feature in Amazon EC2 Auto Scaling, which helps you update instances in
/// your Auto Scaling group. This feature is helpful, for example, when you have a new
/// AMI or a new user data script. You just need to create a new launch template that
/// specifies the new AMI or user data script. Then start an instance refresh to immediately
/// begin the process of updating instances in the group.
///
///
///
/// If successful, the request's response contains a unique ID that you can use to track
/// the progress of the instance refresh. To query its status, call the DescribeInstanceRefreshes
/// API. To describe the instance refreshes that have already run, call the DescribeInstanceRefreshes
/// API. To cancel an instance refresh that is in progress, use the CancelInstanceRefresh
/// API.
///
///
///
/// An instance refresh might fail for several reasons, such as EC2 launch failures, misconfigured
/// health checks, or not ignoring or allowing the termination of instances that are in
/// Standby
state or protected from scale in. You can monitor for failed
/// EC2 launches using the scaling activities. To find the scaling activities, call the
/// DescribeScalingActivities API.
///
///
///
/// If you enable auto rollback, your Auto Scaling group will be rolled back automatically
/// when the instance refresh fails. You can enable this feature before starting an instance
/// refresh by specifying the AutoRollback
property in the instance refresh
/// preferences. Otherwise, to roll back an instance refresh before it finishes, use the
/// RollbackInstanceRefresh API.
///
///
public partial class StartInstanceRefreshRequest : AmazonAutoScalingRequest
{
private string _autoScalingGroupName;
private DesiredConfiguration _desiredConfiguration;
private RefreshPreferences _preferences;
private RefreshStrategy _strategy;
///
/// Gets and sets the property AutoScalingGroupName.
///
/// The name of the Auto Scaling group.
///
///
[AWSProperty(Required=true, Min=1, Max=255)]
public string AutoScalingGroupName
{
get { return this._autoScalingGroupName; }
set { this._autoScalingGroupName = value; }
}
// Check to see if AutoScalingGroupName property is set
internal bool IsSetAutoScalingGroupName()
{
return this._autoScalingGroupName != null;
}
///
/// Gets and sets the property 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 instance types. This can help you
/// reduce the number of replacements that are required to apply updates.
///
///
///
public DesiredConfiguration DesiredConfiguration
{
get { return this._desiredConfiguration; }
set { this._desiredConfiguration = value; }
}
// Check to see if DesiredConfiguration property is set
internal bool IsSetDesiredConfiguration()
{
return this._desiredConfiguration != null;
}
///
/// Gets and sets the property Preferences.
///
/// Sets your preferences for the instance refresh so that it performs as expected when
/// you start it. Includes the instance warmup time, the minimum healthy percentage, and
/// the behaviors that you want Amazon EC2 Auto Scaling to use if instances that are in
/// Standby
state or protected from scale in are found. You can also choose
/// to enable additional features, such as the following:
///
/// -
///
/// Auto rollback
///
///
-
///
/// Checkpoints
///
///
-
///
/// Skip matching
///
///
///
public RefreshPreferences Preferences
{
get { return this._preferences; }
set { this._preferences = value; }
}
// Check to see if Preferences property is set
internal bool IsSetPreferences()
{
return this._preferences != null;
}
///
/// Gets and sets the property Strategy.
///
/// The strategy to use for the instance refresh. The only valid value is Rolling
.
///
///
public RefreshStrategy Strategy
{
get { return this._strategy; }
set { this._strategy = value; }
}
// Check to see if Strategy property is set
internal bool IsSetStrategy()
{
return this._strategy != null;
}
}
}