@SdkInternalApi
    final UpdateGameSessionResult executeUpdateGameSession(UpdateGameSessionRequest updateGameSessionRequest) {

        ExecutionContext executionContext = createExecutionContext(updateGameSessionRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<UpdateGameSessionRequest> request = null;
        Response<UpdateGameSessionResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new UpdateGameSessionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateGameSessionRequest));
                // 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, "UpdateGameSession");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

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

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Updates the mutable properties of a game session.
</p>
<p>
To update a game session, specify the game session ID and the values you want to change.
</p>
<p>
If successful, the updated <code>GameSession</code> object is returned.
</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 updateGameSessionRequest
@return Result of the UpdateGameSession operation returned by the service.
@throws NotFoundException
        THe requested resources was not found. The resource was either not created yet or deleted.
@throws ConflictException
        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.</p>
@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 InvalidRequestException
        One or more parameter values in the request are invalid. Correct the invalid parameter values before
        retrying.
@sample AmazonGameLift.UpdateGameSession
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateGameSession" target="_top">AWS API
     Documentation</a>
aws-java-sdk-gamelift/src/main/java/com/amazonaws/services/gamelift/AmazonGameLiftClient.java