Amazon.GameLift.AmazonGameLiftClient.CreatePlayerSession C# (CSharp) Метод

CreatePlayerSession() публичный Метод

Adds a player to a game session and creates a player session record. A game session must be in an ACTIVE status, have a creation policy of ALLOW_ALL, and have an open player slot before players can be added to the session.

To create a player session, specify a game session ID and player ID. If successful, the player is added to the game session and a new PlayerSession object is returned.

/// The game instance is currently full and cannot allow the requested player(s) to join. /// Clients can retry such requests immediately or after a waiting period. /// /// The service encountered an unrecoverable internal failure while processing the request. /// Clients can retry such requests immediately or after a waiting period. /// /// The requested operation would cause a conflict with the current state of a resource /// associated with the request and/or the game instance. Resolve the conflict before /// retrying. /// /// One or more parameter values in the request are invalid. Correct the invalid parameter /// values before retrying. /// /// A service resource associated with the request could not be found. Clients should /// not retry such requests. /// /// The service is unable to resolve the routing for a particular alias because it has /// a terminal RoutingStrategy associated with it. The message returned in this /// exception is the message defined in the routing strategy itself. Such requests should /// only be retried if the routing strategy for the specified alias is modified. /// /// The client failed authentication. Clients should not retry such requests. ///
public CreatePlayerSession ( string gameSessionId, string playerId ) : Amazon.GameLift.Model.CreatePlayerSessionResponse
gameSessionId string Unique identifier for the game session to add a player to. Game session ID format is as follows: "arn:aws:gamelift:<region>::gamesession/fleet-<fleet ID>/<ID string>". The value of <ID string> is either a custom ID string (if one was specified when the game session was created) an autogenerated string.
playerId string Unique identifier for the player to be added.
Результат Amazon.GameLift.Model.CreatePlayerSessionResponse
        public CreatePlayerSessionResponse CreatePlayerSession(string gameSessionId, string playerId)
        {
            var request = new CreatePlayerSessionRequest();
            request.GameSessionId = gameSessionId;
            request.PlayerId = playerId;
            return CreatePlayerSession(request);
        }

Same methods

AmazonGameLiftClient::CreatePlayerSession ( CreatePlayerSessionRequest request ) : Amazon.GameLift.Model.CreatePlayerSessionResponse
AmazonGameLiftClient