/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace EMR { namespace Model { /** *

Placement group configuration for an Amazon EMR cluster. The configuration * specifies the placement strategy that can be applied to instance roles during * cluster creation.

To use this configuration, consider attaching managed * policy AmazonElasticMapReducePlacementGroupPolicy to the Amazon EMR * role.

See Also:

AWS * API Reference

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

Role of the instance in the cluster.

Starting with Amazon EMR release * 5.23.0, the only supported instance role is MASTER.

*/ inline const InstanceRoleType& GetInstanceRole() const{ return m_instanceRole; } /** *

Role of the instance in the cluster.

Starting with Amazon EMR release * 5.23.0, the only supported instance role is MASTER.

*/ inline bool InstanceRoleHasBeenSet() const { return m_instanceRoleHasBeenSet; } /** *

Role of the instance in the cluster.

Starting with Amazon EMR release * 5.23.0, the only supported instance role is MASTER.

*/ inline void SetInstanceRole(const InstanceRoleType& value) { m_instanceRoleHasBeenSet = true; m_instanceRole = value; } /** *

Role of the instance in the cluster.

Starting with Amazon EMR release * 5.23.0, the only supported instance role is MASTER.

*/ inline void SetInstanceRole(InstanceRoleType&& value) { m_instanceRoleHasBeenSet = true; m_instanceRole = std::move(value); } /** *

Role of the instance in the cluster.

Starting with Amazon EMR release * 5.23.0, the only supported instance role is MASTER.

*/ inline PlacementGroupConfig& WithInstanceRole(const InstanceRoleType& value) { SetInstanceRole(value); return *this;} /** *

Role of the instance in the cluster.

Starting with Amazon EMR release * 5.23.0, the only supported instance role is MASTER.

*/ inline PlacementGroupConfig& WithInstanceRole(InstanceRoleType&& value) { SetInstanceRole(std::move(value)); return *this;} /** *

Amazon EC2 Placement Group strategy associated with instance role.

*

Starting with Amazon EMR release 5.23.0, the only supported placement * strategy is SPREAD for the MASTER instance role.

*/ inline const PlacementGroupStrategy& GetPlacementStrategy() const{ return m_placementStrategy; } /** *

Amazon EC2 Placement Group strategy associated with instance role.

*

Starting with Amazon EMR release 5.23.0, the only supported placement * strategy is SPREAD for the MASTER instance role.

*/ inline bool PlacementStrategyHasBeenSet() const { return m_placementStrategyHasBeenSet; } /** *

Amazon EC2 Placement Group strategy associated with instance role.

*

Starting with Amazon EMR release 5.23.0, the only supported placement * strategy is SPREAD for the MASTER instance role.

*/ inline void SetPlacementStrategy(const PlacementGroupStrategy& value) { m_placementStrategyHasBeenSet = true; m_placementStrategy = value; } /** *

Amazon EC2 Placement Group strategy associated with instance role.

*

Starting with Amazon EMR release 5.23.0, the only supported placement * strategy is SPREAD for the MASTER instance role.

*/ inline void SetPlacementStrategy(PlacementGroupStrategy&& value) { m_placementStrategyHasBeenSet = true; m_placementStrategy = std::move(value); } /** *

Amazon EC2 Placement Group strategy associated with instance role.

*

Starting with Amazon EMR release 5.23.0, the only supported placement * strategy is SPREAD for the MASTER instance role.

*/ inline PlacementGroupConfig& WithPlacementStrategy(const PlacementGroupStrategy& value) { SetPlacementStrategy(value); return *this;} /** *

Amazon EC2 Placement Group strategy associated with instance role.

*

Starting with Amazon EMR release 5.23.0, the only supported placement * strategy is SPREAD for the MASTER instance role.

*/ inline PlacementGroupConfig& WithPlacementStrategy(PlacementGroupStrategy&& value) { SetPlacementStrategy(std::move(value)); return *this;} private: InstanceRoleType m_instanceRole; bool m_instanceRoleHasBeenSet = false; PlacementGroupStrategy m_placementStrategy; bool m_placementStrategyHasBeenSet = false; }; } // namespace Model } // namespace EMR } // namespace Aws