GameLift / Client / create_container_group_definition

create_container_group_definition#

GameLift.Client.create_container_group_definition(**kwargs)#

Creates a ContainerGroupDefinition that describes a set of containers for hosting your game server with Amazon GameLift managed containers hosting. An Amazon GameLift container group is similar to a container task or pod. Use container group definitions when you create a container fleet with CreateContainerFleet.

A container group definition determines how Amazon GameLift deploys your containers to each instance in a container fleet. You can maintain multiple versions of a container group definition.

There are two types of container groups:

  • A game server container group has the containers that run your game server application and supporting software. A game server container group can have these container types:

    • Game server container. This container runs your game server. You can define one game server container in a game server container group.

    • Support container. This container runs software in parallel with your game server. You can define up to 8 support containers in a game server group.

When building a game server container group definition, you can choose to bundle your game server executable and all dependent software into a single game server container. Alternatively, you can separate the software into one game server container and one or more support containers.

On a container fleet instance, a game server container group can be deployed multiple times (depending on the compute resources of the instance). This means that all containers in the container group are replicated together.

  • A per-instance container group has containers for processes that aren’t replicated on a container fleet instance. This might include background services, logging, test processes, or processes that need to persist independently of the game server container group. When building a per-instance container group, you can define up to 10 support containers.

Note

This operation requires Identity and Access Management (IAM) permissions to access container images in Amazon ECR repositories. See IAM permissions for Amazon GameLift for help setting the appropriate permissions.

Request options

Use this operation to make the following types of requests. You can specify values for the minimum required parameters and customize optional values later.

  • Create a game server container group definition. Provide the following required parameter values:

    • Name

    • ContainerGroupType ( GAME_SERVER)

    • OperatingSystem (omit to use default value)

    • TotalMemoryLimitMebibytes (omit to use default value)

    • ``TotalVcpuLimit ``(omit to use default value)

    • At least one GameServerContainerDefinition

      • ContainerName

      • ImageUrl

      • PortConfiguration

      • ServerSdkVersion (omit to use default value)

  • Create a per-instance container group definition. Provide the following required parameter values:

    • Name

    • ContainerGroupType ( PER_INSTANCE)

    • OperatingSystem (omit to use default value)

    • TotalMemoryLimitMebibytes (omit to use default value)

    • ``TotalVcpuLimit ``(omit to use default value)

    • At least one SupportContainerDefinition

      • ContainerName

      • ImageUrl

Results

If successful, this request creates a ContainerGroupDefinition resource and assigns a unique ARN value. You can update most properties of a container group definition by calling UpdateContainerGroupDefinition, and optionally save the update as a new version.

See also: AWS API Documentation

Request Syntax

