/** * 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 GameLift { namespace Model { /** */ class UpdateGameServerGroupRequest : public GameLiftRequest { public: AWS_GAMELIFT_API UpdateGameServerGroupRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "UpdateGameServerGroup"; } AWS_GAMELIFT_API Aws::String SerializePayload() const override; AWS_GAMELIFT_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

A unique identifier for the game server group. Use either the name or ARN * value.

*/ inline const Aws::String& GetGameServerGroupName() const{ return m_gameServerGroupName; } /** *

A unique identifier for the game server group. Use either the name or ARN * value.

*/ inline bool GameServerGroupNameHasBeenSet() const { return m_gameServerGroupNameHasBeenSet; } /** *

A unique identifier for the game server group. Use either the name or ARN * value.

*/ inline void SetGameServerGroupName(const Aws::String& value) { m_gameServerGroupNameHasBeenSet = true; m_gameServerGroupName = value; } /** *

A unique identifier for the game server group. Use either the name or ARN * value.

*/ inline void SetGameServerGroupName(Aws::String&& value) { m_gameServerGroupNameHasBeenSet = true; m_gameServerGroupName = std::move(value); } /** *

A unique identifier for the game server group. Use either the name or ARN * value.

*/ inline void SetGameServerGroupName(const char* value) { m_gameServerGroupNameHasBeenSet = true; m_gameServerGroupName.assign(value); } /** *

A unique identifier for the game server group. Use either the name or ARN * value.

*/ inline UpdateGameServerGroupRequest& WithGameServerGroupName(const Aws::String& value) { SetGameServerGroupName(value); return *this;} /** *

A unique identifier for the game server group. Use either the name or ARN * value.

*/ inline UpdateGameServerGroupRequest& WithGameServerGroupName(Aws::String&& value) { SetGameServerGroupName(std::move(value)); return *this;} /** *

A unique identifier for the game server group. Use either the name or ARN * value.

*/ inline UpdateGameServerGroupRequest& WithGameServerGroupName(const char* value) { SetGameServerGroupName(value); return *this;} /** *

The Amazon Resource Name (ARN) * for an IAM role that allows Amazon GameLift to access your Amazon EC2 Auto * Scaling groups.

*/ inline const Aws::String& GetRoleArn() const{ return m_roleArn; } /** *

The Amazon Resource Name (ARN) * for an IAM role that allows Amazon GameLift to access your Amazon EC2 Auto * Scaling groups.

*/ inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) * for an IAM role that allows Amazon GameLift to access your Amazon EC2 Auto * Scaling groups.

*/ inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; } /** *

The Amazon Resource Name (ARN) * for an IAM role that allows Amazon GameLift to access your Amazon EC2 Auto * Scaling groups.

*/ inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::move(value); } /** *

The Amazon Resource Name (ARN) * for an IAM role that allows Amazon GameLift to access your Amazon EC2 Auto * Scaling groups.

*/ inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); } /** *

The Amazon Resource Name (ARN) * for an IAM role that allows Amazon GameLift to access your Amazon EC2 Auto * Scaling groups.

*/ inline UpdateGameServerGroupRequest& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;} /** *

The Amazon Resource Name (ARN) * for an IAM role that allows Amazon GameLift to access your Amazon EC2 Auto * Scaling groups.

*/ inline UpdateGameServerGroupRequest& WithRoleArn(Aws::String&& value) { SetRoleArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) * for an IAM role that allows Amazon GameLift to access your Amazon EC2 Auto * Scaling groups.

