AWS Tools for Windows PowerShell
Command Reference

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.

Synopsis

Calls the Amazon GameLift Service StartGameSessionPlacement API operation.

Syntax

Start-GMLGameSessionPlacement
-GameSessionName <String>
-DesiredPlayerSession <DesiredPlayerSession[]>
-GameProperty <GameProperty[]>
-GameSessionData <String>
-GameSessionQueueName <String>
-PriorityConfigurationOverride_LocationOrder <String[]>
-MaximumPlayerSessionCount <Int32>
-PriorityConfigurationOverride_PlacementFallbackStrategy <PlacementFallbackStrategy>
-PlacementId <String>
-PlayerLatency <PlayerLatency[]>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>
-ClientConfig <AmazonGameLiftConfig>

Description

Makes a request to start a new game session using a game session queue. When processing a placement request, Amazon GameLift looks for the best possible available resource to host the game session, based on how the queue is configured to prioritize factors such as resource cost, latency, and location. After selecting an available resource, Amazon GameLift prompts the resource to start a game session. A placement request can include a list of players to create a set of player sessions. The request can also include information to pass to the new game session, such as to specify a game map or other options. Request options Use this operation to make the following types of requests.
  • Request a placement using the queue's default prioritization process (see the default prioritization described in PriorityConfiguration). Include these required parameters:
    • GameSessionQueueName
    • MaximumPlayerSessionCount
    • PlacementID
  • Request a placement and prioritize based on latency. Include these parameters:
    • Required parameters GameSessionQueueName, MaximumPlayerSessionCount, PlacementID.
    • PlayerLatencies. Include a set of latency values for destinations in the queue. When a request includes latency data, Amazon GameLift automatically reorder the queue's locations priority list based on lowest available latency values. If a request includes latency data 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 PriorityConfigurationOverride.
    • 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), you can optionally use the PriorityConfigurationOverride parameter to substitute a different location priority list for this placement request. Amazon GameLift searches each location on the priority override list to find an available hosting resource for the new game session. Specify a fallback strategy to use in the event that Amazon GameLift fails to place the game session in any of the locations on the override list.
  • Request a placement and prioritized based on a custom list of locations.
  • 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 operation generates a new game session placement request and adds it to the game session queue for processing. You can track the status of individual placement requests by calling DescribeGameSessionPlacement or by monitoring queue notifications. When the request status is FULFILLED, a new game session has started and the placement request is updated with connection information for the game session (IP address and port). If the request included player session data, Amazon GameLift creates a player session for each player ID in the request. The request results in a InvalidRequestException in the following situations:
  • If the request includes both PlayerLatencies and PriorityConfigurationOverride parameters.
  • If the request includes the PriorityConfigurationOverride parameter and specifies a queue that 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.

Parameters

-ClientConfig <AmazonGameLiftConfig>
Amazon.PowerShell.Cmdlets.GML.AmazonGameLiftClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-DesiredPlayerSession <DesiredPlayerSession[]>
Set of information on each player to create a player session for.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesDesiredPlayerSessions
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-GameProperty <GameProperty[]>
A set of key-value pairs that can store custom data in a game session. For example: {"Key": "difficulty", "Value": "novice"}.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesGameProperties
-GameSessionData <String>
A set of custom game session properties, formatted as a single string value. This data is passed to a game server process with a request to start a new game session. For more information, see Start a game session.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-GameSessionName <String>
A descriptive label that is associated with a game session. Session names do not need to be unique.
Required?False
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-GameSessionQueueName <String>
Name of the queue to use to place the new game session. You can use either the queue name or ARN value.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-MaximumPlayerSessionCount <Int32>
The maximum number of players that can be connected simultaneously to the game session.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the GameSessionName parameter. The -PassThru parameter is deprecated, use -Select '^GameSessionName' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PlacementId <String>
A unique identifier to assign to the new game session placement. This value is developer-defined. The value must be unique across all Regions and cannot be reused.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-PlayerLatency <PlayerLatency[]>
A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to Amazon Web Services Regions. This information is used to try to place the new game session where it can offer the best possible gameplay experience for the players.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPlayerLatencies
-PriorityConfigurationOverride_LocationOrder <String[]>
A prioritized list of hosting locations. The list can include Amazon Web Services Regions (such as us-west-2), local zones, and custom locations (for Anywhere fleets). Each location must be listed only once. For details, see Amazon GameLift service locations.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PriorityConfigurationOverride_PlacementFallbackStrategy <PlacementFallbackStrategy>
Instructions for how to proceed if placement fails in every location on the priority override list. Valid strategies include:
  • DEFAULT_AFTER_SINGLE_PASS -- After attempting to place a new game session in every location on the priority override list, try to place a game session in queue's other locations. This is the default behavior.
  • NONE -- Limit placements to locations on the priority override list only.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is 'GameSessionPlacement'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.GameLift.Model.StartGameSessionPlacementResponse). Specifying the name of a property of type Amazon.GameLift.Model.StartGameSessionPlacementResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns an Amazon.GameLift.Model.GameSessionPlacement object. The service call response (type Amazon.GameLift.Model.StartGameSessionPlacementResponse) can be returned by specifying '-Select *'.

Supported Version

AWS Tools for PowerShell: 2.x.y.z