/*
* 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
{
///
/// Describes an EC2 Fleet.
///
public partial class FleetData
{
private FleetActivityStatus _activityStatus;
private string _clientToken;
private string _context;
private DateTime? _createTime;
private List _errors = new List();
private FleetExcessCapacityTerminationPolicy _excessCapacityTerminationPolicy;
private string _fleetId;
private FleetStateCode _fleetState;
private double? _fulfilledCapacity;
private double? _fulfilledOnDemandCapacity;
private List _instances = new List();
private List _launchTemplateConfigs = new List();
private OnDemandOptions _onDemandOptions;
private bool? _replaceUnhealthyInstances;
private SpotOptions _spotOptions;
private List _tags = new List();
private TargetCapacitySpecification _targetCapacitySpecification;
private bool? _terminateInstancesWithExpiration;
private FleetType _type;
private DateTime? _validFrom;
private DateTime? _validUntil;
///
/// Gets and sets the property ActivityStatus.
///
/// The progress of the EC2 Fleet. If there is an error, the status is error
.
/// After all requests are placed, the status is pending_fulfillment
. If
/// the size of the EC2 Fleet is equal to or greater than its target capacity, the status
/// is fulfilled
. If the size of the EC2 Fleet is decreased, the status is
/// pending_termination
while instances are terminating.
///
///
public FleetActivityStatus ActivityStatus
{
get { return this._activityStatus; }
set { this._activityStatus = value; }
}
// Check to see if ActivityStatus property is set
internal bool IsSetActivityStatus()
{
return this._activityStatus != null;
}
///
/// Gets and sets the property ClientToken.
///
/// Unique, case-sensitive identifier that you provide to ensure the idempotency of the
/// request. For more information, see Ensuring
/// idempotency.
///
///
///
/// Constraints: Maximum 64 ASCII characters
///
///
public string ClientToken
{
get { return this._clientToken; }
set { this._clientToken = value; }
}
// Check to see if ClientToken property is set
internal bool IsSetClientToken()
{
return this._clientToken != null;
}
///
/// 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 CreateTime.
///
/// The creation date and time of the EC2 Fleet.
///
///
public DateTime CreateTime
{
get { return this._createTime.GetValueOrDefault(); }
set { this._createTime = value; }
}
// Check to see if CreateTime property is set
internal bool IsSetCreateTime()
{
return this._createTime.HasValue;
}
///
/// Gets and sets the property Errors.
///
/// Information about the instances that could not be launched by the fleet. Valid only
/// when Type is set to instant
.
///
///
public List Errors
{
get { return this._errors; }
set { this._errors = value; }
}
// Check to see if Errors property is set
internal bool IsSetErrors()
{
return this._errors != null && this._errors.Count > 0;
}
///
/// Gets and sets the property ExcessCapacityTerminationPolicy.
///
/// Indicates whether running instances should be terminated if the 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.
///
///
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 FleetState.
///
/// The state of the EC2 Fleet.
///
///
public FleetStateCode FleetState
{
get { return this._fleetState; }
set { this._fleetState = value; }
}
// Check to see if FleetState property is set
internal bool IsSetFleetState()
{
return this._fleetState != null;
}
///
/// Gets and sets the property FulfilledCapacity.
///
/// The number of units fulfilled by this request compared to the set target capacity.
///
///
public double FulfilledCapacity
{
get { return this._fulfilledCapacity.GetValueOrDefault(); }
set { this._fulfilledCapacity = value; }
}
// Check to see if FulfilledCapacity property is set
internal bool IsSetFulfilledCapacity()
{
return this._fulfilledCapacity.HasValue;
}
///
/// Gets and sets the property FulfilledOnDemandCapacity.
///
/// The number of units fulfilled by this request compared to the set target On-Demand
/// capacity.
///
///
public double FulfilledOnDemandCapacity
{
get { return this._fulfilledOnDemandCapacity.GetValueOrDefault(); }
set { this._fulfilledOnDemandCapacity = value; }
}
// Check to see if FulfilledOnDemandCapacity property is set
internal bool IsSetFulfilledOnDemandCapacity()
{
return this._fulfilledOnDemandCapacity.HasValue;
}
///
/// Gets and sets the property Instances.
///
/// Information about the instances that were launched by the fleet. Valid only when Type
/// is set to instant
.
///
///
public List Instances
{
get { return this._instances; }
set { this._instances = value; }
}
// Check to see if Instances property is set
internal bool IsSetInstances()
{
return this._instances != null && this._instances.Count > 0;
}
///
/// Gets and sets the property LaunchTemplateConfigs.
///
/// The launch template and overrides.
///
///
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 OnDemandOptions.
///
/// The allocation strategy of On-Demand Instances in an EC2 Fleet.
///
///
public OnDemandOptions OnDemandOptions
{
get { return this._onDemandOptions; }
set { this._onDemandOptions = value; }
}
// Check to see if OnDemandOptions property is set
internal bool IsSetOnDemandOptions()
{
return this._onDemandOptions != null;
}
///
/// Gets and sets the property ReplaceUnhealthyInstances.
///
/// Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only
/// for fleets of type maintain
. For more information, see EC2
/// Fleet health checks in the Amazon EC2 User Guide.
///
///
public bool ReplaceUnhealthyInstances
{
get { return this._replaceUnhealthyInstances.GetValueOrDefault(); }
set { this._replaceUnhealthyInstances = value; }
}
// Check to see if ReplaceUnhealthyInstances property is set
internal bool IsSetReplaceUnhealthyInstances()
{
return this._replaceUnhealthyInstances.HasValue;
}
///
/// Gets and sets the property SpotOptions.
///
/// The configuration of Spot Instances in an EC2 Fleet.
///
///
public SpotOptions SpotOptions
{
get { return this._spotOptions; }
set { this._spotOptions = value; }
}
// Check to see if SpotOptions property is set
internal bool IsSetSpotOptions()
{
return this._spotOptions != null;
}
///
/// Gets and sets the property Tags.
///
/// The tags for an EC2 Fleet resource.
///
///
public List Tags
{
get { return this._tags; }
set { this._tags = value; }
}
// Check to see if Tags property is set
internal bool IsSetTags()
{
return this._tags != null && this._tags.Count > 0;
}
///
/// Gets and sets the property TargetCapacitySpecification.
///
/// The number of units to request. You can choose to set the target capacity in terms
/// of instances or a performance characteristic that is important to your application
/// workload, such as vCPUs, memory, or I/O. If the request type is maintain
,
/// you can specify a target capacity of 0 and add capacity later.
///
///
public TargetCapacitySpecification TargetCapacitySpecification
{
get { return this._targetCapacitySpecification; }
set { this._targetCapacitySpecification = value; }
}
// Check to see if TargetCapacitySpecification property is set
internal bool IsSetTargetCapacitySpecification()
{
return this._targetCapacitySpecification != null;
}
///
/// Gets and sets the property TerminateInstancesWithExpiration.
///
/// Indicates whether running instances should be terminated when the EC2 Fleet expires.
///
///
///
public bool TerminateInstancesWithExpiration
{
get { return this._terminateInstancesWithExpiration.GetValueOrDefault(); }
set { this._terminateInstancesWithExpiration = value; }
}
// Check to see if TerminateInstancesWithExpiration property is set
internal bool IsSetTerminateInstancesWithExpiration()
{
return this._terminateInstancesWithExpiration.HasValue;
}
///
/// Gets and sets the property Type.
///
/// The type of request. Indicates whether the EC2 Fleet only requests
the
/// target capacity, or also attempts to maintain
it. If you request a certain
/// target capacity, EC2 Fleet only places the required requests; it does not attempt
/// to replenish instances if capacity is diminished, and it does not submit requests
/// in alternative capacity pools if capacity is unavailable. To maintain a certain target
/// capacity, EC2 Fleet places the required requests to meet this target capacity. It
/// also automatically replenishes any interrupted Spot Instances. Default: maintain
.
///
///
public FleetType Type
{
get { return this._type; }
set { this._type = value; }
}
// Check to see if Type property is set
internal bool IsSetType()
{
return this._type != null;
}
///
/// Gets and sets the property ValidFrom.
///
/// The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
/// The default is to start fulfilling the request immediately.
///
///
public DateTime ValidFrom
{
get { return this._validFrom.GetValueOrDefault(); }
set { this._validFrom = value; }
}
// Check to see if ValidFrom property is set
internal bool IsSetValidFrom()
{
return this._validFrom.HasValue;
}
///
/// Gets and sets the property ValidUntil.
///
/// The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
/// At this point, no new instance requests are placed or able to fulfill the request.
/// The default end date is 7 days from the current date.
///
///
public DateTime ValidUntil
{
get { return this._validUntil.GetValueOrDefault(); }
set { this._validUntil = value; }
}
// Check to see if ValidUntil property is set
internal bool IsSetValidUntil()
{
return this._validUntil.HasValue;
}
}
}