/* * 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 ec2-2016-11-15.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.EC2.Model { /// /// The Spot Instance replacement strategy to use when Amazon EC2 emits a signal that /// your Spot Instance is at an elevated risk of being interrupted. For more information, /// see Capacity /// rebalancing in the Amazon EC2 User Guide for Linux Instances. /// public partial class SpotCapacityRebalance { private ReplacementStrategy _replacementStrategy; private int? _terminationDelay; /// /// Gets and sets the property ReplacementStrategy. /// /// The replacement strategy to use. Only available for fleets of type maintain. /// /// /// /// launch - Spot Fleet launches a new replacement Spot Instance when a /// rebalance notification is emitted for an existing Spot Instance in the fleet. Spot /// Fleet does not terminate the instances that receive a rebalance notification. You /// can terminate the old instances, or you can leave them running. You are charged for /// all instances while they are running. /// /// /// /// launch-before-terminate - Spot Fleet launches a new replacement Spot /// Instance when a rebalance notification is emitted for an existing Spot Instance in /// the fleet, and then, after a delay that you specify (in TerminationDelay), /// terminates the instances that received a rebalance notification. /// /// public ReplacementStrategy ReplacementStrategy { get { return this._replacementStrategy; } set { this._replacementStrategy = value; } } // Check to see if ReplacementStrategy property is set internal bool IsSetReplacementStrategy() { return this._replacementStrategy != null; } /// /// Gets and sets the property TerminationDelay. /// /// The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot /// Instance after launching a new replacement Spot Instance. /// /// /// /// Required when ReplacementStrategy is set to launch-before-terminate. /// /// /// /// Not valid when ReplacementStrategy is set to launch. /// /// /// /// Valid values: Minimum value of 120 seconds. Maximum value of 7200 /// seconds. /// /// public int TerminationDelay { get { return this._terminationDelay.GetValueOrDefault(); } set { this._terminationDelay = value; } } // Check to see if TerminationDelay property is set internal bool IsSetTerminationDelay() { return this._terminationDelay.HasValue; } } }