DescribeContainerGroupDefinition - Amazon GameLift

DescribeContainerGroupDefinition

Retrieves the properties of a container group definition, including all container definitions in the group.

Request options:

  • Retrieve the latest version of a container group definition. Specify the container group definition name only, or use an ARN value without a version number.

  • Retrieve a particular version. Specify the container group definition name and a version number, or use an ARN value that includes the version number.

Results:

If successful, this operation returns the complete properties of a container group definition version.

Learn more

Request Syntax

{ "Name": "string", "VersionNumber": number }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Note

In the following list, the required parameters are described first.

Name

The unique identifier for the container group definition to retrieve properties for. You can use either the Name or ARN value.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 512.

Pattern: ^[a-zA-Z0-9\-]+$|^arn:.*:containergroupdefinition\/[a-zA-Z0-9\-]+(:[0-9]+)?$

Required: Yes

VersionNumber

The specific version to retrieve.

Type: Integer

Valid Range: Minimum value of 1.

Required: No

Response Syntax

{ "ContainerGroupDefinition": { "ContainerGroupDefinitionArn": "string", "ContainerGroupType": "string", "CreationTime": number, "GameServerContainerDefinition": { "ContainerName": "string", "DependsOn": [ { "Condition": "string", "ContainerName": "string" } ], "EnvironmentOverride": [ { "Name": "string", "Value": "string" } ], "ImageUri": "string", "MountPoints": [ { "AccessLevel": "string", "ContainerPath": "string", "InstancePath": "string" } ], "PortConfiguration": { "ContainerPortRanges": [ { "FromPort": number, "Protocol": "string", "ToPort": number } ] }, "ResolvedImageDigest": "string", "ServerSdkVersion": "string" }, "Name": "string", "OperatingSystem": "string", "Status": "string", "StatusReason": "string", "SupportContainerDefinitions": [ { "ContainerName": "string", "DependsOn": [ { "Condition": "string", "ContainerName": "string" } ], "EnvironmentOverride": [ { "Name": "string", "Value": "string" } ], "Essential": boolean, "HealthCheck": { "Command": [ "string" ], "Interval": number, "Retries": number, "StartPeriod": number, "Timeout": number }, "ImageUri": "string", "MemoryHardLimitMebibytes": number, "MountPoints": [ { "AccessLevel": "string", "ContainerPath": "string", "InstancePath": "string" } ], "PortConfiguration": { "ContainerPortRanges": [ { "FromPort": number, "Protocol": "string", "ToPort": number } ] }, "ResolvedImageDigest": "string", "Vcpu": number } ], "TotalMemoryLimitMebibytes": number, "TotalVcpuLimit": number, "VersionDescription": "string", "VersionNumber": number } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

ContainerGroupDefinition

The properties of the requested container group definition resource.

Type: ContainerGroupDefinition object

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServiceException

The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.

HTTP Status Code: 500

InvalidRequestException

One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.

HTTP Status Code: 400

NotFoundException

The requested resources was not found. The resource was either not created yet or deleted.

HTTP Status Code: 400

UnauthorizedException

The client failed authentication. Clients should not retry such requests.

HTTP Status Code: 400

UnsupportedRegionException

The requested operation is not supported in the Region specified.

HTTP Status Code: 400

Examples

Retrieve a container group definition version

This example retrieves the 3rd version of a container group definition. It assumes we're working in the same AWS Region as the container group we want to retrieve. To retrieve a container group definition in a different region, we could make the request using the definition's ARN value or we could specify the other region.

HTTP requests are authenticated using an AWS Signature Version 4 signature in the Authorization header field.

Sample Request

{ "Name": "MyAdventureGameContainerGroup", "Version": 3 }

Sample Response

{ "ContainerGroupDefinition": { "ContainerGroupDefinitionArn": "arn:aws:gamelift:us-west-2:111122223333:containergroupdefinition/MyAdventureGameContainerGroup:3", "ContainerGroupType": "GAME_SERVER", "CreationTime": 1496365885.44, "GameServerContainerDefinition": [ { "ContainerName": "MyAdventureGameContainer", "ImageUri": "111122223333.dkr.ecr.us-west-2.amazonaws.com/MyAdventureGameContainerImage", "PortConfiguration": { "ContainerPortRanges": [ { "FromPort": 35000, "Protocol": "TCP", "ToPort": 40000 } ] }, "ResolvedImageDigest": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", "ServerSdkVersion": "5.2.0" } ], "Name": "MyAdventureGameContainerGroup", "OperatingSystem": "AMAZON_LINUX_2023", "Status": "READY", "SupportContainerDefinitions": [ { "ContainerName": "MyAdventureGameDependencies", "ImageUri": "111122223333.dkr.ecr.us-west-2.amazonaws.com/MyAdventureGameContainerImage" } ], "TotalMemoryLimitMebibytes": 1024, "TotalVcpuLimit": 1, "VersionNumber": "3" } }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: