/**
* 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 Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace GameLift
{
namespace Model
{
/**
* Describes the configuration for a container that runs your game server
* executable. This definition includes container configuration, resources, and
* start instructions. Use this data type when creating or updating a game server
* container group definition. For properties of a deployed container, see
* GameServerContainerDefinition. A game server container is automatically
* considered essential; if an essential container fails, the entire container
* group restarts.
Use with: CreateContainerGroupDefinition,
* UpdateContainerGroupDefinition
See Also:
AWS
* API Reference
*/
class GameServerContainerDefinitionInput
{
public:
AWS_GAMELIFT_API GameServerContainerDefinitionInput();
AWS_GAMELIFT_API GameServerContainerDefinitionInput(Aws::Utils::Json::JsonView jsonValue);
AWS_GAMELIFT_API GameServerContainerDefinitionInput& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_GAMELIFT_API Aws::Utils::Json::JsonValue Jsonize() const;
///@{
/**
* A string that uniquely identifies the container definition within a container
* group.
*/
inline const Aws::String& GetContainerName() const{ return m_containerName; }
inline bool ContainerNameHasBeenSet() const { return m_containerNameHasBeenSet; }
inline void SetContainerName(const Aws::String& value) { m_containerNameHasBeenSet = true; m_containerName = value; }
inline void SetContainerName(Aws::String&& value) { m_containerNameHasBeenSet = true; m_containerName = std::move(value); }
inline void SetContainerName(const char* value) { m_containerNameHasBeenSet = true; m_containerName.assign(value); }
inline GameServerContainerDefinitionInput& WithContainerName(const Aws::String& value) { SetContainerName(value); return *this;}
inline GameServerContainerDefinitionInput& WithContainerName(Aws::String&& value) { SetContainerName(std::move(value)); return *this;}
inline GameServerContainerDefinitionInput& WithContainerName(const char* value) { SetContainerName(value); return *this;}
///@}
///@{
/**
* Establishes dependencies between this container and the status of other
* containers in the same container group. A container can have dependencies on
* multiple different containers.
You can use dependencies to establish a
* startup/shutdown sequence across the container group. For example, you might
* specify that ContainerB has a START dependency on
* ContainerA. This dependency means that ContainerB can't start
* until after ContainerA has started. This dependency is reversed on
* shutdown, which means that ContainerB must shut down before
* ContainerA can shut down.
*/
inline const Aws::Vector& GetDependsOn() const{ return m_dependsOn; }
inline bool DependsOnHasBeenSet() const { return m_dependsOnHasBeenSet; }
inline void SetDependsOn(const Aws::Vector& value) { m_dependsOnHasBeenSet = true; m_dependsOn = value; }
inline void SetDependsOn(Aws::Vector&& value) { m_dependsOnHasBeenSet = true; m_dependsOn = std::move(value); }
inline GameServerContainerDefinitionInput& WithDependsOn(const Aws::Vector& value) { SetDependsOn(value); return *this;}
inline GameServerContainerDefinitionInput& WithDependsOn(Aws::Vector&& value) { SetDependsOn(std::move(value)); return *this;}
inline GameServerContainerDefinitionInput& AddDependsOn(const ContainerDependency& value) { m_dependsOnHasBeenSet = true; m_dependsOn.push_back(value); return *this; }
inline GameServerContainerDefinitionInput& AddDependsOn(ContainerDependency&& value) { m_dependsOnHasBeenSet = true; m_dependsOn.push_back(std::move(value)); return *this; }
///@}
///@{
/**
* A mount point that binds a path inside the container to a file or directory
* on the host system and lets it access the file or directory.
*/
inline const Aws::Vector& GetMountPoints() const{ return m_mountPoints; }
inline bool MountPointsHasBeenSet() const { return m_mountPointsHasBeenSet; }
inline void SetMountPoints(const Aws::Vector& value) { m_mountPointsHasBeenSet = true; m_mountPoints = value; }
inline void SetMountPoints(Aws::Vector&& value) { m_mountPointsHasBeenSet = true; m_mountPoints = std::move(value); }
inline GameServerContainerDefinitionInput& WithMountPoints(const Aws::Vector& value) { SetMountPoints(value); return *this;}
inline GameServerContainerDefinitionInput& WithMountPoints(Aws::Vector&& value) { SetMountPoints(std::move(value)); return *this;}
inline GameServerContainerDefinitionInput& AddMountPoints(const ContainerMountPoint& value) { m_mountPointsHasBeenSet = true; m_mountPoints.push_back(value); return *this; }
inline GameServerContainerDefinitionInput& AddMountPoints(ContainerMountPoint&& value) { m_mountPointsHasBeenSet = true; m_mountPoints.push_back(std::move(value)); return *this; }
///@}
///@{
/**
* A set of environment variables to pass to the container on startup. See the
* ContainerDefinition::environment
* parameter in the Amazon Elastic Container Service API Reference.
*/
inline const Aws::Vector& GetEnvironmentOverride() const{ return m_environmentOverride; }
inline bool EnvironmentOverrideHasBeenSet() const { return m_environmentOverrideHasBeenSet; }
inline void SetEnvironmentOverride(const Aws::Vector& value) { m_environmentOverrideHasBeenSet = true; m_environmentOverride = value; }
inline void SetEnvironmentOverride(Aws::Vector&& value) { m_environmentOverrideHasBeenSet = true; m_environmentOverride = std::move(value); }
inline GameServerContainerDefinitionInput& WithEnvironmentOverride(const Aws::Vector& value) { SetEnvironmentOverride(value); return *this;}
inline GameServerContainerDefinitionInput& WithEnvironmentOverride(Aws::Vector&& value) { SetEnvironmentOverride(std::move(value)); return *this;}
inline GameServerContainerDefinitionInput& AddEnvironmentOverride(const ContainerEnvironment& value) { m_environmentOverrideHasBeenSet = true; m_environmentOverride.push_back(value); return *this; }
inline GameServerContainerDefinitionInput& AddEnvironmentOverride(ContainerEnvironment&& value) { m_environmentOverrideHasBeenSet = true; m_environmentOverride.push_back(std::move(value)); return *this; }
///@}
///@{
/**
* The location of the container image to deploy to a container fleet. Provide
* an image in an Amazon Elastic Container Registry public or private repository.
* The repository must be in the same Amazon Web Services account and Amazon Web
* Services Region where you're creating the container group definition. For limits
* on image size, see Amazon
* GameLift endpoints and quotas. You can use any of the following image URI
* formats:
-
Image ID only: [AWS account].dkr.ecr.[AWS
* region].amazonaws.com/[repository ID]
-
Image ID and
* digest: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository
* ID]@[digest]
-
Image ID and tag: [AWS
* account].dkr.ecr.[AWS region].amazonaws.com/[repository ID]:[tag]
*
*/
inline const Aws::String& GetImageUri() const{ return m_imageUri; }
inline bool ImageUriHasBeenSet() const { return m_imageUriHasBeenSet; }
inline void SetImageUri(const Aws::String& value) { m_imageUriHasBeenSet = true; m_imageUri = value; }
inline void SetImageUri(Aws::String&& value) { m_imageUriHasBeenSet = true; m_imageUri = std::move(value); }
inline void SetImageUri(const char* value) { m_imageUriHasBeenSet = true; m_imageUri.assign(value); }
inline GameServerContainerDefinitionInput& WithImageUri(const Aws::String& value) { SetImageUri(value); return *this;}
inline GameServerContainerDefinitionInput& WithImageUri(Aws::String&& value) { SetImageUri(std::move(value)); return *this;}
inline GameServerContainerDefinitionInput& WithImageUri(const char* value) { SetImageUri(value); return *this;}
///@}
///@{
/**
* A set of ports that Amazon GameLift can assign to processes in the container.
* Processes, must be assigned a container port to accept inbound traffic
* connections. For example, a game server process requires a container port to
* allow game clients to connect to it. Container ports aren't directly accessed by
* inbound traffic. Instead, Amazon GameLift maps container ports to externally
* accessible connection ports (see the container fleet property
* ConnectionPortRange).
*/
inline const ContainerPortConfiguration& GetPortConfiguration() const{ return m_portConfiguration; }
inline bool PortConfigurationHasBeenSet() const { return m_portConfigurationHasBeenSet; }
inline void SetPortConfiguration(const ContainerPortConfiguration& value) { m_portConfigurationHasBeenSet = true; m_portConfiguration = value; }
inline void SetPortConfiguration(ContainerPortConfiguration&& value) { m_portConfigurationHasBeenSet = true; m_portConfiguration = std::move(value); }
inline GameServerContainerDefinitionInput& WithPortConfiguration(const ContainerPortConfiguration& value) { SetPortConfiguration(value); return *this;}
inline GameServerContainerDefinitionInput& WithPortConfiguration(ContainerPortConfiguration&& value) { SetPortConfiguration(std::move(value)); return *this;}
///@}
///@{
/**
* The Amazon GameLift server SDK version that the game server is integrated
* with. Only game servers using 5.2.0 or higher are compatible with container
* fleets.
*/
inline const Aws::String& GetServerSdkVersion() const{ return m_serverSdkVersion; }
inline bool ServerSdkVersionHasBeenSet() const { return m_serverSdkVersionHasBeenSet; }
inline void SetServerSdkVersion(const Aws::String& value) { m_serverSdkVersionHasBeenSet = true; m_serverSdkVersion = value; }
inline void SetServerSdkVersion(Aws::String&& value) { m_serverSdkVersionHasBeenSet = true; m_serverSdkVersion = std::move(value); }
inline void SetServerSdkVersion(const char* value) { m_serverSdkVersionHasBeenSet = true; m_serverSdkVersion.assign(value); }
inline GameServerContainerDefinitionInput& WithServerSdkVersion(const Aws::String& value) { SetServerSdkVersion(value); return *this;}
inline GameServerContainerDefinitionInput& WithServerSdkVersion(Aws::String&& value) { SetServerSdkVersion(std::move(value)); return *this;}
inline GameServerContainerDefinitionInput& WithServerSdkVersion(const char* value) { SetServerSdkVersion(value); return *this;}
///@}
private:
Aws::String m_containerName;
bool m_containerNameHasBeenSet = false;
Aws::Vector m_dependsOn;
bool m_dependsOnHasBeenSet = false;
Aws::Vector m_mountPoints;
bool m_mountPointsHasBeenSet = false;
Aws::Vector m_environmentOverride;
bool m_environmentOverrideHasBeenSet = false;
Aws::String m_imageUri;
bool m_imageUriHasBeenSet = false;
ContainerPortConfiguration m_portConfiguration;
bool m_portConfigurationHasBeenSet = false;
Aws::String m_serverSdkVersion;
bool m_serverSdkVersionHasBeenSet = false;
};
} // namespace Model
} // namespace GameLift
} // namespace Aws