/** * 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 namespace Aws { namespace EC2 { namespace Model { /** */ class CreateCapacityReservationFleetRequest : public EC2Request { public: AWS_EC2_API CreateCapacityReservationFleetRequest(); // 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 "CreateCapacityReservationFleet"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The strategy used by the Capacity Reservation Fleet to determine which of the * specified instance types to use. Currently, only the prioritized * allocation strategy is supported. For more information, see * Allocation strategy in the Amazon EC2 User Guide.

Valid values: * prioritized

*/ inline const Aws::String& GetAllocationStrategy() const{ return m_allocationStrategy; } /** *

The strategy used by the Capacity Reservation Fleet to determine which of the * specified instance types to use. Currently, only the prioritized * allocation strategy is supported. For more information, see * Allocation strategy in the Amazon EC2 User Guide.

Valid values: * prioritized

*/ inline bool AllocationStrategyHasBeenSet() const { return m_allocationStrategyHasBeenSet; } /** *

The strategy used by the Capacity Reservation Fleet to determine which of the * specified instance types to use. Currently, only the prioritized * allocation strategy is supported. For more information, see * Allocation strategy in the Amazon EC2 User Guide.

Valid values: * prioritized

*/ inline void SetAllocationStrategy(const Aws::String& value) { m_allocationStrategyHasBeenSet = true; m_allocationStrategy = value; } /** *

The strategy used by the Capacity Reservation Fleet to determine which of the * specified instance types to use. Currently, only the prioritized * allocation strategy is supported. For more information, see * Allocation strategy in the Amazon EC2 User Guide.

Valid values: * prioritized

*/ inline void SetAllocationStrategy(Aws::String&& value) { m_allocationStrategyHasBeenSet = true; m_allocationStrategy = std::move(value); } /** *

The strategy used by the Capacity Reservation Fleet to determine which of the * specified instance types to use. Currently, only the prioritized * allocation strategy is supported. For more information, see * Allocation strategy in the Amazon EC2 User Guide.

Valid values: * prioritized

*/ inline void SetAllocationStrategy(const char* value) { m_allocationStrategyHasBeenSet = true; m_allocationStrategy.assign(value); } /** *

The strategy used by the Capacity Reservation Fleet to determine which of the * specified instance types to use. Currently, only the prioritized * allocation strategy is supported. For more information, see * Allocation strategy in the Amazon EC2 User Guide.

Valid values: * prioritized

*/ inline CreateCapacityReservationFleetRequest& WithAllocationStrategy(const Aws::String& value) { SetAllocationStrategy(value); return *this;} /** *

The strategy used by the Capacity Reservation Fleet to determine which of the * specified instance types to use. Currently, only the prioritized * allocation strategy is supported. For more information, see * Allocation strategy in the Amazon EC2 User Guide.

Valid values: * prioritized

*/ inline CreateCapacityReservationFleetRequest& WithAllocationStrategy(Aws::String&& value) { SetAllocationStrategy(std::move(value)); return *this;} /** *

The strategy used by the Capacity Reservation Fleet to determine which of the * specified instance types to use. Currently, only the prioritized * allocation strategy is supported. For more information, see * Allocation strategy in the Amazon EC2 User Guide.

Valid values: * prioritized

*/ inline CreateCapacityReservationFleetRequest& WithAllocationStrategy(const char* value) { SetAllocationStrategy(value); return *this;} /** *

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see Ensure * Idempotency.

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see Ensure * Idempotency.

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see Ensure * Idempotency.

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see Ensure * Idempotency.

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see Ensure * Idempotency.

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see Ensure * Idempotency.

*/ inline CreateCapacityReservationFleetRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} /** *

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see Ensure * Idempotency.

*/ inline CreateCapacityReservationFleetRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} /** *

Unique, case-sensitive identifier that you provide to ensure the idempotency * of the request. For more information, see Ensure * Idempotency.

*/ inline CreateCapacityReservationFleetRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} /** *

Information about the instance types for which to reserve the capacity.

*/ inline const Aws::Vector& GetInstanceTypeSpecifications() const{ return m_instanceTypeSpecifications; } /** *

Information about the instance types for which to reserve the capacity.

*/ inline bool InstanceTypeSpecificationsHasBeenSet() const { return m_instanceTypeSpecificationsHasBeenSet; } /** *

Information about the instance types for which to reserve the capacity.

*/ inline void SetInstanceTypeSpecifications(const Aws::Vector& value) { m_instanceTypeSpecificationsHasBeenSet = true; m_instanceTypeSpecifications = value; } /** *

Information about the instance types for which to reserve the capacity.

*/ inline void SetInstanceTypeSpecifications(Aws::Vector&& value) { m_instanceTypeSpecificationsHasBeenSet = true; m_instanceTypeSpecifications = std::move(value); } /** *

Information about the instance types for which to reserve the capacity.

*/ inline CreateCapacityReservationFleetRequest& WithInstanceTypeSpecifications(const Aws::Vector& value) { SetInstanceTypeSpecifications(value); return *this;} /** *

Information about the instance types for which to reserve the capacity.

*/ inline CreateCapacityReservationFleetRequest& WithInstanceTypeSpecifications(Aws::Vector&& value) { SetInstanceTypeSpecifications(std::move(value)); return *this;} /** *

Information about the instance types for which to reserve the capacity.

*/ inline CreateCapacityReservationFleetRequest& AddInstanceTypeSpecifications(const ReservationFleetInstanceSpecification& value) { m_instanceTypeSpecificationsHasBeenSet = true; m_instanceTypeSpecifications.push_back(value); return *this; } /** *

Information about the instance types for which to reserve the capacity.

*/ inline CreateCapacityReservationFleetRequest& AddInstanceTypeSpecifications(ReservationFleetInstanceSpecification&& value) { m_instanceTypeSpecificationsHasBeenSet = true; m_instanceTypeSpecifications.push_back(std::move(value)); return *this; } /** *

Indicates the tenancy of the Capacity Reservation Fleet. All Capacity * Reservations in the Fleet inherit this tenancy. The Capacity Reservation Fleet * can have one of the following tenancy settings:

  • * default - The Capacity Reservation Fleet is created on hardware * that is shared with other Amazon Web Services accounts.

  • * dedicated - The Capacity Reservations are created on single-tenant * hardware that is dedicated to a single Amazon Web Services account.

  • *
*/ inline const FleetCapacityReservationTenancy& GetTenancy() const{ return m_tenancy; } /** *

Indicates the tenancy of the Capacity Reservation Fleet. All Capacity * Reservations in the Fleet inherit this tenancy. The Capacity Reservation Fleet * can have one of the following tenancy settings:

  • * default - The Capacity Reservation Fleet is created on hardware * that is shared with other Amazon Web Services accounts.

  • * dedicated - The Capacity Reservations are 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 Fleet. All Capacity * Reservations in the Fleet inherit this tenancy. The Capacity Reservation Fleet * can have one of the following tenancy settings:

  • * default - The Capacity Reservation Fleet is created on hardware * that is shared with other Amazon Web Services accounts.

  • * dedicated - The Capacity Reservations are created on single-tenant * hardware that is dedicated to a single Amazon Web Services account.

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

Indicates the tenancy of the Capacity Reservation Fleet. All Capacity * Reservations in the Fleet inherit this tenancy. The Capacity Reservation Fleet * can have one of the following tenancy settings:

  • * default - The Capacity Reservation Fleet is created on hardware * that is shared with other Amazon Web Services accounts.

  • * dedicated - The Capacity Reservations are created on single-tenant * hardware that is dedicated to a single Amazon Web Services account.

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

Indicates the tenancy of the Capacity Reservation Fleet. All Capacity * Reservations in the Fleet inherit this tenancy. The Capacity Reservation Fleet * can have one of the following tenancy settings:

  • * default - The Capacity Reservation Fleet is created on hardware * that is shared with other Amazon Web Services accounts.

  • * dedicated - The Capacity Reservations are created on single-tenant * hardware that is dedicated to a single Amazon Web Services account.

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

Indicates the tenancy of the Capacity Reservation Fleet. All Capacity * Reservations in the Fleet inherit this tenancy. The Capacity Reservation Fleet * can have one of the following tenancy settings:

  • * default - The Capacity Reservation Fleet is created on hardware * that is shared with other Amazon Web Services accounts.

  • * dedicated - The Capacity Reservations are created on single-tenant * hardware that is dedicated to a single Amazon Web Services account.

  • *
*/ inline CreateCapacityReservationFleetRequest& WithTenancy(FleetCapacityReservationTenancy&& value) { SetTenancy(std::move(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 CreateCapacityReservationFleetRequest& 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.

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

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

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

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

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

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

Indicates the type of instance launches that the Capacity Reservation Fleet * accepts. All Capacity Reservations in the Fleet inherit this instance matching * criteria.

Currently, Capacity Reservation Fleets support * open instance matching criteria only. This means that instances * that have matching attributes (instance type, platform, and Availability Zone) * run in the Capacity Reservations automatically. Instances do not need to * explicitly target a Capacity Reservation Fleet to use its reserved capacity.

*/ inline const FleetInstanceMatchCriteria& GetInstanceMatchCriteria() const{ return m_instanceMatchCriteria; } /** *

Indicates the type of instance launches that the Capacity Reservation Fleet * accepts. All Capacity Reservations in the Fleet inherit this instance matching * criteria.

Currently, Capacity Reservation Fleets support * open instance matching criteria only. This means that instances * that have matching attributes (instance type, platform, and Availability Zone) * run in the Capacity Reservations automatically. Instances do not need to * explicitly target a Capacity Reservation Fleet to use its reserved capacity.

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

Indicates the type of instance launches that the Capacity Reservation Fleet * accepts. All Capacity Reservations in the Fleet inherit this instance matching * criteria.

Currently, Capacity Reservation Fleets support * open instance matching criteria only. This means that instances * that have matching attributes (instance type, platform, and Availability Zone) * run in the Capacity Reservations automatically. Instances do not need to * explicitly target a Capacity Reservation Fleet to use its reserved capacity.

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

Indicates the type of instance launches that the Capacity Reservation Fleet * accepts. All Capacity Reservations in the Fleet inherit this instance matching * criteria.

Currently, Capacity Reservation Fleets support * open instance matching criteria only. This means that instances * that have matching attributes (instance type, platform, and Availability Zone) * run in the Capacity Reservations automatically. Instances do not need to * explicitly target a Capacity Reservation Fleet to use its reserved capacity.

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

Indicates the type of instance launches that the Capacity Reservation Fleet * accepts. All Capacity Reservations in the Fleet inherit this instance matching * criteria.

Currently, Capacity Reservation Fleets support * open instance matching criteria only. This means that instances * that have matching attributes (instance type, platform, and Availability Zone) * run in the Capacity Reservations automatically. Instances do not need to * explicitly target a Capacity Reservation Fleet to use its reserved capacity.

*/ inline CreateCapacityReservationFleetRequest& WithInstanceMatchCriteria(const FleetInstanceMatchCriteria& value) { SetInstanceMatchCriteria(value); return *this;} /** *

Indicates the type of instance launches that the Capacity Reservation Fleet * accepts. All Capacity Reservations in the Fleet inherit this instance matching * criteria.

Currently, Capacity Reservation Fleets support * open instance matching criteria only. This means that instances * that have matching attributes (instance type, platform, and Availability Zone) * run in the Capacity Reservations automatically. Instances do not need to * explicitly target a Capacity Reservation Fleet to use its reserved capacity.

*/ inline CreateCapacityReservationFleetRequest& WithInstanceMatchCriteria(FleetInstanceMatchCriteria&& value) { SetInstanceMatchCriteria(std::move(value)); return *this;} /** *

The tags to assign to the Capacity Reservation Fleet. The tags are * automatically assigned to the Capacity Reservations in the Fleet.

*/ inline const Aws::Vector& GetTagSpecifications() const{ return m_tagSpecifications; } /** *

The tags to assign to the Capacity Reservation Fleet. The tags are * automatically assigned to the Capacity Reservations in the Fleet.

*/ inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; } /** *

The tags to assign to the Capacity Reservation Fleet. The tags are * automatically assigned to the Capacity Reservations in the Fleet.

*/ inline void SetTagSpecifications(const Aws::Vector& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; } /** *

The tags to assign to the Capacity Reservation Fleet. The tags are * automatically assigned to the Capacity Reservations in the Fleet.

*/ inline void SetTagSpecifications(Aws::Vector&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); } /** *

The tags to assign to the Capacity Reservation Fleet. The tags are * automatically assigned to the Capacity Reservations in the Fleet.

*/ inline CreateCapacityReservationFleetRequest& WithTagSpecifications(const Aws::Vector& value) { SetTagSpecifications(value); return *this;} /** *

The tags to assign to the Capacity Reservation Fleet. The tags are * automatically assigned to the Capacity Reservations in the Fleet.

*/ inline CreateCapacityReservationFleetRequest& WithTagSpecifications(Aws::Vector&& value) { SetTagSpecifications(std::move(value)); return *this;} /** *

The tags to assign to the Capacity Reservation Fleet. The tags are * automatically assigned to the Capacity Reservations in the Fleet.

*/ inline CreateCapacityReservationFleetRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; } /** *

The tags to assign to the Capacity Reservation Fleet. The tags are * automatically assigned to the Capacity Reservations in the Fleet.

*/ inline CreateCapacityReservationFleetRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(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 CreateCapacityReservationFleetRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} private: Aws::String m_allocationStrategy; bool m_allocationStrategyHasBeenSet = false; Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; Aws::Vector m_instanceTypeSpecifications; bool m_instanceTypeSpecificationsHasBeenSet = false; FleetCapacityReservationTenancy m_tenancy; bool m_tenancyHasBeenSet = false; int m_totalTargetCapacity; bool m_totalTargetCapacityHasBeenSet = false; Aws::Utils::DateTime m_endDate; bool m_endDateHasBeenSet = false; FleetInstanceMatchCriteria m_instanceMatchCriteria; bool m_instanceMatchCriteriaHasBeenSet = false; Aws::Vector m_tagSpecifications; bool m_tagSpecificationsHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws