/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace EC2 { namespace Model { /** */ class ModifyCapacityReservationFleetRequest : public EC2Request { public: AWS_EC2_API ModifyCapacityReservationFleetRequest(); // 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 "ModifyCapacityReservationFleet"; } 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 Fleet to modify.

*/ inline const Aws::String& GetCapacityReservationFleetId() const{ return m_capacityReservationFleetId; } /** *

The ID of the Capacity Reservation Fleet to modify.

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

The ID of the Capacity Reservation Fleet to modify.

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

The ID of the Capacity Reservation Fleet to modify.

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

The ID of the Capacity Reservation Fleet to modify.

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

The ID of the Capacity Reservation Fleet to modify.

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

The ID of the Capacity Reservation Fleet to modify.

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

The ID of the Capacity Reservation Fleet to modify.

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

The total number of capacity units to be reserved by the Capacity Reservation * Fleet. This value, together with the instance type weights that you assign to * each instance type used by the Fleet determine the number of instances for which * the Fleet reserves capacity. Both values are based on units that make sense for * your workload. For more information, see Total * target capacity in the Amazon EC2 User Guide.

*/ inline int GetTotalTargetCapacity() const{ return m_totalTargetCapacity; } /** *

The total number of capacity units to be reserved by the Capacity Reservation * Fleet. This value, together with the instance type weights that you assign to * each instance type used by the Fleet determine the number of instances for which * the Fleet reserves capacity. Both values are based on units that make sense for * your workload. For more information, see Total * target capacity in the Amazon EC2 User Guide.

*/ inline bool TotalTargetCapacityHasBeenSet() const { return m_totalTargetCapacityHasBeenSet; } /** *

The total number of capacity units to be reserved by the Capacity Reservation * Fleet. This value, together with the instance type weights that you assign to * each instance type used by the Fleet determine the number of instances for which * the Fleet reserves capacity. Both values are based on units that make sense for * your workload. For more information, see Total * target capacity in the Amazon EC2 User Guide.

*/ inline void SetTotalTargetCapacity(int value) { m_totalTargetCapacityHasBeenSet = true; m_totalTargetCapacity = value; } /** *

The total number of capacity units to be reserved by the Capacity Reservation * Fleet. This value, together with the instance type weights that you assign to * each instance type used by the Fleet determine the number of instances for which * the Fleet reserves capacity. Both values are based on units that make sense for * your workload. For more information, see Total * target capacity in the Amazon EC2 User Guide.

*/ inline ModifyCapacityReservationFleetRequest& WithTotalTargetCapacity(int value) { SetTotalTargetCapacity(value); return *this;} /** *

The date and time at which the Capacity Reservation Fleet expires. When the * Capacity Reservation Fleet expires, its state changes to expired * and all of the Capacity Reservations in the Fleet expire.

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

You can't specify * EndDate and RemoveEndDate in the same request.

*/ inline const Aws::Utils::DateTime& GetEndDate() const{ return m_endDate; } /** *

The date and time at which the Capacity Reservation Fleet expires. When the * Capacity Reservation Fleet expires, its state changes to expired * and all of the Capacity Reservations in the Fleet expire.

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

You can't specify * EndDate and RemoveEndDate in the same request.

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

The date and time at which the Capacity Reservation Fleet expires. When the * Capacity Reservation Fleet expires, its state changes to expired * and all of the Capacity Reservations in the Fleet expire.

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

You can't specify * EndDate and RemoveEndDate in the same request.

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

The date and time at which the Capacity Reservation Fleet expires. When the * Capacity Reservation Fleet expires, its state changes to expired * and all of the Capacity Reservations in the Fleet expire.

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

You can't specify * EndDate and RemoveEndDate in the same request.

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

The date and time at which the Capacity Reservation Fleet expires. When the * Capacity Reservation Fleet expires, its state changes to expired * and all of the Capacity Reservations in the Fleet expire.

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

You can't specify * EndDate and RemoveEndDate in the same request.

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

The date and time at which the Capacity Reservation Fleet expires. When the * Capacity Reservation Fleet expires, its state changes to expired * and all of the Capacity Reservations in the Fleet expire.

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

You can't specify * EndDate and RemoveEndDate in the same request.

*/ inline ModifyCapacityReservationFleetRequest& WithEndDate(Aws::Utils::DateTime&& value) { SetEndDate(std::move(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 ModifyCapacityReservationFleetRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

Indicates whether to remove the end date from the Capacity Reservation Fleet. * If you remove the end date, the Capacity Reservation Fleet does not expire and * it remains active until you explicitly cancel it using the * CancelCapacityReservationFleet action.

You can't specify * RemoveEndDate and EndDate in the same request.

*/ inline bool GetRemoveEndDate() const{ return m_removeEndDate; } /** *

Indicates whether to remove the end date from the Capacity Reservation Fleet. * If you remove the end date, the Capacity Reservation Fleet does not expire and * it remains active until you explicitly cancel it using the * CancelCapacityReservationFleet action.

You can't specify * RemoveEndDate and EndDate in the same request.

*/ inline bool RemoveEndDateHasBeenSet() const { return m_removeEndDateHasBeenSet; } /** *

Indicates whether to remove the end date from the Capacity Reservation Fleet. * If you remove the end date, the Capacity Reservation Fleet does not expire and * it remains active until you explicitly cancel it using the * CancelCapacityReservationFleet action.

You can't specify * RemoveEndDate and EndDate in the same request.

*/ inline void SetRemoveEndDate(bool value) { m_removeEndDateHasBeenSet = true; m_removeEndDate = value; } /** *

Indicates whether to remove the end date from the Capacity Reservation Fleet. * If you remove the end date, the Capacity Reservation Fleet does not expire and * it remains active until you explicitly cancel it using the * CancelCapacityReservationFleet action.

You can't specify * RemoveEndDate and EndDate in the same request.

*/ inline ModifyCapacityReservationFleetRequest& WithRemoveEndDate(bool value) { SetRemoveEndDate(value); return *this;} private: Aws::String m_capacityReservationFleetId; bool m_capacityReservationFleetIdHasBeenSet = false; int m_totalTargetCapacity; bool m_totalTargetCapacityHasBeenSet = false; Aws::Utils::DateTime m_endDate; bool m_endDateHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; bool m_removeEndDate; bool m_removeEndDateHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws