ListCompute - Amazon GameLift

ListCompute

Retrieves information on the compute resources in an Amazon GameLift fleet. Use the pagination parameters to retrieve results in a set of sequential pages.

Request options:

  • Retrieve a list of all computes in a fleet. Specify a fleet ID.

  • Retrieve a list of all computes in a specific fleet location. Specify a fleet ID and location.

  • Retrieve a list of managed container fleets based on compute status. Specify a fleet ID, status, and (optionally) location.

Results:

If successful, this operation returns information on a set of computes. Depending on the type of fleet, the result includes the following information:

  • For managed EC2 fleets (compute type EC2), this operation returns information about the EC2 instance. Compute names are EC2 instance IDs.

  • For Anywhere fleets (compute type ANYWHERE), this operation returns compute names and details as provided when the compute was registered with RegisterCompute. This includes GameLiftServiceSdkEndpoint or GameLiftAgentEndpoint.

  • For managed container fleets, this operation returns information about compute containers and the instances they're running on. Compute names are container names.

Request Syntax

{ "ComputeStatus": "string", "ContainerGroupDefinitionName": "string", "FleetId": "string", "Limit": number, "Location": "string", "NextToken": "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.

FleetId

A unique identifier for the fleet to retrieve compute resources for.

Type: String

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

Pattern: ^[a-z]*fleet-[a-zA-Z0-9\-]+$|^arn:.*:[a-z]*fleet\/[a-z]*fleet-[a-zA-Z0-9\-]+$

Required: Yes

ComputeStatus

The status of computes in a managed container fleet, based on the success of the latest update deployment.

  • ACTIVE -- The compute is deployed with the correct container definitions. It is ready to process game servers and host game sessions.

  • IMPAIRED -- An update deployment to the compute failed, and the compute is deployed with incorrect container definitions.

Type: String

Valid Values: ACTIVE | IMPAIRED

Required: No

ContainerGroupDefinitionName

For computes in a managed container fleet, the name of the deployed container group definition.

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: No

Limit

The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

Type: Integer

Valid Range: Minimum value of 1.

Required: No

Location

The name of a location to retrieve compute resources for. For an Amazon GameLift Anywhere fleet, use a custom location. For a managed fleet, provide a AWS Region or Local Zone code (for example: us-west-2 or us-west-2-lax-1).

Type: String

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

Pattern: ^[A-Za-z0-9\-]+

Required: No

NextToken

A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value.

Type: String

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

Required: No

Response Syntax

{ "ComputeList": [ { "ComputeArn": "string", "ComputeName": "string", "ComputeStatus": "string", "ContainerAttributes": [ { "ContainerName": "string", "ContainerRuntimeId": "string" } ], "CreationTime": number, "DnsName": "string", "FleetArn": "string", "FleetId": "string", "GameLiftAgentEndpoint": "string", "GameLiftServiceSdkEndpoint": "string", "GameServerContainerGroupDefinitionArn": "string", "InstanceId": "string", "IpAddress": "string", "Location": "string", "OperatingSystem": "string", "Type": "string" } ], "NextToken": "string" }

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.

ComputeList

A list of compute resources in the specified fleet.

Type: Array of Compute objects

NextToken

A token that indicates where to resume retrieving results on the next call to this operation. If no token is returned, these results represent the end of the list.

Type: String

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

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

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

See Also

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