AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Makes a request to start a new game session using a game session queue. When processing a placement request in a queue, Amazon GameLift finds the best possible available resource to host the game session and prompts the resource to start the game session.
Request options
Call this API with the following minimum parameters: GameSessionQueueName, MaximumPlayerSessionCount, and PlacementID. You can also include game session data (data formatted as strings) or game properties (data formatted as key-value pairs) to pass to the new game session.
You can change how Amazon GameLift chooses a hosting resource for the new game session. Prioritizing resources for game session placements is defined when you configure a game session queue. You can use the default prioritization process or specify a custom process by providing a PriorityConfiguration when you create or update a queue.
Prioritize based on resource cost and location, using the queue's configured priority settings. Call this API with the minimum parameters.
Prioritize based on latency. Include a set of values for PlayerLatencies. You can provide latency data with or without player session data. This option instructs Amazon GameLift to reorder the queue's prioritized locations list based on the latency data. If latency data is provided for multiple players, Amazon GameLift calculates each location's average latency for all players and reorders to find the lowest latency across all players. Don't include latency data if you're providing a custom list of locations.
Prioritize based on a custom list of locations. If you're using a queue that's configured to prioritize location first (see PriorityConfiguration for game session queues), use the PriorityConfigurationOverride parameter to substitute a different location list for this placement request. When prioritizing placements by location, Amazon GameLift searches each location in prioritized order to find an available hosting resource for the new game session. You can choose whether to use the override list for the first placement attempt only or for all attempts.
You can request new player sessions for a group of players. Include the DesiredPlayerSessions parameter and include at minimum a unique player ID for each. You can also include player-specific data to pass to the new game session.
Result
If successful, this request generates a new game session placement request and adds
it to the game session queue for Amazon GameLift to process in turn. You can track
the status of individual placement requests by calling DescribeGameSessionPlacement.
A new game session is running if the status is FULFILLED
and the request returns
the game session connection information (IP address and port). If you include player
session data, Amazon GameLift creates a player session for each player ID in the request.
The request results in a BadRequestException
in the following situations:
If the request includes both PlayerLatencies and PriorityConfigurationOverride parameters.
If the request includes the PriorityConfigurationOverride parameter and designates a queue doesn't prioritize locations.
Amazon GameLift continues to retry each placement request until it reaches the queue's timeout setting. If a request times out, you can resubmit the request to the same queue or try a different queue.
For .NET Core this operation is only available in asynchronous form. Please refer to StartGameSessionPlacementAsync.
Namespace: Amazon.GameLift
Assembly: AWSSDK.GameLift.dll
Version: 3.x.y.z
public virtual StartGameSessionPlacementResponse StartGameSessionPlacement( StartGameSessionPlacementRequest request )
Container for the necessary parameters to execute the StartGameSessionPlacement service method.
Exception | Condition |
---|---|
InternalServiceException | The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period. |
InvalidRequestException | One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying. |
NotFoundException | The requested resources was not found. The resource was either not created yet or deleted. |
UnauthorizedException | The client failed authentication. Clients should not retry such requests. |
UnsupportedRegionException | The requested operation is not supported in the Region specified. |
.NET Framework:
Supported in: 4.5 and newer, 3.5