stopMatchmaking method

Future<void> stopMatchmaking({
  1. required String ticketId,
})

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

Cancels a matchmaking ticket or match backfill ticket that is currently being processed. To stop the matchmaking operation, specify the ticket ID. If successful, work on the ticket is stopped, and the ticket status is changed to CANCELLED.

This call is also used to turn off automatic backfill for an individual game session. This is for game sessions that are created with a matchmaking configuration that has automatic backfill enabled. The ticket ID is included in the MatchmakerData of an updated game session object, which is provided to the game server. Learn more

Add FlexMatch to a game client

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

Parameter ticketId : A unique identifier for a matchmaking ticket.

Implementation

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