amazonka-gamelift-2.0: Amazon GameLift SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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 or failed to respond, the ticket status is set to CANCELLED, and processing is terminated. For tickets where players have accepted or not yet responded, the ticket status is returned to SEARCHING to find a new match. A new matchmaking request for these players can be submitted as needed.

Learn more

Add FlexMatch to a game client

FlexMatch events (reference)

Synopsis

Creating a Request

data AcceptMatch Source #

See: newAcceptMatch smart constructor.

Constructors

AcceptMatch' 

Fields

  • ticketId :: Text

    A unique identifier for a matchmaking ticket. The ticket must be in status REQUIRES_ACCEPTANCE; otherwise this request will fail.

  • playerIds :: [Text]

    A unique identifier for a player delivering the response. This parameter can include one or multiple player IDs.

  • acceptanceType :: AcceptanceType

    Player response to the proposed match.

Instances

Instances details
ToJSON AcceptMatch Source # 
Instance details

Defined in Amazonka.GameLift.AcceptMatch

ToHeaders AcceptMatch Source # 
Instance details

Defined in Amazonka.GameLift.AcceptMatch

Methods

toHeaders :: AcceptMatch -> [Header] #

ToPath AcceptMatch Source # 
Instance details

Defined in Amazonka.GameLift.AcceptMatch

ToQuery AcceptMatch Source # 
Instance details

Defined in Amazonka.GameLift.AcceptMatch

AWSRequest AcceptMatch Source # 
Instance details

Defined in Amazonka.GameLift.AcceptMatch

Associated Types

type AWSResponse AcceptMatch #

Generic AcceptMatch Source # 
Instance details

Defined in Amazonka.GameLift.AcceptMatch

Associated Types

type Rep AcceptMatch :: Type -> Type #

Read AcceptMatch Source # 
Instance details

Defined in Amazonka.GameLift.AcceptMatch

Show AcceptMatch Source # 
Instance details

Defined in Amazonka.GameLift.AcceptMatch

NFData AcceptMatch Source # 
Instance details

Defined in Amazonka.GameLift.AcceptMatch

Methods

rnf :: AcceptMatch -> () #

Eq AcceptMatch Source # 
Instance details

Defined in Amazonka.GameLift.AcceptMatch

Hashable AcceptMatch Source # 
Instance details

Defined in Amazonka.GameLift.AcceptMatch

type AWSResponse AcceptMatch Source # 
Instance details

Defined in Amazonka.GameLift.AcceptMatch

type Rep AcceptMatch Source # 
Instance details

Defined in Amazonka.GameLift.AcceptMatch

type Rep AcceptMatch = D1 ('MetaData "AcceptMatch" "Amazonka.GameLift.AcceptMatch" "amazonka-gamelift-2.0-IjhNQby9jLV6gj30IrgsyK" 'False) (C1 ('MetaCons "AcceptMatch'" 'PrefixI 'True) (S1 ('MetaSel ('Just "ticketId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "playerIds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Text]) :*: S1 ('MetaSel ('Just "acceptanceType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 AcceptanceType))))

newAcceptMatch Source #

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:

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

Instances details
Generic AcceptMatchResponse Source # 
Instance details

Defined in Amazonka.GameLift.AcceptMatch

Associated Types

type Rep AcceptMatchResponse :: Type -> Type #

Read AcceptMatchResponse Source # 
Instance details

Defined in Amazonka.GameLift.AcceptMatch

Show AcceptMatchResponse Source # 
Instance details

Defined in Amazonka.GameLift.AcceptMatch

NFData AcceptMatchResponse Source # 
Instance details

Defined in Amazonka.GameLift.AcceptMatch

Methods

rnf :: AcceptMatchResponse -> () #

Eq AcceptMatchResponse Source # 
Instance details

Defined in Amazonka.GameLift.AcceptMatch

type Rep AcceptMatchResponse Source # 
Instance details

Defined in Amazonka.GameLift.AcceptMatch

type Rep AcceptMatchResponse = D1 ('MetaData "AcceptMatchResponse" "Amazonka.GameLift.AcceptMatch" "amazonka-gamelift-2.0-IjhNQby9jLV6gj30IrgsyK" 'False) (C1 ('MetaCons "AcceptMatchResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newAcceptMatchResponse Source #

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