*/ inline UpdateGameServerGroupRequest& WithRoleArn(const char* value) { SetRoleArn(value); return *this;} /** *

An updated list of Amazon EC2 instance types to use in the Auto Scaling * group. The instance definitions must specify at least two different instance * types that are supported by Amazon GameLift FleetIQ. This updated list replaces * the entire current list of instance definitions for the game server group. For * more information on instance types, see EC2 * Instance Types in the Amazon EC2 User Guide. You can optionally * specify capacity weighting for each instance type. If no weight value is * specified for an instance type, it is set to the default value "1". For more * information about capacity weighting, see * Instance Weighting for Amazon EC2 Auto Scaling in the Amazon EC2 Auto * Scaling User Guide.

*/ inline const Aws::Vector& GetInstanceDefinitions() const{ return m_instanceDefinitions; } /** *

An updated list of Amazon EC2 instance types to use in the Auto Scaling * group. The instance definitions must specify at least two different instance * types that are supported by Amazon GameLift FleetIQ. This updated list replaces * the entire current list of instance definitions for the game server group. For * more information on instance types, see EC2 * Instance Types in the Amazon EC2 User Guide. You can optionally * specify capacity weighting for each instance type. If no weight value is * specified for an instance type, it is set to the default value "1". For more * information about capacity weighting, see * Instance Weighting for Amazon EC2 Auto Scaling in the Amazon EC2 Auto * Scaling User Guide.

*/ inline bool InstanceDefinitionsHasBeenSet() const { return m_instanceDefinitionsHasBeenSet; } /** *

An updated list of Amazon EC2 instance types to use in the Auto Scaling * group. The instance definitions must specify at least two different instance * types that are supported by Amazon GameLift FleetIQ. This updated list replaces * the entire current list of instance definitions for the game server group. For * more information on instance types, see EC2 * Instance Types in the Amazon EC2 User Guide. You can optionally * specify capacity weighting for each instance type. If no weight value is * specified for an instance type, it is set to the default value "1". For more * information about capacity weighting, see * Instance Weighting for Amazon EC2 Auto Scaling in the Amazon EC2 Auto * Scaling User Guide.

*/ inline void SetInstanceDefinitions(const Aws::Vector& value) { m_instanceDefinitionsHasBeenSet = true; m_instanceDefinitions = value; } /** *

An updated list of Amazon EC2 instance types to use in the Auto Scaling * group. The instance definitions must specify at least two different instance * types that are supported by Amazon GameLift FleetIQ. This updated list replaces * the entire current list of instance definitions for the game server group. For * more information on instance types, see EC2 * Instance Types in the Amazon EC2 User Guide. You can optionally * specify capacity weighting for each instance type. If no weight value is * specified for an instance type, it is set to the default value "1". For more * information about capacity weighting, see * Instance Weighting for Amazon EC2 Auto Scaling in the Amazon EC2 Auto * Scaling User Guide.

*/ inline void SetInstanceDefinitions(Aws::Vector&& value) { m_instanceDefinitionsHasBeenSet = true; m_instanceDefinitions = std::move(value); } /** *

An updated list of Amazon EC2 instance types to use in the Auto Scaling * group. The instance definitions must specify at least two different instance * types that are supported by Amazon GameLift FleetIQ. This updated list replaces * the entire current list of instance definitions for the game server group. For * more information on instance types, see EC2 * Instance Types in the Amazon EC2 User Guide. You can optionally * specify capacity weighting for each instance type. If no weight value is * specified for an instance type, it is set to the default value "1". For more * information about capacity weighting, see * Instance Weighting for Amazon EC2 Auto Scaling in the Amazon EC2 Auto * Scaling User Guide.

*/ inline UpdateGameServerGroupRequest& WithInstanceDefinitions(const Aws::Vector& value) { SetInstanceDefinitions(value); return *this;} /** *

An updated list of Amazon EC2 instance types to use in the Auto Scaling * group. The instance definitions must specify at least two different instance * types that are supported by Amazon GameLift FleetIQ. This updated list replaces * the entire current list of instance definitions for the game server group. For * more information on instance types, see EC2 * Instance Types in the Amazon EC2 User Guide. You can optionally * specify capacity weighting for each instance type. If no weight value is * specified for an instance type, it is set to the default value "1". For more * information about capacity weighting, see * Instance Weighting for Amazon EC2 Auto Scaling in the Amazon EC2 Auto * Scaling User Guide.

*/ inline UpdateGameServerGroupRequest& WithInstanceDefinitions(Aws::Vector&& value) { SetInstanceDefinitions(std::move(value)); return *this;} /** *

An updated list of Amazon EC2 instance types to use in the Auto Scaling * group. The instance definitions must specify at least two different instance * types that are supported by Amazon GameLift FleetIQ. This updated list replaces * the entire current list of instance definitions for the game server group. For * more information on instance types, see EC2 * Instance Types in the Amazon EC2 User Guide. You can optionally * specify capacity weighting for each instance type. If no weight value is * specified for an instance type, it is set to the default value "1". For more * information about capacity weighting, see * Instance Weighting for Amazon EC2 Auto Scaling in the Amazon EC2 Auto * Scaling User Guide.

*/ inline UpdateGameServerGroupRequest& AddInstanceDefinitions(const InstanceDefinition& value) { m_instanceDefinitionsHasBeenSet = true; m_instanceDefinitions.push_back(value); return *this; } /** *

An updated list of Amazon EC2 instance types to use in the Auto Scaling * group. The instance definitions must specify at least two different instance * types that are supported by Amazon GameLift FleetIQ. This updated list replaces * the entire current list of instance definitions for the game server group. For * more information on instance types, see EC2 * Instance Types in the Amazon EC2 User Guide. You can optionally * specify capacity weighting for each instance type. If no weight value is * specified for an instance type, it is set to the default value "1". For more * information about capacity weighting, see * Instance Weighting for Amazon EC2 Auto Scaling in the Amazon EC2 Auto * Scaling User Guide.

*/ inline UpdateGameServerGroupRequest& AddInstanceDefinitions(InstanceDefinition&& value) { m_instanceDefinitionsHasBeenSet = true; m_instanceDefinitions.push_back(std::move(value)); return *this; } /** *

A flag that indicates whether instances in the game server group are * protected from early termination. Unprotected instances that have active game * servers running might be terminated during a scale-down event, causing players * to be dropped from the game. Protected instances cannot be terminated while * there are active game servers running except in the event of a forced game * server group deletion (see ). An exception to this is with Spot Instances, which * can be terminated by Amazon Web Services regardless of protection status. This * property is set to NO_PROTECTION by default.

*/ inline const GameServerProtectionPolicy& GetGameServerProtectionPolicy() const{ return m_gameServerProtectionPolicy; } /** *

A flag that indicates whether instances in the game server group are * protected from early termination. Unprotected instances that have active game * servers running might be terminated during a scale-down event, causing players * to be dropped from the game. Protected instances cannot be terminated while * there are active game servers running except in the event of a forced game * server group deletion (see ). An exception to this is with Spot Instances, which * can be terminated by Amazon Web Services regardless of protection status. This * property is set to NO_PROTECTION by default.

*/ inline bool GameServerProtectionPolicyHasBeenSet() const { return m_gameServerProtectionPolicyHasBeenSet; } /** *

A flag that indicates whether instances in the game server group are * protected from early termination. Unprotected instances that have active game * servers running might be terminated during a scale-down event, causing players * to be dropped from the game. Protected instances cannot be terminated while * there are active game servers running except in the event of a forced game * server group deletion (see ). An exception to this is with Spot Instances, which * can be terminated by Amazon Web Services regardless of protection status. This * property is set to NO_PROTECTION by default.

*/ inline void SetGameServerProtectionPolicy(const GameServerProtectionPolicy& value) { m_gameServerProtectionPolicyHasBeenSet = true; m_gameServerProtectionPolicy = value; } /** *

A flag that indicates whether instances in the game server group are * protected from early termination. Unprotected instances that have active game * servers running might be terminated during a scale-down event, causing players * to be dropped from the game. Protected instances cannot be terminated while * there are active game servers running except in the event of a forced game * server group deletion (see ). An exception to this is with Spot Instances, which * can be terminated by Amazon Web Services regardless of protection status. This * property is set to NO_PROTECTION by default.

*/ inline void SetGameServerProtectionPolicy(GameServerProtectionPolicy&& value) { m_gameServerProtectionPolicyHasBeenSet = true; m_gameServerProtectionPolicy = std::move(value); } /** *

A flag that indicates whether instances in the game server group are * protected from early termination. Unprotected instances that have active game * servers running might be terminated during a scale-down event, causing players * to be dropped from the game. Protected instances cannot be terminated while * there are active game servers running except in the event of a forced game * server group deletion (see ). An exception to this is with Spot Instances, which * can be terminated by Amazon Web Services regardless of protection status. This * property is set to NO_PROTECTION by default.

*/ inline UpdateGameServerGroupRequest& WithGameServerProtectionPolicy(const GameServerProtectionPolicy& value) { SetGameServerProtectionPolicy(value); return *this;} /** *

A flag that indicates whether instances in the game server group are * protected from early termination. Unprotected instances that have active game * servers running might be terminated during a scale-down event, causing players * to be dropped from the game. Protected instances cannot be terminated while * there are active game servers running except in the event of a forced game * server group deletion (see ). An exception to this is with Spot Instances, which * can be terminated by Amazon Web Services regardless of protection status. This * property is set to NO_PROTECTION by default.

*/ inline UpdateGameServerGroupRequest& WithGameServerProtectionPolicy(GameServerProtectionPolicy&& value) { SetGameServerProtectionPolicy(std::move(value)); return *this;} /** *

Indicates how Amazon GameLift FleetIQ balances the use of Spot Instances and * On-Demand Instances in the game server group. Method options include the * following:

  • SPOT_ONLY - Only Spot Instances are * used in the game server group. If Spot Instances are unavailable or not viable * for game hosting, the game server group provides no hosting capacity until Spot * Instances can again be used. Until then, no new instances are started, and the * existing nonviable Spot Instances are terminated (after current gameplay ends) * and are not replaced.

  • SPOT_PREFERRED - (default * value) Spot Instances are used whenever available in the game server group. If * Spot Instances are unavailable, the game server group continues to provide * hosting capacity by falling back to On-Demand Instances. Existing nonviable Spot * Instances are terminated (after current gameplay ends) and are replaced with new * On-Demand Instances.

  • ON_DEMAND_ONLY - Only * On-Demand Instances are used in the game server group. No Spot Instances are * used, even when available, while this balancing strategy is in force.

  • *
*/ inline const BalancingStrategy& GetBalancingStrategy() const{ return m_balancingStrategy; } /** *

Indicates how Amazon GameLift FleetIQ balances the use of Spot Instances and * On-Demand Instances in the game server group. Method options include the * following:

  • SPOT_ONLY - Only Spot Instances are * used in the game server group. If Spot Instances are unavailable or not viable * for game hosting, the game server group provides no hosting capacity until Spot * Instances can again be used. Until then, no new instances are started, and the * existing nonviable Spot Instances are terminated (after current gameplay ends) * and are not replaced.

  • SPOT_PREFERRED - (default * value) Spot Instances are used whenever available in the game server group. If * Spot Instances are unavailable, the game server group continues to provide * hosting capacity by falling back to On-Demand Instances. Existing nonviable Spot * Instances are terminated (after current gameplay ends) and are replaced with new * On-Demand Instances.

  • ON_DEMAND_ONLY - Only * On-Demand Instances are used in the game server group. No Spot Instances are * used, even when available, while this balancing strategy is in force.

  • *
*/ inline bool BalancingStrategyHasBeenSet() const { return m_balancingStrategyHasBeenSet; } /** *

Indicates how Amazon GameLift FleetIQ balances the use of Spot Instances and * On-Demand Instances in the game server group. Method options include the * following:

  • SPOT_ONLY - Only Spot Instances are * used in the game server group. If Spot Instances are unavailable or not viable * for game hosting, the game server group provides no hosting capacity until Spot * Instances can again be used. Until then, no new instances are started, and the * existing nonviable Spot Instances are terminated (after current gameplay ends) * and are not replaced.

  • SPOT_PREFERRED - (default * value) Spot Instances are used whenever available in the game server group. If * Spot Instances are unavailable, the game server group continues to provide * hosting capacity by falling back to On-Demand Instances. Existing nonviable Spot * Instances are terminated (after current gameplay ends) and are replaced with new * On-Demand Instances.

  • ON_DEMAND_ONLY - Only * On-Demand Instances are used in the game server group. No Spot Instances are * used, even when available, while this balancing strategy is in force.

  • *
*/ inline void SetBalancingStrategy(const BalancingStrategy& value) { m_balancingStrategyHasBeenSet = true; m_balancingStrategy = value; } /** *

Indicates how Amazon GameLift FleetIQ balances the use of Spot Instances and * On-Demand Instances in the game server group. Method options include the * following:

  • SPOT_ONLY - Only Spot Instances are * used in the game server group. If Spot Instances are unavailable or not viable * for game hosting, the game server group provides no hosting capacity until Spot * Instances can again be used. Until then, no new instances are started, and the * existing nonviable Spot Instances are terminated (after current gameplay ends) * and are not replaced.

  • SPOT_PREFERRED - (default * value) Spot Instances are used whenever available in the game server group. If * Spot Instances are unavailable, the game server group continues to provide * hosting capacity by falling back to On-Demand Instances. Existing nonviable Spot * Instances are terminated (after current gameplay ends) and are replaced with new * On-Demand Instances.

  • ON_DEMAND_ONLY - Only * On-Demand Instances are used in the game server group. No Spot Instances are * used, even when available, while this balancing strategy is in force.

  • *
*/ inline void SetBalancingStrategy(BalancingStrategy&& value) { m_balancingStrategyHasBeenSet = true; m_balancingStrategy = std::move(value); } /** *

Indicates how Amazon GameLift FleetIQ balances the use of Spot Instances and * On-Demand Instances in the game server group. Method options include the * following:

  • SPOT_ONLY - Only Spot Instances are * used in the game server group. If Spot Instances are unavailable or not viable * for game hosting, the game server group provides no hosting capacity until Spot * Instances can again be used. Until then, no new instances are started, and the * existing nonviable Spot Instances are terminated (after current gameplay ends) * and are not replaced.

  • SPOT_PREFERRED - (default * value) Spot Instances are used whenever available in the game server group. If * Spot Instances are unavailable, the game server group continues to provide * hosting capacity by falling back to On-Demand Instances. Existing nonviable Spot * Instances are terminated (after current gameplay ends) and are replaced with new * On-Demand Instances.

  • ON_DEMAND_ONLY - Only * On-Demand Instances are used in the game server group. No Spot Instances are * used, even when available, while this balancing strategy is in force.

  • *
*/ inline UpdateGameServerGroupRequest& WithBalancingStrategy(const BalancingStrategy& value) { SetBalancingStrategy(value); return *this;} /** *

Indicates how Amazon GameLift FleetIQ balances the use of Spot Instances and * On-Demand Instances in the game server group. Method options include the * following:

  • SPOT_ONLY - Only Spot Instances are * used in the game server group. If Spot Instances are unavailable or not viable * for game hosting, the game server group provides no hosting capacity until Spot * Instances can again be used. Until then, no new instances are started, and the * existing nonviable Spot Instances are terminated (after current gameplay ends) * and are not replaced.

  • SPOT_PREFERRED - (default * value) Spot Instances are used whenever available in the game server group. If * Spot Instances are unavailable, the game server group continues to provide * hosting capacity by falling back to On-Demand Instances. Existing nonviable Spot * Instances are terminated (after current gameplay ends) and are replaced with new * On-Demand Instances.

  • ON_DEMAND_ONLY - Only * On-Demand Instances are used in the game server group. No Spot Instances are * used, even when available, while this balancing strategy is in force.

  • *
*/ inline UpdateGameServerGroupRequest& WithBalancingStrategy(BalancingStrategy&& value) { SetBalancingStrategy(std::move(value)); return *this;} private: Aws::String m_gameServerGroupName; bool m_gameServerGroupNameHasBeenSet = false; Aws::String m_roleArn; bool m_roleArnHasBeenSet = false; Aws::Vector m_instanceDefinitions; bool m_instanceDefinitionsHasBeenSet = false; GameServerProtectionPolicy m_gameServerProtectionPolicy; bool m_gameServerProtectionPolicyHasBeenSet = false; BalancingStrategy m_balancingStrategy; bool m_balancingStrategyHasBeenSet = false; }; } // namespace Model } // namespace GameLift } // namespace Aws