
software.amazon.awssdk.services.backupstorage.BackupStorageAsyncClient Maven / Gradle / Ivy
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.backupstorage;
import java.nio.file.Path;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.annotations.ThreadSafe;
import software.amazon.awssdk.core.SdkClient;
import software.amazon.awssdk.core.async.AsyncRequestBody;
import software.amazon.awssdk.core.async.AsyncResponseTransformer;
import software.amazon.awssdk.services.backupstorage.model.DeleteObjectRequest;
import software.amazon.awssdk.services.backupstorage.model.DeleteObjectResponse;
import software.amazon.awssdk.services.backupstorage.model.GetChunkRequest;
import software.amazon.awssdk.services.backupstorage.model.GetChunkResponse;
import software.amazon.awssdk.services.backupstorage.model.GetObjectMetadataRequest;
import software.amazon.awssdk.services.backupstorage.model.GetObjectMetadataResponse;
import software.amazon.awssdk.services.backupstorage.model.ListChunksRequest;
import software.amazon.awssdk.services.backupstorage.model.ListChunksResponse;
import software.amazon.awssdk.services.backupstorage.model.ListObjectsRequest;
import software.amazon.awssdk.services.backupstorage.model.ListObjectsResponse;
import software.amazon.awssdk.services.backupstorage.model.NotifyObjectCompleteRequest;
import software.amazon.awssdk.services.backupstorage.model.NotifyObjectCompleteResponse;
import software.amazon.awssdk.services.backupstorage.model.PutChunkRequest;
import software.amazon.awssdk.services.backupstorage.model.PutChunkResponse;
import software.amazon.awssdk.services.backupstorage.model.PutObjectRequest;
import software.amazon.awssdk.services.backupstorage.model.PutObjectResponse;
import software.amazon.awssdk.services.backupstorage.model.StartObjectRequest;
import software.amazon.awssdk.services.backupstorage.model.StartObjectResponse;
import software.amazon.awssdk.services.backupstorage.paginators.ListChunksPublisher;
import software.amazon.awssdk.services.backupstorage.paginators.ListObjectsPublisher;
/**
* Service client for accessing AWS Backup Storage asynchronously. This can be created using the static
* {@link #builder()} method.
*
* The frontend service for Cryo Storage.
*/
@Generated("software.amazon.awssdk:codegen")
@SdkPublicApi
@ThreadSafe
public interface BackupStorageAsyncClient extends SdkClient {
String SERVICE_NAME = "backup-storage";
/**
* Value for looking up the service's metadata from the
* {@link software.amazon.awssdk.regions.ServiceMetadataProvider}.
*/
String SERVICE_METADATA_ID = "backupstorage";
/**
* Delete Object from the incremental base Backup.
*
* @param deleteObjectRequest
* @return A Java Future containing the result of the DeleteObject operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.DeleteObject
* @see AWS
* API Documentation
*/
default CompletableFuture deleteObject(DeleteObjectRequest deleteObjectRequest) {
throw new UnsupportedOperationException();
}
/**
* Delete Object from the incremental base Backup.
*
* This is a convenience which creates an instance of the {@link DeleteObjectRequest.Builder} avoiding the need to
* create one manually via {@link DeleteObjectRequest#builder()}
*
*
* @param deleteObjectRequest
* A {@link Consumer} that will call methods on {@link DeleteObjectInput.Builder} to create a request.
* @return A Java Future containing the result of the DeleteObject operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.DeleteObject
* @see AWS
* API Documentation
*/
default CompletableFuture deleteObject(Consumer deleteObjectRequest) {
return deleteObject(DeleteObjectRequest.builder().applyMutation(deleteObjectRequest).build());
}
/**
* Gets the specified object's chunk.
*
* @param getChunkRequest
* @param asyncResponseTransformer
* The response transformer for processing the streaming response in a non-blocking manner. See
* {@link AsyncResponseTransformer} for details on how this callback should be implemented and for links to
* precanned implementations for common scenarios like downloading to a file. The service documentation for
* the response content is as follows 'Chunk data'.
* @return A future to the transformed result of the AsyncResponseTransformer.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - ServiceInternalException Deprecated. To be removed from the model.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.GetChunk
* @see AWS API
* Documentation
*/
default CompletableFuture getChunk(GetChunkRequest getChunkRequest,
AsyncResponseTransformer asyncResponseTransformer) {
throw new UnsupportedOperationException();
}
/**
* Gets the specified object's chunk.
*
* This is a convenience which creates an instance of the {@link GetChunkRequest.Builder} avoiding the need to
* create one manually via {@link GetChunkRequest#builder()}
*
*
* @param getChunkRequest
* A {@link Consumer} that will call methods on {@link GetChunkInput.Builder} to create a request.
* @param asyncResponseTransformer
* The response transformer for processing the streaming response in a non-blocking manner. See
* {@link AsyncResponseTransformer} for details on how this callback should be implemented and for links to
* precanned implementations for common scenarios like downloading to a file. The service documentation for
* the response content is as follows 'Chunk data'.
* @return A future to the transformed result of the AsyncResponseTransformer.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - ServiceInternalException Deprecated. To be removed from the model.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.GetChunk
* @see AWS API
* Documentation
*/
default CompletableFuture getChunk(Consumer getChunkRequest,
AsyncResponseTransformer asyncResponseTransformer) {
return getChunk(GetChunkRequest.builder().applyMutation(getChunkRequest).build(), asyncResponseTransformer);
}
/**
* Gets the specified object's chunk.
*
* @param getChunkRequest
* @param destinationPath
* {@link Path} to file that response contents will be written to. The file must not exist or this method
* will throw an exception. If the file is not writable by the current user then an exception will be thrown.
* The service documentation for the response content is as follows 'Chunk data'.
* @return A future to the transformed result of the AsyncResponseTransformer.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - ServiceInternalException Deprecated. To be removed from the model.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.GetChunk
* @see AWS API
* Documentation
*/
default CompletableFuture getChunk(GetChunkRequest getChunkRequest, Path destinationPath) {
return getChunk(getChunkRequest, AsyncResponseTransformer.toFile(destinationPath));
}
/**
* Gets the specified object's chunk.
*
* This is a convenience which creates an instance of the {@link GetChunkRequest.Builder} avoiding the need to
* create one manually via {@link GetChunkRequest#builder()}
*
*
* @param getChunkRequest
* A {@link Consumer} that will call methods on {@link GetChunkInput.Builder} to create a request.
* @param destinationPath
* {@link Path} to file that response contents will be written to. The file must not exist or this method
* will throw an exception. If the file is not writable by the current user then an exception will be thrown.
* The service documentation for the response content is as follows 'Chunk data'.
* @return A future to the transformed result of the AsyncResponseTransformer.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - ServiceInternalException Deprecated. To be removed from the model.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.GetChunk
* @see AWS API
* Documentation
*/
default CompletableFuture getChunk(Consumer getChunkRequest, Path destinationPath) {
return getChunk(GetChunkRequest.builder().applyMutation(getChunkRequest).build(), destinationPath);
}
/**
* Get metadata associated with an Object.
*
* @param getObjectMetadataRequest
* @param asyncResponseTransformer
* The response transformer for processing the streaming response in a non-blocking manner. See
* {@link AsyncResponseTransformer} for details on how this callback should be implemented and for links to
* precanned implementations for common scenarios like downloading to a file. The service documentation for
* the response content is as follows 'Metadata blob.'.
* @return A future to the transformed result of the AsyncResponseTransformer.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.GetObjectMetadata
* @see AWS API Documentation
*/
default CompletableFuture getObjectMetadata(GetObjectMetadataRequest getObjectMetadataRequest,
AsyncResponseTransformer asyncResponseTransformer) {
throw new UnsupportedOperationException();
}
/**
* Get metadata associated with an Object.
*
* This is a convenience which creates an instance of the {@link GetObjectMetadataRequest.Builder} avoiding the need
* to create one manually via {@link GetObjectMetadataRequest#builder()}
*
*
* @param getObjectMetadataRequest
* A {@link Consumer} that will call methods on {@link GetObjectMetadataInput.Builder} to create a request.
* @param asyncResponseTransformer
* The response transformer for processing the streaming response in a non-blocking manner. See
* {@link AsyncResponseTransformer} for details on how this callback should be implemented and for links to
* precanned implementations for common scenarios like downloading to a file. The service documentation for
* the response content is as follows 'Metadata blob.'.
* @return A future to the transformed result of the AsyncResponseTransformer.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.GetObjectMetadata
* @see AWS API Documentation
*/
default CompletableFuture getObjectMetadata(
Consumer getObjectMetadataRequest,
AsyncResponseTransformer asyncResponseTransformer) {
return getObjectMetadata(GetObjectMetadataRequest.builder().applyMutation(getObjectMetadataRequest).build(),
asyncResponseTransformer);
}
/**
* Get metadata associated with an Object.
*
* @param getObjectMetadataRequest
* @param destinationPath
* {@link Path} to file that response contents will be written to. The file must not exist or this method
* will throw an exception. If the file is not writable by the current user then an exception will be thrown.
* The service documentation for the response content is as follows 'Metadata blob.'.
* @return A future to the transformed result of the AsyncResponseTransformer.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.GetObjectMetadata
* @see AWS API Documentation
*/
default CompletableFuture getObjectMetadata(GetObjectMetadataRequest getObjectMetadataRequest,
Path destinationPath) {
return getObjectMetadata(getObjectMetadataRequest, AsyncResponseTransformer.toFile(destinationPath));
}
/**
* Get metadata associated with an Object.
*
* This is a convenience which creates an instance of the {@link GetObjectMetadataRequest.Builder} avoiding the need
* to create one manually via {@link GetObjectMetadataRequest#builder()}
*
*
* @param getObjectMetadataRequest
* A {@link Consumer} that will call methods on {@link GetObjectMetadataInput.Builder} to create a request.
* @param destinationPath
* {@link Path} to file that response contents will be written to. The file must not exist or this method
* will throw an exception. If the file is not writable by the current user then an exception will be thrown.
* The service documentation for the response content is as follows 'Metadata blob.'.
* @return A future to the transformed result of the AsyncResponseTransformer.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.GetObjectMetadata
* @see AWS API Documentation
*/
default CompletableFuture getObjectMetadata(
Consumer getObjectMetadataRequest, Path destinationPath) {
return getObjectMetadata(GetObjectMetadataRequest.builder().applyMutation(getObjectMetadataRequest).build(),
destinationPath);
}
/**
* List chunks in a given Object
*
* @param listChunksRequest
* @return A Java Future containing the result of the ListChunks operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - ServiceInternalException Deprecated. To be removed from the model.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.ListChunks
* @see AWS API
* Documentation
*/
default CompletableFuture listChunks(ListChunksRequest listChunksRequest) {
throw new UnsupportedOperationException();
}
/**
* List chunks in a given Object
*
* This is a convenience which creates an instance of the {@link ListChunksRequest.Builder} avoiding the need to
* create one manually via {@link ListChunksRequest#builder()}
*
*
* @param listChunksRequest
* A {@link Consumer} that will call methods on {@link ListChunksInput.Builder} to create a request.
* @return A Java Future containing the result of the ListChunks operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - ServiceInternalException Deprecated. To be removed from the model.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.ListChunks
* @see AWS API
* Documentation
*/
default CompletableFuture listChunks(Consumer listChunksRequest) {
return listChunks(ListChunksRequest.builder().applyMutation(listChunksRequest).build());
}
/**
* List chunks in a given Object
*
* This is a variant of {@link #listChunks(software.amazon.awssdk.services.backupstorage.model.ListChunksRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.backupstorage.paginators.ListChunksPublisher publisher = client.listChunksPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.backupstorage.paginators.ListChunksPublisher publisher = client.listChunksPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.backupstorage.model.ListChunksResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listChunks(software.amazon.awssdk.services.backupstorage.model.ListChunksRequest)} operation.
*
*
* @param listChunksRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - ServiceInternalException Deprecated. To be removed from the model.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.ListChunks
* @see AWS API
* Documentation
*/
default ListChunksPublisher listChunksPaginator(ListChunksRequest listChunksRequest) {
throw new UnsupportedOperationException();
}
/**
* List chunks in a given Object
*
* This is a variant of {@link #listChunks(software.amazon.awssdk.services.backupstorage.model.ListChunksRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.backupstorage.paginators.ListChunksPublisher publisher = client.listChunksPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.backupstorage.paginators.ListChunksPublisher publisher = client.listChunksPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.backupstorage.model.ListChunksResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listChunks(software.amazon.awssdk.services.backupstorage.model.ListChunksRequest)} operation.
*
*
* This is a convenience which creates an instance of the {@link ListChunksRequest.Builder} avoiding the need to
* create one manually via {@link ListChunksRequest#builder()}
*
*
* @param listChunksRequest
* A {@link Consumer} that will call methods on {@link ListChunksInput.Builder} to create a request.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - ServiceInternalException Deprecated. To be removed from the model.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.ListChunks
* @see AWS API
* Documentation
*/
default ListChunksPublisher listChunksPaginator(Consumer listChunksRequest) {
return listChunksPaginator(ListChunksRequest.builder().applyMutation(listChunksRequest).build());
}
/**
* List all Objects in a given Backup.
*
* @param listObjectsRequest
* @return A Java Future containing the result of the ListObjects operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.ListObjects
* @see AWS API
* Documentation
*/
default CompletableFuture listObjects(ListObjectsRequest listObjectsRequest) {
throw new UnsupportedOperationException();
}
/**
* List all Objects in a given Backup.
*
* This is a convenience which creates an instance of the {@link ListObjectsRequest.Builder} avoiding the need to
* create one manually via {@link ListObjectsRequest#builder()}
*
*
* @param listObjectsRequest
* A {@link Consumer} that will call methods on {@link ListObjectsInput.Builder} to create a request.
* @return A Java Future containing the result of the ListObjects operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.ListObjects
* @see AWS API
* Documentation
*/
default CompletableFuture listObjects(Consumer listObjectsRequest) {
return listObjects(ListObjectsRequest.builder().applyMutation(listObjectsRequest).build());
}
/**
* List all Objects in a given Backup.
*
* This is a variant of {@link #listObjects(software.amazon.awssdk.services.backupstorage.model.ListObjectsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.backupstorage.paginators.ListObjectsPublisher publisher = client.listObjectsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.backupstorage.paginators.ListObjectsPublisher publisher = client.listObjectsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.backupstorage.model.ListObjectsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listObjects(software.amazon.awssdk.services.backupstorage.model.ListObjectsRequest)} operation.
*
*
* @param listObjectsRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.ListObjects
* @see AWS API
* Documentation
*/
default ListObjectsPublisher listObjectsPaginator(ListObjectsRequest listObjectsRequest) {
throw new UnsupportedOperationException();
}
/**
* List all Objects in a given Backup.
*
* This is a variant of {@link #listObjects(software.amazon.awssdk.services.backupstorage.model.ListObjectsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.backupstorage.paginators.ListObjectsPublisher publisher = client.listObjectsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.backupstorage.paginators.ListObjectsPublisher publisher = client.listObjectsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.backupstorage.model.ListObjectsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of MaxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listObjects(software.amazon.awssdk.services.backupstorage.model.ListObjectsRequest)} operation.
*
*
* This is a convenience which creates an instance of the {@link ListObjectsRequest.Builder} avoiding the need to
* create one manually via {@link ListObjectsRequest#builder()}
*
*
* @param listObjectsRequest
* A {@link Consumer} that will call methods on {@link ListObjectsInput.Builder} to create a request.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.ListObjects
* @see AWS API
* Documentation
*/
default ListObjectsPublisher listObjectsPaginator(Consumer listObjectsRequest) {
return listObjectsPaginator(ListObjectsRequest.builder().applyMutation(listObjectsRequest).build());
}
/**
* Complete upload
*
* @param notifyObjectCompleteRequest
* @param requestBody
* Functional interface that can be implemented to produce the request content in a non-blocking manner. The
* size of the content is expected to be known up front. See {@link AsyncRequestBody} for specific details on
* implementing this interface as well as links to precanned implementations for common scenarios like
* uploading from a file. The service documentation for the request content is as follows 'Optional metadata
* associated with an Object. Maximum length is 4MB.'
* @return A Java Future containing the result of the NotifyObjectComplete operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - NotReadableInputStreamException Retryalble exception. Indicated issues while reading an input stream
* due to the networking issues or connection drop on the client side.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.NotifyObjectComplete
* @see AWS API Documentation
*/
default CompletableFuture notifyObjectComplete(
NotifyObjectCompleteRequest notifyObjectCompleteRequest, AsyncRequestBody requestBody) {
throw new UnsupportedOperationException();
}
/**
* Complete upload
*
* This is a convenience which creates an instance of the {@link NotifyObjectCompleteRequest.Builder} avoiding the
* need to create one manually via {@link NotifyObjectCompleteRequest#builder()}
*
*
* @param notifyObjectCompleteRequest
* A {@link Consumer} that will call methods on {@link NotifyObjectCompleteInput.Builder} to create a
* request.
* @param requestBody
* Functional interface that can be implemented to produce the request content in a non-blocking manner. The
* size of the content is expected to be known up front. See {@link AsyncRequestBody} for specific details on
* implementing this interface as well as links to precanned implementations for common scenarios like
* uploading from a file. The service documentation for the request content is as follows 'Optional metadata
* associated with an Object. Maximum length is 4MB.'
* @return A Java Future containing the result of the NotifyObjectComplete operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - NotReadableInputStreamException Retryalble exception. Indicated issues while reading an input stream
* due to the networking issues or connection drop on the client side.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.NotifyObjectComplete
* @see AWS API Documentation
*/
default CompletableFuture notifyObjectComplete(
Consumer notifyObjectCompleteRequest, AsyncRequestBody requestBody) {
return notifyObjectComplete(NotifyObjectCompleteRequest.builder().applyMutation(notifyObjectCompleteRequest).build(),
requestBody);
}
/**
* Complete upload
*
* @param notifyObjectCompleteRequest
* @param sourcePath
* {@link Path} to file containing data to send to the service. File will be read entirely and may be read
* multiple times in the event of a retry. If the file does not exist or the current user does not have
* access to read it then an exception will be thrown. The service documentation for the request content is
* as follows 'Optional metadata associated with an Object. Maximum length is 4MB.'
* @return A Java Future containing the result of the NotifyObjectComplete operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - NotReadableInputStreamException Retryalble exception. Indicated issues while reading an input stream
* due to the networking issues or connection drop on the client side.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.NotifyObjectComplete
* @see AWS API Documentation
*/
default CompletableFuture notifyObjectComplete(
NotifyObjectCompleteRequest notifyObjectCompleteRequest, Path sourcePath) {
return notifyObjectComplete(notifyObjectCompleteRequest, AsyncRequestBody.fromFile(sourcePath));
}
/**
* Complete upload
*
* This is a convenience which creates an instance of the {@link NotifyObjectCompleteRequest.Builder} avoiding the
* need to create one manually via {@link NotifyObjectCompleteRequest#builder()}
*
*
* @param notifyObjectCompleteRequest
* A {@link Consumer} that will call methods on {@link NotifyObjectCompleteInput.Builder} to create a
* request.
* @param sourcePath
* {@link Path} to file containing data to send to the service. File will be read entirely and may be read
* multiple times in the event of a retry. If the file does not exist or the current user does not have
* access to read it then an exception will be thrown. The service documentation for the request content is
* as follows 'Optional metadata associated with an Object. Maximum length is 4MB.'
* @return A Java Future containing the result of the NotifyObjectComplete operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - NotReadableInputStreamException Retryalble exception. Indicated issues while reading an input stream
* due to the networking issues or connection drop on the client side.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.NotifyObjectComplete
* @see AWS API Documentation
*/
default CompletableFuture notifyObjectComplete(
Consumer notifyObjectCompleteRequest, Path sourcePath) {
return notifyObjectComplete(NotifyObjectCompleteRequest.builder().applyMutation(notifyObjectCompleteRequest).build(),
sourcePath);
}
/**
* Upload chunk.
*
* @param putChunkRequest
* @param requestBody
* Functional interface that can be implemented to produce the request content in a non-blocking manner. The
* size of the content is expected to be known up front. See {@link AsyncRequestBody} for specific details on
* implementing this interface as well as links to precanned implementations for common scenarios like
* uploading from a file. The service documentation for the request content is as follows 'Data to be
* uploaded'
* @return A Java Future containing the result of the PutChunk operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - NotReadableInputStreamException Retryalble exception. Indicated issues while reading an input stream
* due to the networking issues or connection drop on the client side.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.PutChunk
* @see AWS API
* Documentation
*/
default CompletableFuture putChunk(PutChunkRequest putChunkRequest, AsyncRequestBody requestBody) {
throw new UnsupportedOperationException();
}
/**
* Upload chunk.
*
* This is a convenience which creates an instance of the {@link PutChunkRequest.Builder} avoiding the need to
* create one manually via {@link PutChunkRequest#builder()}
*
*
* @param putChunkRequest
* A {@link Consumer} that will call methods on {@link PutChunkInput.Builder} to create a request.
* @param requestBody
* Functional interface that can be implemented to produce the request content in a non-blocking manner. The
* size of the content is expected to be known up front. See {@link AsyncRequestBody} for specific details on
* implementing this interface as well as links to precanned implementations for common scenarios like
* uploading from a file. The service documentation for the request content is as follows 'Data to be
* uploaded'
* @return A Java Future containing the result of the PutChunk operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - NotReadableInputStreamException Retryalble exception. Indicated issues while reading an input stream
* due to the networking issues or connection drop on the client side.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.PutChunk
* @see AWS API
* Documentation
*/
default CompletableFuture putChunk(Consumer putChunkRequest,
AsyncRequestBody requestBody) {
return putChunk(PutChunkRequest.builder().applyMutation(putChunkRequest).build(), requestBody);
}
/**
* Upload chunk.
*
* @param putChunkRequest
* @param sourcePath
* {@link Path} to file containing data to send to the service. File will be read entirely and may be read
* multiple times in the event of a retry. If the file does not exist or the current user does not have
* access to read it then an exception will be thrown. The service documentation for the request content is
* as follows 'Data to be uploaded'
* @return A Java Future containing the result of the PutChunk operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - NotReadableInputStreamException Retryalble exception. Indicated issues while reading an input stream
* due to the networking issues or connection drop on the client side.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.PutChunk
* @see AWS API
* Documentation
*/
default CompletableFuture putChunk(PutChunkRequest putChunkRequest, Path sourcePath) {
return putChunk(putChunkRequest, AsyncRequestBody.fromFile(sourcePath));
}
/**
* Upload chunk.
*
* This is a convenience which creates an instance of the {@link PutChunkRequest.Builder} avoiding the need to
* create one manually via {@link PutChunkRequest#builder()}
*
*
* @param putChunkRequest
* A {@link Consumer} that will call methods on {@link PutChunkInput.Builder} to create a request.
* @param sourcePath
* {@link Path} to file containing data to send to the service. File will be read entirely and may be read
* multiple times in the event of a retry. If the file does not exist or the current user does not have
* access to read it then an exception will be thrown. The service documentation for the request content is
* as follows 'Data to be uploaded'
* @return A Java Future containing the result of the PutChunk operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - NotReadableInputStreamException Retryalble exception. Indicated issues while reading an input stream
* due to the networking issues or connection drop on the client side.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.PutChunk
* @see AWS API
* Documentation
*/
default CompletableFuture putChunk(Consumer putChunkRequest, Path sourcePath) {
return putChunk(PutChunkRequest.builder().applyMutation(putChunkRequest).build(), sourcePath);
}
/**
* Upload object that can store object metadata String and data blob in single API call using inline chunk field.
*
* @param putObjectRequest
* @param requestBody
* Functional interface that can be implemented to produce the request content in a non-blocking manner. The
* size of the content is expected to be known up front. See {@link AsyncRequestBody} for specific details on
* implementing this interface as well as links to precanned implementations for common scenarios like
* uploading from a file. The service documentation for the request content is as follows 'Inline chunk data
* to be uploaded.'
* @return A Java Future containing the result of the PutObject operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - NotReadableInputStreamException Retryalble exception. Indicated issues while reading an input stream
* due to the networking issues or connection drop on the client side.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.PutObject
* @see AWS API
* Documentation
*/
default CompletableFuture putObject(PutObjectRequest putObjectRequest, AsyncRequestBody requestBody) {
throw new UnsupportedOperationException();
}
/**
* Upload object that can store object metadata String and data blob in single API call using inline chunk field.
*
* This is a convenience which creates an instance of the {@link PutObjectRequest.Builder} avoiding the need to
* create one manually via {@link PutObjectRequest#builder()}
*
*
* @param putObjectRequest
* A {@link Consumer} that will call methods on {@link PutObjectInput.Builder} to create a request.
* @param requestBody
* Functional interface that can be implemented to produce the request content in a non-blocking manner. The
* size of the content is expected to be known up front. See {@link AsyncRequestBody} for specific details on
* implementing this interface as well as links to precanned implementations for common scenarios like
* uploading from a file. The service documentation for the request content is as follows 'Inline chunk data
* to be uploaded.'
* @return A Java Future containing the result of the PutObject operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - NotReadableInputStreamException Retryalble exception. Indicated issues while reading an input stream
* due to the networking issues or connection drop on the client side.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.PutObject
* @see AWS API
* Documentation
*/
default CompletableFuture putObject(Consumer putObjectRequest,
AsyncRequestBody requestBody) {
return putObject(PutObjectRequest.builder().applyMutation(putObjectRequest).build(), requestBody);
}
/**
* Upload object that can store object metadata String and data blob in single API call using inline chunk field.
*
* @param putObjectRequest
* @param sourcePath
* {@link Path} to file containing data to send to the service. File will be read entirely and may be read
* multiple times in the event of a retry. If the file does not exist or the current user does not have
* access to read it then an exception will be thrown. The service documentation for the request content is
* as follows 'Inline chunk data to be uploaded.'
* @return A Java Future containing the result of the PutObject operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - NotReadableInputStreamException Retryalble exception. Indicated issues while reading an input stream
* due to the networking issues or connection drop on the client side.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.PutObject
* @see AWS API
* Documentation
*/
default CompletableFuture putObject(PutObjectRequest putObjectRequest, Path sourcePath) {
return putObject(putObjectRequest, AsyncRequestBody.fromFile(sourcePath));
}
/**
* Upload object that can store object metadata String and data blob in single API call using inline chunk field.
*
* This is a convenience which creates an instance of the {@link PutObjectRequest.Builder} avoiding the need to
* create one manually via {@link PutObjectRequest#builder()}
*
*
* @param putObjectRequest
* A {@link Consumer} that will call methods on {@link PutObjectInput.Builder} to create a request.
* @param sourcePath
* {@link Path} to file containing data to send to the service. File will be read entirely and may be read
* multiple times in the event of a retry. If the file does not exist or the current user does not have
* access to read it then an exception will be thrown. The service documentation for the request content is
* as follows 'Inline chunk data to be uploaded.'
* @return A Java Future containing the result of the PutObject operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - NotReadableInputStreamException Retryalble exception. Indicated issues while reading an input stream
* due to the networking issues or connection drop on the client side.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - KmsInvalidKeyUsageException Non-retryable exception. Indicates the KMS key usage is incorrect. See
* exception message for details.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.PutObject
* @see AWS API
* Documentation
*/
default CompletableFuture putObject(Consumer putObjectRequest, Path sourcePath) {
return putObject(PutObjectRequest.builder().applyMutation(putObjectRequest).build(), sourcePath);
}
/**
* Start upload containing one or many chunks.
*
* @param startObjectRequest
* @return A Java Future containing the result of the StartObject operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - DataAlreadyExistsException Non-retryable exception. Attempted to create already existing object or
* chunk. This message contains a checksum of already presented data.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.StartObject
* @see AWS API
* Documentation
*/
default CompletableFuture startObject(StartObjectRequest startObjectRequest) {
throw new UnsupportedOperationException();
}
/**
* Start upload containing one or many chunks.
*
* This is a convenience which creates an instance of the {@link StartObjectRequest.Builder} avoiding the need to
* create one manually via {@link StartObjectRequest#builder()}
*
*
* @param startObjectRequest
* A {@link Consumer} that will call methods on {@link StartObjectInput.Builder} to create a request.
* @return A Java Future containing the result of the StartObject operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ServiceUnavailableException Retryable exception, indicates internal server error.
* - ServiceInternalException Deprecated. To be removed from the model.
* - RetryableException Retryable exception. In general indicates internal failure that can be fixed by
* retry.
* - IllegalArgumentException Non-retryable exception, indicates client error (wrong argument passed to
* API). See exception message for details.
* - ResourceNotFoundException Non-retryable exception. Attempted to make an operation on non-existing or
* expired resource.
* - DataAlreadyExistsException Non-retryable exception. Attempted to create already existing object or
* chunk. This message contains a checksum of already presented data.
* - ThrottlingException Increased rate over throttling limits. Can be retried with exponential backoff.
* - AccessDeniedException
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - BackupStorageException Base class for all service exceptions. Unknown exceptions will be thrown as an
* instance of this type.
*
* @sample BackupStorageAsyncClient.StartObject
* @see AWS API
* Documentation
*/
default CompletableFuture startObject(Consumer startObjectRequest) {
return startObject(StartObjectRequest.builder().applyMutation(startObjectRequest).build());
}
/**
* Create a {@link BackupStorageAsyncClient} with the region loaded from the
* {@link software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain} and credentials loaded from the
* {@link software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider}.
*/
static BackupStorageAsyncClient create() {
return builder().build();
}
/**
* Create a builder that can be used to configure and create a {@link BackupStorageAsyncClient}.
*/
static BackupStorageAsyncClientBuilder builder() {
return new DefaultBackupStorageAsyncClientBuilder();
}
}