@SdkInternalApi
    final CreateDiskSnapshotResult executeCreateDiskSnapshot(CreateDiskSnapshotRequest createDiskSnapshotRequest) {

        ExecutionContext executionContext = createExecutionContext(createDiskSnapshotRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<CreateDiskSnapshotRequest> request = null;
        Response<CreateDiskSnapshotResult> response = null;

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

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

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

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Creates a snapshot of a block storage disk. You can use snapshots for backups, to make copies of disks, and to
save data before shutting down a Lightsail instance.
</p>
<p>
You can take a snapshot of an attached disk that is in use; however, snapshots only capture data that has been
written to your disk at the time the snapshot command is issued. This may exclude any data that has been cached
by any applications or the operating system. If you can pause any file systems on the disk long enough to take a
snapshot, your snapshot should be complete. Nevertheless, if you cannot pause all file writes to the disk, you
should unmount the disk from within the Lightsail instance, issue the create disk snapshot command, and then
remount the disk to ensure a consistent and complete snapshot. You may remount and use your disk while the
snapshot status is pending.
</p>
<p>
You can also use this operation to create a snapshot of an instance's system volume. You might want to do this,
for example, to recover data from the system volume of a botched instance or to create a backup of the system
volume like you would for a block storage disk. To create a snapshot of a system volume, just define the
<code>instance name</code> parameter when issuing the snapshot command, and a snapshot of the defined instance's
system volume will be created. After the snapshot is available, you can create a block storage disk from the
snapshot and attach it to a running instance to access the data on the disk.
</p>
<p>
The <code>create disk snapshot</code> operation supports tag-based access control via request tags. For more
information, see the <a
href="https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags"
>Amazon Lightsail Developer Guide</a>.
</p>

@param createDiskSnapshotRequest
@return Result of the CreateDiskSnapshot operation returned by the service.
@throws ServiceException
        A general service exception.
@throws InvalidInputException
        Lightsail throws this exception when user input does not conform to the validation rules of an input
        field.</p> <note>
        <p>
        Domain and distribution APIs are only available in the N. Virginia (<code>us-east-1</code>) Amazon Web
        Services Region. Please set your Amazon Web Services Region configuration to <code>us-east-1</code> to
        create, view, or edit these resources.
        </p>
@throws NotFoundException
        Lightsail throws this exception when it cannot find a resource.
@throws OperationFailureException
        Lightsail throws this exception when an operation fails to execute.
@throws AccessDeniedException
        Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
        access a resource.
@throws AccountSetupInProgressException
        Lightsail throws this exception when an account is still in the setup in progress state.
@throws UnauthenticatedException
        Lightsail throws this exception when the user has not been authenticated.
@sample AmazonLightsail.CreateDiskSnapshot
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateDiskSnapshot" target="_top">AWS
     API Documentation</a>
aws-java-sdk-lightsail/src/main/java/com/amazonaws/services/lightsail/AmazonLightsailClient.java