/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace EC2 { namespace Model { /** */ class ModifyCapacityReservationRequest : public EC2Request { public: AWS_EC2_API ModifyCapacityReservationRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "ModifyCapacityReservation"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

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 ModifyCapacityReservationRequest& WithCapacityReservationId(const Aws::String& value) { SetCapacityReservationId(value); return *this;} /** *

The ID of the Capacity Reservation.

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

The ID of the Capacity Reservation.

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

The number of instances for which to reserve capacity. The number of * instances can't be increased or decreased by more than 1000 in a * single request.

*/ inline int GetInstanceCount() const{ return m_instanceCount; } /** *

The number of instances for which to reserve capacity. The number of * instances can't be increased or decreased by more than 1000 in a * single request.

*/ inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; } /** *

The number of instances for which to reserve capacity. The number of * instances can't be increased or decreased by more than 1000 in a * single request.

*/ inline void SetInstanceCount(int value) { m_instanceCountHasBeenSet = true; m_instanceCount = value; } /** *

The number of instances for which to reserve capacity. The number of * instances can't be increased or decreased by more than 1000 in a * single request.

*/ inline ModifyCapacityReservationRequest& WithInstanceCount(int value) { SetInstanceCount(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.

The Capacity * Reservation is cancelled within an hour from the specified time. For example, if * you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end * between 13:30:55 and 14:30:55 on 5/31/2019.

You must provide an * EndDate value if EndDateType is limited. * Omit EndDate if EndDateType is * unlimited.

*/ 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.

The Capacity * Reservation is cancelled within an hour from the specified time. For example, if * you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end * between 13:30:55 and 14:30:55 on 5/31/2019.

You must provide an * EndDate value if EndDateType is limited. * Omit EndDate if EndDateType is * unlimited.

*/ 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.

The Capacity * Reservation is cancelled within an hour from the specified time. For example, if * you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end * between 13:30:55 and 14:30:55 on 5/31/2019.

You must provide an * EndDate value if EndDateType is limited. * Omit EndDate if EndDateType is * unlimited.

*/ 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.

The Capacity * Reservation is cancelled within an hour from the specified time. For example, if * you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end * between 13:30:55 and 14:30:55 on 5/31/2019.

You must provide an * EndDate value if EndDateType is limited. * Omit EndDate if EndDateType is * unlimited.

*/ 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.

The Capacity * Reservation is cancelled within an hour from the specified time. For example, if * you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end * between 13:30:55 and 14:30:55 on 5/31/2019.

You must provide an * EndDate value if EndDateType is limited. * Omit EndDate if EndDateType is * unlimited.

*/ inline ModifyCapacityReservationRequest& 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.

The Capacity * Reservation is cancelled within an hour from the specified time. For example, if * you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end * between 13:30:55 and 14:30:55 on 5/31/2019.

You must provide an * EndDate value if EndDateType is limited. * Omit EndDate if EndDateType is * unlimited.

*/ inline ModifyCapacityReservationRequest& 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. Do not provide an EndDate value if * EndDateType is unlimited.

  • * limited - The Capacity Reservation expires automatically at a * specified date and time. You must provide an EndDate value if * EndDateType is limited.

*/ 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. Do not provide an EndDate value if * EndDateType is unlimited.

  • * limited - The Capacity Reservation expires automatically at a * specified date and time. You must provide an EndDate value if * EndDateType is limited.

*/ 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. Do not provide an EndDate value if * EndDateType is unlimited.

  • * limited - The Capacity Reservation expires automatically at a * specified date and time. You must provide an EndDate value if * EndDateType is limited.

*/ 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. Do not provide an EndDate value if * EndDateType is unlimited.

  • * limited - The Capacity Reservation expires automatically at a * specified date and time. You must provide an EndDate value if * EndDateType is limited.

*/ 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. Do not provide an EndDate value if * EndDateType is unlimited.

  • * limited - The Capacity Reservation expires automatically at a * specified date and time. You must provide an EndDate value if * EndDateType is limited.

*/ inline ModifyCapacityReservationRequest& 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. Do not provide an EndDate value if * EndDateType is unlimited.

  • * limited - The Capacity Reservation expires automatically at a * specified date and time. You must provide an EndDate value if * EndDateType is limited.

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

Reserved. Capacity Reservations you have created are accepted by default.

*/ inline bool GetAccept() const{ return m_accept; } /** *

Reserved. Capacity Reservations you have created are accepted by default.

*/ inline bool AcceptHasBeenSet() const { return m_acceptHasBeenSet; } /** *

Reserved. Capacity Reservations you have created are accepted by default.

*/ inline void SetAccept(bool value) { m_acceptHasBeenSet = true; m_accept = value; } /** *

Reserved. Capacity Reservations you have created are accepted by default.

*/ inline ModifyCapacityReservationRequest& WithAccept(bool value) { SetAccept(value); return *this;} /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool GetDryRun() const{ return m_dryRun; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline ModifyCapacityReservationRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

Reserved for future use.

*/ inline const Aws::String& GetAdditionalInfo() const{ return m_additionalInfo; } /** *

Reserved for future use.

*/ inline bool AdditionalInfoHasBeenSet() const { return m_additionalInfoHasBeenSet; } /** *

Reserved for future use.

*/ inline void SetAdditionalInfo(const Aws::String& value) { m_additionalInfoHasBeenSet = true; m_additionalInfo = value; } /** *

Reserved for future use.

*/ inline void SetAdditionalInfo(Aws::String&& value) { m_additionalInfoHasBeenSet = true; m_additionalInfo = std::move(value); } /** *

Reserved for future use.

*/ inline void SetAdditionalInfo(const char* value) { m_additionalInfoHasBeenSet = true; m_additionalInfo.assign(value); } /** *

Reserved for future use.

*/ inline ModifyCapacityReservationRequest& WithAdditionalInfo(const Aws::String& value) { SetAdditionalInfo(value); return *this;} /** *

Reserved for future use.

*/ inline ModifyCapacityReservationRequest& WithAdditionalInfo(Aws::String&& value) { SetAdditionalInfo(std::move(value)); return *this;} /** *

Reserved for future use.

*/ inline ModifyCapacityReservationRequest& WithAdditionalInfo(const char* value) { SetAdditionalInfo(value); return *this;} private: Aws::String m_capacityReservationId; bool m_capacityReservationIdHasBeenSet = false; int m_instanceCount; bool m_instanceCountHasBeenSet = false; Aws::Utils::DateTime m_endDate; bool m_endDateHasBeenSet = false; EndDateType m_endDateType; bool m_endDateTypeHasBeenSet = false; bool m_accept; bool m_acceptHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; Aws::String m_additionalInfo; bool m_additionalInfoHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws