@SdkInternalApi
    final UpdateScriptResult executeUpdateScript(UpdateScriptRequest updateScriptRequest) {

        ExecutionContext executionContext = createExecutionContext(updateScriptRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<UpdateScriptRequest> request = null;
        Response<UpdateScriptResult> response = null;

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

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

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

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Updates Realtime script metadata and content.
</p>
<p>
To update script metadata, specify the script ID and provide updated name and/or version values.
</p>
<p>
To update script content, provide an updated zip file by pointing to either a local file or an Amazon S3 bucket
location. You can use either method regardless of how the original script was uploaded. Use the <i>Version</i>
parameter to track updates to the script.
</p>
<p>
If the call is successful, the updated metadata is stored in the script record and a revised script is uploaded
to the Amazon GameLift service. Once the script is updated and acquired by a fleet instance, the new version is
used for all new game sessions.
</p>
<p>
<b>Learn more</b>
</p>
<p>
<a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-intro.html">Amazon GameLift Realtime
Servers</a>
</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 updateScriptRequest
@return Result of the UpdateScript operation returned by the service.
@throws UnauthorizedException
        The client failed authentication. Clients should not retry such requests.
@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.
@throws InternalServiceException
        The service encountered an unrecoverable internal failure while processing the request. Clients can retry
        such requests immediately or after a waiting period.
@sample AmazonGameLift.UpdateScript
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/UpdateScript" target="_top">AWS API
     Documentation</a>
aws-java-sdk-gamelift/src/main/java/com/amazonaws/services/gamelift/AmazonGameLiftClient.java