/** * 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 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 AWS_EC2_API CapacityReservation { public: CapacityReservation(); CapacityReservation(const Aws::Utils::Xml::XmlNode& xmlNode); CapacityReservation& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; 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 AWS account that owns the Capacity Reservation.

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

The ID of the AWS account that owns the Capacity Reservation.

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

The ID of the AWS account that owns the Capacity Reservation.

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

The ID of the AWS account that owns the Capacity Reservation.

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

The ID of the AWS account that owns the Capacity Reservation.

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

The ID of the AWS account that owns the Capacity Reservation.

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

The ID of the AWS account that owns the Capacity Reservation.

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

The ID of the AWS 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 AWS accounts.

  • dedicated - The * Capacity Reservation is created on single-tenant hardware that is dedicated to a * single AWS 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 AWS accounts.

  • dedicated - The * Capacity Reservation is created on single-tenant hardware that is dedicated to a * single AWS 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 AWS accounts.

  • dedicated - The * Capacity Reservation is created on single-tenant hardware that is dedicated to a * single AWS 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 AWS accounts.

  • dedicated - The * Capacity Reservation is created on single-tenant hardware that is dedicated to a * single AWS 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 AWS accounts.

  • dedicated - The * Capacity Reservation is created on single-tenant hardware that is dedicated to a * single AWS 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 AWS accounts.

  • dedicated - The * Capacity Reservation is created on single-tenant hardware that is dedicated to a * single AWS 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;} /** *

Indicates whether the Capacity Reservation supports instances with temporary, * block-level storage.

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

Indicates whether the Capacity Reservation supports instances with temporary, * block-level storage.

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

Indicates whether the Capacity Reservation supports instances with temporary, * block-level storage.

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

Indicates whether the Capacity Reservation supports instances with temporary, * block-level storage.

*/ 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 manually 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 manually 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 manually 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 manually 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 manually 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 manually 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 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; } private: Aws::String m_capacityReservationId; bool m_capacityReservationIdHasBeenSet; Aws::String m_ownerId; bool m_ownerIdHasBeenSet; Aws::String m_capacityReservationArn; bool m_capacityReservationArnHasBeenSet; Aws::String m_availabilityZoneId; bool m_availabilityZoneIdHasBeenSet; Aws::String m_instanceType; bool m_instanceTypeHasBeenSet; CapacityReservationInstancePlatform m_instancePlatform; bool m_instancePlatformHasBeenSet; Aws::String m_availabilityZone; bool m_availabilityZoneHasBeenSet; CapacityReservationTenancy m_tenancy; bool m_tenancyHasBeenSet; int m_totalInstanceCount; bool m_totalInstanceCountHasBeenSet; int m_availableInstanceCount; bool m_availableInstanceCountHasBeenSet; bool m_ebsOptimized; bool m_ebsOptimizedHasBeenSet; bool m_ephemeralStorage; bool m_ephemeralStorageHasBeenSet; CapacityReservationState m_state; bool m_stateHasBeenSet; Aws::Utils::DateTime m_endDate; bool m_endDateHasBeenSet; EndDateType m_endDateType; bool m_endDateTypeHasBeenSet; InstanceMatchCriteria m_instanceMatchCriteria; bool m_instanceMatchCriteriaHasBeenSet; Aws::Utils::DateTime m_createDate; bool m_createDateHasBeenSet; Aws::Vector m_tags; bool m_tagsHasBeenSet; }; } // namespace Model } // namespace EC2 } // namespace Aws