describeFleetLocationCapacity method
This API works with the following fleet types: EC2, Anywhere, Container
Retrieves the resource capacity settings for a fleet location. The data returned includes the current capacity (number of EC2 instances) and some scaling settings for the requested fleet location. For a managed container fleet, this operation also returns counts for game server container groups.
Use this operation to retrieve capacity information for a fleet's remote
location or home Region (you can also retrieve home Region capacity by
calling DescribeFleetCapacity).
To retrieve capacity data, identify a fleet and location.
If successful, a FleetCapacity object is returned for the
requested fleet location.
Learn more
Setting up Amazon GameLift Servers fleets
Amazon GameLift Servers service locations for managed hosting
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 capacity for. You
can use either the fleet ID or ARN value.
Parameter location :
The fleet location to retrieve capacity information for. Specify a
location in the form of an Amazon Web Services Region code, such as
us-west-2.
Implementation
Future<DescribeFleetLocationCapacityOutput> describeFleetLocationCapacity({
required String fleetId,
required String location,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'GameLift.DescribeFleetLocationCapacity'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'FleetId': fleetId,
'Location': location,
},
);
return DescribeFleetLocationCapacityOutput.fromJson(jsonResponse.body);
}