stopMatchmaking method
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
Related operations
May throw InvalidRequestException. May throw NotFoundException. May throw InternalServiceException. May throw UnsupportedRegionException.
Parameter ticketId
:
A unique identifier for a matchmaking ticket.
Implementation
Future<void> stopMatchmaking({
required String ticketId,
}) async {
ArgumentError.checkNotNull(ticketId, 'ticketId');
_s.validateStringLength(
'ticketId',
ticketId,
0,
128,
isRequired: true,
);
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,
},
);
}