/** * 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 Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace EMR { namespace Model { /** *

Describes the strategy for using unused Capacity Reservations for fulfilling * On-Demand capacity.

See Also:

AWS * API Reference

*/ class OnDemandCapacityReservationOptions { public: AWS_EMR_API OnDemandCapacityReservationOptions(); AWS_EMR_API OnDemandCapacityReservationOptions(Aws::Utils::Json::JsonView jsonValue); AWS_EMR_API OnDemandCapacityReservationOptions& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_EMR_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Indicates whether to use unused Capacity Reservations for fulfilling * On-Demand capacity.

If you specify * use-capacity-reservations-first, the fleet uses unused Capacity * Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. * If multiple instance pools have unused Capacity Reservations, the On-Demand * allocation strategy (lowest-price) is applied. If the number of * unused Capacity Reservations is less than the On-Demand target capacity, the * remaining On-Demand target capacity is launched according to the On-Demand * allocation strategy (lowest-price).

If you do not specify a * value, the fleet fulfills the On-Demand capacity according to the chosen * On-Demand allocation strategy.

*/ inline const OnDemandCapacityReservationUsageStrategy& GetUsageStrategy() const{ return m_usageStrategy; } /** *

Indicates whether to use unused Capacity Reservations for fulfilling * On-Demand capacity.

If you specify * use-capacity-reservations-first, the fleet uses unused Capacity * Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. * If multiple instance pools have unused Capacity Reservations, the On-Demand * allocation strategy (lowest-price) is applied. If the number of * unused Capacity Reservations is less than the On-Demand target capacity, the * remaining On-Demand target capacity is launched according to the On-Demand * allocation strategy (lowest-price).

If you do not specify a * value, the fleet fulfills the On-Demand capacity according to the chosen * On-Demand allocation strategy.

*/ inline bool UsageStrategyHasBeenSet() const { return m_usageStrategyHasBeenSet; } /** *

Indicates whether to use unused Capacity Reservations for fulfilling * On-Demand capacity.

If you specify * use-capacity-reservations-first, the fleet uses unused Capacity * Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. * If multiple instance pools have unused Capacity Reservations, the On-Demand * allocation strategy (lowest-price) is applied. If the number of * unused Capacity Reservations is less than the On-Demand target capacity, the * remaining On-Demand target capacity is launched according to the On-Demand * allocation strategy (lowest-price).

If you do not specify a * value, the fleet fulfills the On-Demand capacity according to the chosen * On-Demand allocation strategy.

*/ inline void SetUsageStrategy(const OnDemandCapacityReservationUsageStrategy& value) { m_usageStrategyHasBeenSet = true; m_usageStrategy = value; } /** *

Indicates whether to use unused Capacity Reservations for fulfilling * On-Demand capacity.

If you specify * use-capacity-reservations-first, the fleet uses unused Capacity * Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. * If multiple instance pools have unused Capacity Reservations, the On-Demand * allocation strategy (lowest-price) is applied. If the number of * unused Capacity Reservations is less than the On-Demand target capacity, the * remaining On-Demand target capacity is launched according to the On-Demand * allocation strategy (lowest-price).

If you do not specify a * value, the fleet fulfills the On-Demand capacity according to the chosen * On-Demand allocation strategy.

*/ inline void SetUsageStrategy(OnDemandCapacityReservationUsageStrategy&& value) { m_usageStrategyHasBeenSet = true; m_usageStrategy = std::move(value); } /** *

Indicates whether to use unused Capacity Reservations for fulfilling * On-Demand capacity.

If you specify * use-capacity-reservations-first, the fleet uses unused Capacity * Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. * If multiple instance pools have unused Capacity Reservations, the On-Demand * allocation strategy (lowest-price) is applied. If the number of * unused Capacity Reservations is less than the On-Demand target capacity, the * remaining On-Demand target capacity is launched according to the On-Demand * allocation strategy (lowest-price).

If you do not specify a * value, the fleet fulfills the On-Demand capacity according to the chosen * On-Demand allocation strategy.

*/ inline OnDemandCapacityReservationOptions& WithUsageStrategy(const OnDemandCapacityReservationUsageStrategy& value) { SetUsageStrategy(value); return *this;} /** *

Indicates whether to use unused Capacity Reservations for fulfilling * On-Demand capacity.

If you specify * use-capacity-reservations-first, the fleet uses unused Capacity * Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. * If multiple instance pools have unused Capacity Reservations, the On-Demand * allocation strategy (lowest-price) is applied. If the number of * unused Capacity Reservations is less than the On-Demand target capacity, the * remaining On-Demand target capacity is launched according to the On-Demand * allocation strategy (lowest-price).

If you do not specify a * value, the fleet fulfills the On-Demand capacity according to the chosen * On-Demand allocation strategy.

*/ inline OnDemandCapacityReservationOptions& WithUsageStrategy(OnDemandCapacityReservationUsageStrategy&& value) { SetUsageStrategy(std::move(value)); return *this;} /** *

Indicates the instance's Capacity Reservation preferences. Possible * preferences include:

  • open - The instance can run * in any open Capacity Reservation that has matching attributes (instance type, * platform, Availability Zone).

  • none - The * instance avoids running in a Capacity Reservation even if one is available. The * instance runs as an On-Demand Instance.

*/ inline const OnDemandCapacityReservationPreference& GetCapacityReservationPreference() const{ return m_capacityReservationPreference; } /** *

Indicates the instance's Capacity Reservation preferences. Possible * preferences include:

  • open - The instance can run * in any open Capacity Reservation that has matching attributes (instance type, * platform, Availability Zone).

  • none - The * instance avoids running in a Capacity Reservation even if one is available. The * instance runs as an On-Demand Instance.

*/ inline bool CapacityReservationPreferenceHasBeenSet() const { return m_capacityReservationPreferenceHasBeenSet; } /** *

Indicates the instance's Capacity Reservation preferences. Possible * preferences include:

  • open - The instance can run * in any open Capacity Reservation that has matching attributes (instance type, * platform, Availability Zone).

  • none - The * instance avoids running in a Capacity Reservation even if one is available. The * instance runs as an On-Demand Instance.

*/ inline void SetCapacityReservationPreference(const OnDemandCapacityReservationPreference& value) { m_capacityReservationPreferenceHasBeenSet = true; m_capacityReservationPreference = value; } /** *

Indicates the instance's Capacity Reservation preferences. Possible * preferences include:

  • open - The instance can run * in any open Capacity Reservation that has matching attributes (instance type, * platform, Availability Zone).

  • none - The * instance avoids running in a Capacity Reservation even if one is available. The * instance runs as an On-Demand Instance.

*/ inline void SetCapacityReservationPreference(OnDemandCapacityReservationPreference&& value) { m_capacityReservationPreferenceHasBeenSet = true; m_capacityReservationPreference = std::move(value); } /** *

Indicates the instance's Capacity Reservation preferences. Possible * preferences include:

  • open - The instance can run * in any open Capacity Reservation that has matching attributes (instance type, * platform, Availability Zone).

  • none - The * instance avoids running in a Capacity Reservation even if one is available. The * instance runs as an On-Demand Instance.

*/ inline OnDemandCapacityReservationOptions& WithCapacityReservationPreference(const OnDemandCapacityReservationPreference& value) { SetCapacityReservationPreference(value); return *this;} /** *

Indicates the instance's Capacity Reservation preferences. Possible * preferences include:

  • open - The instance can run * in any open Capacity Reservation that has matching attributes (instance type, * platform, Availability Zone).

  • none - The * instance avoids running in a Capacity Reservation even if one is available. The * instance runs as an On-Demand Instance.

*/ inline OnDemandCapacityReservationOptions& WithCapacityReservationPreference(OnDemandCapacityReservationPreference&& value) { SetCapacityReservationPreference(std::move(value)); return *this;} /** *

The ARN of the Capacity Reservation resource group in which to run the * instance.

*/ inline const Aws::String& GetCapacityReservationResourceGroupArn() const{ return m_capacityReservationResourceGroupArn; } /** *

The ARN of the Capacity Reservation resource group in which to run the * instance.

*/ inline bool CapacityReservationResourceGroupArnHasBeenSet() const { return m_capacityReservationResourceGroupArnHasBeenSet; } /** *

The ARN of the Capacity Reservation resource group in which to run the * instance.

*/ inline void SetCapacityReservationResourceGroupArn(const Aws::String& value) { m_capacityReservationResourceGroupArnHasBeenSet = true; m_capacityReservationResourceGroupArn = value; } /** *

The ARN of the Capacity Reservation resource group in which to run the * instance.

*/ inline void SetCapacityReservationResourceGroupArn(Aws::String&& value) { m_capacityReservationResourceGroupArnHasBeenSet = true; m_capacityReservationResourceGroupArn = std::move(value); } /** *

The ARN of the Capacity Reservation resource group in which to run the * instance.

*/ inline void SetCapacityReservationResourceGroupArn(const char* value) { m_capacityReservationResourceGroupArnHasBeenSet = true; m_capacityReservationResourceGroupArn.assign(value); } /** *

The ARN of the Capacity Reservation resource group in which to run the * instance.

*/ inline OnDemandCapacityReservationOptions& WithCapacityReservationResourceGroupArn(const Aws::String& value) { SetCapacityReservationResourceGroupArn(value); return *this;} /** *

The ARN of the Capacity Reservation resource group in which to run the * instance.

*/ inline OnDemandCapacityReservationOptions& WithCapacityReservationResourceGroupArn(Aws::String&& value) { SetCapacityReservationResourceGroupArn(std::move(value)); return *this;} /** *

The ARN of the Capacity Reservation resource group in which to run the * instance.

*/ inline OnDemandCapacityReservationOptions& WithCapacityReservationResourceGroupArn(const char* value) { SetCapacityReservationResourceGroupArn(value); return *this;} private: OnDemandCapacityReservationUsageStrategy m_usageStrategy; bool m_usageStrategyHasBeenSet = false; OnDemandCapacityReservationPreference m_capacityReservationPreference; bool m_capacityReservationPreferenceHasBeenSet = false; Aws::String m_capacityReservationResourceGroupArn; bool m_capacityReservationResourceGroupArnHasBeenSet = false; }; } // namespace Model } // namespace EMR } // namespace Aws