response = client.create_container_group_definition(
    Name='string',
    ContainerGroupType='GAME_SERVER'|'PER_INSTANCE',
    TotalMemoryLimitMebibytes=123,
    TotalVcpuLimit=123.0,
    GameServerContainerDefinition={
        'ContainerName': 'string',
        'DependsOn': [
            {
                'ContainerName': 'string',
                'Condition': 'START'|'COMPLETE'|'SUCCESS'|'HEALTHY'
            },
        ],
        'MountPoints': [
            {
                'InstancePath': 'string',
                'ContainerPath': 'string',
                'AccessLevel': 'READ_ONLY'|'READ_AND_WRITE'
            },
        ],
        'EnvironmentOverride': [
            {
                'Name': 'string',
                'Value': 'string'
            },
        ],
        'ImageUri': 'string',
        'PortConfiguration': {
            'ContainerPortRanges': [
                {
                    'FromPort': 123,
                    'ToPort': 123,
                    'Protocol': 'TCP'|'UDP'
                },
            ]
        },
        'ServerSdkVersion': 'string'
    },
    SupportContainerDefinitions=[
        {
            'ContainerName': 'string',
            'DependsOn': [
                {
                    'ContainerName': 'string',
                    'Condition': 'START'|'COMPLETE'|'SUCCESS'|'HEALTHY'
                },
            ],
            'MountPoints': [
                {
                    'InstancePath': 'string',
                    'ContainerPath': 'string',
                    'AccessLevel': 'READ_ONLY'|'READ_AND_WRITE'
                },
            ],
            'EnvironmentOverride': [
                {
                    'Name': 'string',
                    'Value': 'string'
                },
            ],
            'Essential': True|False,
            'HealthCheck': {
                'Command': [
                    'string',
                ],
                'Interval': 123,
                'Retries': 123,
                'StartPeriod': 123,
                'Timeout': 123
            },
            'ImageUri': 'string',
            'MemoryHardLimitMebibytes': 123,
            'PortConfiguration': {
                'ContainerPortRanges': [
                    {
                        'FromPort': 123,
                        'ToPort': 123,
                        'Protocol': 'TCP'|'UDP'
                    },
                ]
            },
            'Vcpu': 123.0
        },
    ],
    OperatingSystem='AMAZON_LINUX_2023',
    VersionDescription='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters:
  • Name (string) –

    [REQUIRED]

    A descriptive identifier for the container group definition. The name value must be unique in an Amazon Web Services Region.

  • ContainerGroupType (string) –

    The type of container group being defined. Container group type determines how Amazon GameLift deploys the container group on each fleet instance.

    Default value: GAME_SERVER

  • TotalMemoryLimitMebibytes (integer) –

    [REQUIRED]

    The maximum amount of memory (in MiB) to allocate to the container group. All containers in the group share this memory. If you specify memory limits for an individual container, the total value must be greater than any individual container’s memory limit.

    Default value: 1024

  • TotalVcpuLimit (float) –

    [REQUIRED]

    The maximum amount of vCPU units to allocate to the container group (1 vCPU is equal to 1024 CPU units). All containers in the group share this memory. If you specify vCPU limits for individual containers, the total value must be equal to or greater than the sum of the CPU limits for all containers in the group.

    Default value: 1

  • GameServerContainerDefinition (dict) –

    The definition for the game server container in this group. Define a game server container only when the container group type is GAME_SERVER. Game server containers specify a container image with your game server build. You can pass in your container definitions as a JSON file.

    • ContainerName (string) – [REQUIRED]

      A string that uniquely identifies the container definition within a container group.

    • DependsOn (list) –

      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.

      • (dict) –

        A container’s dependency on another container in the same container group. The dependency impacts how the dependent container is able to start or shut down based the status of the other container.

        For example, ContainerA is configured with the following dependency: a START dependency on ContainerB. This means that ContainerA can’t start until ContainerB has started. It also means that ContainerA must shut down before ContainerB.

        eiifcbfhgrdurhnucnufkgbnbnnerrvbtjvljdetkehc**Part of:** GameServerContainerDefinition, GameServerContainerDefinitionInput, SupportContainerDefinition, SupportContainerDefinitionInput

        • ContainerName (string) – [REQUIRED]

          A descriptive label for the container definition that this container depends on.

        • Condition (string) – [REQUIRED]

          The condition that the dependency container must reach before the dependent container can start. Valid conditions include:

          • START - The dependency container must have started.

          • COMPLETE - The dependency container has run to completion (exits). Use this condition with nonessential containers, such as those that run a script and then exit. The dependency container can’t be an essential container.

          • SUCCESS - The dependency container has run to completion and exited with a zero status. The dependency container can’t be an essential container.

          • HEALTHY - The dependency container has passed its Docker health check. Use this condition with dependency containers that have health checks configured. This condition is confirmed at container group startup only.

    • MountPoints (list) –

      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.

      • (dict) –

        A mount point that binds a container to a file or directory on the host system.

        Part of: GameServerContainerDefinition, GameServerContainerDefinitionInput, SupportContainerDefinition, SupportContainerDefinitionInput

        • InstancePath (string) – [REQUIRED]

          The path to the source file or directory.

        • ContainerPath (string) –

          The mount path on the container. If this property isn’t set, the instance path is used.

        • AccessLevel (string) –

          The type of access for the container.

    • EnvironmentOverride (list) –

      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.

      • (dict) –

        An environment variable to set inside a container, in the form of a key-value pair.

        Part of: GameServerContainerDefinition, GameServerContainerDefinitionInput, SupportContainerDefinition, SupportContainerDefinitionInput

        • Name (string) – [REQUIRED]

          The environment variable name.

        • Value (string) – [REQUIRED]

          The environment variable value.

    • ImageUri (string) – [REQUIRED]

      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]

    • PortConfiguration (dict) – [REQUIRED]

      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).

      • ContainerPortRanges (list) – [REQUIRED]

        A set of one or more container port number ranges. The ranges can’t overlap.

        • (dict) –

          A set of one or more port numbers that can be opened on the container.

          Part of: ContainerPortConfiguration

          • FromPort (integer) – [REQUIRED]

            A starting value for the range of allowed port numbers.

          • ToPort (integer) – [REQUIRED]

            An ending value for the range of allowed port numbers. Port numbers are end-inclusive. This value must be equal to or greater than FromPort.

          • Protocol (string) – [REQUIRED]

            The network protocol that these ports support.

    • ServerSdkVersion (string) – [REQUIRED]

      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.

  • SupportContainerDefinitions (list) –

    One or more definition for support containers in this group. You can define a support container in any type of container group. You can pass in your container definitions as a JSON file.

    • (dict) –

      Describes a support container in a container group. You can define a support container in either a game server container group or a per-instance container group. Support containers don’t run game server processes.

      This definition includes container configuration, resources, and start instructions. Use this data type when creating or updating a container group definition. For properties of a deployed support container, see SupportContainerDefinition.

      Use with: CreateContainerGroupDefinition, UpdateContainerGroupDefinition

      • ContainerName (string) – [REQUIRED]

        A string that uniquely identifies the container definition within a container group.

      • DependsOn (list) –

        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.

        • (dict) –

          A container’s dependency on another container in the same container group. The dependency impacts how the dependent container is able to start or shut down based the status of the other container.

          For example, ContainerA is configured with the following dependency: a START dependency on ContainerB. This means that ContainerA can’t start until ContainerB has started. It also means that ContainerA must shut down before ContainerB.

          eiifcbfhgrdurhnucnufkgbnbnnerrvbtjvljdetkehc**Part of:** GameServerContainerDefinition, GameServerContainerDefinitionInput, SupportContainerDefinition, SupportContainerDefinitionInput

          • ContainerName (string) – [REQUIRED]

            A descriptive label for the container definition that this container depends on.

          • Condition (string) – [REQUIRED]

            The condition that the dependency container must reach before the dependent container can start. Valid conditions include:

            • START - The dependency container must have started.

            • COMPLETE - The dependency container has run to completion (exits). Use this condition with nonessential containers, such as those that run a script and then exit. The dependency container can’t be an essential container.

            • SUCCESS - The dependency container has run to completion and exited with a zero status. The dependency container can’t be an essential container.

            • HEALTHY - The dependency container has passed its Docker health check. Use this condition with dependency containers that have health checks configured. This condition is confirmed at container group startup only.

      • MountPoints (list) –

        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.

        • (dict) –

          A mount point that binds a container to a file or directory on the host system.

          Part of: GameServerContainerDefinition, GameServerContainerDefinitionInput, SupportContainerDefinition, SupportContainerDefinitionInput

          • InstancePath (string) – [REQUIRED]

            The path to the source file or directory.

          • ContainerPath (string) –

            The mount path on the container. If this property isn’t set, the instance path is used.

          • AccessLevel (string) –

            The type of access for the container.

      • EnvironmentOverride (list) –

        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.

        • (dict) –

          An environment variable to set inside a container, in the form of a key-value pair.

          Part of: GameServerContainerDefinition, GameServerContainerDefinitionInput, SupportContainerDefinition, SupportContainerDefinitionInput

          • Name (string) – [REQUIRED]

            The environment variable name.

          • Value (string) – [REQUIRED]

            The environment variable value.

      • Essential (boolean) –

        Flags the container as vital for the container group to function properly. If an essential container fails, the entire container group restarts. At least one support container in a per-instance container group must be essential. When flagging a container as essential, also configure a health check so that the container can signal that it’s healthy.

      • HealthCheck (dict) –

        Configuration for a non-terminal health check. A container automatically restarts if it stops functioning. With a health check, you can define additional reasons to flag a container as unhealthy and restart it. If an essential container fails a health check, the entire container group restarts.

        • Command (list) – [REQUIRED]

          A string array that specifies the command that the container runs to determine if it’s healthy.

          • (string) –

        • Interval (integer) –

          The time period (in seconds) between each health check.

        • Retries (integer) –

          The number of times to retry a failed health check before flagging the container unhealthy. The first run of the command does not count as a retry.

        • StartPeriod (integer) –

          The optional grace period (in seconds) to give a container time to bootstrap before the first failed health check counts toward the number of retries.

        • Timeout (integer) –

          The time period (in seconds) to wait for a health check to succeed before counting a failed health check.

      • ImageUri (string) – [REQUIRED]

        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]

      • MemoryHardLimitMebibytes (integer) –

        A specified amount of memory (in MiB) to reserve for this container. If you don’t specify a container-specific memory limit, the container shares the container group’s total memory allocation.

        Related data type: ContainerGroupDefinition TotalMemoryLimitMebibytes

      • PortConfiguration (dict) –

        A set of ports that Amazon GameLift can assign to processes in the container. Any processes that accept inbound traffic connections must be assigned a port from this set. The container port range must be large enough to assign one to each process in the container that needs one.

        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.

        • ContainerPortRanges (list) – [REQUIRED]

          A set of one or more container port number ranges. The ranges can’t overlap.

          • (dict) –

            A set of one or more port numbers that can be opened on the container.

            Part of: ContainerPortConfiguration

            • FromPort (integer) – [REQUIRED]

              A starting value for the range of allowed port numbers.

            • ToPort (integer) – [REQUIRED]

              An ending value for the range of allowed port numbers. Port numbers are end-inclusive. This value must be equal to or greater than FromPort.

            • Protocol (string) – [REQUIRED]

              The network protocol that these ports support.

      • Vcpu (float) –

        The number of vCPU units to reserve for this container. The container can use more resources when needed, if available. If you don’t reserve CPU units for this container, it shares the container group’s total vCPU limit.

        Related data type: ContainerGroupDefinition TotalCpuLimit

  • OperatingSystem (string) –

    [REQUIRED]

    The platform that all containers in the group use. Containers in a group must run on the same operating system.

    Default value: AMAZON_LINUX_2023

    Note

    Amazon Linux 2 (AL2) will reach end of support on 6/30/2025. See more details in the Amazon Linux 2 FAQs. For game servers that are hosted on AL2 and use Amazon GameLift server SDK 4.x, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See Migrate to Amazon GameLift server SDK version 5.

  • VersionDescription (string) – A description for the initial version of this container group definition.

  • Tags (list) –

    A list of labels to assign to the container group definition resource. Tags are developer-defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost allocation. For more information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference.

    • (dict) –

      A label that you can assign to a Amazon GameLift resource.

      Learn more

      Tagging Amazon Web Services Resources in the Amazon Web Services General Reference

      Amazon Web Services Tagging Strategies

      Related actions

      All APIs by task

      • Key (string) – [REQUIRED]

        The key for a developer-defined key value pair for tagging an Amazon Web Services resource.

      • Value (string) – [REQUIRED]

        The value for a developer-defined key value pair for tagging an Amazon Web Services resource.

