Class CfnContainerGroupDefinition.GameServerContainerDefinitionProperty
Describes the game server container in an existing game server container group.
Inherited Members
Namespace: Amazon.CDK.AWS.GameLift
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnContainerGroupDefinition.GameServerContainerDefinitionProperty : CfnContainerGroupDefinition.IGameServerContainerDefinitionProperty
Syntax (vb)
Public Class CfnContainerGroupDefinition.GameServerContainerDefinitionProperty 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() | Describes the game server container in an existing game server container group. |
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 Servers 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 Servers server SDK version that the game server is integrated with. |
Constructors
GameServerContainerDefinitionProperty()
Describes the game server container in an existing game server container group.
public GameServerContainerDefinitionProperty()
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"
};
Properties
ContainerName
The container definition identifier.
public string ContainerName { get; set; }
Property Value
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
Remarks
A container might have dependencies on multiple containers.
Type union: either IResolvable or (either IResolvable or CfnContainerGroupDefinition.IContainerDependencyProperty)[]
EnvironmentOverride
A set of environment variables that's passed to the container on startup.
public object? EnvironmentOverride { get; set; }
Property Value
Remarks
See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference .
Type union: either IResolvable or (either IResolvable or CfnContainerGroupDefinition.IContainerEnvironmentProperty)[]
ImageUri
The URI to the image that Amazon GameLift Servers uses when deploying this container to a container fleet.
public string ImageUri { get; set; }
Property Value
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
Remarks
Type union: either IResolvable or (either IResolvable or CfnContainerGroupDefinition.IContainerMountPointProperty)[]
PortConfiguration
The set of ports that are available to bind to processes in the container.
public object? PortConfiguration { get; set; }
Property Value
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 Servers maps these container ports to externally accessible connection ports, which are assigned as needed from the container fleet's ConnectionPortRange .
Type union: either IResolvable or CfnContainerGroupDefinition.IPortConfigurationProperty
ResolvedImageDigest
A unique and immutable identifier for the container image.
public string? ResolvedImageDigest { get; set; }
Property Value
Remarks
The digest is a SHA 256 hash of the container image manifest.
ServerSdkVersion
The Amazon GameLift Servers server SDK version that the game server is integrated with.
public string ServerSdkVersion { get; set; }
Property Value
Remarks
Only game servers using 5.2.0 or higher are compatible with container fleets.