deleteFleetLocations method
This API works with the following fleet types: EC2, Anywhere, Container
Removes locations from a multi-location fleet. When deleting a location, all game server process and all instances that are still active in the location are shut down.
To delete fleet locations, identify the fleet ID and provide a list of the locations to be deleted.
If successful, GameLift sets the location status to DELETING,
and begins to shut down existing server processes and terminate instances
in each location being deleted. When completed, the location status
changes to TERMINATED.
Learn more
Setting up Amazon GameLift Servers 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 delete locations for. You can use
either the fleet ID or ARN value.
Parameter locations :
The list of fleet locations to delete. Specify locations in the form of an
Amazon Web Services Region code, such as us-west-2.
Implementation
Future<DeleteFleetLocationsOutput> deleteFleetLocations({
required String fleetId,
required List<String> locations,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'GameLift.DeleteFleetLocations'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'FleetId': fleetId,
'Locations': locations,
},
);
return DeleteFleetLocationsOutput.fromJson(jsonResponse.body);
}