/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace EC2 { namespace Model { /** *

Describes a Capacity Reservation.

See Also:

AWS * API Reference

*/ class CapacityReservation { public: AWS_EC2_API CapacityReservation(); AWS_EC2_API CapacityReservation(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API CapacityReservation& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The ID of the Capacity Reservation.

*/ inline const Aws::String& GetCapacityReservationId() const{ return m_capacityReservationId; } /** *

The ID of the Capacity Reservation.

*/ inline bool CapacityReservationIdHasBeenSet() const { return m_capacityReservationIdHasBeenSet; } /** *

The ID of the Capacity Reservation.

*/ inline void SetCapacityReservationId(const Aws::String& value) { m_capacityReservationIdHasBeenSet = true; m_capacityReservationId = value; } /** *

The ID of the Capacity Reservation.

*/ inline void SetCapacityReservationId(Aws::String&& value) { m_capacityReservationIdHasBeenSet = true; m_capacityReservationId = std::move(value); } /** *

The ID of the Capacity Reservation.

*/ inline void SetCapacityReservationId(const char* value) { m_capacityReservationIdHasBeenSet = true; m_capacityReservationId.assign(value); } /** *

The ID of the Capacity Reservation.

*/ inline CapacityReservation& WithCapacityReservationId(const Aws::String& value) { SetCapacityReservationId(value); return *this;} /** *

The ID of the Capacity Reservation.

*/ inline CapacityReservation& WithCapacityReservationId(Aws::String&& value) { SetCapacityReservationId(std::move(value)); return *this;} /** *

The ID of the Capacity Reservation.

*/ inline CapacityReservation& WithCapacityReservationId(const char* value) { SetCapacityReservationId(value); return *this;} /** *

The ID of the Amazon Web Services account that owns the Capacity * Reservation.

*/ inline const Aws::String& GetOwnerId() const{ return m_ownerId; } /** *

The ID of the Amazon Web Services account that owns the Capacity * Reservation.

*/ inline bool OwnerIdHasBeenSet() const { return m_ownerIdHasBeenSet; } /** *

The ID of the Amazon Web Services account that owns the Capacity * Reservation.

*/ inline void SetOwnerId(const Aws::String& value) { m_ownerIdHasBeenSet = true; m_ownerId = value; } /** *

The ID of the Amazon Web Services account that owns the Capacity * Reservation.

*/ inline void SetOwnerId(Aws::String&& value) { m_ownerIdHasBeenSet = true; m_ownerId = std::move(value); } /** *

The ID of the Amazon Web Services account that owns the Capacity * Reservation.

*/ inline void SetOwnerId(const char* value) { m_ownerIdHasBeenSet = true; m_ownerId.assign(value); } /** *

The ID of the Amazon Web Services account that owns the Capacity * Reservation.

*/ inline CapacityReservation& WithOwnerId(const Aws::String& value) { SetOwnerId(value); return *this;} /** *

The ID of the Amazon Web Services account that owns the Capacity * Reservation.

*/ inline CapacityReservation& WithOwnerId(Aws::String&& value) { SetOwnerId(std::move(value)); return *this;} /** *

The ID of the Amazon Web Services account that owns the Capacity * Reservation.

*/ inline CapacityReservation& WithOwnerId(const char* value) { SetOwnerId(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Capacity Reservation.

*/ inline const Aws::String& GetCapacityReservationArn() const{ return m_capacityReservationArn; } /** *

The Amazon Resource Name (ARN) of the Capacity Reservation.

*/ inline bool CapacityReservationArnHasBeenSet() const { return m_capacityReservationArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the Capacity Reservation.

*/ inline void SetCapacityReservationArn(const Aws::String& value) { m_capacityReservationArnHasBeenSet = true; m_capacityReservationArn = value; } /** *

The Amazon Resource Name (ARN) of the Capacity Reservation.

*/ inline void SetCapacityReservationArn(Aws::String&& value) { m_capacityReservationArnHasBeenSet = true; m_capacityReservationArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the Capacity Reservation.

*/ inline void SetCapacityReservationArn(const char* value) { m_capacityReservationArnHasBeenSet = true; m_capacityReservationArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the Capacity Reservation.

*/ inline CapacityReservation& WithCapacityReservationArn(const Aws::String& value) { SetCapacityReservationArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Capacity Reservation.

*/ inline CapacityReservation& WithCapacityReservationArn(Aws::String&& value) { SetCapacityReservationArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the Capacity Reservation.

*/ inline CapacityReservation& WithCapacityReservationArn(const char* value) { SetCapacityReservationArn(value); return *this;} /** *

The Availability Zone ID of the Capacity Reservation.

*/ inline const Aws::String& GetAvailabilityZoneId() const{ return m_availabilityZoneId; } /** *

The Availability Zone ID of the Capacity Reservation.

*/ inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; } /** *

The Availability Zone ID of the Capacity Reservation.

*/ inline void SetAvailabilityZoneId(const Aws::String& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = value; } /** *

The Availability Zone ID of the Capacity Reservation.

*/ inline void SetAvailabilityZoneId(Aws::String&& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = std::move(value); } /** *

The Availability Zone ID of the Capacity Reservation.

*/ inline void SetAvailabilityZoneId(const char* value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId.assign(value); } /** *

The Availability Zone ID of the Capacity Reservation.

*/ inline CapacityReservation& WithAvailabilityZoneId(const Aws::String& value) { SetAvailabilityZoneId(value); return *this;} /** *

The Availability Zone ID of the Capacity Reservation.

*/ inline CapacityReservation& WithAvailabilityZoneId(Aws::String&& value) { SetAvailabilityZoneId(std::move(value)); return *this;} /** *

The Availability Zone ID of the Capacity Reservation.

*/ inline CapacityReservation& WithAvailabilityZoneId(const char* value) { SetAvailabilityZoneId(value); return *this;} /** *

The type of instance for which the Capacity Reservation reserves * capacity.

*/ inline const Aws::String& GetInstanceType() const{ return m_instanceType; } /** *

The type of instance for which the Capacity Reservation reserves * capacity.

*/ inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; } /** *

The type of instance for which the Capacity Reservation reserves * capacity.

*/ inline void SetInstanceType(const Aws::String& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; } /** *

The type of instance for which the Capacity Reservation reserves * capacity.

*/ inline void SetInstanceType(Aws::String&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); } /** *

The type of instance for which the Capacity Reservation reserves * capacity.

*/ inline void SetInstanceType(const char* value) { m_instanceTypeHasBeenSet = true; m_instanceType.assign(value); } /** *

The type of instance for which the Capacity Reservation reserves * capacity.

*/ inline CapacityReservation& WithInstanceType(const Aws::String& value) { SetInstanceType(value); return *this;} /** *

The type of instance for which the Capacity Reservation reserves * capacity.

*/ inline CapacityReservation& WithInstanceType(Aws::String&& value) { SetInstanceType(std::move(value)); return *this;} /** *

The type of instance for which the Capacity Reservation reserves * capacity.

*/ inline CapacityReservation& WithInstanceType(const char* value) { SetInstanceType(value); return *this;} /** *

The type of operating system for which the Capacity Reservation reserves * capacity.

*/ inline const CapacityReservationInstancePlatform& GetInstancePlatform() const{ return m_instancePlatform; } /** *

The type of operating system for which the Capacity Reservation reserves * capacity.

*/ inline bool InstancePlatformHasBeenSet() const { return m_instancePlatformHasBeenSet; } /** *

The type of operating system for which the Capacity Reservation reserves * capacity.

*/ inline void SetInstancePlatform(const CapacityReservationInstancePlatform& value) { m_instancePlatformHasBeenSet = true; m_instancePlatform = value; } /** *

The type of operating system for which the Capacity Reservation reserves * capacity.

*/ inline void SetInstancePlatform(CapacityReservationInstancePlatform&& value) { m_instancePlatformHasBeenSet = true; m_instancePlatform = std::move(value); } /** *

The type of operating system for which the Capacity Reservation reserves * capacity.

*/ inline CapacityReservation& WithInstancePlatform(const CapacityReservationInstancePlatform& value) { SetInstancePlatform(value); return *this;} /** *

The type of operating system for which the Capacity Reservation reserves * capacity.

*/ inline CapacityReservation& WithInstancePlatform(CapacityReservationInstancePlatform&& value) { SetInstancePlatform(std::move(value)); return *this;} /** *

The Availability Zone in which the capacity is reserved.

*/ inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; } /** *

The Availability Zone in which the capacity is reserved.

*/ inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; } /** *

The Availability Zone in which the capacity is reserved.

*/ inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; } /** *

The Availability Zone in which the capacity is reserved.

*/ inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); } /** *

The Availability Zone in which the capacity is reserved.

*/ inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); } /** *

The Availability Zone in which the capacity is reserved.

*/ inline CapacityReservation& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;} /** *

The Availability Zone in which the capacity is reserved.

*/ inline CapacityReservation& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;} /** *

The Availability Zone in which the capacity is reserved.

*/ inline CapacityReservation& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;} /** *

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.

  • *
*/ inline const CapacityReservationTenancy& GetTenancy() const{ return m_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.

  • *
*/ inline bool TenancyHasBeenSet() const { return m_tenancyHasBeenSet; } /** *

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.

  • *
*/ inline void SetTenancy(const CapacityReservationTenancy& value) { m_tenancyHasBeenSet = true; m_tenancy = value; } /** *

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.

  • *
*/ inline void SetTenancy(CapacityReservationTenancy&& value) { m_tenancyHasBeenSet = true; m_tenancy = std::move(value); } /** *

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.

  • *
*/ inline CapacityReservation& WithTenancy(const CapacityReservationTenancy& value) { SetTenancy(value); return *this;} /** *

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.

  • *
*/ inline CapacityReservation& WithTenancy(CapacityReservationTenancy&& value) { SetTenancy(std::move(value)); return *this;} /** *

The total number of instances for which the Capacity Reservation reserves * capacity.

*/ inline int GetTotalInstanceCount() const{ return m_totalInstanceCount; } /** *

The total number of instances for which the Capacity Reservation reserves * capacity.

*/ inline bool TotalInstanceCountHasBeenSet() const { return m_totalInstanceCountHasBeenSet; } /** *

The total number of instances for which the Capacity Reservation reserves * capacity.

*/ inline void SetTotalInstanceCount(int value) { m_totalInstanceCountHasBeenSet = true; m_totalInstanceCount = value; } /** *

The total number of instances for which the Capacity Reservation reserves * capacity.

*/ inline CapacityReservation& WithTotalInstanceCount(int value) { SetTotalInstanceCount(value); return *this;} /** *

The remaining capacity. Indicates the number of instances that can be * launched in the Capacity Reservation.

*/ inline int GetAvailableInstanceCount() const{ return m_availableInstanceCount; } /** *

The remaining capacity. Indicates the number of instances that can be * launched in the Capacity Reservation.

*/ inline bool AvailableInstanceCountHasBeenSet() const { return m_availableInstanceCountHasBeenSet; } /** *

The remaining capacity. Indicates the number of instances that can be * launched in the Capacity Reservation.

*/ inline void SetAvailableInstanceCount(int value) { m_availableInstanceCountHasBeenSet = true; m_availableInstanceCount = value; } /** *

The remaining capacity. Indicates the number of instances that can be * launched in the Capacity Reservation.

*/ inline CapacityReservation& WithAvailableInstanceCount(int value) { SetAvailableInstanceCount(value); return *this;} /** *

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.

*/ inline bool GetEbsOptimized() const{ return m_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.

*/ inline bool EbsOptimizedHasBeenSet() const { return m_ebsOptimizedHasBeenSet; } /** *

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.

*/ inline void SetEbsOptimized(bool value) { m_ebsOptimizedHasBeenSet = true; m_ebsOptimized = value; } /** *

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.

*/ inline CapacityReservation& WithEbsOptimized(bool value) { SetEbsOptimized(value); return *this;} /** *

Deprecated.

*/ inline bool GetEphemeralStorage() const{ return m_ephemeralStorage; } /** *

Deprecated.

*/ inline bool EphemeralStorageHasBeenSet() const { return m_ephemeralStorageHasBeenSet; } /** *

Deprecated.

*/ inline void SetEphemeralStorage(bool value) { m_ephemeralStorageHasBeenSet = true; m_ephemeralStorage = value; } /** *

Deprecated.

*/ inline CapacityReservation& WithEphemeralStorage(bool value) { SetEphemeralStorage(value); return *this;} /** *

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.

*/ inline const CapacityReservationState& GetState() const{ return m_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.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

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.

*/ inline void SetState(const CapacityReservationState& value) { m_stateHasBeenSet = true; m_state = value; } /** *

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.

*/ inline void SetState(CapacityReservationState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

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.

*/ inline CapacityReservation& WithState(const CapacityReservationState& value) { SetState(value); return *this;} /** *

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.

*/ inline CapacityReservation& WithState(CapacityReservationState&& value) { SetState(std::move(value)); return *this;} /** *

The date and time at which the Capacity Reservation was started.

*/ inline const Aws::Utils::DateTime& GetStartDate() const{ return m_startDate; } /** *

The date and time at which the Capacity Reservation was started.

*/ inline bool StartDateHasBeenSet() const { return m_startDateHasBeenSet; } /** *

The date and time at which the Capacity Reservation was started.

*/ inline void SetStartDate(const Aws::Utils::DateTime& value) { m_startDateHasBeenSet = true; m_startDate = value; } /** *

The date and time at which the Capacity Reservation was started.

*/ inline void SetStartDate(Aws::Utils::DateTime&& value) { m_startDateHasBeenSet = true; m_startDate = std::move(value); } /** *

The date and time at which the Capacity Reservation was started.

*/ inline CapacityReservation& WithStartDate(const Aws::Utils::DateTime& value) { SetStartDate(value); return *this;} /** *

The date and time at which the Capacity Reservation was started.

*/ inline CapacityReservation& WithStartDate(Aws::Utils::DateTime&& value) { SetStartDate(std::move(value)); return *this;} /** *

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.

*/ inline const Aws::Utils::DateTime& GetEndDate() const{ return m_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.

*/ inline bool EndDateHasBeenSet() const { return m_endDateHasBeenSet; } /** *

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.

*/ inline void SetEndDate(const Aws::Utils::DateTime& value) { m_endDateHasBeenSet = true; m_endDate = value; } /** *

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.

*/ inline void SetEndDate(Aws::Utils::DateTime&& value) { m_endDateHasBeenSet = true; m_endDate = std::move(value); } /** *

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.

*/ inline CapacityReservation& WithEndDate(const Aws::Utils::DateTime& value) { SetEndDate(value); return *this;} /** *

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.

*/ inline CapacityReservation& WithEndDate(Aws::Utils::DateTime&& value) { SetEndDate(std::move(value)); return *this;} /** *

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.

*/ inline const EndDateType& GetEndDateType() const{ return m_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.

*/ inline bool EndDateTypeHasBeenSet() const { return m_endDateTypeHasBeenSet; } /** *

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.

*/ inline void SetEndDateType(const EndDateType& value) { m_endDateTypeHasBeenSet = true; m_endDateType = value; } /** *

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.

*/ inline void SetEndDateType(EndDateType&& value) { m_endDateTypeHasBeenSet = true; m_endDateType = std::move(value); } /** *

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.

*/ inline CapacityReservation& WithEndDateType(const EndDateType& value) { SetEndDateType(value); return *this;} /** *

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.

*/ inline CapacityReservation& WithEndDateType(EndDateType&& value) { SetEndDateType(std::move(value)); return *this;} /** *

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.

  • *
*/ inline const InstanceMatchCriteria& GetInstanceMatchCriteria() const{ return m_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.

  • *
*/ inline bool InstanceMatchCriteriaHasBeenSet() const { return m_instanceMatchCriteriaHasBeenSet; } /** *

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.

  • *
*/ inline void SetInstanceMatchCriteria(const InstanceMatchCriteria& value) { m_instanceMatchCriteriaHasBeenSet = true; m_instanceMatchCriteria = value; } /** *

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.

  • *
*/ inline void SetInstanceMatchCriteria(InstanceMatchCriteria&& value) { m_instanceMatchCriteriaHasBeenSet = true; m_instanceMatchCriteria = std::move(value); } /** *

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.

  • *
*/ inline CapacityReservation& WithInstanceMatchCriteria(const InstanceMatchCriteria& value) { SetInstanceMatchCriteria(value); return *this;} /** *

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.

  • *
*/ inline CapacityReservation& WithInstanceMatchCriteria(InstanceMatchCriteria&& value) { SetInstanceMatchCriteria(std::move(value)); return *this;} /** *

The date and time at which the Capacity Reservation was created.

*/ inline const Aws::Utils::DateTime& GetCreateDate() const{ return m_createDate; } /** *

The date and time at which the Capacity Reservation was created.

*/ inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; } /** *

The date and time at which the Capacity Reservation was created.

*/ inline void SetCreateDate(const Aws::Utils::DateTime& value) { m_createDateHasBeenSet = true; m_createDate = value; } /** *

The date and time at which the Capacity Reservation was created.

*/ inline void SetCreateDate(Aws::Utils::DateTime&& value) { m_createDateHasBeenSet = true; m_createDate = std::move(value); } /** *

The date and time at which the Capacity Reservation was created.

*/ inline CapacityReservation& WithCreateDate(const Aws::Utils::DateTime& value) { SetCreateDate(value); return *this;} /** *

The date and time at which the Capacity Reservation was created.

*/ inline CapacityReservation& WithCreateDate(Aws::Utils::DateTime&& value) { SetCreateDate(std::move(value)); return *this;} /** *

Any tags assigned to the Capacity Reservation.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

Any tags assigned to the Capacity Reservation.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

Any tags assigned to the Capacity Reservation.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

Any tags assigned to the Capacity Reservation.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

Any tags assigned to the Capacity Reservation.

*/ inline CapacityReservation& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

Any tags assigned to the Capacity Reservation.

*/ inline CapacityReservation& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

Any tags assigned to the Capacity Reservation.

*/ inline CapacityReservation& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

Any tags assigned to the Capacity Reservation.

*/ inline CapacityReservation& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

The Amazon Resource Name (ARN) of the Outpost on which the Capacity * Reservation was created.

*/ inline const Aws::String& GetOutpostArn() const{ return m_outpostArn; } /** *

The Amazon Resource Name (ARN) of the Outpost on which the Capacity * Reservation was created.

*/ inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the Outpost on which the Capacity * Reservation was created.

*/ inline void SetOutpostArn(const Aws::String& value) { m_outpostArnHasBeenSet = true; m_outpostArn = value; } /** *

The Amazon Resource Name (ARN) of the Outpost on which the Capacity * Reservation was created.

*/ inline void SetOutpostArn(Aws::String&& value) { m_outpostArnHasBeenSet = true; m_outpostArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the Outpost on which the Capacity * Reservation was created.

*/ inline void SetOutpostArn(const char* value) { m_outpostArnHasBeenSet = true; m_outpostArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the Outpost on which the Capacity * Reservation was created.

*/ inline CapacityReservation& WithOutpostArn(const Aws::String& value) { SetOutpostArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Outpost on which the Capacity * Reservation was created.

*/ inline CapacityReservation& WithOutpostArn(Aws::String&& value) { SetOutpostArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the Outpost on which the Capacity * Reservation was created.

*/ inline CapacityReservation& WithOutpostArn(const char* value) { SetOutpostArn(value); return *this;} /** *

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.

*/ inline const Aws::String& GetCapacityReservationFleetId() const{ return m_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.

*/ inline bool CapacityReservationFleetIdHasBeenSet() const { return m_capacityReservationFleetIdHasBeenSet; } /** *

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.

*/ inline void SetCapacityReservationFleetId(const Aws::String& value) { m_capacityReservationFleetIdHasBeenSet = true; m_capacityReservationFleetId = value; } /** *

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.

*/ inline void SetCapacityReservationFleetId(Aws::String&& value) { m_capacityReservationFleetIdHasBeenSet = true; m_capacityReservationFleetId = std::move(value); } /** *

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.

*/ inline void SetCapacityReservationFleetId(const char* value) { m_capacityReservationFleetIdHasBeenSet = true; m_capacityReservationFleetId.assign(value); } /** *

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.

*/ inline CapacityReservation& WithCapacityReservationFleetId(const Aws::String& value) { SetCapacityReservationFleetId(value); return *this;} /** *

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.

*/ inline CapacityReservation& WithCapacityReservationFleetId(Aws::String&& value) { SetCapacityReservationFleetId(std::move(value)); return *this;} /** *

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.

*/ inline CapacityReservation& WithCapacityReservationFleetId(const char* value) { SetCapacityReservationFleetId(value); return *this;} /** *

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.

*/ inline const Aws::String& GetPlacementGroupArn() const{ return m_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.

*/ inline bool PlacementGroupArnHasBeenSet() const { return m_placementGroupArnHasBeenSet; } /** *

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.

*/ inline void SetPlacementGroupArn(const Aws::String& value) { m_placementGroupArnHasBeenSet = true; m_placementGroupArn = value; } /** *

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.

*/ inline void SetPlacementGroupArn(Aws::String&& value) { m_placementGroupArnHasBeenSet = true; m_placementGroupArn = std::move(value); } /** *

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.

*/ inline void SetPlacementGroupArn(const char* value) { m_placementGroupArnHasBeenSet = true; m_placementGroupArn.assign(value); } /** *

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.

*/ inline CapacityReservation& WithPlacementGroupArn(const Aws::String& value) { SetPlacementGroupArn(value); return *this;} /** *

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.

*/ inline CapacityReservation& WithPlacementGroupArn(Aws::String&& value) { SetPlacementGroupArn(std::move(value)); return *this;} /** *

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.

*/ inline CapacityReservation& WithPlacementGroupArn(const char* value) { SetPlacementGroupArn(value); return *this;} /** *

Information about instance capacity usage.

*/ inline const Aws::Vector& GetCapacityAllocations() const{ return m_capacityAllocations; } /** *

Information about instance capacity usage.

*/ inline bool CapacityAllocationsHasBeenSet() const { return m_capacityAllocationsHasBeenSet; } /** *

Information about instance capacity usage.

*/ inline void SetCapacityAllocations(const Aws::Vector& value) { m_capacityAllocationsHasBeenSet = true; m_capacityAllocations = value; } /** *

Information about instance capacity usage.

*/ inline void SetCapacityAllocations(Aws::Vector&& value) { m_capacityAllocationsHasBeenSet = true; m_capacityAllocations = std::move(value); } /** *

Information about instance capacity usage.

*/ inline CapacityReservation& WithCapacityAllocations(const Aws::Vector& value) { SetCapacityAllocations(value); return *this;} /** *

Information about instance capacity usage.

*/ inline CapacityReservation& WithCapacityAllocations(Aws::Vector&& value) { SetCapacityAllocations(std::move(value)); return *this;} /** *

Information about instance capacity usage.

*/ inline CapacityReservation& AddCapacityAllocations(const CapacityAllocation& value) { m_capacityAllocationsHasBeenSet = true; m_capacityAllocations.push_back(value); return *this; } /** *

Information about instance capacity usage.

*/ inline CapacityReservation& AddCapacityAllocations(CapacityAllocation&& value) { m_capacityAllocationsHasBeenSet = true; m_capacityAllocations.push_back(std::move(value)); return *this; } private: Aws::String m_capacityReservationId; bool m_capacityReservationIdHasBeenSet = false; Aws::String m_ownerId; bool m_ownerIdHasBeenSet = false; Aws::String m_capacityReservationArn; bool m_capacityReservationArnHasBeenSet = false; Aws::String m_availabilityZoneId; bool m_availabilityZoneIdHasBeenSet = false; Aws::String m_instanceType; bool m_instanceTypeHasBeenSet = false; CapacityReservationInstancePlatform m_instancePlatform; bool m_instancePlatformHasBeenSet = false; Aws::String m_availabilityZone; bool m_availabilityZoneHasBeenSet = false; CapacityReservationTenancy m_tenancy; bool m_tenancyHasBeenSet = false; int m_totalInstanceCount; bool m_totalInstanceCountHasBeenSet = false; int m_availableInstanceCount; bool m_availableInstanceCountHasBeenSet = false; bool m_ebsOptimized; bool m_ebsOptimizedHasBeenSet = false; bool m_ephemeralStorage; bool m_ephemeralStorageHasBeenSet = false; CapacityReservationState m_state; bool m_stateHasBeenSet = false; Aws::Utils::DateTime m_startDate; bool m_startDateHasBeenSet = false; Aws::Utils::DateTime m_endDate; bool m_endDateHasBeenSet = false; EndDateType m_endDateType; bool m_endDateTypeHasBeenSet = false; InstanceMatchCriteria m_instanceMatchCriteria; bool m_instanceMatchCriteriaHasBeenSet = false; Aws::Utils::DateTime m_createDate; bool m_createDateHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; Aws::String m_outpostArn; bool m_outpostArnHasBeenSet = false; Aws::String m_capacityReservationFleetId; bool m_capacityReservationFleetIdHasBeenSet = false; Aws::String m_placementGroupArn; bool m_placementGroupArnHasBeenSet = false; Aws::Vector m_capacityAllocations; bool m_capacityAllocationsHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws