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 |
__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
Related actions
RegisterGameServer | ListGameServers | ClaimGameServer | DescribeGameServer | UpdateGameServer | DeregisterGameServer | All APIs by task
Synopsis
- data ClaimGameServer = ClaimGameServer' {}
- newClaimGameServer :: Text -> ClaimGameServer
- claimGameServer_gameServerData :: Lens' ClaimGameServer (Maybe Text)
- claimGameServer_gameServerId :: Lens' ClaimGameServer (Maybe Text)
- claimGameServer_gameServerGroupName :: Lens' ClaimGameServer Text
- data ClaimGameServerResponse = ClaimGameServerResponse' {}
- newClaimGameServerResponse :: Int -> ClaimGameServerResponse
- claimGameServerResponse_gameServer :: Lens' ClaimGameServerResponse (Maybe GameServer)
- claimGameServerResponse_httpStatus :: Lens' ClaimGameServerResponse Int
Creating a Request
data ClaimGameServer Source #
See: newClaimGameServer
smart constructor.
ClaimGameServer' | |
|
Instances
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.
ClaimGameServerResponse' | |
|
Instances
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.
claimGameServerResponse_httpStatus :: Lens' ClaimGameServerResponse Int Source #
The response's http status code.