/** * 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 { /** *

A set of instructions that define the set of server processes to run on * computes in a fleet. Server processes run either an executable in a custom game * build or a Realtime Servers script. Amazon GameLift launches the processes, * manages their life cycle, and replaces them as needed. Computes check regularly * for an updated runtime configuration.

An Amazon GameLift instance is * limited to 50 processes running concurrently. To calculate the total number of * processes defined in a runtime configuration, add the values of the * ConcurrentExecutions parameter for each server process. Learn more * about * Running Multiple Processes on a Fleet.

See Also:

AWS * API Reference

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

A collection of server process configurations that identify what server * processes to run on fleet computes.

*/ inline const Aws::Vector& GetServerProcesses() const{ return m_serverProcesses; } inline bool ServerProcessesHasBeenSet() const { return m_serverProcessesHasBeenSet; } inline void SetServerProcesses(const Aws::Vector& value) { m_serverProcessesHasBeenSet = true; m_serverProcesses = value; } inline void SetServerProcesses(Aws::Vector&& value) { m_serverProcessesHasBeenSet = true; m_serverProcesses = std::move(value); } inline RuntimeConfiguration& WithServerProcesses(const Aws::Vector& value) { SetServerProcesses(value); return *this;} inline RuntimeConfiguration& WithServerProcesses(Aws::Vector&& value) { SetServerProcesses(std::move(value)); return *this;} inline RuntimeConfiguration& AddServerProcesses(const ServerProcess& value) { m_serverProcessesHasBeenSet = true; m_serverProcesses.push_back(value); return *this; } inline RuntimeConfiguration& AddServerProcesses(ServerProcess&& value) { m_serverProcessesHasBeenSet = true; m_serverProcesses.push_back(std::move(value)); return *this; } ///@} ///@{ /** *

The number of game sessions in status ACTIVATING to allow on an * instance. This setting limits the instance resources that can be used for new * game activations at any one time.

*/ inline int GetMaxConcurrentGameSessionActivations() const{ return m_maxConcurrentGameSessionActivations; } inline bool MaxConcurrentGameSessionActivationsHasBeenSet() const { return m_maxConcurrentGameSessionActivationsHasBeenSet; } inline void SetMaxConcurrentGameSessionActivations(int value) { m_maxConcurrentGameSessionActivationsHasBeenSet = true; m_maxConcurrentGameSessionActivations = value; } inline RuntimeConfiguration& WithMaxConcurrentGameSessionActivations(int value) { SetMaxConcurrentGameSessionActivations(value); return *this;} ///@} ///@{ /** *

The maximum amount of time (in seconds) allowed to launch a new game session * and have it report ready to host players. During this time, the game session is * in status ACTIVATING. If the game session does not become active * before the timeout, it is ended and the game session status is changed to * TERMINATED.

*/ inline int GetGameSessionActivationTimeoutSeconds() const{ return m_gameSessionActivationTimeoutSeconds; } inline bool GameSessionActivationTimeoutSecondsHasBeenSet() const { return m_gameSessionActivationTimeoutSecondsHasBeenSet; } inline void SetGameSessionActivationTimeoutSeconds(int value) { m_gameSessionActivationTimeoutSecondsHasBeenSet = true; m_gameSessionActivationTimeoutSeconds = value; } inline RuntimeConfiguration& WithGameSessionActivationTimeoutSeconds(int value) { SetGameSessionActivationTimeoutSeconds(value); return *this;} ///@} private: Aws::Vector m_serverProcesses; bool m_serverProcessesHasBeenSet = false; int m_maxConcurrentGameSessionActivations; bool m_maxConcurrentGameSessionActivationsHasBeenSet = false; int m_gameSessionActivationTimeoutSeconds; bool m_gameSessionActivationTimeoutSecondsHasBeenSet = false; }; } // namespace Model } // namespace GameLift } // namespace Aws