Class CfnContainerGroupDefinition.GameServerContainerDefinitionProperty
Describes the game server container in an existing game server container group.
Inheritance
Namespace: Amazon.CDK.AWS.GameLift
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class GameServerContainerDefinitionProperty : Object, CfnContainerGroupDefinition.IGameServerContainerDefinitionProperty
Syntax (vb)
Public Class GameServerContainerDefinitionProperty
Inherits Object
Implements CfnContainerGroupDefinition.IGameServerContainerDefinitionProperty
Remarks
A game server container identifies a container image with your game server build. A game server container is automatically considered essential; if an essential container fails, the entire container group restarts.
You can update a container definition and deploy the updates to an existing fleet. When creating or updating a game server container group definition, use the property .
Part of: ContainerGroupDefinition
Returned by: DescribeContainerGroupDefinition , ListContainerGroupDefinitions , UpdateContainerGroupDefinition
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.GameLift;
var gameServerContainerDefinitionProperty = new GameServerContainerDefinitionProperty {
ContainerName = "containerName",
ImageUri = "imageUri",
ServerSdkVersion = "serverSdkVersion",
// the properties below are optional
DependsOn = new [] { new ContainerDependencyProperty {
Condition = "condition",
ContainerName = "containerName"
} },
EnvironmentOverride = new [] { new ContainerEnvironmentProperty {
Name = "name",
Value = "value"
} },
MountPoints = new [] { new ContainerMountPointProperty {
InstancePath = "instancePath",
// the properties below are optional
AccessLevel = "accessLevel",
ContainerPath = "containerPath"
} },
PortConfiguration = new PortConfigurationProperty {
ContainerPortRanges = new [] { new ContainerPortRangeProperty {
FromPort = 123,
Protocol = "protocol",
ToPort = 123
} }
},
ResolvedImageDigest = "resolvedImageDigest"
};
Synopsis
Constructors
GameServerContainerDefinitionProperty() |
Properties
ContainerName | The container definition identifier. |
DependsOn | Indicates that the container relies on the status of other containers in the same container group during startup and shutdown sequences. |
EnvironmentOverride | A set of environment variables that's passed to the container on startup. |
ImageUri | The URI to the image that Amazon GameLift uses when deploying this container to a container fleet. |
MountPoints | 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. |
PortConfiguration | The set of ports that are available to bind to processes in the container. |
ResolvedImageDigest | A unique and immutable identifier for the container image. |
ServerSdkVersion | The Amazon GameLift server SDK version that the game server is integrated with. |
Constructors
GameServerContainerDefinitionProperty()
public GameServerContainerDefinitionProperty()
Properties
ContainerName
The container definition identifier.
public string ContainerName { get; set; }
Property Value
System.String
Remarks
Container names are unique within a container group definition.
DependsOn
Indicates that the container relies on the status of other containers in the same container group during startup and shutdown sequences.
public object DependsOn { get; set; }
Property Value
System.Object
Remarks
A container might have dependencies on multiple containers.
EnvironmentOverride
A set of environment variables that's passed to the container on startup.
public object EnvironmentOverride { get; set; }
Property Value
System.Object
Remarks
See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference .
ImageUri
The URI to the image that Amazon GameLift uses when deploying this container to a container fleet.
public string ImageUri { get; set; }
Property Value
System.String
Remarks
For a more specific identifier, see ResolvedImageDigest
.
MountPoints
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.
public object MountPoints { get; set; }
Property Value
System.Object
Remarks
PortConfiguration
The set of ports that are available to bind to processes in the container.
public object PortConfiguration { get; set; }
Property Value
System.Object
Remarks
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. Amazon GameLift maps these container ports to externally accessible connection ports, which are assigned as needed from the container fleet's ConnectionPortRange
.
ResolvedImageDigest
A unique and immutable identifier for the container image.
public string ResolvedImageDigest { get; set; }
Property Value
System.String
Remarks
The digest is a SHA 256 hash of the container image manifest.
ServerSdkVersion
The Amazon GameLift server SDK version that the game server is integrated with.
public string ServerSdkVersion { get; set; }
Property Value
System.String
Remarks
Only game servers using 5.2.0 or higher are compatible with container fleets.