deregisterCompute method

Future<void> deregisterCompute({
  1. required String computeName,
  2. required String fleetId,
})

This API works with the following fleet types: Anywhere

Removes a compute resource from an Anywhere fleet. Deregistered computes can no longer host game sessions through Amazon GameLift Servers. Use this operation with an Anywhere fleet that doesn't use the Amazon GameLift Servers Agent For Anywhere fleets with the Agent, the Agent handles all compute registry tasks for you.

To deregister a compute, call this operation from the compute that's being deregistered and specify the compute name and the fleet ID.

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

Parameter computeName : The unique identifier of the compute resource to deregister. For an Anywhere fleet compute, use the registered compute name.

Parameter fleetId : A unique identifier for the fleet the compute resource is currently registered to.

Implementation

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