| Copyright | (c) 2013-2021 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
Amazonka.GameLift.AcceptMatch
Description
Registers a player's acceptance or rejection of a proposed FlexMatch match. A matchmaking configuration may require player acceptance; if so, then matches built with that configuration cannot be completed unless all players accept the proposed match within a specified time limit.
When FlexMatch builds a match, all the matchmaking tickets involved in
the proposed match are placed into status REQUIRES_ACCEPTANCE. This is
a trigger for your game to get acceptance from all players in the
ticket. Acceptances are only valid for tickets when they are in this
status; all other acceptances result in an error.
To register acceptance, specify the ticket ID, a response, and one or
more players. Once all players have registered acceptance, the
matchmaking tickets advance to status PLACING, where a new game
session is created for the match.
If any player rejects the match, or if acceptances are not received
before a specified timeout, the proposed match is dropped. The
matchmaking tickets are then handled in one of two ways: For tickets
where one or more players rejected the match, the ticket status is
returned to SEARCHING to find a new match. For tickets where one or
more players failed to respond, the ticket status is set to CANCELLED,
and processing is terminated. A new matchmaking request for these
players can be submitted as needed.
Learn more
Add FlexMatch to a game client
FlexMatch events (reference)
Related actions
StartMatchmaking | DescribeMatchmaking | StopMatchmaking | AcceptMatch | StartMatchBackfill | All APIs by task
Synopsis
- data AcceptMatch = AcceptMatch' {
- ticketId :: Text
- playerIds :: [Text]
- acceptanceType :: AcceptanceType
- newAcceptMatch :: Text -> AcceptanceType -> AcceptMatch
- acceptMatch_ticketId :: Lens' AcceptMatch Text
- acceptMatch_playerIds :: Lens' AcceptMatch [Text]
- acceptMatch_acceptanceType :: Lens' AcceptMatch AcceptanceType
- data AcceptMatchResponse = AcceptMatchResponse' {
- httpStatus :: Int
- newAcceptMatchResponse :: Int -> AcceptMatchResponse
- acceptMatchResponse_httpStatus :: Lens' AcceptMatchResponse Int
Creating a Request
data AcceptMatch Source #
Represents the input for a request operation.
See: newAcceptMatch smart constructor.
Constructors
| AcceptMatch' | |
Fields
| |
Instances
Arguments
| :: Text | |
| -> AcceptanceType | |
| -> AcceptMatch |
Create a value of AcceptMatch with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:ticketId:AcceptMatch', acceptMatch_ticketId - A unique identifier for a matchmaking ticket. The ticket must be in
status REQUIRES_ACCEPTANCE; otherwise this request will fail.
$sel:playerIds:AcceptMatch', acceptMatch_playerIds - A unique identifier for a player delivering the response. This parameter
can include one or multiple player IDs.
$sel:acceptanceType:AcceptMatch', acceptMatch_acceptanceType - Player response to the proposed match.
Request Lenses
acceptMatch_ticketId :: Lens' AcceptMatch Text Source #
A unique identifier for a matchmaking ticket. The ticket must be in
status REQUIRES_ACCEPTANCE; otherwise this request will fail.
acceptMatch_playerIds :: Lens' AcceptMatch [Text] Source #
A unique identifier for a player delivering the response. This parameter can include one or multiple player IDs.
acceptMatch_acceptanceType :: Lens' AcceptMatch AcceptanceType Source #
Player response to the proposed match.
Destructuring the Response
data AcceptMatchResponse Source #
See: newAcceptMatchResponse smart constructor.
Constructors
| AcceptMatchResponse' | |
Fields
| |
Instances
newAcceptMatchResponse Source #
Arguments
| :: Int | |
| -> AcceptMatchResponse |
Create a value of AcceptMatchResponse with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:AcceptMatchResponse', acceptMatchResponse_httpStatus - The response's http status code.
Response Lenses
acceptMatchResponse_httpStatus :: Lens' AcceptMatchResponse Int Source #
The response's http status code.