GameLift.Client.
describe_matchmaking
(**kwargs)¶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 to receive notifications, and provide the topic ARN in the matchmaking configuration.
See also: AWS API Documentation
Request Syntax
response = client.describe_matchmaking(
TicketIds=[
'string',
]
)
[REQUIRED]
A unique identifier for a matchmaking ticket. You can include up to 10 ID values.
{
'TicketList': [
{
'TicketId': 'string',
'ConfigurationName': 'string',
'ConfigurationArn': 'string',
'Status': 'CANCELLED'|'COMPLETED'|'FAILED'|'PLACING'|'QUEUED'|'REQUIRES_ACCEPTANCE'|'SEARCHING'|'TIMED_OUT',
'StatusReason': 'string',
'StatusMessage': 'string',
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1),
'Players': [
{
'PlayerId': 'string',
'PlayerAttributes': {
'string': {
'S': 'string',
'N': 123.0,
'SL': [
'string',
],
'SDM': {
'string': 123.0
}
}
},
'Team': 'string',
'LatencyInMs': {
'string': 123
}
},
],
'GameSessionConnectionInfo': {
'GameSessionArn': 'string',
'IpAddress': 'string',
'DnsName': 'string',
'Port': 123,
'MatchedPlayerSessions': [
{
'PlayerId': 'string',
'PlayerSessionId': 'string'
},
]
},
'EstimatedWaitTime': 123
},
]
}
Response Structure
A collection of existing matchmaking ticket objects matching the request.
Ticket generated to track the progress of a matchmaking request. Each ticket is uniquely identified by a ticket ID, supplied by the requester, when creating a matchmaking request.
A unique identifier for a matchmaking ticket.
Name of the matchmaking configuration that is used with this ticket. Matchmaking configurations determine how players are grouped into a match and how a new game session is created for the match.
The Amazon Resource Name ( ARN ) associated with the GameLift matchmaking configuration resource that is used with this ticket.
Current status of the matchmaking request.
StopMatchmaking
operation or a proposed match that one or more players failed to accept.Note
Matchmaking requests that fail to successfully complete (statuses FAILED, CANCELLED, TIMED_OUT) can be resubmitted as new requests with new ticket IDs.
Code to explain the current status. For example, a status reason may indicate when a ticket has returned to SEARCHING
status after a proposed match fails to receive player acceptances.
Additional information about the current status.
Time stamp indicating when this matchmaking request was received. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"
).
Time stamp indicating when the matchmaking request stopped being processed due to successful completion, timeout, or cancellation. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"
).
A set of Player
objects, each representing a player to find matches for. Players are identified by a unique player ID and may include latency data for use during matchmaking. If the ticket is in status COMPLETED
, the Player
objects include the team the players were assigned to in the resulting match.
Represents a player in matchmaking. When starting a matchmaking request, a player has a player ID, attributes, and may have latency data. Team information is added after a match has been successfully completed.
A unique identifier for a player
A collection of key:value pairs containing player information for use in matchmaking. Player attribute keys must match the playerAttributes used in a matchmaking rule set. Example: "PlayerAttributes": {"skill": {"N": "23"}, "gameMode": {"S": "deathmatch"}}
.
You can provide up to 10 PlayerAttributes
.
Values for use in player attribute key-value pairs. This object lets you specify an attribute value using any of the valid data types: string, number, string array, or data map. Each AttributeValue
object can use only one of the available properties.
For single string values. Maximum string length is 100 characters.
For number values, expressed as double.
For a list of up to 100 strings. Maximum length for each string is 100 characters. Duplicate values are not recognized; all occurrences of the repeated value after the first of a repeated value are ignored.
For a map of up to 10 data type:value pairs. Maximum length for each string value is 100 characters.
Name of the team that the player is assigned to in a match. Team names are defined in a matchmaking rule set.
A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to @aws; Regions. If this property is present, FlexMatch considers placing the match only in Regions for which latency is reported.
If a matchmaker has a rule that evaluates player latency, players must report latency in order to be matched. If no latency is reported in this scenario, FlexMatch assumes that no Regions are available to the player and the ticket is not matchable.
Connection information for a new game session. Once a match is made, the FlexMatch engine creates a new game session for it. This information is added to the matchmaking ticket, which you can be retrieve by calling DescribeMatchmaking .
A unique identifier for the game session. Use the game session ID.
The IP address of the game session. To connect to a GameLift game server, an app needs both the IP address and port number.
The DNS identifier assigned to the instance that is running the game session. Values have the following format:
<unique identifier>.<region identifier>.amazongamelift.com
.ec2-<unique identifier>.compute.amazonaws.com
. (See Amazon EC2 Instance IP Addressing.)When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.
The port number for the game session. To connect to a GameLift game server, an app needs both the IP address and port number.
A collection of player session IDs, one for each player ID that was included in the original matchmaking request.
Represents a new player session that is created as a result of a successful FlexMatch match. A successful match automatically creates new player sessions for every player ID in the original matchmaking request.
When players connect to the match's game session, they must include both player ID and player session ID in order to claim their assigned player slot.
A unique identifier for a player
A unique identifier for a player session
Average amount of time (in seconds) that players are currently waiting for a match. If there is not enough recent data, this property may be empty.
Exceptions
GameLift.Client.exceptions.InvalidRequestException
GameLift.Client.exceptions.InternalServiceException
GameLift.Client.exceptions.UnsupportedRegionException