/*
* 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 a Capacity Reservation.
///
public partial class CapacityReservation
{
private string _availabilityZone;
private string _availabilityZoneId;
private int? _availableInstanceCount;
private List _capacityAllocations = new List();
private string _capacityReservationArn;
private string _capacityReservationFleetId;
private string _capacityReservationId;
private DateTime? _createDate;
private bool? _ebsOptimized;
private DateTime? _endDate;
private EndDateType _endDateType;
private bool? _ephemeralStorage;
private InstanceMatchCriteria _instanceMatchCriteria;
private CapacityReservationInstancePlatform _instancePlatform;
private string _instanceType;
private string _outpostArn;
private string _ownerId;
private string _placementGroupArn;
private DateTime? _startDate;
private CapacityReservationState _state;
private List _tags = new List();
private CapacityReservationTenancy _tenancy;
private int? _totalInstanceCount;
///
/// Gets and sets the property AvailabilityZone.
///
/// The Availability Zone in which the capacity is reserved.
///
///
public string AvailabilityZone
{
get { return this._availabilityZone; }
set { this._availabilityZone = value; }
}
// Check to see if AvailabilityZone property is set
internal bool IsSetAvailabilityZone()
{
return this._availabilityZone != null;
}
///
/// Gets and sets the property AvailabilityZoneId.
///
/// The Availability Zone ID of the Capacity Reservation.
///
///
public string AvailabilityZoneId
{
get { return this._availabilityZoneId; }
set { this._availabilityZoneId = value; }
}
// Check to see if AvailabilityZoneId property is set
internal bool IsSetAvailabilityZoneId()
{
return this._availabilityZoneId != null;
}
///
/// Gets and sets the property AvailableInstanceCount.
///
/// The remaining capacity. Indicates the number of instances that can be launched in
/// the Capacity Reservation.
///
///
public int AvailableInstanceCount
{
get { return this._availableInstanceCount.GetValueOrDefault(); }
set { this._availableInstanceCount = value; }
}
// Check to see if AvailableInstanceCount property is set
internal bool IsSetAvailableInstanceCount()
{
return this._availableInstanceCount.HasValue;
}
///
/// Gets and sets the property CapacityAllocations.
///
/// Information about instance capacity usage.
///
///
public List CapacityAllocations
{
get { return this._capacityAllocations; }
set { this._capacityAllocations = value; }
}
// Check to see if CapacityAllocations property is set
internal bool IsSetCapacityAllocations()
{
return this._capacityAllocations != null && this._capacityAllocations.Count > 0;
}
///
/// Gets and sets the property CapacityReservationArn.
///
/// The Amazon Resource Name (ARN) of the Capacity Reservation.
///
///
public string CapacityReservationArn
{
get { return this._capacityReservationArn; }
set { this._capacityReservationArn = value; }
}
// Check to see if CapacityReservationArn property is set
internal bool IsSetCapacityReservationArn()
{
return this._capacityReservationArn != null;
}
///
/// Gets and sets the property CapacityReservationFleetId.
///
/// The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs.
/// Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.
///
///
public string CapacityReservationFleetId
{
get { return this._capacityReservationFleetId; }
set { this._capacityReservationFleetId = value; }
}
// Check to see if CapacityReservationFleetId property is set
internal bool IsSetCapacityReservationFleetId()
{
return this._capacityReservationFleetId != null;
}
///
/// Gets and sets the property CapacityReservationId.
///
/// The ID of the Capacity Reservation.
///
///
public string CapacityReservationId
{
get { return this._capacityReservationId; }
set { this._capacityReservationId = value; }
}
// Check to see if CapacityReservationId property is set
internal bool IsSetCapacityReservationId()
{
return this._capacityReservationId != null;
}
///
/// Gets and sets the property CreateDate.
///
/// The date and time at which the Capacity Reservation was created.
///
///
public DateTime CreateDate
{
get { return this._createDate.GetValueOrDefault(); }
set { this._createDate = value; }
}
// Check to see if CreateDate property is set
internal bool IsSetCreateDate()
{
return this._createDate.HasValue;
}
///
/// Gets and sets the property EbsOptimized.
///
/// Indicates whether the Capacity Reservation supports EBS-optimized instances. This
/// optimization provides dedicated throughput to Amazon EBS and an optimized configuration
/// stack to provide optimal I/O performance. This optimization isn't available with all
/// instance types. Additional usage charges apply when using an EBS- optimized instance.
///
///
public bool EbsOptimized
{
get { return this._ebsOptimized.GetValueOrDefault(); }
set { this._ebsOptimized = value; }
}
// Check to see if EbsOptimized property is set
internal bool IsSetEbsOptimized()
{
return this._ebsOptimized.HasValue;
}
///
/// Gets and sets the property EndDate.
///
/// The date and time at which the Capacity Reservation expires. When a Capacity Reservation
/// expires, the reserved capacity is released and you can no longer launch instances
/// into it. The Capacity Reservation's state changes to expired
when it
/// reaches its end date and time.
///
///
public DateTime EndDate
{
get { return this._endDate.GetValueOrDefault(); }
set { this._endDate = value; }
}
// Check to see if EndDate property is set
internal bool IsSetEndDate()
{
return this._endDate.HasValue;
}
///
/// Gets and sets the property EndDateType.
///
/// Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can
/// have one of the following end types:
///
/// -
///
///
unlimited
- The Capacity Reservation remains active until you explicitly
/// cancel it.
///
/// -
///
///
limited
- The Capacity Reservation expires automatically at a specified
/// date and time.
///
///
///
public EndDateType EndDateType
{
get { return this._endDateType; }
set { this._endDateType = value; }
}
// Check to see if EndDateType property is set
internal bool IsSetEndDateType()
{
return this._endDateType != null;
}
///
/// Gets and sets the property EphemeralStorage.
///
/// Deprecated.
///
///
public bool EphemeralStorage
{
get { return this._ephemeralStorage.GetValueOrDefault(); }
set { this._ephemeralStorage = value; }
}
// Check to see if EphemeralStorage property is set
internal bool IsSetEphemeralStorage()
{
return this._ephemeralStorage.HasValue;
}
///
/// Gets and sets the property InstanceMatchCriteria.
///
/// Indicates the type of instance launches that the Capacity Reservation accepts. The
/// options include:
///
/// -
///
///
open
- The Capacity Reservation accepts all instances that have matching
/// attributes (instance type, platform, and Availability Zone). Instances that have matching
/// attributes launch into the Capacity Reservation automatically without specifying any
/// additional parameters.
///
/// -
///
///
targeted
- The Capacity Reservation only accepts instances that have
/// matching attributes (instance type, platform, and Availability Zone), and explicitly
/// target the Capacity Reservation. This ensures that only permitted instances can use
/// the reserved capacity.
///
///
///
public InstanceMatchCriteria InstanceMatchCriteria
{
get { return this._instanceMatchCriteria; }
set { this._instanceMatchCriteria = value; }
}
// Check to see if InstanceMatchCriteria property is set
internal bool IsSetInstanceMatchCriteria()
{
return this._instanceMatchCriteria != null;
}
///
/// Gets and sets the property InstancePlatform.
///
/// The type of operating system for which the Capacity Reservation reserves capacity.
///
///
public CapacityReservationInstancePlatform InstancePlatform
{
get { return this._instancePlatform; }
set { this._instancePlatform = value; }
}
// Check to see if InstancePlatform property is set
internal bool IsSetInstancePlatform()
{
return this._instancePlatform != null;
}
///
/// Gets and sets the property InstanceType.
///
/// The type of instance for which the Capacity Reservation reserves capacity.
///
///
public string InstanceType
{
get { return this._instanceType; }
set { this._instanceType = value; }
}
// Check to see if InstanceType property is set
internal bool IsSetInstanceType()
{
return this._instanceType != null;
}
///
/// Gets and sets the property OutpostArn.
///
/// The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was
/// created.
///
///
public string OutpostArn
{
get { return this._outpostArn; }
set { this._outpostArn = value; }
}
// Check to see if OutpostArn property is set
internal bool IsSetOutpostArn()
{
return this._outpostArn != null;
}
///
/// Gets and sets the property OwnerId.
///
/// The ID of the Amazon Web Services account that owns the Capacity Reservation.
///
///
public string OwnerId
{
get { return this._ownerId; }
set { this._ownerId = value; }
}
// Check to see if OwnerId property is set
internal bool IsSetOwnerId()
{
return this._ownerId != null;
}
///
/// Gets and sets the property PlacementGroupArn.
///
/// The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity
/// Reservation was created. For more information, see
/// Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide.
///
///
public string PlacementGroupArn
{
get { return this._placementGroupArn; }
set { this._placementGroupArn = value; }
}
// Check to see if PlacementGroupArn property is set
internal bool IsSetPlacementGroupArn()
{
return this._placementGroupArn != null;
}
///
/// Gets and sets the property StartDate.
///
/// The date and time at which the Capacity Reservation was started.
///
///
public DateTime StartDate
{
get { return this._startDate.GetValueOrDefault(); }
set { this._startDate = value; }
}
// Check to see if StartDate property is set
internal bool IsSetStartDate()
{
return this._startDate.HasValue;
}
///
/// Gets and sets the property State.
///
/// The current state of the Capacity Reservation. A Capacity Reservation can be in one
/// of the following states:
///
/// -
///
///
active
- The Capacity Reservation is active and the capacity is available
/// for your use.
///
/// -
///
///
expired
- The Capacity Reservation expired automatically at the date
/// and time specified in your request. The reserved capacity is no longer available for
/// your use.
///
/// -
///
///
cancelled
- The Capacity Reservation was cancelled. The reserved capacity
/// is no longer available for your use.
///
/// -
///
///
pending
- The Capacity Reservation request was successful but the capacity
/// provisioning is still pending.
///
/// -
///
///
failed
- The Capacity Reservation request has failed. A request might
/// fail due to invalid request parameters, capacity constraints, or instance limit constraints.
/// Failed requests are retained for 60 minutes.
///
///
///
public CapacityReservationState State
{
get { return this._state; }
set { this._state = value; }
}
// Check to see if State property is set
internal bool IsSetState()
{
return this._state != null;
}
///
/// Gets and sets the property Tags.
///
/// Any tags assigned to the Capacity Reservation.
///
///
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 Tenancy.
///
/// Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have
/// one of the following tenancy settings:
///
/// -
///
///
default
- The Capacity Reservation is created on hardware that is shared
/// with other Amazon Web Services accounts.
///
/// -
///
///
dedicated
- The Capacity Reservation is created on single-tenant hardware
/// that is dedicated to a single Amazon Web Services account.
///
///
///
public CapacityReservationTenancy Tenancy
{
get { return this._tenancy; }
set { this._tenancy = value; }
}
// Check to see if Tenancy property is set
internal bool IsSetTenancy()
{
return this._tenancy != null;
}
///
/// Gets and sets the property TotalInstanceCount.
///
/// The total number of instances for which the Capacity Reservation reserves capacity.
///
///
public int TotalInstanceCount
{
get { return this._totalInstanceCount.GetValueOrDefault(); }
set { this._totalInstanceCount = value; }
}
// Check to see if TotalInstanceCount property is set
internal bool IsSetTotalInstanceCount()
{
return this._totalInstanceCount.HasValue;
}
}
}