Copyright | (c) 2013-2017 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 |
Language | Haskell2010 |
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 all players accepted the match, the ticket status is returned to SEARCHING
to find a new match. For tickets where one or more players failed to accept the match, the ticket status is set to FAILED
, and processing is terminated. A new matchmaking request for these players can be submitted as needed.
Matchmaking-related operations include:
StartMatchmaking
DescribeMatchmaking
StopMatchmaking
AcceptMatch
- acceptMatch :: Text -> AcceptanceType -> AcceptMatch
- data AcceptMatch
- amTicketId :: Lens' AcceptMatch Text
- amPlayerIds :: Lens' AcceptMatch [Text]
- amAcceptanceType :: Lens' AcceptMatch AcceptanceType
- acceptMatchResponse :: Int -> AcceptMatchResponse
- data AcceptMatchResponse
- amrsResponseStatus :: Lens' AcceptMatchResponse Int
Creating a Request
Creates a value of AcceptMatch
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
amTicketId
- Unique identifier for a matchmaking ticket. The ticket must be in statusREQUIRES_ACCEPTANCE
; otherwise this request will fail.amPlayerIds
- Unique identifier for a player delivering the response. This parameter can include one or multiple player IDs.amAcceptanceType
- Player response to the proposed match.
data AcceptMatch Source #
Represents the input for a request action.
See: acceptMatch
smart constructor.
Request Lenses
amTicketId :: Lens' AcceptMatch Text Source #
Unique identifier for a matchmaking ticket. The ticket must be in status REQUIRES_ACCEPTANCE
; otherwise this request will fail.
amPlayerIds :: Lens' AcceptMatch [Text] Source #
Unique identifier for a player delivering the response. This parameter can include one or multiple player IDs.
amAcceptanceType :: Lens' AcceptMatch AcceptanceType Source #
Player response to the proposed match.
Destructuring the Response
Creates a value of AcceptMatchResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
amrsResponseStatus
- -- | The response status code.
data AcceptMatchResponse Source #
See: acceptMatchResponse
smart constructor.
Response Lenses
amrsResponseStatus :: Lens' AcceptMatchResponse Int Source #
- - | The response status code.