Return type:

dict

Returns:

Response Syntax

{
    'ContainerGroupDefinition': {
        'ContainerGroupDefinitionArn': 'string',
        'CreationTime': datetime(2015, 1, 1),
        'OperatingSystem': 'AMAZON_LINUX_2023',
        'Name': 'string',
        'ContainerGroupType': 'GAME_SERVER'|'PER_INSTANCE',
        'TotalMemoryLimitMebibytes': 123,
        'TotalVcpuLimit': 123.0,
        'GameServerContainerDefinition': {
            'ContainerName': 'string',
            'DependsOn': [
                {
                    'ContainerName': 'string',
                    'Condition': 'START'|'COMPLETE'|'SUCCESS'|'HEALTHY'
                },
            ],
            'MountPoints': [
                {
                    'InstancePath': 'string',
                    'ContainerPath': 'string',
                    'AccessLevel': 'READ_ONLY'|'READ_AND_WRITE'
                },
            ],
            'EnvironmentOverride': [
                {
                    'Name': 'string',
                    'Value': 'string'
                },
            ],
            'ImageUri': 'string',
            'PortConfiguration': {
                'ContainerPortRanges': [
                    {
                        'FromPort': 123,
                        'ToPort': 123,
                        'Protocol': 'TCP'|'UDP'
                    },
                ]
            },
            'ResolvedImageDigest': 'string',
            'ServerSdkVersion': 'string'
        },
        'SupportContainerDefinitions': [
            {
                'ContainerName': 'string',
                'DependsOn': [
                    {
                        'ContainerName': 'string',
                        'Condition': 'START'|'COMPLETE'|'SUCCESS'|'HEALTHY'
                    },
                ],
                'MountPoints': [
                    {
                        'InstancePath': 'string',
                        'ContainerPath': 'string',
                        'AccessLevel': 'READ_ONLY'|'READ_AND_WRITE'
                    },
                ],
                'EnvironmentOverride': [
                    {
                        'Name': 'string',
                        'Value': 'string'
                    },
                ],
                'Essential': True|False,
                'HealthCheck': {
                    'Command': [
                        'string',
                    ],
                    'Interval': 123,
                    'Retries': 123,
                    'StartPeriod': 123,
                    'Timeout': 123
                },
                'ImageUri': 'string',
                'MemoryHardLimitMebibytes': 123,
                'PortConfiguration': {
                    'ContainerPortRanges': [
                        {
                            'FromPort': 123,
                            'ToPort': 123,
                            'Protocol': 'TCP'|'UDP'
                        },
                    ]
                },
                'ResolvedImageDigest': 'string',
                'Vcpu': 123.0
            },
        ],
        'VersionNumber': 123,
        'VersionDescription': 'string',
        'Status': 'READY'|'COPYING'|'FAILED',
        'StatusReason': 'string'
    }
}

