libZSservicesZSamazonka-gameliftZSamazonka-gamelift
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.GameLift.ClaimGameServer

Description

__This operation is used with the GameLift FleetIQ solution and game server groups.__

Locates an available game server and temporarily reserves it to host gameplay and players. This operation is called from a game client or client service (such as a matchmaker) to request hosting resources for a new game session. In response, GameLift FleetIQ locates an available game server, places it in CLAIMED status for 60 seconds, and returns connection information that players can use to connect to the game server.

To claim a game server, identify a game server group. You can also specify a game server ID, although this approach bypasses GameLift FleetIQ placement optimization. Optionally, include game data to pass to the game server at the start of a game session, such as a game map or player information.

When a game server is successfully claimed, connection information is returned. A claimed game server's utilization status remains AVAILABLE while the claim status is set to CLAIMED for up to 60 seconds. This time period gives the game server time to update its status to UTILIZED (using UpdateGameServer) once players join. If the game server's status is not updated within 60 seconds, the game server reverts to unclaimed status and is available to be claimed by another request. The claim time period is a fixed value and is not configurable.

If you try to claim a specific game server, this request will fail in the following cases:

  • If the game server utilization status is UTILIZED.
  • If the game server claim status is CLAIMED.

When claiming a specific game server, this request will succeed even if the game server is running on an instance in DRAINING status. To avoid this, first check the instance status by calling DescribeGameServerInstances.

Learn more

GameLift FleetIQ Guide

Related actions

RegisterGameServer | ListGameServers | ClaimGameServer | DescribeGameServer | UpdateGameServer | DeregisterGameServer | All APIs by task

Synopsis

Creating a Request

data ClaimGameServer Source #

See: newClaimGameServer smart constructor.

Constructors

ClaimGameServer' 

Fields

  • gameServerData :: Maybe Text

    A set of custom game server properties, formatted as a single string value. This data is passed to a game client or service when it requests information on game servers using ListGameServers or ClaimGameServer.

  • gameServerId :: Maybe Text

    A custom string that uniquely identifies the game server to claim. If this parameter is left empty, GameLift FleetIQ searches for an available game server in the specified game server group.

  • gameServerGroupName :: Text

    A unique identifier for the game server group where the game server is running. Use either the GameServerGroup name or ARN value. If you are not specifying a game server to claim, this value identifies where you want GameLift FleetIQ to look for an available game server to claim.

Instances

Instances details
Eq ClaimGameServer Source # 
Instance details

Defined in Amazonka.GameLift.ClaimGameServer

Read ClaimGameServer Source # 
Instance details

Defined in Amazonka.GameLift.ClaimGameServer

Show ClaimGameServer Source # 
Instance details

Defined in Amazonka.GameLift.ClaimGameServer

Generic ClaimGameServer Source # 
Instance details

Defined in Amazonka.GameLift.ClaimGameServer

Associated Types

type Rep ClaimGameServer :: Type -> Type #

NFData ClaimGameServer Source # 
Instance details

Defined in Amazonka.GameLift.ClaimGameServer

Methods

rnf :: ClaimGameServer -> () #

Hashable ClaimGameServer Source # 
Instance details

Defined in Amazonka.GameLift.ClaimGameServer

ToJSON ClaimGameServer Source # 
Instance details

Defined in Amazonka.GameLift.ClaimGameServer

AWSRequest ClaimGameServer Source # 
Instance details

Defined in Amazonka.GameLift.ClaimGameServer

Associated Types

type AWSResponse ClaimGameServer #

ToHeaders ClaimGameServer Source # 
Instance details

Defined in Amazonka.GameLift.ClaimGameServer

ToPath ClaimGameServer Source # 
Instance details

Defined in Amazonka.GameLift.ClaimGameServer

ToQuery ClaimGameServer Source # 
Instance details

Defined in Amazonka.GameLift.ClaimGameServer

type Rep ClaimGameServer Source # 
Instance details

Defined in Amazonka.GameLift.ClaimGameServer

