Skip to content

ContainerGroupDefinition

Source code in docs_src/capo_gamelift/types/container_group_definition.py
class ContainerGroupDefinition(TypedDict, closed=True):
    container_group_definition_arn: NotRequired[
        "capo_gamelift.types.container_group_definition_arn.ContainerGroupDefinitionArn"
    ]
    """<p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html">ARN</a>) that is assigned to an Amazon GameLift Servers <code>ContainerGroupDefinition</code> resource. It uniquely identifies the resource across all Amazon Web Services Regions. Format is <code>arn:aws:gamelift:[region]::containergroupdefinition/[container group definition name]:[version]</code>.</p>"""
    creation_time: NotRequired["capo_gamelift.types.timestamp.Timestamp"]
    """<p>A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example <code>"1469498468.057"</code>).</p>"""
    operating_system: NotRequired[
        "capo_gamelift.types.container_operating_system.ContainerOperatingSystem"
    ]
    """<p>The platform that all containers in the container group definition run on.</p> <note> <p>Amazon Linux 2 (AL2) will reach end of support on 6/30/2026. See more details in the <a href="http://aws.amazon.com/amazon-linux-2/faqs/">Amazon Linux 2 FAQs</a>. For game servers that are hosted on AL2 and use server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk5-migration.html"> Migrate to server SDK version 5.</a> </p> </note>"""
    name: NotRequired[
        "capo_gamelift.types.container_group_definition_name.ContainerGroupDefinitionName"
    ]
    """<p>A descriptive identifier for the container group definition. The name value is unique in an Amazon Web Services Region.</p>"""
    container_group_type: NotRequired[
        "capo_gamelift.types.container_group_type.ContainerGroupType"
    ]
    """<p>The type of container group. Container group type determines how Amazon GameLift Servers deploys the container group on each fleet instance.</p>"""
    total_memory_limit_mebibytes: NotRequired[
        "capo_gamelift.types.container_total_memory_limit.ContainerTotalMemoryLimit"
    ]
    """<p>The amount of memory (in MiB) on a fleet instance to allocate for the container group. All containers in the group share these resources. </p> <p>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.</p>"""
    total_vcpu_limit: NotRequired[
        "capo_gamelift.types.container_total_vcpu_limit.ContainerTotalVcpuLimit"
    ]
    """<p>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 vCPU reservation for each container definition in the group. If individual containers have reservations, this total value must be equal to or greater than the sum of the reservations for each container in the group.</p> <p>For a game server container group, if this property is set, Amazon GameLift Servers uses this value to calculate how many game server container groups fit on an instance. If this property isn't set, the group's containers can use up to the instance's available vCPU, and Amazon GameLift Servers uses the sum of the containers' <code>Vcpu</code> values to calculate how many game server container groups fit on an instance.</p>"""
    game_server_container_definition: NotRequired[
        "capo_gamelift.types.game_server_container_definition.GameServerContainerDefinition"
    ]
    """<p>The definition for the game server container in this group. This property is used only when the container group type is <code>GAME_SERVER</code>. This container definition specifies a container image with the game server build. </p>"""
    support_container_definitions: NotRequired[
        "capo_gamelift.types.support_container_definition_list.SupportContainerDefinitionList"
    ]
    """<p>The set of definitions for support containers in this group. A container group definition might have zero support container definitions. Support containers can be used in any type of container group.</p>"""
    version_number: NotRequired["capo_gamelift.types.positive_integer.PositiveInteger"]
    """<p>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.</p>"""
    version_description: NotRequired[
        "capo_gamelift.types.non_zero_and_max_string.NonZeroAndMaxString"
    ]
    """<p>An optional description that was provided for a container group definition update. Each version can have a unique description.</p>"""
    status: NotRequired[
        "capo_gamelift.types.container_group_definition_status.ContainerGroupDefinitionStatus"
    ]
    """<p>Current status of the container group definition resource. Values include:</p> <ul> <li> <p> <code>COPYING</code> -- Amazon GameLift Servers 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.</p> </li> <li> <p> <code>READY</code> -- Amazon GameLift Servers 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. </p> </li> <li> <p> <code>FAILED</code> -- Amazon GameLift Servers failed to create a valid container group definition resource. For more details on the cause of the failure, see <code>StatusReason</code>. A container group definition resource in failed status will be deleted within a few minutes.</p> </li> </ul>"""
    status_reason: NotRequired[
        "capo_gamelift.types.non_zero_and_max_string.NonZeroAndMaxString"
    ]
    """<p>Additional information about a container group definition that's in <code>FAILED</code> status. Possible reasons include:</p> <ul> <li> <p>An internal issue prevented Amazon GameLift Servers from creating the container group definition resource. Delete the failed resource and call <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateContainerGroupDefinition.html">CreateContainerGroupDefinition</a> again. </p> </li> <li> <p>An access-denied message means that you don't have permissions to access the container image on ECR. See <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-iam-policy-examples.html"> IAM permission examples</a> for help setting up required IAM permissions for Amazon GameLift Servers.</p> </li> <li> <p>The <code>ImageUri</code> 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.</p> </li> <li> <p>At least one of the container images referenced in the container group definition exceeds the allowed size. For size limits, see <a href="https://docs.aws.amazon.com/general/latest/gr/gamelift.html"> Amazon GameLift Servers endpoints and quotas</a>.</p> </li> <li> <p>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.</p> </li> </ul>"""

container_group_definition_arn instance-attribute

container_group_definition_arn: NotRequired[ContainerGroupDefinitionArn]

The Amazon Resource Name (ARN) that is assigned to an Amazon GameLift Servers 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].

container_group_type instance-attribute

container_group_type: NotRequired[ContainerGroupType]

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

creation_time instance-attribute

creation_time: NotRequired[Timestamp]

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

game_server_container_definition instance-attribute

game_server_container_definition: NotRequired[GameServerContainerDefinition]

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.

name instance-attribute

name: NotRequired[ContainerGroupDefinitionName]

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

operating_system instance-attribute

operating_system: NotRequired[ContainerOperatingSystem]

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

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

status instance-attribute

status: NotRequired[ContainerGroupDefinitionStatus]

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

  • COPYING -- Amazon GameLift Servers 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 Servers 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 Servers 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.

status_reason instance-attribute

status_reason: NotRequired[NonZeroAndMaxString]

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

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

  • 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 Servers.

  • 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 Servers 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.

support_container_definitions instance-attribute

support_container_definitions: NotRequired[SupportContainerDefinitionList]

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

total_memory_limit_mebibytes instance-attribute

total_memory_limit_mebibytes: NotRequired[ContainerTotalMemoryLimit]

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.

total_vcpu_limit instance-attribute

total_vcpu_limit: NotRequired[ContainerTotalVcpuLimit]

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 vCPU reservation for each container definition in the group. If individual containers have reservations, this total value must be equal to or greater than the sum of the reservations for each container in the group.

For a game server container group, if this property is set, Amazon GameLift Servers uses this value to calculate how many game server container groups fit on an instance. If this property isn't set, the group's containers can use up to the instance's available vCPU, and Amazon GameLift Servers uses the sum of the containers' Vcpu values to calculate how many game server container groups fit on an instance.

version_description instance-attribute

version_description: NotRequired[NonZeroAndMaxString]

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

version_number instance-attribute

version_number: NotRequired[PositiveInteger]

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.