Interface KeyspacesStreamsAsyncClient
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
builder()
method.The asynchronous client performs non-blocking I/O when configured with any
SdkAsyncHttpClient
supported in the SDK. However, full non-blocking is not guaranteed as the async client may
perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API
call.
Amazon Keyspaces (for Apache Cassandra) change data capture (CDC) records change events for Amazon Keyspaces tables. The change events captured in a stream are time-ordered and de-duplicated write operations. Using stream data you can build event driven applications that incorporate near-real time change events from Amazon Keyspaces tables.
Amazon Keyspaces CDC is serverless and scales the infrastructure for change events automatically based on the volume of changes on your table.
This API reference describes the Amazon Keyspaces CDC stream API in detail.
For more information about Amazon Keyspaces CDC, see Working with change data capture (CDC) streams in Amazon Keyspaces in the Amazon Keyspaces Developer Guide.
To learn how Amazon Keyspaces CDC API actions are recorded with CloudTrail, see Amazon Keyspaces information in CloudTrail in the Amazon Keyspaces Developer Guide.
To see the metrics Amazon Keyspaces CDC sends to Amazon CloudWatch, see Amazon Keyspaces change data capture (CDC) CloudWatch metrics in the Amazon Keyspaces Developer Guide.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Value for looking up the service's metadata from theServiceMetadataProvider
.static final String
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a builder that can be used to configure and create aKeyspacesStreamsAsyncClient
.static KeyspacesStreamsAsyncClient
create()
Create aKeyspacesStreamsAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.default CompletableFuture
<GetRecordsResponse> getRecords
(Consumer<GetRecordsRequest.Builder> getRecordsRequest) Retrieves data records from a specified shard in an Amazon Keyspaces data stream.default CompletableFuture
<GetRecordsResponse> getRecords
(GetRecordsRequest getRecordsRequest) Retrieves data records from a specified shard in an Amazon Keyspaces data stream.getShardIterator
(Consumer<GetShardIteratorRequest.Builder> getShardIteratorRequest) Returns a shard iterator that serves as a bookmark for reading data from a specific position in an Amazon Keyspaces data stream's shard.getShardIterator
(GetShardIteratorRequest getShardIteratorRequest) Returns a shard iterator that serves as a bookmark for reading data from a specific position in an Amazon Keyspaces data stream's shard.default CompletableFuture
<GetStreamResponse> getStream
(Consumer<GetStreamRequest.Builder> getStreamRequest) Returns detailed information about a specific data capture stream for an Amazon Keyspaces table.default CompletableFuture
<GetStreamResponse> getStream
(GetStreamRequest getStreamRequest) Returns detailed information about a specific data capture stream for an Amazon Keyspaces table.default GetStreamPublisher
getStreamPaginator
(Consumer<GetStreamRequest.Builder> getStreamRequest) This is a variant ofgetStream(software.amazon.awssdk.services.keyspacesstreams.model.GetStreamRequest)
operation.default GetStreamPublisher
getStreamPaginator
(GetStreamRequest getStreamRequest) This is a variant ofgetStream(software.amazon.awssdk.services.keyspacesstreams.model.GetStreamRequest)
operation.default CompletableFuture
<ListStreamsResponse> listStreams
(Consumer<ListStreamsRequest.Builder> listStreamsRequest) Returns a list of all data capture streams associated with your Amazon Keyspaces account or for a specific keyspace or table.default CompletableFuture
<ListStreamsResponse> listStreams
(ListStreamsRequest listStreamsRequest) Returns a list of all data capture streams associated with your Amazon Keyspaces account or for a specific keyspace or table.default ListStreamsPublisher
listStreamsPaginator
(Consumer<ListStreamsRequest.Builder> listStreamsRequest) This is a variant oflistStreams(software.amazon.awssdk.services.keyspacesstreams.model.ListStreamsRequest)
operation.default ListStreamsPublisher
listStreamsPaginator
(ListStreamsRequest listStreamsRequest) This is a variant oflistStreams(software.amazon.awssdk.services.keyspacesstreams.model.ListStreamsRequest)
operation.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationMethods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider
.- See Also:
-
-
Method Details
-
getRecords
Retrieves data records from a specified shard in an Amazon Keyspaces data stream. This operation returns a collection of data records from the shard, including the primary key columns and information about modifications made to the captured table data. Each record represents a single data modification in the Amazon Keyspaces table and includes metadata about when the change occurred.
- Parameters:
getRecordsRequest
-- Returns:
- A Java Future containing the result of the GetRecords operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
This exception occurs when you send too many requests in a short period of time. Implement exponential backoff in your retry strategy to handle this exception. Reducing your request frequency or distributing requests more evenly can help avoid throughput exceptions.
- AccessDeniedException You don't have sufficient access permissions to perform this operation.
This exception occurs when your IAM user or role lacks the required permissions to access the Amazon Keyspaces resource or perform the requested action. Check your IAM policies and ensure they grant the necessary permissions.
- InternalServerException The Amazon Keyspaces service encountered an unexpected error while processing
the request.
This internal server error is not related to your request parameters. Retry your request after a brief delay. If the issue persists, contact Amazon Web Services Support with details of your request to help identify and resolve the problem.
- ValidationException The request validation failed because one or more input parameters failed
validation.
This exception occurs when there are syntax errors in the request, field constraints are violated, or required parameters are missing. To help you fix the issue, the exception message provides details about which parameter failed and why.
- ResourceNotFoundException The requested resource doesn't exist or could not be found.
This exception occurs when you attempt to access a keyspace, table, stream, or other Amazon Keyspaces resource that doesn't exist or that has been deleted. Verify that the resource identifier is correct and that the resource exists in your account.
- 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.
- KeyspacesStreamsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
- See Also:
-
getRecords
default CompletableFuture<GetRecordsResponse> getRecords(Consumer<GetRecordsRequest.Builder> getRecordsRequest) Retrieves data records from a specified shard in an Amazon Keyspaces data stream. This operation returns a collection of data records from the shard, including the primary key columns and information about modifications made to the captured table data. Each record represents a single data modification in the Amazon Keyspaces table and includes metadata about when the change occurred.
This is a convenience which creates an instance of the
GetRecordsRequest.Builder
avoiding the need to create one manually viaGetRecordsRequest.builder()
- Parameters:
getRecordsRequest
- AConsumer
that will call methods onGetRecordsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetRecords operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
This exception occurs when you send too many requests in a short period of time. Implement exponential backoff in your retry strategy to handle this exception. Reducing your request frequency or distributing requests more evenly can help avoid throughput exceptions.
- AccessDeniedException You don't have sufficient access permissions to perform this operation.
This exception occurs when your IAM user or role lacks the required permissions to access the Amazon Keyspaces resource or perform the requested action. Check your IAM policies and ensure they grant the necessary permissions.
- InternalServerException The Amazon Keyspaces service encountered an unexpected error while processing
the request.
This internal server error is not related to your request parameters. Retry your request after a brief delay. If the issue persists, contact Amazon Web Services Support with details of your request to help identify and resolve the problem.
- ValidationException The request validation failed because one or more input parameters failed
validation.
This exception occurs when there are syntax errors in the request, field constraints are violated, or required parameters are missing. To help you fix the issue, the exception message provides details about which parameter failed and why.
- ResourceNotFoundException The requested resource doesn't exist or could not be found.
This exception occurs when you attempt to access a keyspace, table, stream, or other Amazon Keyspaces resource that doesn't exist or that has been deleted. Verify that the resource identifier is correct and that the resource exists in your account.
- 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.
- KeyspacesStreamsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
- See Also:
-
getShardIterator
default CompletableFuture<GetShardIteratorResponse> getShardIterator(GetShardIteratorRequest getShardIteratorRequest) Returns a shard iterator that serves as a bookmark for reading data from a specific position in an Amazon Keyspaces data stream's shard. The shard iterator specifies the shard position from which to start reading data records sequentially. You can specify whether to begin reading at the latest record, the oldest record, or at a particular sequence number within the shard.
- Parameters:
getShardIteratorRequest
-- Returns:
- A Java Future containing the result of the GetShardIterator operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
This exception occurs when you send too many requests in a short period of time. Implement exponential backoff in your retry strategy to handle this exception. Reducing your request frequency or distributing requests more evenly can help avoid throughput exceptions.
- AccessDeniedException You don't have sufficient access permissions to perform this operation.
This exception occurs when your IAM user or role lacks the required permissions to access the Amazon Keyspaces resource or perform the requested action. Check your IAM policies and ensure they grant the necessary permissions.
- InternalServerException The Amazon Keyspaces service encountered an unexpected error while processing
the request.
This internal server error is not related to your request parameters. Retry your request after a brief delay. If the issue persists, contact Amazon Web Services Support with details of your request to help identify and resolve the problem.
- ValidationException The request validation failed because one or more input parameters failed
validation.
This exception occurs when there are syntax errors in the request, field constraints are violated, or required parameters are missing. To help you fix the issue, the exception message provides details about which parameter failed and why.
- ResourceNotFoundException The requested resource doesn't exist or could not be found.
This exception occurs when you attempt to access a keyspace, table, stream, or other Amazon Keyspaces resource that doesn't exist or that has been deleted. Verify that the resource identifier is correct and that the resource exists in your account.
- 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.
- KeyspacesStreamsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
- See Also:
-
getShardIterator
default CompletableFuture<GetShardIteratorResponse> getShardIterator(Consumer<GetShardIteratorRequest.Builder> getShardIteratorRequest) Returns a shard iterator that serves as a bookmark for reading data from a specific position in an Amazon Keyspaces data stream's shard. The shard iterator specifies the shard position from which to start reading data records sequentially. You can specify whether to begin reading at the latest record, the oldest record, or at a particular sequence number within the shard.
This is a convenience which creates an instance of the
GetShardIteratorRequest.Builder
avoiding the need to create one manually viaGetShardIteratorRequest.builder()
- Parameters:
getShardIteratorRequest
- AConsumer
that will call methods onGetShardIteratorRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetShardIterator operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
This exception occurs when you send too many requests in a short period of time. Implement exponential backoff in your retry strategy to handle this exception. Reducing your request frequency or distributing requests more evenly can help avoid throughput exceptions.
- AccessDeniedException You don't have sufficient access permissions to perform this operation.
This exception occurs when your IAM user or role lacks the required permissions to access the Amazon Keyspaces resource or perform the requested action. Check your IAM policies and ensure they grant the necessary permissions.
- InternalServerException The Amazon Keyspaces service encountered an unexpected error while processing
the request.
This internal server error is not related to your request parameters. Retry your request after a brief delay. If the issue persists, contact Amazon Web Services Support with details of your request to help identify and resolve the problem.
- ValidationException The request validation failed because one or more input parameters failed
validation.
This exception occurs when there are syntax errors in the request, field constraints are violated, or required parameters are missing. To help you fix the issue, the exception message provides details about which parameter failed and why.
- ResourceNotFoundException The requested resource doesn't exist or could not be found.
This exception occurs when you attempt to access a keyspace, table, stream, or other Amazon Keyspaces resource that doesn't exist or that has been deleted. Verify that the resource identifier is correct and that the resource exists in your account.
- 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.
- KeyspacesStreamsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
- See Also:
-
getStream
Returns detailed information about a specific data capture stream for an Amazon Keyspaces table. The information includes the stream's Amazon Resource Name (ARN), creation time, current status, retention period, shard composition, and associated table details. This operation helps you monitor and manage the configuration of your Amazon Keyspaces data streams.
- Parameters:
getStreamRequest
-- Returns:
- A Java Future containing the result of the GetStream operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
This exception occurs when you send too many requests in a short period of time. Implement exponential backoff in your retry strategy to handle this exception. Reducing your request frequency or distributing requests more evenly can help avoid throughput exceptions.
- AccessDeniedException You don't have sufficient access permissions to perform this operation.
This exception occurs when your IAM user or role lacks the required permissions to access the Amazon Keyspaces resource or perform the requested action. Check your IAM policies and ensure they grant the necessary permissions.
- InternalServerException The Amazon Keyspaces service encountered an unexpected error while processing
the request.
This internal server error is not related to your request parameters. Retry your request after a brief delay. If the issue persists, contact Amazon Web Services Support with details of your request to help identify and resolve the problem.
- ValidationException The request validation failed because one or more input parameters failed
validation.
This exception occurs when there are syntax errors in the request, field constraints are violated, or required parameters are missing. To help you fix the issue, the exception message provides details about which parameter failed and why.
- ResourceNotFoundException The requested resource doesn't exist or could not be found.
This exception occurs when you attempt to access a keyspace, table, stream, or other Amazon Keyspaces resource that doesn't exist or that has been deleted. Verify that the resource identifier is correct and that the resource exists in your account.
- 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.
- KeyspacesStreamsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
- See Also:
-
getStream
default CompletableFuture<GetStreamResponse> getStream(Consumer<GetStreamRequest.Builder> getStreamRequest) Returns detailed information about a specific data capture stream for an Amazon Keyspaces table. The information includes the stream's Amazon Resource Name (ARN), creation time, current status, retention period, shard composition, and associated table details. This operation helps you monitor and manage the configuration of your Amazon Keyspaces data streams.
This is a convenience which creates an instance of the
GetStreamRequest.Builder
avoiding the need to create one manually viaGetStreamRequest.builder()
- Parameters:
getStreamRequest
- AConsumer
that will call methods onGetStreamRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetStream operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
This exception occurs when you send too many requests in a short period of time. Implement exponential backoff in your retry strategy to handle this exception. Reducing your request frequency or distributing requests more evenly can help avoid throughput exceptions.
- AccessDeniedException You don't have sufficient access permissions to perform this operation.
This exception occurs when your IAM user or role lacks the required permissions to access the Amazon Keyspaces resource or perform the requested action. Check your IAM policies and ensure they grant the necessary permissions.
- InternalServerException The Amazon Keyspaces service encountered an unexpected error while processing
the request.
This internal server error is not related to your request parameters. Retry your request after a brief delay. If the issue persists, contact Amazon Web Services Support with details of your request to help identify and resolve the problem.
- ValidationException The request validation failed because one or more input parameters failed
validation.
This exception occurs when there are syntax errors in the request, field constraints are violated, or required parameters are missing. To help you fix the issue, the exception message provides details about which parameter failed and why.
- ResourceNotFoundException The requested resource doesn't exist or could not be found.
This exception occurs when you attempt to access a keyspace, table, stream, or other Amazon Keyspaces resource that doesn't exist or that has been deleted. Verify that the resource identifier is correct and that the resource exists in your account.
- 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.
- KeyspacesStreamsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
- See Also:
-
getStreamPaginator
This is a variant of
getStream(software.amazon.awssdk.services.keyspacesstreams.model.GetStreamRequest)
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
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
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 methodsoftware.amazon.awssdk.services.keyspacesstreams.paginators.GetStreamPublisher publisher = client.getStreamPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.keyspacesstreams.paginators.GetStreamPublisher publisher = client.getStreamPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.keyspacesstreams.model.GetStreamResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.keyspacesstreams.model.GetStreamResponse response) { //... }; });
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
getStream(software.amazon.awssdk.services.keyspacesstreams.model.GetStreamRequest)
operation.- Parameters:
getStreamRequest
-- Returns:
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
This exception occurs when you send too many requests in a short period of time. Implement exponential backoff in your retry strategy to handle this exception. Reducing your request frequency or distributing requests more evenly can help avoid throughput exceptions.
- AccessDeniedException You don't have sufficient access permissions to perform this operation.
This exception occurs when your IAM user or role lacks the required permissions to access the Amazon Keyspaces resource or perform the requested action. Check your IAM policies and ensure they grant the necessary permissions.
- InternalServerException The Amazon Keyspaces service encountered an unexpected error while processing
the request.
This internal server error is not related to your request parameters. Retry your request after a brief delay. If the issue persists, contact Amazon Web Services Support with details of your request to help identify and resolve the problem.
- ValidationException The request validation failed because one or more input parameters failed
validation.
This exception occurs when there are syntax errors in the request, field constraints are violated, or required parameters are missing. To help you fix the issue, the exception message provides details about which parameter failed and why.
- ResourceNotFoundException The requested resource doesn't exist or could not be found.
This exception occurs when you attempt to access a keyspace, table, stream, or other Amazon Keyspaces resource that doesn't exist or that has been deleted. Verify that the resource identifier is correct and that the resource exists in your account.
- 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.
- KeyspacesStreamsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
- See Also:
-
getStreamPaginator
This is a variant of
getStream(software.amazon.awssdk.services.keyspacesstreams.model.GetStreamRequest)
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
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
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 methodsoftware.amazon.awssdk.services.keyspacesstreams.paginators.GetStreamPublisher publisher = client.getStreamPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.keyspacesstreams.paginators.GetStreamPublisher publisher = client.getStreamPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.keyspacesstreams.model.GetStreamResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.keyspacesstreams.model.GetStreamResponse response) { //... }; });
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
getStream(software.amazon.awssdk.services.keyspacesstreams.model.GetStreamRequest)
operation.
This is a convenience which creates an instance of the
GetStreamRequest.Builder
avoiding the need to create one manually viaGetStreamRequest.builder()
- Parameters:
getStreamRequest
- AConsumer
that will call methods onGetStreamRequest.Builder
to create a request.- Returns:
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
This exception occurs when you send too many requests in a short period of time. Implement exponential backoff in your retry strategy to handle this exception. Reducing your request frequency or distributing requests more evenly can help avoid throughput exceptions.
- AccessDeniedException You don't have sufficient access permissions to perform this operation.
This exception occurs when your IAM user or role lacks the required permissions to access the Amazon Keyspaces resource or perform the requested action. Check your IAM policies and ensure they grant the necessary permissions.
- InternalServerException The Amazon Keyspaces service encountered an unexpected error while processing
the request.
This internal server error is not related to your request parameters. Retry your request after a brief delay. If the issue persists, contact Amazon Web Services Support with details of your request to help identify and resolve the problem.
- ValidationException The request validation failed because one or more input parameters failed
validation.
This exception occurs when there are syntax errors in the request, field constraints are violated, or required parameters are missing. To help you fix the issue, the exception message provides details about which parameter failed and why.
- ResourceNotFoundException The requested resource doesn't exist or could not be found.
This exception occurs when you attempt to access a keyspace, table, stream, or other Amazon Keyspaces resource that doesn't exist or that has been deleted. Verify that the resource identifier is correct and that the resource exists in your account.
- 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.
- KeyspacesStreamsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
- See Also:
-
listStreams
Returns a list of all data capture streams associated with your Amazon Keyspaces account or for a specific keyspace or table. The response includes information such as stream ARNs, table associations, creation timestamps, and current status. This operation helps you discover and manage all active data streams in your Amazon Keyspaces environment.
- Parameters:
listStreamsRequest
-- Returns:
- A Java Future containing the result of the ListStreams operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
This exception occurs when you send too many requests in a short period of time. Implement exponential backoff in your retry strategy to handle this exception. Reducing your request frequency or distributing requests more evenly can help avoid throughput exceptions.
- AccessDeniedException You don't have sufficient access permissions to perform this operation.
This exception occurs when your IAM user or role lacks the required permissions to access the Amazon Keyspaces resource or perform the requested action. Check your IAM policies and ensure they grant the necessary permissions.
- InternalServerException The Amazon Keyspaces service encountered an unexpected error while processing
the request.
This internal server error is not related to your request parameters. Retry your request after a brief delay. If the issue persists, contact Amazon Web Services Support with details of your request to help identify and resolve the problem.
- ValidationException The request validation failed because one or more input parameters failed
validation.
This exception occurs when there are syntax errors in the request, field constraints are violated, or required parameters are missing. To help you fix the issue, the exception message provides details about which parameter failed and why.
- ResourceNotFoundException The requested resource doesn't exist or could not be found.
This exception occurs when you attempt to access a keyspace, table, stream, or other Amazon Keyspaces resource that doesn't exist or that has been deleted. Verify that the resource identifier is correct and that the resource exists in your account.
- 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.
- KeyspacesStreamsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
- See Also:
-
listStreams
default CompletableFuture<ListStreamsResponse> listStreams(Consumer<ListStreamsRequest.Builder> listStreamsRequest) Returns a list of all data capture streams associated with your Amazon Keyspaces account or for a specific keyspace or table. The response includes information such as stream ARNs, table associations, creation timestamps, and current status. This operation helps you discover and manage all active data streams in your Amazon Keyspaces environment.
This is a convenience which creates an instance of the
ListStreamsRequest.Builder
avoiding the need to create one manually viaListStreamsRequest.builder()
- Parameters:
listStreamsRequest
- AConsumer
that will call methods onListStreamsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListStreams operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
This exception occurs when you send too many requests in a short period of time. Implement exponential backoff in your retry strategy to handle this exception. Reducing your request frequency or distributing requests more evenly can help avoid throughput exceptions.
- AccessDeniedException You don't have sufficient access permissions to perform this operation.
This exception occurs when your IAM user or role lacks the required permissions to access the Amazon Keyspaces resource or perform the requested action. Check your IAM policies and ensure they grant the necessary permissions.
- InternalServerException The Amazon Keyspaces service encountered an unexpected error while processing
the request.
This internal server error is not related to your request parameters. Retry your request after a brief delay. If the issue persists, contact Amazon Web Services Support with details of your request to help identify and resolve the problem.
- ValidationException The request validation failed because one or more input parameters failed
validation.
This exception occurs when there are syntax errors in the request, field constraints are violated, or required parameters are missing. To help you fix the issue, the exception message provides details about which parameter failed and why.
- ResourceNotFoundException The requested resource doesn't exist or could not be found.
This exception occurs when you attempt to access a keyspace, table, stream, or other Amazon Keyspaces resource that doesn't exist or that has been deleted. Verify that the resource identifier is correct and that the resource exists in your account.
- 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.
- KeyspacesStreamsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
- See Also:
-
listStreamsPaginator
This is a variant of
listStreams(software.amazon.awssdk.services.keyspacesstreams.model.ListStreamsRequest)
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
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
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 methodsoftware.amazon.awssdk.services.keyspacesstreams.paginators.ListStreamsPublisher publisher = client.listStreamsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.keyspacesstreams.paginators.ListStreamsPublisher publisher = client.listStreamsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.keyspacesstreams.model.ListStreamsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.keyspacesstreams.model.ListStreamsResponse response) { //... }; });
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
listStreams(software.amazon.awssdk.services.keyspacesstreams.model.ListStreamsRequest)
operation.- Parameters:
listStreamsRequest
-- Returns:
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
This exception occurs when you send too many requests in a short period of time. Implement exponential backoff in your retry strategy to handle this exception. Reducing your request frequency or distributing requests more evenly can help avoid throughput exceptions.
- AccessDeniedException You don't have sufficient access permissions to perform this operation.
This exception occurs when your IAM user or role lacks the required permissions to access the Amazon Keyspaces resource or perform the requested action. Check your IAM policies and ensure they grant the necessary permissions.
- InternalServerException The Amazon Keyspaces service encountered an unexpected error while processing
the request.
This internal server error is not related to your request parameters. Retry your request after a brief delay. If the issue persists, contact Amazon Web Services Support with details of your request to help identify and resolve the problem.
- ValidationException The request validation failed because one or more input parameters failed
validation.
This exception occurs when there are syntax errors in the request, field constraints are violated, or required parameters are missing. To help you fix the issue, the exception message provides details about which parameter failed and why.
- ResourceNotFoundException The requested resource doesn't exist or could not be found.
This exception occurs when you attempt to access a keyspace, table, stream, or other Amazon Keyspaces resource that doesn't exist or that has been deleted. Verify that the resource identifier is correct and that the resource exists in your account.
- 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.
- KeyspacesStreamsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
- See Also:
-
listStreamsPaginator
default ListStreamsPublisher listStreamsPaginator(Consumer<ListStreamsRequest.Builder> listStreamsRequest) This is a variant of
listStreams(software.amazon.awssdk.services.keyspacesstreams.model.ListStreamsRequest)
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
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
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 methodsoftware.amazon.awssdk.services.keyspacesstreams.paginators.ListStreamsPublisher publisher = client.listStreamsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.keyspacesstreams.paginators.ListStreamsPublisher publisher = client.listStreamsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.keyspacesstreams.model.ListStreamsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.keyspacesstreams.model.ListStreamsResponse response) { //... }; });
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
listStreams(software.amazon.awssdk.services.keyspacesstreams.model.ListStreamsRequest)
operation.
This is a convenience which creates an instance of the
ListStreamsRequest.Builder
avoiding the need to create one manually viaListStreamsRequest.builder()
- Parameters:
listStreamsRequest
- AConsumer
that will call methods onListStreamsRequest.Builder
to create a request.- Returns:
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
This exception occurs when you send too many requests in a short period of time. Implement exponential backoff in your retry strategy to handle this exception. Reducing your request frequency or distributing requests more evenly can help avoid throughput exceptions.
- AccessDeniedException You don't have sufficient access permissions to perform this operation.
This exception occurs when your IAM user or role lacks the required permissions to access the Amazon Keyspaces resource or perform the requested action. Check your IAM policies and ensure they grant the necessary permissions.
- InternalServerException The Amazon Keyspaces service encountered an unexpected error while processing
the request.
This internal server error is not related to your request parameters. Retry your request after a brief delay. If the issue persists, contact Amazon Web Services Support with details of your request to help identify and resolve the problem.
- ValidationException The request validation failed because one or more input parameters failed
validation.
This exception occurs when there are syntax errors in the request, field constraints are violated, or required parameters are missing. To help you fix the issue, the exception message provides details about which parameter failed and why.
- ResourceNotFoundException The requested resource doesn't exist or could not be found.
This exception occurs when you attempt to access a keyspace, table, stream, or other Amazon Keyspaces resource that doesn't exist or that has been deleted. Verify that the resource identifier is correct and that the resource exists in your account.
- 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.
- KeyspacesStreamsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- ThrottlingException The request rate is too high and exceeds the service's throughput limits.
- See Also:
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-
create
Create aKeyspacesStreamsAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aKeyspacesStreamsAsyncClient
.
-