Response Structure

  • (dict) –

    • ContainerGroupDefinition (dict) –

      The properties of the new container group definition resource. You can use this resource to create a container fleet.

      • ContainerGroupDefinitionArn (string) –

        The Amazon Resource Name ( ARN) that is assigned to an Amazon GameLift ContainerGroupDefinition resource. It uniquely identifies the resource across all Amazon Web Services Regions. Format is arn:aws:gamelift:[region]::containergroupdefinition/[container group definition name]:[version].

      • CreationTime (datetime) –

        A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

      • OperatingSystem (string) –

        The platform that all containers in the container group definition run on.

        Note

        Amazon Linux 2 (AL2) will reach end of support on 6/30/2025. See more details in the Amazon Linux 2 FAQs. For game servers that are hosted on AL2 and use Amazon GameLift server SDK 4.x, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See Migrate to Amazon GameLift server SDK version 5.

      • Name (string) –

        A descriptive identifier for the container group definition. The name value is unique in an Amazon Web Services Region.

      • ContainerGroupType (string) –

        The type of container group. Container group type determines how Amazon GameLift deploys the container group on each fleet instance.

      • TotalMemoryLimitMebibytes (integer) –

        The amount of memory (in MiB) on a fleet instance to allocate for the container group. All containers in the group share these resources.

        You can set a limit for each container definition in the group. If individual containers have limits, this total value must be greater than any individual container’s memory limit.

      • TotalVcpuLimit (float) –

        The amount of vCPU units on a fleet instance to allocate for the container group (1 vCPU is equal to 1024 CPU units). All containers in the group share these resources. You can set a limit for each container definition in the group. If individual containers have limits, this total value must be equal to or greater than the sum of the limits for each container in the group.

      • GameServerContainerDefinition (dict) –

        The definition for the game server container in this group. This property is used only when the container group type is GAME_SERVER. This container definition specifies a container image with the game server build.

        • ContainerName (string) –

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

        • DependsOn (list) –

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

          • (dict) –

            A container’s dependency on another container in the same container group. The dependency impacts how the dependent container is able to start or shut down based the status of the other container.

            For example, ContainerA is configured with the following dependency: a START dependency on ContainerB. This means that ContainerA can’t start until ContainerB has started. It also means that ContainerA must shut down before ContainerB.

            eiifcbfhgrdurhnucnufkgbnbnnerrvbtjvljdetkehc**Part of:** GameServerContainerDefinition, GameServerContainerDefinitionInput, SupportContainerDefinition, SupportContainerDefinitionInput

            • ContainerName (string) –

              A descriptive label for the container definition that this container depends on.

            • Condition (string) –

              The condition that the dependency container must reach before the dependent container can start. Valid conditions include:

              • START - The dependency container must have started.

              • COMPLETE - The dependency container has run to completion (exits). Use this condition with nonessential containers, such as those that run a script and then exit. The dependency container can’t be an essential container.

              • SUCCESS - The dependency container has run to completion and exited with a zero status. The dependency container can’t be an essential container.

              • HEALTHY - The dependency container has passed its Docker health check. Use this condition with dependency containers that have health checks configured. This condition is confirmed at container group startup only.

        • MountPoints (list) –

          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.

          • (dict) –

            A mount point that binds a container to a file or directory on the host system.

            Part of: GameServerContainerDefinition, GameServerContainerDefinitionInput, SupportContainerDefinition, SupportContainerDefinitionInput

            • InstancePath (string) –

              The path to the source file or directory.

            • ContainerPath (string) –

              The mount path on the container. If this property isn’t set, the instance path is used.

            • AccessLevel (string) –

              The type of access for the container.

        • EnvironmentOverride (list) –

          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.

          • (dict) –

            An environment variable to set inside a container, in the form of a key-value pair.

            Part of: GameServerContainerDefinition, GameServerContainerDefinitionInput, SupportContainerDefinition, SupportContainerDefinitionInput

            • Name (string) –

              The environment variable name.

            • Value (string) –

              The environment variable value.

        • ImageUri (string) –

          The URI to the image that Amazon GameLift uses when deploying this container to a container fleet. For a more specific identifier, see ResolvedImageDigest.

        • PortConfiguration (dict) –

          The set of ports that are available to bind 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.

          • ContainerPortRanges (list) –

            A set of one or more container port number ranges. The ranges can’t overlap.

            • (dict) –

              A set of one or more port numbers that can be opened on the container.

              Part of: ContainerPortConfiguration

              • FromPort (integer) –

                A starting value for the range of allowed port numbers.

              • ToPort (integer) –

                An ending value for the range of allowed port numbers. Port numbers are end-inclusive. This value must be equal to or greater than FromPort.

              • Protocol (string) –

                The network protocol that these ports support.

        • ResolvedImageDigest (string) –

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

        • ServerSdkVersion (string) –

          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.

      • SupportContainerDefinitions (list) –

        The set of definitions for support containers in this group. A container group definition might have zero support container definitions. Support container can be used in any type of container group.

        • (dict) –

          Describes a support container in a container group. A support container might be in a game server container group or a per-instance container group. Support containers don’t run game server processes.

          You can update a support container definition and deploy the updates to an existing fleet. When creating or updating a game server container group definition, use the property GameServerContainerDefinitionInput.

          Part of: ContainerGroupDefinition

          Returned by: DescribeContainerGroupDefinition, ListContainerGroupDefinitions, UpdateContainerGroupDefinition

          • ContainerName (string) –

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

          • DependsOn (list) –

            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.

            • (dict) –

              A container’s dependency on another container in the same container group. The dependency impacts how the dependent container is able to start or shut down based the status of the other container.

              For example, ContainerA is configured with the following dependency: a START dependency on ContainerB. This means that ContainerA can’t start until ContainerB has started. It also means that ContainerA must shut down before ContainerB.

              eiifcbfhgrdurhnucnufkgbnbnnerrvbtjvljdetkehc**Part of:** GameServerContainerDefinition, GameServerContainerDefinitionInput, SupportContainerDefinition, SupportContainerDefinitionInput

              • ContainerName (string) –

                A descriptive label for the container definition that this container depends on.

              • Condition (string) –

                The condition that the dependency container must reach before the dependent container can start. Valid conditions include:

                • START - The dependency container must have started.

                • COMPLETE - The dependency container has run to completion (exits). Use this condition with nonessential containers, such as those that run a script and then exit. The dependency container can’t be an essential container.

                • SUCCESS - The dependency container has run to completion and exited with a zero status. The dependency container can’t be an essential container.

                • HEALTHY - The dependency container has passed its Docker health check. Use this condition with dependency containers that have health checks configured. This condition is confirmed at container group startup only.

          • MountPoints (list) –

            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.

            • (dict) –

              A mount point that binds a container to a file or directory on the host system.

              Part of: GameServerContainerDefinition, GameServerContainerDefinitionInput, SupportContainerDefinition, SupportContainerDefinitionInput

              • InstancePath (string) –

                The path to the source file or directory.

              • ContainerPath (string) –

                The mount path on the container. If this property isn’t set, the instance path is used.

              • AccessLevel (string) –

                The type of access for the container.

          • EnvironmentOverride (list) –

            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.

            • (dict) –

              An environment variable to set inside a container, in the form of a key-value pair.

              Part of: GameServerContainerDefinition, GameServerContainerDefinitionInput, SupportContainerDefinition, SupportContainerDefinitionInput

              • Name (string) –

                The environment variable name.

              • Value (string) –

                The environment variable value.

          • Essential (boolean) –

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

          • HealthCheck (dict) –

            A configuration for a non-terminal health check. A support container automatically restarts if it stops functioning or if it fails this health check.

            • Command (list) –

              A string array that specifies the command that the container runs to determine if it’s healthy.

              • (string) –

            • Interval (integer) –

              The time period (in seconds) between each health check.

            • Retries (integer) –

              The number of times to retry a failed health check before flagging the container unhealthy. The first run of the command does not count as a retry.

            • StartPeriod (integer) –

              The optional grace period (in seconds) to give a container time to bootstrap before the first failed health check counts toward the number of retries.

            • Timeout (integer) –

              The time period (in seconds) to wait for a health check to succeed before counting a failed health check.

          • ImageUri (string) –

            The URI to the image that Amazon GameLift deploys to a container fleet. For a more specific identifier, see ResolvedImageDigest.

          • MemoryHardLimitMebibytes (integer) –

            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$TotalMemoryLimitMebibytes

          • PortConfiguration (dict) –

            A set of ports that allow access to the container from external users. Processes running in the container can bind to a one of these ports. 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.

            • ContainerPortRanges (list) –

              A set of one or more container port number ranges. The ranges can’t overlap.

              • (dict) –

                A set of one or more port numbers that can be opened on the container.

                Part of: ContainerPortConfiguration

                • FromPort (integer) –

                  A starting value for the range of allowed port numbers.

                • ToPort (integer) –

                  An ending value for the range of allowed port numbers. Port numbers are end-inclusive. This value must be equal to or greater than FromPort.

                • Protocol (string) –

                  The network protocol that these ports support.

          • ResolvedImageDigest (string) –

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

          • Vcpu (float) –

            The number of vCPU units that are reserved for the container. If no resources are reserved, the container shares the total vCPU limit for the container group.

            Related data type: ContainerGroupDefinition$TotalVcpuLimit

      • VersionNumber (integer) –

        Indicates the version of a particular container group definition. This number is incremented automatically when you update a container group definition. You can view, update, or delete individual versions or the entire container group definition.

      • VersionDescription (string) –

        An optional description that was provided for a container group definition update. Each version can have a unique description.

      • Status (string) –

        Current status of the container group definition resource. Values include:

        • COPYING – Amazon GameLift is in the process of making copies of all container images that are defined in the group. While in this state, the resource can’t be used to create a container fleet.

        • READY – Amazon GameLift has copied the registry images for all containers that are defined in the group. You can use a container group definition in this status to create a container fleet.

        • FAILED – Amazon GameLift failed to create a valid container group definition resource. For more details on the cause of the failure, see StatusReason. A container group definition resource in failed status will be deleted within a few minutes.

      • StatusReason (string) –

        Additional information about a container group definition that’s in FAILED status. Possible reasons include:

        • An internal issue prevented Amazon GameLift from creating the container group definition resource. Delete the failed resource and call CreateContainerGroupDefinitionagain.

        • An access-denied message means that you don’t have permissions to access the container image on ECR. See IAM permission examples for help setting up required IAM permissions for Amazon GameLift.

        • The ImageUri value for at least one of the containers in the container group definition was invalid or not found in the current Amazon Web Services account.

        • At least one of the container images referenced in the container group definition exceeds the allowed size. For size limits, see Amazon GameLift endpoints and quotas.

        • At least one of the container images referenced in the container group definition uses a different operating system than the one defined for the container group.

Exceptions