/*
* 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
{
///
/// Container for the parameters to the ModifyFleet operation.
/// Modifies the specified EC2 Fleet.
///
///
///
/// You can only modify an EC2 Fleet request of type maintain
.
///
///
///
/// While the EC2 Fleet is being modified, it is in the modifying
state.
///
///
///
/// To scale up your EC2 Fleet, increase its target capacity. The EC2 Fleet launches the
/// additional Spot Instances according to the allocation strategy for the EC2 Fleet request.
/// If the allocation strategy is lowest-price
, the EC2 Fleet launches instances
/// using the Spot Instance pool with the lowest price. If the allocation strategy is
/// diversified
, the EC2 Fleet distributes the instances across the Spot
/// Instance pools. If the allocation strategy is capacity-optimized
, EC2
/// Fleet launches instances from Spot Instance pools with optimal capacity for the number
/// of instances that are launching.
///
///
///
/// To scale down your EC2 Fleet, decrease its target capacity. First, the EC2 Fleet cancels
/// any open requests that exceed the new target capacity. You can request that the EC2
/// Fleet terminate Spot Instances until the size of the fleet no longer exceeds the new
/// target capacity. If the allocation strategy is lowest-price
, the EC2
/// Fleet terminates the instances with the highest price per unit. If the allocation
/// strategy is capacity-optimized
, the EC2 Fleet terminates the instances
/// in the Spot Instance pools that have the least available Spot Instance capacity. If
/// the allocation strategy is diversified
, the EC2 Fleet terminates instances
/// across the Spot Instance pools. Alternatively, you can request that the EC2 Fleet
/// keep the fleet at its current size, but not replace any Spot Instances that are interrupted
/// or that you terminate manually.
///
///
///
/// If you are finished with your EC2 Fleet for now, but will use it again later, you
/// can set the target capacity to 0.
///
///
public partial class ModifyFleetRequest : AmazonEC2Request
{
private string _context;
private FleetExcessCapacityTerminationPolicy _excessCapacityTerminationPolicy;
private string _fleetId;
private List _launchTemplateConfigs = new List();
private TargetCapacitySpecificationRequest _targetCapacitySpecification;
///
/// Gets and sets the property Context.
///
/// Reserved.
///
///
public string Context
{
get { return this._context; }
set { this._context = value; }
}
// Check to see if Context property is set
internal bool IsSetContext()
{
return this._context != null;
}
///
/// Gets and sets the property ExcessCapacityTerminationPolicy.
///
/// Indicates whether running instances should be terminated if the total target capacity
/// of the EC2 Fleet is decreased below the current size of the EC2 Fleet.
///
///
///
/// Supported only for fleets of type maintain
.
///
///
public FleetExcessCapacityTerminationPolicy ExcessCapacityTerminationPolicy
{
get { return this._excessCapacityTerminationPolicy; }
set { this._excessCapacityTerminationPolicy = value; }
}
// Check to see if ExcessCapacityTerminationPolicy property is set
internal bool IsSetExcessCapacityTerminationPolicy()
{
return this._excessCapacityTerminationPolicy != null;
}
///
/// Gets and sets the property FleetId.
///
/// The ID of the EC2 Fleet.
///
///
[AWSProperty(Required=true)]
public string FleetId
{
get { return this._fleetId; }
set { this._fleetId = value; }
}
// Check to see if FleetId property is set
internal bool IsSetFleetId()
{
return this._fleetId != null;
}
///
/// Gets and sets the property LaunchTemplateConfigs.
///
/// The launch template and overrides.
///
///
[AWSProperty(Min=0, Max=50)]
public List LaunchTemplateConfigs
{
get { return this._launchTemplateConfigs; }
set { this._launchTemplateConfigs = value; }
}
// Check to see if LaunchTemplateConfigs property is set
internal bool IsSetLaunchTemplateConfigs()
{
return this._launchTemplateConfigs != null && this._launchTemplateConfigs.Count > 0;
}
///
/// Gets and sets the property TargetCapacitySpecification.
///
/// The size of the EC2 Fleet.
///
///
public TargetCapacitySpecificationRequest TargetCapacitySpecification
{
get { return this._targetCapacitySpecification; }
set { this._targetCapacitySpecification = value; }
}
// Check to see if TargetCapacitySpecification property is set
internal bool IsSetTargetCapacitySpecification()
{
return this._targetCapacitySpecification != null;
}
}
}