describeFleetLocationUtilization method

Future<DescribeFleetLocationUtilizationOutput> describeFleetLocationUtilization({
  1. required String fleetId,
  2. required String location,
})

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

Retrieves current usage data for a fleet location. Utilization data provides a snapshot of current game hosting activity at the requested location. Use this operation to retrieve utilization information for a fleet's remote location or home Region (you can also retrieve home Region utilization by calling DescribeFleetUtilization).

To retrieve utilization data, identify a fleet and location.

If successful, a FleetUtilization object is returned for the requested fleet location.

Learn more

Setting up Amazon GameLift Servers fleets

Amazon GameLift Servers service locations for managed hosting

GameLift metrics for fleets

May throw InternalServiceException. May throw InvalidRequestException. May throw NotFoundException. May throw UnauthorizedException. May throw UnsupportedRegionException.

Parameter fleetId : A unique identifier for the fleet to request location utilization for. You can use either the fleet ID or ARN value.

Parameter location : The fleet location to retrieve utilization information for. Specify a location in the form of an Amazon Web Services Region code, such as us-west-2.

Implementation

Future<DescribeFleetLocationUtilizationOutput>
    describeFleetLocationUtilization({
  required String fleetId,
  required String location,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'GameLift.DescribeFleetLocationUtilization'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'FleetId': fleetId,
      'Location': location,
    },
  );

  return DescribeFleetLocationUtilizationOutput.fromJson(jsonResponse.body);
}