DescribeContainerGroupDefinition
This operation is used with the Amazon GameLift containers feature, which is currently in public preview.
Retrieves the properties of a container group definition, including all container definitions in the group.
To retrieve a container group definition, provide a resource identifier. If successful, this operation returns the complete properties of the container group definition.
Learn more
Request Syntax
{
"Name": "string
"
}
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
orARN
value.Type: String
Length Constraints: Minimum length of 1. Maximum length of 512.
Pattern:
^[a-zA-Z0-9\-]+$|^arn:.*:containergroupdefinition\/[a-zA-Z0-9\-]+$
Required: Yes
Response Syntax
{
"ContainerGroupDefinition": {
"ContainerDefinitions": [
{
"Command": [ "string" ],
"ContainerName": "string",
"Cpu": number,
"DependsOn": [
{
"Condition": "string",
"ContainerName": "string"
}
],
"EntryPoint": [ "string" ],
"Environment": [
{
"Name": "string",
"Value": "string"
}
],
"Essential": boolean,
"HealthCheck": {
"Command": [ "string" ],
"Interval": number,
"Retries": number,
"StartPeriod": number,
"Timeout": number
},
"ImageUri": "string",
"MemoryLimits": {
"HardLimit": number,
"SoftLimit": number
},
"PortConfiguration": {
"ContainerPortRanges": [
{
"FromPort": number,
"Protocol": "string",
"ToPort": number
}
]
},
"ResolvedImageDigest": "string",
"WorkingDirectory": "string"
}
],
"ContainerGroupDefinitionArn": "string",
"CreationTime": number,
"Name": "string",
"OperatingSystem": "string",
"SchedulingStrategy": "string",
"Status": "string",
"StatusReason": "string",
"TotalCpuLimit": number,
"TotalMemoryLimit": 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
This example retrieves a container group definition by specifying the definition name. 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",
}
Sample Response
{
"ContainerGroupDefinition": {
"ContainerDefinitions": [
{
"ContainerName": "MyAdventureGameContainer",
"Essential": TRUE,
"ImageUri": "111122223333.dkr.ecr.us-west-2.amazonaws.com/MyAdventureGameContainerImage",
"PortConfiguration": {
"ContainerPortRanges": [
{
"FromPort": 35000,
"Protocol": "TCP",
"ToPort": 40000
}
]
},
"ResolvedImageDigest": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}
],
"ContainerGroupDefinitionArn": "arn:aws:gamelift:us-west-2:111122223333:containergroupdefinition/MyAdventureGameContainerGroup",
"CreationTime": 1496365885.44,
"Name": "MyAdventureGameContainerGroup",
"OperatingSystem": "AMAZON_LINUX_2023",
"SchedulingStrategy": "REPLICA",
"Status": "COPYING",
"TotalCpuLimit": 4096,
"TotalMemoryLimit": 1024
}
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: