Skip to content

aws.gamelift.list_container_group_definitions

Example SQL Queries

SELECT * FROM
aws.gamelift.list_container_group_definitions;

Description

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

Retrieves all container group definitions for the Amazon Web Services account and Amazon Web Services Region that are currently in use. You can filter the result set by the container groups' scheduling strategy. Use the pagination parameters to retrieve results in a set of sequential pages.

This operation returns the list of container group definitions in no particular order.

Learn more

Table Definition

Column NameColumn Data Type
scheduling_strategy Input Column

The method for deploying the container group across fleet instances. A replica container group might have multiple copies on each fleet instance. A daemon container group maintains only one copy per fleet instance.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
container_definitions

The set of container definitions that are included in the container group.

STRUCT(
"container_name" VARCHAR,
"image_uri" VARCHAR,
"resolved_image_digest" VARCHAR,
"memory_limits" STRUCT(
"soft_limit" BIGINT,
"hard_limit" BIGINT
),
"port_configuration" STRUCT(
"container_port_ranges" STRUCT(
"from_port" BIGINT,
"to_port" BIGINT,
"protocol" VARCHAR
)[]
),
"cpu" BIGINT,
"health_check" STRUCT(
"command" VARCHAR[],
"interval" BIGINT,
"timeout" BIGINT,
"retries" BIGINT,
"start_period" BIGINT
),
"command" VARCHAR[],
"essential" BOOLEAN,
"entry_point" VARCHAR[],
"working_directory" VARCHAR,
"environment" STRUCT(
"name" VARCHAR,
"value" VARCHAR
)[],
"depends_on" STRUCT(
"container_name" VARCHAR,
"condition" VARCHAR
)[]
)[]
Show child fields
container_definitions[]
Show child fields
container_definitions[].command[]
container_definitions[].container_name

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

container_definitions[].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

container_definitions[].depends_on[]
Show child fields
container_definitions[].depends_on[].condition

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.

container_definitions[].depends_on[].container_name

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

container_definitions[].entry_point[]
container_definitions[].environment[]
Show child fields
container_definitions[].environment[].name

The environment variable name.

container_definitions[].environment[].value

The environment variable value.

container_definitions[].essential

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

container_definitions[].health_check

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.

Show child fields
container_definitions[].health_check.command[]
container_definitions[].health_check.interval

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

container_definitions[].health_check.retries

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

container_definitions[].health_check.start_period

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.

container_definitions[].health_check.timeout

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

container_definitions[].image_uri

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

container_definitions[].memory_limits

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

Show child fields
container_definitions[].memory_limits.hard_limit

The maximum amount of memory that the container can use. If a container attempts to exceed this limit, the container is stopped. This property is similar to the Amazon ECS container definition parameter memory in the Amazon Elastic Container Service Developer Guide.

container_definitions[].memory_limits.soft_limit

The amount of memory that is reserved for a container. When the container group's shared memory is under contention, the system attempts to maintain the container memory usage at this soft limit. However, the container can use more memory when needed, if available. This property is similar to the Amazon ECS container definition parameter memoryreservation (Amazon Elastic Container Service Developer Guide).

container_definitions[].port_configuration

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.

Show child fields
container_definitions[].port_configuration.container_port_ranges[]
Show child fields
container_definitions[].port_configuration.container_port_ranges[].from_port

A starting value for the range of allowed port numbers.

container_definitions[].port_configuration.container_port_ranges[].protocol

The network protocol that these ports support.

container_definitions[].port_configuration.container_port_ranges[].to_port

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.

container_definitions[].resolved_image_digest

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.

container_definitions[].working_directory

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

container_group_definition_arn

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

VARCHAR
creation_time

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

TIMESTAMP_S
name

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

VARCHAR
operating_system

The platform required for all containers in the container group definition.

VARCHAR
status

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.

VARCHAR
status_reason

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.

VARCHAR
total_cpu_limit

The amount of CPU units on a fleet instance to allocate for the container group. All containers in the group share these resources. This property is an integer value in CPU units (1 vCPU is equal to 1024 CPU units).

You can set additional limits for each ContainerDefinition in the group. If individual containers have limits, this value must be equal to or greater than the sum of all container-specific CPU limits in the group.

For more details on memory allocation, see the Container fleet design guide.

BIGINT
total_memory_limit

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 additional limits for each ContainerDefinition in the group. If individual containers have limits, this value must meet the following requirements:

  • Equal to or greater than the sum of all container-specific soft memory limits in the group.

  • Equal to or greater than any container-specific hard limits in the group.

For more details on memory allocation, see the Container fleet design guide.

BIGINT