@SdkInternalApi
    final CreateSnapshotResult executeCreateSnapshot(CreateSnapshotRequest createSnapshotRequest) {

        ExecutionContext executionContext = createExecutionContext(createSnapshotRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<CreateSnapshotRequest> request = null;
        Response<CreateSnapshotResult> response = null;

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

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

            StaxResponseHandler<CreateSnapshotResult> responseHandler = new StaxResponseHandler<CreateSnapshotResult>(
                    new CreateSnapshotResultStaxUnmarshaller());

            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use snapshots for backups, to make copies
of EBS volumes, and to save data before shutting down an instance.
</p>
<p>
You can create snapshots of volumes in a Region and volumes on an Outpost. If you create a snapshot of a volume
in a Region, the snapshot must be stored in the same Region as the volume. If you create a snapshot of a volume
on an Outpost, the snapshot can be stored on the same Outpost as the volume, or in the Region for that Outpost.
</p>
<p>
When a snapshot is created, any Amazon Web Services Marketplace product codes that are associated with the source
volume are propagated to the snapshot.
</p>
<p>
You can take a snapshot of an attached volume that is in use. However, snapshots only capture data that has been
written to your Amazon EBS volume at the time the snapshot command is issued; this might exclude any data that
has been cached by any applications or the operating system. If you can pause any file systems on the volume long
enough to take a snapshot, your snapshot should be complete. However, if you cannot pause all file writes to the
volume, you should unmount the volume from within the instance, issue the snapshot command, and then remount the
volume to ensure a consistent and complete snapshot. You may remount and use your volume while the snapshot
status is <code>pending</code>.
</p>
<p>
When you create a snapshot for an EBS volume that serves as a root device, we recommend that you stop the
instance before taking the snapshot.
</p>
<p>
Snapshots that are taken from encrypted volumes are automatically encrypted. Volumes that are created from
encrypted snapshots are also automatically encrypted. Your encrypted volumes and any associated snapshots always
remain protected.
</p>
<p>
You can tag your snapshots during creation. For more information, see <a
href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tag your Amazon EC2 resources</a> in
the <i>Amazon EC2 User Guide</i>.
</p>
<p>
For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/what-is-ebs.html">Amazon
EBS</a> and <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-encryption.html">Amazon EBS
encryption</a> in the <i>Amazon EBS User Guide</i>.
</p>

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