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

Describes an instance fleet, which is a group of Amazon EC2 instances that * host a particular node type (master, core, or task) in an Amazon EMR cluster. * Instance fleets can consist of a mix of instance types and On-Demand and Spot * Instances, which are provisioned to meet a defined target capacity.

*

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 InstanceFleet { public: AWS_EMR_API InstanceFleet(); AWS_EMR_API InstanceFleet(Aws::Utils::Json::JsonView jsonValue); AWS_EMR_API InstanceFleet& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_EMR_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The unique identifier of the instance fleet.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The unique identifier of the instance fleet.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The unique identifier of the instance fleet.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The unique identifier of the instance fleet.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The unique identifier of the instance fleet.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The unique identifier of the instance fleet.

*/ inline InstanceFleet& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The unique identifier of the instance fleet.

*/ inline InstanceFleet& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The unique identifier of the instance fleet.

*/ inline InstanceFleet& WithId(const char* value) { SetId(value); return *this;} /** *

A friendly name for the instance fleet.

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

A friendly name for the instance fleet.

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

A friendly name for the instance fleet.

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

A friendly name for the instance fleet.

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

A friendly name for the instance fleet.

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

A friendly name for the instance fleet.

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

A friendly name for the instance fleet.

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

A friendly name for the instance fleet.

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

The current status of the instance fleet.

*/ inline const InstanceFleetStatus& GetStatus() const{ return m_status; } /** *

The current status of the instance fleet.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The current status of the instance fleet.

*/ inline void SetStatus(const InstanceFleetStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The current status of the instance fleet.

*/ inline void SetStatus(InstanceFleetStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The current status of the instance fleet.

*/ inline InstanceFleet& WithStatus(const InstanceFleetStatus& value) { SetStatus(value); return *this;} /** *

The current status of the instance fleet.

*/ inline InstanceFleet& WithStatus(InstanceFleetStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

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

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

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

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

The node type that the instance fleet hosts. Valid values are MASTER, CORE, * or 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, * or 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, * or TASK.

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

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

*/ inline InstanceFleet& 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. You can use * InstanceFleet$ProvisionedOnDemandCapacity to determine the Spot capacity * units that have been provisioned for the instance fleet.

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. You can use * InstanceFleet$ProvisionedOnDemandCapacity to determine the Spot capacity * units that have been provisioned for the instance fleet.

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. You can use * InstanceFleet$ProvisionedOnDemandCapacity to determine the Spot capacity * units that have been provisioned for the instance fleet.

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. You can use * InstanceFleet$ProvisionedOnDemandCapacity to determine the Spot capacity * units that have been provisioned for the instance fleet.

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 InstanceFleet& 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. You can * use InstanceFleet$ProvisionedSpotCapacity to determine the Spot capacity * units that have been provisioned for the instance fleet.

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. You can * use InstanceFleet$ProvisionedSpotCapacity to determine the Spot capacity * units that have been provisioned for the instance fleet.

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. You can * use InstanceFleet$ProvisionedSpotCapacity to determine the Spot capacity * units that have been provisioned for the instance fleet.

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. You can * use InstanceFleet$ProvisionedSpotCapacity to determine the Spot capacity * units that have been provisioned for the instance fleet.

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 InstanceFleet& WithTargetSpotCapacity(int value) { SetTargetSpotCapacity(value); return *this;} /** *

The number of On-Demand units that have been provisioned for the instance * fleet to fulfill TargetOnDemandCapacity. This provisioned capacity * might be less than or greater than TargetOnDemandCapacity.

*/ inline int GetProvisionedOnDemandCapacity() const{ return m_provisionedOnDemandCapacity; } /** *

The number of On-Demand units that have been provisioned for the instance * fleet to fulfill TargetOnDemandCapacity. This provisioned capacity * might be less than or greater than TargetOnDemandCapacity.

*/ inline bool ProvisionedOnDemandCapacityHasBeenSet() const { return m_provisionedOnDemandCapacityHasBeenSet; } /** *

The number of On-Demand units that have been provisioned for the instance * fleet to fulfill TargetOnDemandCapacity. This provisioned capacity * might be less than or greater than TargetOnDemandCapacity.

*/ inline void SetProvisionedOnDemandCapacity(int value) { m_provisionedOnDemandCapacityHasBeenSet = true; m_provisionedOnDemandCapacity = value; } /** *

The number of On-Demand units that have been provisioned for the instance * fleet to fulfill TargetOnDemandCapacity. This provisioned capacity * might be less than or greater than TargetOnDemandCapacity.

*/ inline InstanceFleet& WithProvisionedOnDemandCapacity(int value) { SetProvisionedOnDemandCapacity(value); return *this;} /** *

The number of Spot units that have been provisioned for this instance fleet * to fulfill TargetSpotCapacity. This provisioned capacity might be * less than or greater than TargetSpotCapacity.

*/ inline int GetProvisionedSpotCapacity() const{ return m_provisionedSpotCapacity; } /** *

The number of Spot units that have been provisioned for this instance fleet * to fulfill TargetSpotCapacity. This provisioned capacity might be * less than or greater than TargetSpotCapacity.

*/ inline bool ProvisionedSpotCapacityHasBeenSet() const { return m_provisionedSpotCapacityHasBeenSet; } /** *

The number of Spot units that have been provisioned for this instance fleet * to fulfill TargetSpotCapacity. This provisioned capacity might be * less than or greater than TargetSpotCapacity.

*/ inline void SetProvisionedSpotCapacity(int value) { m_provisionedSpotCapacityHasBeenSet = true; m_provisionedSpotCapacity = value; } /** *

The number of Spot units that have been provisioned for this instance fleet * to fulfill TargetSpotCapacity. This provisioned capacity might be * less than or greater than TargetSpotCapacity.

*/ inline InstanceFleet& WithProvisionedSpotCapacity(int value) { SetProvisionedSpotCapacity(value); return *this;} /** *

An array of specifications for the instance types that comprise an instance * fleet.

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

An array of specifications for the instance types that comprise an instance * fleet.

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

An array of specifications for the instance types that comprise an instance * fleet.

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

An array of specifications for the instance types that comprise an instance * fleet.

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

An array of specifications for the instance types that comprise an instance * fleet.

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

An array of specifications for the instance types that comprise an instance * fleet.

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

An array of specifications for the instance types that comprise an instance * fleet.

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

An array of specifications for the instance types that comprise an instance * fleet.

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

Describes the launch specification for an instance fleet.

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

Describes the launch specification for an instance fleet.

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

Describes the launch specification for an instance fleet.

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

Describes the launch specification for an instance fleet.

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

Describes the launch specification for an instance fleet.

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

Describes the launch specification for an instance fleet.

*/ inline InstanceFleet& 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 InstanceFleet& WithResizeSpecifications(const InstanceFleetResizingSpecifications& value) { SetResizeSpecifications(value); return *this;} /** *

The resize specification for the instance fleet.

*/ inline InstanceFleet& WithResizeSpecifications(InstanceFleetResizingSpecifications&& value) { SetResizeSpecifications(std::move(value)); return *this;} private: Aws::String m_id; bool m_idHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; InstanceFleetStatus m_status; bool m_statusHasBeenSet = false; InstanceFleetType m_instanceFleetType; bool m_instanceFleetTypeHasBeenSet = false; int m_targetOnDemandCapacity; bool m_targetOnDemandCapacityHasBeenSet = false; int m_targetSpotCapacity; bool m_targetSpotCapacityHasBeenSet = false; int m_provisionedOnDemandCapacity; bool m_provisionedOnDemandCapacityHasBeenSet = false; int m_provisionedSpotCapacity; bool m_provisionedSpotCapacityHasBeenSet = false; Aws::Vector m_instanceTypeSpecifications; bool m_instanceTypeSpecificationsHasBeenSet = false; InstanceFleetProvisioningSpecifications m_launchSpecifications; bool m_launchSpecificationsHasBeenSet = false; InstanceFleetResizingSpecifications m_resizeSpecifications; bool m_resizeSpecificationsHasBeenSet = false; }; } // namespace Model } // namespace EMR } // namespace Aws