/* * 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 { /// /// Describes the preferences for an instance refresh. /// public partial class RefreshPreferences { private bool? _autoRollback; private int? _checkpointDelay; private List _checkpointPercentages = new List(); private int? _instanceWarmup; private int? _minHealthyPercentage; private ScaleInProtectedInstances _scaleInProtectedInstances; private bool? _skipMatching; private StandbyInstances _standbyInstances; /// /// Gets and sets the property AutoRollback. /// /// (Optional) Indicates whether to roll back the Auto Scaling group to its previous configuration /// if the instance refresh fails. The default is false. /// /// /// /// A rollback is not supported in the following situations: /// ///
  • /// /// There is no desired configuration specified for the instance refresh. /// ///
  • /// /// The Auto Scaling group has a launch template that uses an Amazon Web Services Systems /// Manager parameter instead of an AMI ID for the ImageId property. /// ///
  • /// /// The Auto Scaling group uses the launch template's $Latest or $Default /// version. /// ///
///
public bool AutoRollback { get { return this._autoRollback.GetValueOrDefault(); } set { this._autoRollback = value; } } // Check to see if AutoRollback property is set internal bool IsSetAutoRollback() { return this._autoRollback.HasValue; } /// /// Gets and sets the property CheckpointDelay. /// /// (Optional) The amount of time, in seconds, to wait after a checkpoint before continuing. /// This property is optional, but if you specify a value for it, you must also specify /// a value for CheckpointPercentages. If you specify a value for CheckpointPercentages /// and not for CheckpointDelay, the CheckpointDelay defaults /// to 3600 (1 hour). /// /// [AWSProperty(Min=0, Max=172800)] public int CheckpointDelay { get { return this._checkpointDelay.GetValueOrDefault(); } set { this._checkpointDelay = value; } } // Check to see if CheckpointDelay property is set internal bool IsSetCheckpointDelay() { return this._checkpointDelay.HasValue; } /// /// Gets and sets the property CheckpointPercentages. /// /// (Optional) Threshold values for each checkpoint in ascending order. Each number must /// be unique. To replace all instances in the Auto Scaling group, the last number in /// the array must be 100. /// /// /// /// For usage examples, see Adding /// checkpoints to an instance refresh in the Amazon EC2 Auto Scaling User Guide. /// /// public List CheckpointPercentages { get { return this._checkpointPercentages; } set { this._checkpointPercentages = value; } } // Check to see if CheckpointPercentages property is set internal bool IsSetCheckpointPercentages() { return this._checkpointPercentages != null && this._checkpointPercentages.Count > 0; } /// /// Gets and sets the property InstanceWarmup. /// /// A time period, in seconds, during which an instance refresh waits before moving on /// to replacing the next instance after a new instance enters the InService /// state. /// /// /// /// This property is not required for normal usage. Instead, use the DefaultInstanceWarmup /// property of the Auto Scaling group. The InstanceWarmup and DefaultInstanceWarmup /// properties work the same way. Only specify this property if you must override the /// DefaultInstanceWarmup property. /// /// /// /// If you do not specify this property, the instance warmup by default is the value /// of the DefaultInstanceWarmup property, if defined (which is recommended /// in all cases), or the HealthCheckGracePeriod property otherwise. /// /// [AWSProperty(Min=0)] public int InstanceWarmup { get { return this._instanceWarmup.GetValueOrDefault(); } set { this._instanceWarmup = value; } } // Check to see if InstanceWarmup property is set internal bool IsSetInstanceWarmup() { return this._instanceWarmup.HasValue; } /// /// Gets and sets the property MinHealthyPercentage. /// /// The amount of capacity in the Auto Scaling group that must pass your group's health /// checks to allow the operation to continue. The value is expressed as a percentage /// of the desired capacity of the Auto Scaling group (rounded up to the nearest integer). /// The default is 90. /// /// /// /// Setting the minimum healthy percentage to 100 percent limits the rate of replacement /// to one instance at a time. In contrast, setting it to 0 percent has the effect of /// replacing all instances at the same time. /// /// [AWSProperty(Min=0, Max=100)] public int MinHealthyPercentage { get { return this._minHealthyPercentage.GetValueOrDefault(); } set { this._minHealthyPercentage = value; } } // Check to see if MinHealthyPercentage property is set internal bool IsSetMinHealthyPercentage() { return this._minHealthyPercentage.HasValue; } /// /// Gets and sets the property ScaleInProtectedInstances. /// /// Choose the behavior that you want Amazon EC2 Auto Scaling to use if instances protected /// from scale in are found. /// /// /// /// The following lists the valid values: /// ///
Refresh
/// /// Amazon EC2 Auto Scaling replaces instances that are protected from scale in. /// ///
Ignore
/// /// Amazon EC2 Auto Scaling ignores instances that are protected from scale in and continues /// to replace instances that are not protected. /// ///
Wait (default)
/// /// Amazon EC2 Auto Scaling waits one hour for you to remove scale-in protection. Otherwise, /// the instance refresh will fail. /// ///
///
public ScaleInProtectedInstances ScaleInProtectedInstances { get { return this._scaleInProtectedInstances; } set { this._scaleInProtectedInstances = value; } } // Check to see if ScaleInProtectedInstances property is set internal bool IsSetScaleInProtectedInstances() { return this._scaleInProtectedInstances != null; } /// /// Gets and sets the property SkipMatching. /// /// (Optional) Indicates whether skip matching is enabled. If enabled (true), /// then Amazon EC2 Auto Scaling skips replacing instances that match the desired configuration. /// If no desired configuration is specified, then it skips replacing instances that have /// the same launch template and instance types that the Auto Scaling group was using /// before the start of the instance refresh. The default is false. /// /// /// /// For more information, see Use /// an instance refresh with skip matching in the Amazon EC2 Auto Scaling User /// Guide. /// /// public bool SkipMatching { get { return this._skipMatching.GetValueOrDefault(); } set { this._skipMatching = value; } } // Check to see if SkipMatching property is set internal bool IsSetSkipMatching() { return this._skipMatching.HasValue; } /// /// Gets and sets the property StandbyInstances. /// /// Choose the behavior that you want Amazon EC2 Auto Scaling to use if instances in Standby /// state are found. /// /// /// /// The following lists the valid values: /// ///
Terminate
/// /// Amazon EC2 Auto Scaling terminates instances that are in Standby. /// ///
Ignore
/// /// Amazon EC2 Auto Scaling ignores instances that are in Standby and continues /// to replace instances that are in the InService state. /// ///
Wait (default)
/// /// Amazon EC2 Auto Scaling waits one hour for you to return the instances to service. /// Otherwise, the instance refresh will fail. /// ///
///
public StandbyInstances StandbyInstances { get { return this._standbyInstances; } set { this._standbyInstances = value; } } // Check to see if StandbyInstances property is set internal bool IsSetStandbyInstances() { return this._standbyInstances != null; } } }