deleteLocation method

Future<void> deleteLocation({
  1. required String locationName,
})

This API works with the following fleet types: Anywhere

Deletes a custom location.

Before deleting a custom location, review any fleets currently using the custom location and deregister the location if it is in use. For more information, see DeregisterCompute.

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

Parameter locationName : The location name of the custom location to be deleted.

Implementation

Future<void> deleteLocation({
  required String locationName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'GameLift.DeleteLocation'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'LocationName': locationName,
    },
  );
}