@SdkInternalApi
    final ModifyVolumeResult executeModifyVolume(ModifyVolumeRequest modifyVolumeRequest) {

        ExecutionContext executionContext = createExecutionContext(modifyVolumeRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<ModifyVolumeRequest> request = null;
        Response<ModifyVolumeResult> response = null;

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

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

            StaxResponseHandler<ModifyVolumeResult> responseHandler = new StaxResponseHandler<ModifyVolumeResult>(new ModifyVolumeResultStaxUnmarshaller());

            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
You can modify several parameters of an existing EBS volume, including volume size, volume type, and IOPS
capacity. If your EBS volume is attached to a current-generation EC2 instance type, you might be able to apply
these changes without stopping the instance or detaching the volume from it. For more information about modifying
EBS volumes, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-modify-volume.html">Amazon EBS
Elastic Volumes</a> in the <i>Amazon EBS User Guide</i>.
</p>
<p>
When you complete a resize operation on your volume, you need to extend the volume's file-system size to take
advantage of the new storage capacity. For more information, see <a
href="https://docs.aws.amazon.com/ebs/latest/userguide/recognize-expanded-volume-linux.html">Extend the file
system</a>.
</p>
<p>
For more information, see <a
href="https://docs.aws.amazon.com/ebs/latest/userguide/monitoring-volume-modifications.html">Monitor the progress
of volume modifications</a> in the <i>Amazon EBS User Guide</i>.
</p>
<p>
With previous-generation instance types, resizing an EBS volume might require detaching and reattaching the
volume or stopping and restarting the instance.
</p>
<p>
After modifying a volume, you must wait at least six hours and ensure that the volume is in the
<code>in-use</code> or <code>available</code> state before you can modify the same volume. This is sometimes
referred to as a cooldown period.
</p>

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