@SdkInternalApi
    final CreatePlayerSessionResult executeCreatePlayerSession(CreatePlayerSessionRequest createPlayerSessionRequest) {

        ExecutionContext executionContext = createExecutionContext(createPlayerSessionRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<CreatePlayerSessionRequest> request = null;
        Response<CreatePlayerSessionResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new CreatePlayerSessionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createPlayerSessionRequest));
                // Binds the request metrics to the current request.
                request.setAWSRequestMetrics(awsRequestMetrics);
                request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
                request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
                request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
                request.addHandlerContext(HandlerContextKey.SERVICE_ID, "GameLift");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreatePlayerSession");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

            } finally {
                awsRequestMetrics.endEvent(Field.RequestMarshallTime);
            }

            HttpResponseHandler<AmazonWebServiceResponse<CreatePlayerSessionResult>> responseHandler = protocolFactory.createResponseHandler(
                    new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreatePlayerSessionResultJsonUnmarshaller());
            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Reserves an open player slot in a game session for a player. New player sessions can be created in any game
session with an open slot that is in <code>ACTIVE</code> status and has a player creation policy of
<code>ACCEPT_ALL</code>. You can add a group of players to a game session with <a
href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreatePlayerSessions.html"
>CreatePlayerSessions</a> .
</p>
<p>
To create a player session, specify a game session ID, player ID, and optionally a set of player data.
</p>
<p>
If successful, a slot is reserved in the game session for the player and a new <code>PlayerSessions</code> object
is returned with a player session ID. The player references the player session ID when sending a connection
request to the game session, and the game server can use it to validate the player reservation with the Amazon
GameLift service. Player sessions cannot be updated.
</p>
<p>
The maximum number of players per game session is 200. It is not adjustable.
</p>
<p>
<b>Related actions</b>
</p>
<p>
<a href=
"https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets"
>All APIs by task</a>
</p>

@param createPlayerSessionRequest
@return Result of the CreatePlayerSession operation returned by the service.
@throws InternalServiceException
        The service encountered an unrecoverable internal failure while processing the request. Clients can retry
        such requests immediately or after a waiting period.
@throws UnauthorizedException
        The client failed authentication. Clients should not retry such requests.
@throws InvalidGameSessionStatusException
        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.
@throws GameSessionFullException
        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.
@throws TerminalRoutingStrategyException
        The service is unable to resolve the routing for a particular alias because it has a terminal
        <code>RoutingStrategy</code> 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.
@throws InvalidRequestException
        One or more parameter values in the request are invalid. Correct the invalid parameter values before
        retrying.
@throws NotFoundException
        THe requested resources was not found. The resource was either not created yet or deleted.
@sample AmazonGameLift.CreatePlayerSession
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreatePlayerSession" target="_top">AWS
     API Documentation</a>
aws-java-sdk-gamelift/src/main/java/com/amazonaws/services/gamelift/AmazonGameLiftClient.java