type Rep ClaimGameServer = D1 ('MetaData "ClaimGameServer" "Amazonka.GameLift.ClaimGameServer" "libZSservicesZSamazonka-gameliftZSamazonka-gamelift" 'False) (C1 ('MetaCons "ClaimGameServer'" 'PrefixI 'True) (S1 ('MetaSel ('Just "gameServerData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "gameServerId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "gameServerGroupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse ClaimGameServer Source # 
Instance details

Defined in Amazonka.GameLift.ClaimGameServer

newClaimGameServer Source #

Create a value of ClaimGameServer 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:gameServerData:ClaimGameServer', claimGameServer_gameServerData - A set of custom game server properties, formatted as a single string value. This data is passed to a game client or service when it requests information on game servers using ListGameServers or ClaimGameServer.

$sel:gameServerId:ClaimGameServer', claimGameServer_gameServerId - A custom string that uniquely identifies the game server to claim. If this parameter is left empty, GameLift FleetIQ searches for an available game server in the specified game server group.

$sel:gameServerGroupName:ClaimGameServer', claimGameServer_gameServerGroupName - A unique identifier for the game server group where the game server is running. Use either the GameServerGroup name or ARN value. If you are not specifying a game server to claim, this value identifies where you want GameLift FleetIQ to look for an available game server to claim.

Request Lenses

claimGameServer_gameServerData :: Lens' ClaimGameServer (Maybe Text) Source #

A set of custom game server properties, formatted as a single string value. This data is passed to a game client or service when it requests information on game servers using ListGameServers or ClaimGameServer.

claimGameServer_gameServerId :: Lens' ClaimGameServer (Maybe Text) Source #

A custom string that uniquely identifies the game server to claim. If this parameter is left empty, GameLift FleetIQ searches for an available game server in the specified game server group.

claimGameServer_gameServerGroupName :: Lens' ClaimGameServer Text Source #

A unique identifier for the game server group where the game server is running. Use either the GameServerGroup name or ARN value. If you are not specifying a game server to claim, this value identifies where you want GameLift FleetIQ to look for an available game server to claim.

Destructuring the Response

data ClaimGameServerResponse Source #

See: newClaimGameServerResponse smart constructor.

Constructors

ClaimGameServerResponse' 

Fields

Instances

Instances details
Eq ClaimGameServerResponse Source # 
Instance details

Defined in Amazonka.GameLift.ClaimGameServer

Read ClaimGameServerResponse Source # 
Instance details

Defined in Amazonka.GameLift.ClaimGameServer

Show ClaimGameServerResponse Source # 
Instance details

Defined in Amazonka.GameLift.ClaimGameServer

Generic ClaimGameServerResponse Source # 
Instance details

Defined in Amazonka.GameLift.ClaimGameServer

Associated Types

type Rep ClaimGameServerResponse :: Type -> Type #

NFData ClaimGameServerResponse Source # 
Instance details

Defined in Amazonka.GameLift.ClaimGameServer

Methods

rnf :: ClaimGameServerResponse -> () #

type Rep ClaimGameServerResponse Source # 
Instance details

Defined in Amazonka.GameLift.ClaimGameServer

type Rep ClaimGameServerResponse = D1 ('MetaData "ClaimGameServerResponse" "Amazonka.GameLift.ClaimGameServer" "libZSservicesZSamazonka-gameliftZSamazonka-gamelift" 'False) (C1 ('MetaCons "ClaimGameServerResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "gameServer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe GameServer)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newClaimGameServerResponse Source #

Create a value of ClaimGameServerResponse 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:gameServer:ClaimGameServerResponse', claimGameServerResponse_gameServer - Object that describes the newly claimed game server.

$sel:httpStatus:ClaimGameServerResponse', claimGameServerResponse_httpStatus - The response's http status code.

Response Lenses

claimGameServerResponse_gameServer :: Lens' ClaimGameServerResponse (Maybe GameServer) Source #

Object that describes the newly claimed game server.