describeMatchmaking method
Retrieves one or more matchmaking tickets. Use this operation to retrieve ticket information, including--after a successful match is made--connection information for the resulting new game session.
To request matchmaking tickets, provide a list of up to 10 ticket IDs. If the request is successful, a ticket object is returned for each requested ID that currently exists.
This operation is not designed to be continually called to track matchmaking ticket status. This practice can cause you to exceed your API limit, which results in errors. Instead, as a best practice, set up an Amazon Simple Notification Service (SNS) to receive notifications, and provide the topic ARN in the matchmaking configuration. Continuously poling ticket status with DescribeMatchmaking should only be used for games in development with low matchmaking usage.
Learn more
Add FlexMatch to a Game Client
Set Up FlexMatch Event Notification
Related operations
May throw InvalidRequestException. May throw InternalServiceException. May throw UnsupportedRegionException.
Parameter ticketIds
:
A unique identifier for a matchmaking ticket. You can include up to 10 ID
values.
Implementation
Future<DescribeMatchmakingOutput> describeMatchmaking({
required List<String> ticketIds,
}) async {
ArgumentError.checkNotNull(ticketIds, 'ticketIds');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'GameLift.DescribeMatchmaking'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'TicketIds': ticketIds,
},
);
return DescribeMatchmakingOutput.fromJson(jsonResponse.body);
}