GameLift / Client / list_locations

list_locations

GameLift.Client.list_locations(**kwargs)

This API works with the following fleet types: EC2, Anywhere, Container

Lists all custom and Amazon Web Services locations where Amazon GameLift Servers can host game servers. This operation also returns UDP ping beacon information for locations, which you can use to measure network latency between player devices and potential hosting locations.

Learn more

Service locations

See also: AWS API Documentation

Request Syntax

response = client.list_locations(
    Filters=[
        'AWS'|'CUSTOM',
    ],
    Limit=123,
    NextToken='string'
)
Parameters:
  • Filters (list) –

    Filters the list for AWS or CUSTOM locations. Use this parameter to narrow down results to only Amazon Web Services-managed locations (Amazon EC2 or container) or only your custom locations (such as an Amazon GameLift Servers Anywhere fleet).

    • (string) –

  • Limit (integer) – The maximum number of results to return. Use this parameter with NextToken to get results as a set of sequential pages.

  • NextToken (string) – 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.

Return type:

dict

Returns:

Response Syntax

{
    'Locations': [
        {
            'LocationName': 'string',
            'LocationArn': 'string',
            'PingBeacon': {
                'UDPEndpoint': {
                    'Domain': 'string',
                    'Port': 123
                }
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Locations (list) –

      A collection of locations, including both Amazon Web Services and custom locations. Each location includes a name and ping beacon information that can be used to measure network latency between player devices and the location.

      • (dict) –

        Properties of a location, which can include its name, ARN (for custom locations), and ping beacon information.

        • LocationName (string) –

          The location’s name.

        • LocationArn (string) –

          The Amazon Resource Name ( ARN) that is assigned to a custom location resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::location/location-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.

        • PingBeacon (dict) –

          Information about the UDP ping beacon for this location. Ping beacons are fixed endpoints that you can use to measure network latency between a player device and an Amazon GameLift Servers hosting location.

          • UDPEndpoint (dict) –

            The domain name and port of the UDP ping beacon. Your game client can send UDP messages to this endpoint and receive responses to measure network latency.

            • Domain (string) –

              The domain name of the UDP endpoint.

            • Port (integer) –

              The port number of the UDP endpoint. For Amazon GameLift Servers ping beacons, this is typically port 7770.

    • NextToken (string) –

      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.

Exceptions

  • GameLift.Client.exceptions.UnauthorizedException

  • GameLift.Client.exceptions.InvalidRequestException

  • GameLift.Client.exceptions.InternalServiceException