@SdkInternalApi
    final PurchaseScheduledInstancesResult executePurchaseScheduledInstances(PurchaseScheduledInstancesRequest purchaseScheduledInstancesRequest) {

        ExecutionContext executionContext = createExecutionContext(purchaseScheduledInstancesRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<PurchaseScheduledInstancesRequest> request = null;
        Response<PurchaseScheduledInstancesResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new PurchaseScheduledInstancesRequestMarshaller().marshall(super.beforeMarshalling(purchaseScheduledInstancesRequest));
                // 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, "EC2");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PurchaseScheduledInstances");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

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

            StaxResponseHandler<PurchaseScheduledInstancesResult> responseHandler = new StaxResponseHandler<PurchaseScheduledInstancesResult>(
                    new PurchaseScheduledInstancesResultStaxUnmarshaller());

            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<note>
<p>
You can no longer purchase Scheduled Instances.
</p>
</note>
<p>
Purchases the Scheduled Instances with the specified schedule.
</p>
<p>
Scheduled Instances enable you to purchase Amazon EC2 compute capacity by the hour for a one-year term. Before
you can purchase a Scheduled Instance, you must call <a>DescribeScheduledInstanceAvailability</a> to check for
available schedules and obtain a purchase token. After you purchase a Scheduled Instance, you must call
<a>RunScheduledInstances</a> during each scheduled time period.
</p>
<p>
After you purchase a Scheduled Instance, you can't cancel, modify, or resell your purchase.
</p>

@param purchaseScheduledInstancesRequest
       Contains the parameters for PurchaseScheduledInstances.
@return Result of the PurchaseScheduledInstances operation returned by the service.
@sample AmazonEC2.PurchaseScheduledInstances
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/PurchaseScheduledInstances" target="_top">AWS
     API Documentation</a>
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/AmazonEC2Client.java