Amazon.GameLift.AmazonGameLiftClient.CreateGameSession C# (CSharp) 메소드

CreateGameSession() 공개 메소드

Creates a multiplayer game session for players. This action creates a game session record and assigns an available server process in the specified fleet to host the game session. A fleet must be in an ACTIVE status before a game session can be created in it.

To create a game session, specify either fleet ID or alias ID, and indicate a maximum number of players to allow in the game session. You can also provide a name and game-specific properties for this game session. If successful, a GameSession object is returned containing session properties, including an IP address. By default, newly created game sessions allow new players to join. Use UpdateGameSession to change the game sessions player session creation policy.

When creating a game session on a fleet with a resource limit creation policy, the request should include a creator ID. If none is provided, GameLift does not evaluate the fleet's resource limit creation policy.

/// The requested operation would cause a conflict with the current state of a service /// resource associated with the request. Resolve the conflict before retrying this request. /// /// The specified fleet has no available instances to fulfill a CreateGameSession /// request. Clients can retry such requests immediately or after a waiting period. /// /// A game session with this custom ID string already exists in this fleet. Resolve this /// conflict before retrying this request. /// /// 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 fleet. Resolve the conflict before retrying. /// /// One or more parameter values in the request are invalid. Correct the invalid parameter /// values before retrying. /// /// The requested operation would cause the resource to exceed the allowed service limit. /// Resolve the issue 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 CreateGameSession ( CreateGameSessionRequest request ) : Amazon.GameLift.Model.CreateGameSessionResponse
request Amazon.GameLift.Model.CreateGameSessionRequest Container for the necessary parameters to execute the CreateGameSession service method.
리턴 Amazon.GameLift.Model.CreateGameSessionResponse
        public CreateGameSessionResponse CreateGameSession(CreateGameSessionRequest request)
        {
            var marshaller = new CreateGameSessionRequestMarshaller();
            var unmarshaller = CreateGameSessionResponseUnmarshaller.Instance;

            return Invoke<CreateGameSessionRequest,CreateGameSessionResponse>(request, marshaller, unmarshaller);
        }
AmazonGameLiftClient