AWS::GameLift::ContainerGroupDefinition ContainerDefinition - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

AWS::GameLift::ContainerGroupDefinition ContainerDefinition

This data type is used with the Amazon GameLift containers feature, which is currently in public preview.

Describes a container in a container fleet, the resources available to the container, and the commands that are run when the container starts. Container properties can't be updated. To change a property, create a new container group definition. See also ContainerDefinitionInput.

Part of: AWS::GameLift::ContainerGroupDefinition

Returned by: DescribeContainerGroupDefinition, ListContainerGroupDefinitions

Syntax

To declare this entity in your Amazon CloudFormation template, use the following syntax:

JSON

{ "Command" : [ String, ... ], "ContainerName" : String, "Cpu" : Integer, "DependsOn" : [ ContainerDependency, ... ], "EntryPoint" : [ String, ... ], "Environment" : [ ContainerEnvironment, ... ], "Essential" : Boolean, "HealthCheck" : ContainerHealthCheck, "ImageUri" : String, "MemoryLimits" : MemoryLimits, "PortConfiguration" : PortConfiguration, "ResolvedImageDigest" : String, "WorkingDirectory" : String }

Properties

Command

A command that's passed to the container on startup. Each argument for the command is an additional string in the array. See the ContainerDefinition::command parameter in the Amazon Elastic Container Service API reference.

Required: No

Type: Array of String

Minimum: 1 | 1

Maximum: 255 | 20

Update requires: Replacement

ContainerName

The container definition identifier. Container names are unique within a container group definition.

Required: Yes

Type: String

Pattern: ^[a-zA-Z0-9-]+$

Minimum: 1

Maximum: 128

Update requires: Replacement

Cpu

The number of CPU units that are reserved for the container. Note: 1 vCPU unit equals 1024 CPU units. If no resources are reserved, the container shares the total CPU limit for the container group.

Related data type: ContainerGroupDefinition$TotalCpuLimit

Required: No

Type: Integer

Minimum: 1

Maximum: 10240

Update requires: Replacement

DependsOn

Indicates that the container relies on the status of other containers in the same container group during its startup and shutdown sequences. A container might have dependencies on multiple containers.

Required: No

Type: Array of ContainerDependency

Minimum: 1

Maximum: 10

Update requires: Replacement

EntryPoint

The entry point that's passed to the container on startup. If there are multiple arguments, each argument is an additional string in the array. See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API Reference.

Required: No

Type: Array of String

Minimum: 1 | 1

Maximum: 1024 | 20

Update requires: Replacement

Environment

A set of environment variables that's passed to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference.

Required: No

Type: Array of ContainerEnvironment

Minimum: 1

Maximum: 20

Update requires: Replacement

Essential

Indicates whether the container is vital to the container group. If an essential container fails, the entire container group is restarted.

Required: No

Type: Boolean

Update requires: Replacement

HealthCheck

A configuration for a non-terminal health check. A container, which automatically restarts if it stops functioning, also restarts if it fails this health check. If an essential container in the daemon group fails a health check, the entire container group is restarted. The essential container in the replica group doesn't use this health check mechanism, because the Amazon GameLift Agent automatically handles the task.

Required: No

Type: ContainerHealthCheck

Update requires: Replacement

ImageUri

The URI to the image that $short; copied and deployed to a container fleet. For a more specific identifier, see ResolvedImageDigest.

Required: Yes

Type: String

Pattern: ^[a-zA-Z0-9-_\.@\/:]+$

Minimum: 1

Maximum: 255

Update requires: Replacement

MemoryLimits

The amount of memory that Amazon GameLift makes available to the container. If memory limits aren't set for an individual container, the container shares the container group's total memory allocation.

Related data type: ContainerGroupDefinition$TotalMemoryLimit

Required: No

Type: MemoryLimits

Update requires: Replacement

PortConfiguration

Defines the ports that are available to assign to processes in the container. 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.

Required: No

Type: PortConfiguration

Update requires: Replacement

ResolvedImageDigest

A unique and immutable identifier for the container image that is deployed to a container fleet. The digest is a SHA 256 hash of the container image manifest.

Required: No

Type: String

Pattern: ^sha256:[a-fA-F0-9]{64}$

Update requires: Replacement

WorkingDirectory

The directory in the container where commands are run. See the ContainerDefinition::workingDirectory parameter in the Amazon Elastic Container Service API Reference.

Required: No

Type: String

Pattern: ^.*$

Minimum: 1

Maximum: 255

Update requires: Replacement