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

The configuration that defines an instance fleet.

The instance * fleet configuration is available only in Amazon EMR releases 4.8.0 and later, * excluding 5.0.x versions.

See Also:

AWS * API Reference

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

The friendly name of the instance fleet.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The friendly name of the instance fleet.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The friendly name of the instance fleet.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The friendly name of the instance fleet.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The friendly name of the instance fleet.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The friendly name of the instance fleet.

*/ inline InstanceFleetConfig& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The friendly name of the instance fleet.

*/ inline InstanceFleetConfig& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The friendly name of the instance fleet.

*/ inline InstanceFleetConfig& WithName(const char* value) { SetName(value); return *this;} /** *

The node type that the instance fleet hosts. Valid values are MASTER, CORE, * and TASK.

*/ inline const InstanceFleetType& GetInstanceFleetType() const{ return m_instanceFleetType; } /** *

The node type that the instance fleet hosts. Valid values are MASTER, CORE, * and TASK.

*/ inline bool InstanceFleetTypeHasBeenSet() const { return m_instanceFleetTypeHasBeenSet; } /** *

The node type that the instance fleet hosts. Valid values are MASTER, CORE, * and TASK.

*/ inline void SetInstanceFleetType(const InstanceFleetType& value) { m_instanceFleetTypeHasBeenSet = true; m_instanceFleetType = value; } /** *

The node type that the instance fleet hosts. Valid values are MASTER, CORE, * and TASK.

*/ inline void SetInstanceFleetType(InstanceFleetType&& value) { m_instanceFleetTypeHasBeenSet = true; m_instanceFleetType = std::move(value); } /** *

The node type that the instance fleet hosts. Valid values are MASTER, CORE, * and TASK.

*/ inline InstanceFleetConfig& WithInstanceFleetType(const InstanceFleetType& value) { SetInstanceFleetType(value); return *this;} /** *

The node type that the instance fleet hosts. Valid values are MASTER, CORE, * and TASK.

*/ inline InstanceFleetConfig& WithInstanceFleetType(InstanceFleetType&& value) { SetInstanceFleetType(std::move(value)); return *this;} /** *

The target capacity of On-Demand units for the instance fleet, which * determines how many On-Demand Instances to provision. When the instance fleet * launches, Amazon EMR tries to provision On-Demand Instances as specified by * InstanceTypeConfig. Each instance configuration has a specified * WeightedCapacity. When an On-Demand Instance is provisioned, the * WeightedCapacity units count toward the target capacity. Amazon EMR * provisions instances until the target capacity is totally fulfilled, even if * this results in an overage. For example, if there are 2 units remaining to * fulfill capacity, and Amazon EMR can only provision an instance with a * WeightedCapacity of 5 units, the instance is provisioned, and the * target capacity is exceeded by 3 units.

If not specified or set to * 0, only Spot Instances are provisioned for the instance fleet using * TargetSpotCapacity. At least one of TargetSpotCapacity * and TargetOnDemandCapacity should be greater than 0. For a master * instance fleet, only one of TargetSpotCapacity and * TargetOnDemandCapacity can be specified, and its value must be * 1.

*/ inline int GetTargetOnDemandCapacity() const{ return m_targetOnDemandCapacity; } /** *

The target capacity of On-Demand units for the instance fleet, which * determines how many On-Demand Instances to provision. When the instance fleet * launches, Amazon EMR tries to provision On-Demand Instances as specified by * InstanceTypeConfig. Each instance configuration has a specified * WeightedCapacity. When an On-Demand Instance is provisioned, the * WeightedCapacity units count toward the target capacity. Amazon EMR * provisions instances until the target capacity is totally fulfilled, even if * this results in an overage. For example, if there are 2 units remaining to * fulfill capacity, and Amazon EMR can only provision an instance with a * WeightedCapacity of 5 units, the instance is provisioned, and the * target capacity is exceeded by 3 units.

If not specified or set to * 0, only Spot Instances are provisioned for the instance fleet using * TargetSpotCapacity. At least one of TargetSpotCapacity * and TargetOnDemandCapacity should be greater than 0. For a master * instance fleet, only one of TargetSpotCapacity and * TargetOnDemandCapacity can be specified, and its value must be * 1.

*/ inline bool TargetOnDemandCapacityHasBeenSet() const { return m_targetOnDemandCapacityHasBeenSet; } /** *

The target capacity of On-Demand units for the instance fleet, which * determines how many On-Demand Instances to provision. When the instance fleet * launches, Amazon EMR tries to provision On-Demand Instances as specified by * InstanceTypeConfig. Each instance configuration has a specified * WeightedCapacity. When an On-Demand Instance is provisioned, the * WeightedCapacity units count toward the target capacity. Amazon EMR * provisions instances until the target capacity is totally fulfilled, even if * this results in an overage. For example, if there are 2 units remaining to * fulfill capacity, and Amazon EMR can only provision an instance with a * WeightedCapacity of 5 units, the instance is provisioned, and the * target capacity is exceeded by 3 units.

If not specified or set to * 0, only Spot Instances are provisioned for the instance fleet using * TargetSpotCapacity. At least one of TargetSpotCapacity * and TargetOnDemandCapacity should be greater than 0. For a master * instance fleet, only one of TargetSpotCapacity and * TargetOnDemandCapacity can be specified, and its value must be * 1.

*/ inline void SetTargetOnDemandCapacity(int value) { m_targetOnDemandCapacityHasBeenSet = true; m_targetOnDemandCapacity = value; } /** *

The target capacity of On-Demand units for the instance fleet, which * determines how many On-Demand Instances to provision. When the instance fleet * launches, Amazon EMR tries to provision On-Demand Instances as specified by * InstanceTypeConfig. Each instance configuration has a specified * WeightedCapacity. When an On-Demand Instance is provisioned, the * WeightedCapacity units count toward the target capacity. Amazon EMR * provisions instances until the target capacity is totally fulfilled, even if * this results in an overage. For example, if there are 2 units remaining to * fulfill capacity, and Amazon EMR can only provision an instance with a * WeightedCapacity of 5 units, the instance is provisioned, and the * target capacity is exceeded by 3 units.

If not specified or set to * 0, only Spot Instances are provisioned for the instance fleet using * TargetSpotCapacity. At least one of TargetSpotCapacity * and TargetOnDemandCapacity should be greater than 0. For a master * instance fleet, only one of TargetSpotCapacity and * TargetOnDemandCapacity can be specified, and its value must be * 1.

*/ inline InstanceFleetConfig& WithTargetOnDemandCapacity(int value) { SetTargetOnDemandCapacity(value); return *this;} /** *

The target capacity of Spot units for the instance fleet, which determines * how many Spot Instances to provision. When the instance fleet launches, Amazon * EMR tries to provision Spot Instances as specified by InstanceTypeConfig. * Each instance configuration has a specified WeightedCapacity. When * a Spot Instance is provisioned, the WeightedCapacity units count * toward the target capacity. Amazon EMR provisions instances until the target * capacity is totally fulfilled, even if this results in an overage. For example, * if there are 2 units remaining to fulfill capacity, and Amazon EMR can only * provision an instance with a WeightedCapacity of 5 units, the * instance is provisioned, and the target capacity is exceeded by 3 units.

*

If not specified or set to 0, only On-Demand Instances are provisioned * for the instance fleet. At least one of TargetSpotCapacity and * TargetOnDemandCapacity should be greater than 0. For a master * instance fleet, only one of TargetSpotCapacity and * TargetOnDemandCapacity can be specified, and its value must be * 1.

*/ inline int GetTargetSpotCapacity() const{ return m_targetSpotCapacity; } /** *

The target capacity of Spot units for the instance fleet, which determines * how many Spot Instances to provision. When the instance fleet launches, Amazon * EMR tries to provision Spot Instances as specified by InstanceTypeConfig. * Each instance configuration has a specified WeightedCapacity. When * a Spot Instance is provisioned, the WeightedCapacity units count * toward the target capacity. Amazon EMR provisions instances until the target * capacity is totally fulfilled, even if this results in an overage. For example, * if there are 2 units remaining to fulfill capacity, and Amazon EMR can only * provision an instance with a WeightedCapacity of 5 units, the * instance is provisioned, and the target capacity is exceeded by 3 units.

*

If not specified or set to 0, only On-Demand Instances are provisioned * for the instance fleet. At least one of TargetSpotCapacity and * TargetOnDemandCapacity should be greater than 0. For a master * instance fleet, only one of TargetSpotCapacity and * TargetOnDemandCapacity can be specified, and its value must be * 1.

*/ inline bool TargetSpotCapacityHasBeenSet() const { return m_targetSpotCapacityHasBeenSet; } /** *

The target capacity of Spot units for the instance fleet, which determines * how many Spot Instances to provision. When the instance fleet launches, Amazon * EMR tries to provision Spot Instances as specified by InstanceTypeConfig. * Each instance configuration has a specified WeightedCapacity. When * a Spot Instance is provisioned, the WeightedCapacity units count * toward the target capacity. Amazon EMR provisions instances until the target * capacity is totally fulfilled, even if this results in an overage. For example, * if there are 2 units remaining to fulfill capacity, and Amazon EMR can only * provision an instance with a WeightedCapacity of 5 units, the * instance is provisioned, and the target capacity is exceeded by 3 units.

*

If not specified or set to 0, only On-Demand Instances are provisioned * for the instance fleet. At least one of TargetSpotCapacity and * TargetOnDemandCapacity should be greater than 0. For a master * instance fleet, only one of TargetSpotCapacity and * TargetOnDemandCapacity can be specified, and its value must be * 1.

*/ inline void SetTargetSpotCapacity(int value) { m_targetSpotCapacityHasBeenSet = true; m_targetSpotCapacity = value; } /** *

The target capacity of Spot units for the instance fleet, which determines * how many Spot Instances to provision. When the instance fleet launches, Amazon * EMR tries to provision Spot Instances as specified by InstanceTypeConfig. * Each instance configuration has a specified WeightedCapacity. When * a Spot Instance is provisioned, the WeightedCapacity units count * toward the target capacity. Amazon EMR provisions instances until the target * capacity is totally fulfilled, even if this results in an overage. For example, * if there are 2 units remaining to fulfill capacity, and Amazon EMR can only * provision an instance with a WeightedCapacity of 5 units, the * instance is provisioned, and the target capacity is exceeded by 3 units.

*

If not specified or set to 0, only On-Demand Instances are provisioned * for the instance fleet. At least one of TargetSpotCapacity and * TargetOnDemandCapacity should be greater than 0. For a master * instance fleet, only one of TargetSpotCapacity and * TargetOnDemandCapacity can be specified, and its value must be * 1.

*/ inline InstanceFleetConfig& WithTargetSpotCapacity(int value) { SetTargetSpotCapacity(value); return *this;} /** *

The instance type configurations that define the Amazon EC2 instances in the * instance fleet.

*/ inline const Aws::Vector& GetInstanceTypeConfigs() const{ return m_instanceTypeConfigs; } /** *

The instance type configurations that define the Amazon EC2 instances in the * instance fleet.

*/ inline bool InstanceTypeConfigsHasBeenSet() const { return m_instanceTypeConfigsHasBeenSet; } /** *

The instance type configurations that define the Amazon EC2 instances in the * instance fleet.

*/ inline void SetInstanceTypeConfigs(const Aws::Vector& value) { m_instanceTypeConfigsHasBeenSet = true; m_instanceTypeConfigs = value; } /** *

The instance type configurations that define the Amazon EC2 instances in the * instance fleet.

*/ inline void SetInstanceTypeConfigs(Aws::Vector&& value) { m_instanceTypeConfigsHasBeenSet = true; m_instanceTypeConfigs = std::move(value); } /** *

The instance type configurations that define the Amazon EC2 instances in the * instance fleet.

*/ inline InstanceFleetConfig& WithInstanceTypeConfigs(const Aws::Vector& value) { SetInstanceTypeConfigs(value); return *this;} /** *

The instance type configurations that define the Amazon EC2 instances in the * instance fleet.

*/ inline InstanceFleetConfig& WithInstanceTypeConfigs(Aws::Vector&& value) { SetInstanceTypeConfigs(std::move(value)); return *this;} /** *

The instance type configurations that define the Amazon EC2 instances in the * instance fleet.

*/ inline InstanceFleetConfig& AddInstanceTypeConfigs(const InstanceTypeConfig& value) { m_instanceTypeConfigsHasBeenSet = true; m_instanceTypeConfigs.push_back(value); return *this; } /** *

The instance type configurations that define the Amazon EC2 instances in the * instance fleet.

*/ inline InstanceFleetConfig& AddInstanceTypeConfigs(InstanceTypeConfig&& value) { m_instanceTypeConfigsHasBeenSet = true; m_instanceTypeConfigs.push_back(std::move(value)); return *this; } /** *

The launch specification for the instance fleet.

*/ inline const InstanceFleetProvisioningSpecifications& GetLaunchSpecifications() const{ return m_launchSpecifications; } /** *

The launch specification for the instance fleet.

*/ inline bool LaunchSpecificationsHasBeenSet() const { return m_launchSpecificationsHasBeenSet; } /** *

The launch specification for the instance fleet.

*/ inline void SetLaunchSpecifications(const InstanceFleetProvisioningSpecifications& value) { m_launchSpecificationsHasBeenSet = true; m_launchSpecifications = value; } /** *

The launch specification for the instance fleet.

*/ inline void SetLaunchSpecifications(InstanceFleetProvisioningSpecifications&& value) { m_launchSpecificationsHasBeenSet = true; m_launchSpecifications = std::move(value); } /** *

The launch specification for the instance fleet.

*/ inline InstanceFleetConfig& WithLaunchSpecifications(const InstanceFleetProvisioningSpecifications& value) { SetLaunchSpecifications(value); return *this;} /** *

The launch specification for the instance fleet.

*/ inline InstanceFleetConfig& WithLaunchSpecifications(InstanceFleetProvisioningSpecifications&& value) { SetLaunchSpecifications(std::move(value)); return *this;} /** *

The resize specification for the instance fleet.

*/ inline const InstanceFleetResizingSpecifications& GetResizeSpecifications() const{ return m_resizeSpecifications; } /** *

The resize specification for the instance fleet.

*/ inline bool ResizeSpecificationsHasBeenSet() const { return m_resizeSpecificationsHasBeenSet; } /** *

The resize specification for the instance fleet.

*/ inline void SetResizeSpecifications(const InstanceFleetResizingSpecifications& value) { m_resizeSpecificationsHasBeenSet = true; m_resizeSpecifications = value; } /** *

The resize specification for the instance fleet.

*/ inline void SetResizeSpecifications(InstanceFleetResizingSpecifications&& value) { m_resizeSpecificationsHasBeenSet = true; m_resizeSpecifications = std::move(value); } /** *

The resize specification for the instance fleet.

*/ inline InstanceFleetConfig& WithResizeSpecifications(const InstanceFleetResizingSpecifications& value) { SetResizeSpecifications(value); return *this;} /** *

The resize specification for the instance fleet.

*/ inline InstanceFleetConfig& WithResizeSpecifications(InstanceFleetResizingSpecifications&& value) { SetResizeSpecifications(std::move(value)); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; InstanceFleetType m_instanceFleetType; bool m_instanceFleetTypeHasBeenSet = false; int m_targetOnDemandCapacity; bool m_targetOnDemandCapacityHasBeenSet = false; int m_targetSpotCapacity; bool m_targetSpotCapacityHasBeenSet = false; Aws::Vector m_instanceTypeConfigs; bool m_instanceTypeConfigsHasBeenSet = false; InstanceFleetProvisioningSpecifications m_launchSpecifications; bool m_launchSpecificationsHasBeenSet = false; InstanceFleetResizingSpecifications m_resizeSpecifications; bool m_resizeSpecificationsHasBeenSet = false; }; } // namespace Model } // namespace EMR } // namespace Aws