/** * 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 GameLift { namespace Model { /** *

This data type is used with the Amazon GameLift FleetIQ and game server * groups.

An allowed instance type for a game server group. All game * server groups must have at least two instance types defined for it. Amazon * GameLift FleetIQ periodically evaluates each defined instance type for * viability. It then updates the Auto Scaling group with the list of viable * instance types.

See Also:

AWS * API Reference

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

An Amazon EC2 instance type designation.

*/ inline const GameServerGroupInstanceType& GetInstanceType() const{ return m_instanceType; } /** *

An Amazon EC2 instance type designation.

*/ inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; } /** *

An Amazon EC2 instance type designation.

*/ inline void SetInstanceType(const GameServerGroupInstanceType& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; } /** *

An Amazon EC2 instance type designation.

*/ inline void SetInstanceType(GameServerGroupInstanceType&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); } /** *

An Amazon EC2 instance type designation.

*/ inline InstanceDefinition& WithInstanceType(const GameServerGroupInstanceType& value) { SetInstanceType(value); return *this;} /** *

An Amazon EC2 instance type designation.

*/ inline InstanceDefinition& WithInstanceType(GameServerGroupInstanceType&& value) { SetInstanceType(std::move(value)); return *this;} /** *

Instance weighting that indicates how much this instance type contributes to * the total capacity of a game server group. Instance weights are used by Amazon * GameLift FleetIQ to calculate the instance type's cost per unit hour and better * identify the most cost-effective options. For detailed information on weighting * instance capacity, see Instance * Weighting in the Amazon Elastic Compute Cloud Auto Scaling User * Guide. Default value is "1".

*/ inline const Aws::String& GetWeightedCapacity() const{ return m_weightedCapacity; } /** *

Instance weighting that indicates how much this instance type contributes to * the total capacity of a game server group. Instance weights are used by Amazon * GameLift FleetIQ to calculate the instance type's cost per unit hour and better * identify the most cost-effective options. For detailed information on weighting * instance capacity, see Instance * Weighting in the Amazon Elastic Compute Cloud Auto Scaling User * Guide. Default value is "1".

*/ inline bool WeightedCapacityHasBeenSet() const { return m_weightedCapacityHasBeenSet; } /** *

Instance weighting that indicates how much this instance type contributes to * the total capacity of a game server group. Instance weights are used by Amazon * GameLift FleetIQ to calculate the instance type's cost per unit hour and better * identify the most cost-effective options. For detailed information on weighting * instance capacity, see Instance * Weighting in the Amazon Elastic Compute Cloud Auto Scaling User * Guide. Default value is "1".

*/ inline void SetWeightedCapacity(const Aws::String& value) { m_weightedCapacityHasBeenSet = true; m_weightedCapacity = value; } /** *

Instance weighting that indicates how much this instance type contributes to * the total capacity of a game server group. Instance weights are used by Amazon * GameLift FleetIQ to calculate the instance type's cost per unit hour and better * identify the most cost-effective options. For detailed information on weighting * instance capacity, see Instance * Weighting in the Amazon Elastic Compute Cloud Auto Scaling User * Guide. Default value is "1".

*/ inline void SetWeightedCapacity(Aws::String&& value) { m_weightedCapacityHasBeenSet = true; m_weightedCapacity = std::move(value); } /** *

Instance weighting that indicates how much this instance type contributes to * the total capacity of a game server group. Instance weights are used by Amazon * GameLift FleetIQ to calculate the instance type's cost per unit hour and better * identify the most cost-effective options. For detailed information on weighting * instance capacity, see Instance * Weighting in the Amazon Elastic Compute Cloud Auto Scaling User * Guide. Default value is "1".

*/ inline void SetWeightedCapacity(const char* value) { m_weightedCapacityHasBeenSet = true; m_weightedCapacity.assign(value); } /** *

Instance weighting that indicates how much this instance type contributes to * the total capacity of a game server group. Instance weights are used by Amazon * GameLift FleetIQ to calculate the instance type's cost per unit hour and better * identify the most cost-effective options. For detailed information on weighting * instance capacity, see Instance * Weighting in the Amazon Elastic Compute Cloud Auto Scaling User * Guide. Default value is "1".

*/ inline InstanceDefinition& WithWeightedCapacity(const Aws::String& value) { SetWeightedCapacity(value); return *this;} /** *

Instance weighting that indicates how much this instance type contributes to * the total capacity of a game server group. Instance weights are used by Amazon * GameLift FleetIQ to calculate the instance type's cost per unit hour and better * identify the most cost-effective options. For detailed information on weighting * instance capacity, see Instance * Weighting in the Amazon Elastic Compute Cloud Auto Scaling User * Guide. Default value is "1".

*/ inline InstanceDefinition& WithWeightedCapacity(Aws::String&& value) { SetWeightedCapacity(std::move(value)); return *this;} /** *

Instance weighting that indicates how much this instance type contributes to * the total capacity of a game server group. Instance weights are used by Amazon * GameLift FleetIQ to calculate the instance type's cost per unit hour and better * identify the most cost-effective options. For detailed information on weighting * instance capacity, see Instance * Weighting in the Amazon Elastic Compute Cloud Auto Scaling User * Guide. Default value is "1".

*/ inline InstanceDefinition& WithWeightedCapacity(const char* value) { SetWeightedCapacity(value); return *this;} private: GameServerGroupInstanceType m_instanceType; bool m_instanceTypeHasBeenSet = false; Aws::String m_weightedCapacity; bool m_weightedCapacityHasBeenSet = false; }; } // namespace Model } // namespace GameLift } // namespace Aws