Interface TimestreamQueryAsyncClient
- 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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue 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 aTimestreamQueryAsyncClient.default CompletableFuture<CancelQueryResponse> cancelQuery(Consumer<CancelQueryRequest.Builder> cancelQueryRequest) Cancels a query that has been issued.default CompletableFuture<CancelQueryResponse> cancelQuery(CancelQueryRequest cancelQueryRequest) Cancels a query that has been issued.static TimestreamQueryAsyncClientcreate()Create aTimestreamQueryAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.createScheduledQuery(Consumer<CreateScheduledQueryRequest.Builder> createScheduledQueryRequest) Create a scheduled query that will be run on your behalf at the configured schedule.createScheduledQuery(CreateScheduledQueryRequest createScheduledQueryRequest) Create a scheduled query that will be run on your behalf at the configured schedule.deleteScheduledQuery(Consumer<DeleteScheduledQueryRequest.Builder> deleteScheduledQueryRequest) Deletes a given scheduled query.deleteScheduledQuery(DeleteScheduledQueryRequest deleteScheduledQueryRequest) Deletes a given scheduled query.describeAccountSettings(Consumer<DescribeAccountSettingsRequest.Builder> describeAccountSettingsRequest) Describes the settings for your account that include the query pricing model and the configured maximum TCUs the service can use for your query workload.describeAccountSettings(DescribeAccountSettingsRequest describeAccountSettingsRequest) Describes the settings for your account that include the query pricing model and the configured maximum TCUs the service can use for your query workload.describeEndpoints(Consumer<DescribeEndpointsRequest.Builder> describeEndpointsRequest) DescribeEndpoints returns a list of available endpoints to make Timestream API calls against.describeEndpoints(DescribeEndpointsRequest describeEndpointsRequest) DescribeEndpoints returns a list of available endpoints to make Timestream API calls against.describeScheduledQuery(Consumer<DescribeScheduledQueryRequest.Builder> describeScheduledQueryRequest) Provides detailed information about a scheduled query.describeScheduledQuery(DescribeScheduledQueryRequest describeScheduledQueryRequest) Provides detailed information about a scheduled query.executeScheduledQuery(Consumer<ExecuteScheduledQueryRequest.Builder> executeScheduledQueryRequest) You can use this API to run a scheduled query manually.executeScheduledQuery(ExecuteScheduledQueryRequest executeScheduledQueryRequest) You can use this API to run a scheduled query manually.listScheduledQueries(Consumer<ListScheduledQueriesRequest.Builder> listScheduledQueriesRequest) Gets a list of all scheduled queries in the caller's Amazon account and Region.listScheduledQueries(ListScheduledQueriesRequest listScheduledQueriesRequest) Gets a list of all scheduled queries in the caller's Amazon account and Region.default ListScheduledQueriesPublisherlistScheduledQueriesPaginator(Consumer<ListScheduledQueriesRequest.Builder> listScheduledQueriesRequest) This is a variant oflistScheduledQueries(software.amazon.awssdk.services.timestreamquery.model.ListScheduledQueriesRequest)operation.default ListScheduledQueriesPublisherlistScheduledQueriesPaginator(ListScheduledQueriesRequest listScheduledQueriesRequest) This is a variant oflistScheduledQueries(software.amazon.awssdk.services.timestreamquery.model.ListScheduledQueriesRequest)operation.listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) List all tags on a Timestream query resource.listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) List all tags on a Timestream query resource.default ListTagsForResourcePublisherlistTagsForResourcePaginator(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) This is a variant oflistTagsForResource(software.amazon.awssdk.services.timestreamquery.model.ListTagsForResourceRequest)operation.default ListTagsForResourcePublisherlistTagsForResourcePaginator(ListTagsForResourceRequest listTagsForResourceRequest) This is a variant oflistTagsForResource(software.amazon.awssdk.services.timestreamquery.model.ListTagsForResourceRequest)operation.default CompletableFuture<PrepareQueryResponse> prepareQuery(Consumer<PrepareQueryRequest.Builder> prepareQueryRequest) A synchronous operation that allows you to submit a query with parameters to be stored by Timestream for later running.default CompletableFuture<PrepareQueryResponse> prepareQuery(PrepareQueryRequest prepareQueryRequest) A synchronous operation that allows you to submit a query with parameters to be stored by Timestream for later running.default CompletableFuture<QueryResponse> query(Consumer<QueryRequest.Builder> queryRequest) Queryis a synchronous operation that enables you to run a query against your Amazon Timestream data.default CompletableFuture<QueryResponse> query(QueryRequest queryRequest) Queryis a synchronous operation that enables you to run a query against your Amazon Timestream data.default QueryPublisherqueryPaginator(Consumer<QueryRequest.Builder> queryRequest) This is a variant ofquery(software.amazon.awssdk.services.timestreamquery.model.QueryRequest)operation.default QueryPublisherqueryPaginator(QueryRequest queryRequest) This is a variant ofquery(software.amazon.awssdk.services.timestreamquery.model.QueryRequest)operation.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationdefault CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) Associate a set of tags with a Timestream resource.default CompletableFuture<TagResourceResponse> tagResource(TagResourceRequest tagResourceRequest) Associate a set of tags with a Timestream resource.default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes the association of tags from a Timestream query resource.default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest) Removes the association of tags from a Timestream query resource.updateAccountSettings(Consumer<UpdateAccountSettingsRequest.Builder> updateAccountSettingsRequest) Transitions your account to use TCUs for query pricing and modifies the maximum query compute units that you've configured.updateAccountSettings(UpdateAccountSettingsRequest updateAccountSettingsRequest) Transitions your account to use TCUs for query pricing and modifies the maximum query compute units that you've configured.updateScheduledQuery(Consumer<UpdateScheduledQueryRequest.Builder> updateScheduledQueryRequest) Update a scheduled query.updateScheduledQuery(UpdateScheduledQueryRequest updateScheduledQueryRequest) Update a scheduled query.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods 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
-
cancelQuery
Cancels a query that has been issued. Cancellation is provided only if the query has not completed running before the cancellation request was issued. Because cancellation is an idempotent operation, subsequent cancellation requests will return a
CancellationMessage, indicating that the query has already been canceled. See code sample for details.- Parameters:
cancelQueryRequest-- Returns:
- A Java Future containing the result of the CancelQuery 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
cancelQuery
default CompletableFuture<CancelQueryResponse> cancelQuery(Consumer<CancelQueryRequest.Builder> cancelQueryRequest) Cancels a query that has been issued. Cancellation is provided only if the query has not completed running before the cancellation request was issued. Because cancellation is an idempotent operation, subsequent cancellation requests will return a
CancellationMessage, indicating that the query has already been canceled. See code sample for details.
This is a convenience which creates an instance of the
CancelQueryRequest.Builderavoiding the need to create one manually viaCancelQueryRequest.builder()- Parameters:
cancelQueryRequest- AConsumerthat will call methods onCancelQueryRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the CancelQuery 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createScheduledQuery
default CompletableFuture<CreateScheduledQueryResponse> createScheduledQuery(CreateScheduledQueryRequest createScheduledQueryRequest) Create a scheduled query that will be run on your behalf at the configured schedule. Timestream assumes the execution role provided as part of the
ScheduledQueryExecutionRoleArnparameter to run the query. You can use theNotificationConfigurationparameter to configure notification for your scheduled query operations.- Parameters:
createScheduledQueryRequest-- Returns:
- A Java Future containing the result of the CreateScheduledQuery 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.- AccessDeniedException You are not authorized to perform this action.
- ConflictException Unable to poll results for a cancelled query.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ServiceQuotaExceededException You have exceeded the service quota.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createScheduledQuery
default CompletableFuture<CreateScheduledQueryResponse> createScheduledQuery(Consumer<CreateScheduledQueryRequest.Builder> createScheduledQueryRequest) Create a scheduled query that will be run on your behalf at the configured schedule. Timestream assumes the execution role provided as part of the
ScheduledQueryExecutionRoleArnparameter to run the query. You can use theNotificationConfigurationparameter to configure notification for your scheduled query operations.
This is a convenience which creates an instance of the
CreateScheduledQueryRequest.Builderavoiding the need to create one manually viaCreateScheduledQueryRequest.builder()- Parameters:
createScheduledQueryRequest- AConsumerthat will call methods onCreateScheduledQueryRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the CreateScheduledQuery 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.- AccessDeniedException You are not authorized to perform this action.
- ConflictException Unable to poll results for a cancelled query.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ServiceQuotaExceededException You have exceeded the service quota.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteScheduledQuery
default CompletableFuture<DeleteScheduledQueryResponse> deleteScheduledQuery(DeleteScheduledQueryRequest deleteScheduledQueryRequest) Deletes a given scheduled query. This is an irreversible operation.
- Parameters:
deleteScheduledQueryRequest-- Returns:
- A Java Future containing the result of the DeleteScheduledQuery 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ResourceNotFoundException The requested resource could not be found.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteScheduledQuery
default CompletableFuture<DeleteScheduledQueryResponse> deleteScheduledQuery(Consumer<DeleteScheduledQueryRequest.Builder> deleteScheduledQueryRequest) Deletes a given scheduled query. This is an irreversible operation.
This is a convenience which creates an instance of the
DeleteScheduledQueryRequest.Builderavoiding the need to create one manually viaDeleteScheduledQueryRequest.builder()- Parameters:
deleteScheduledQueryRequest- AConsumerthat will call methods onDeleteScheduledQueryRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the DeleteScheduledQuery 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ResourceNotFoundException The requested resource could not be found.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
describeAccountSettings
default CompletableFuture<DescribeAccountSettingsResponse> describeAccountSettings(DescribeAccountSettingsRequest describeAccountSettingsRequest) Describes the settings for your account that include the query pricing model and the configured maximum TCUs the service can use for your query workload.
You're charged only for the duration of compute units used for your workloads.
- Parameters:
describeAccountSettingsRequest-- Returns:
- A Java Future containing the result of the DescribeAccountSettings 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ThrottlingException The request was denied due to request throttling.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
describeAccountSettings
default CompletableFuture<DescribeAccountSettingsResponse> describeAccountSettings(Consumer<DescribeAccountSettingsRequest.Builder> describeAccountSettingsRequest) Describes the settings for your account that include the query pricing model and the configured maximum TCUs the service can use for your query workload.
You're charged only for the duration of compute units used for your workloads.
This is a convenience which creates an instance of the
DescribeAccountSettingsRequest.Builderavoiding the need to create one manually viaDescribeAccountSettingsRequest.builder()- Parameters:
describeAccountSettingsRequest- AConsumerthat will call methods onDescribeAccountSettingsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the DescribeAccountSettings 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ThrottlingException The request was denied due to request throttling.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
describeEndpoints
default CompletableFuture<DescribeEndpointsResponse> describeEndpoints(DescribeEndpointsRequest describeEndpointsRequest) DescribeEndpoints returns a list of available endpoints to make Timestream API calls against. This API is available through both Write and Query.
Because the Timestream SDKs are designed to transparently work with the service’s architecture, including the management and mapping of the service endpoints, it is not recommended that you use this API unless:
-
You are using VPC endpoints (Amazon Web Services PrivateLink) with Timestream
-
Your application uses a programming language that does not yet have SDK support
-
You require better control over the client-side implementation
For detailed information on how and when to use and implement DescribeEndpoints, see The Endpoint Discovery Pattern.
- Parameters:
describeEndpointsRequest-- Returns:
- A Java Future containing the result of the DescribeEndpoints 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.- InternalServerException The service was unable to fully process this request because of an internal server error.
- ValidationException Invalid or malformed request.
- ThrottlingException The request was denied due to request throttling.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
describeEndpoints
default CompletableFuture<DescribeEndpointsResponse> describeEndpoints(Consumer<DescribeEndpointsRequest.Builder> describeEndpointsRequest) DescribeEndpoints returns a list of available endpoints to make Timestream API calls against. This API is available through both Write and Query.
Because the Timestream SDKs are designed to transparently work with the service’s architecture, including the management and mapping of the service endpoints, it is not recommended that you use this API unless:
-
You are using VPC endpoints (Amazon Web Services PrivateLink) with Timestream
-
Your application uses a programming language that does not yet have SDK support
-
You require better control over the client-side implementation
For detailed information on how and when to use and implement DescribeEndpoints, see The Endpoint Discovery Pattern.
This is a convenience which creates an instance of the
DescribeEndpointsRequest.Builderavoiding the need to create one manually viaDescribeEndpointsRequest.builder()- Parameters:
describeEndpointsRequest- AConsumerthat will call methods onDescribeEndpointsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the DescribeEndpoints 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.- InternalServerException The service was unable to fully process this request because of an internal server error.
- ValidationException Invalid or malformed request.
- ThrottlingException The request was denied due to request throttling.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
describeScheduledQuery
default CompletableFuture<DescribeScheduledQueryResponse> describeScheduledQuery(DescribeScheduledQueryRequest describeScheduledQueryRequest) Provides detailed information about a scheduled query.
- Parameters:
describeScheduledQueryRequest-- Returns:
- A Java Future containing the result of the DescribeScheduledQuery 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ResourceNotFoundException The requested resource could not be found.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
describeScheduledQuery
default CompletableFuture<DescribeScheduledQueryResponse> describeScheduledQuery(Consumer<DescribeScheduledQueryRequest.Builder> describeScheduledQueryRequest) Provides detailed information about a scheduled query.
This is a convenience which creates an instance of the
DescribeScheduledQueryRequest.Builderavoiding the need to create one manually viaDescribeScheduledQueryRequest.builder()- Parameters:
describeScheduledQueryRequest- AConsumerthat will call methods onDescribeScheduledQueryRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the DescribeScheduledQuery 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ResourceNotFoundException The requested resource could not be found.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
executeScheduledQuery
default CompletableFuture<ExecuteScheduledQueryResponse> executeScheduledQuery(ExecuteScheduledQueryRequest executeScheduledQueryRequest) You can use this API to run a scheduled query manually.
- Parameters:
executeScheduledQueryRequest-- Returns:
- A Java Future containing the result of the ExecuteScheduledQuery 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ResourceNotFoundException The requested resource could not be found.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
executeScheduledQuery
default CompletableFuture<ExecuteScheduledQueryResponse> executeScheduledQuery(Consumer<ExecuteScheduledQueryRequest.Builder> executeScheduledQueryRequest) You can use this API to run a scheduled query manually.
This is a convenience which creates an instance of the
ExecuteScheduledQueryRequest.Builderavoiding the need to create one manually viaExecuteScheduledQueryRequest.builder()- Parameters:
executeScheduledQueryRequest- AConsumerthat will call methods onExecuteScheduledQueryRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ExecuteScheduledQuery 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ResourceNotFoundException The requested resource could not be found.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listScheduledQueries
default CompletableFuture<ListScheduledQueriesResponse> listScheduledQueries(ListScheduledQueriesRequest listScheduledQueriesRequest) Gets a list of all scheduled queries in the caller's Amazon account and Region.
ListScheduledQueriesis eventually consistent.- Parameters:
listScheduledQueriesRequest-- Returns:
- A Java Future containing the result of the ListScheduledQueries 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listScheduledQueries
default CompletableFuture<ListScheduledQueriesResponse> listScheduledQueries(Consumer<ListScheduledQueriesRequest.Builder> listScheduledQueriesRequest) Gets a list of all scheduled queries in the caller's Amazon account and Region.
ListScheduledQueriesis eventually consistent.
This is a convenience which creates an instance of the
ListScheduledQueriesRequest.Builderavoiding the need to create one manually viaListScheduledQueriesRequest.builder()- Parameters:
listScheduledQueriesRequest- AConsumerthat will call methods onListScheduledQueriesRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListScheduledQueries 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listScheduledQueriesPaginator
default ListScheduledQueriesPublisher listScheduledQueriesPaginator(ListScheduledQueriesRequest listScheduledQueriesRequest) This is a variant of
listScheduledQueries(software.amazon.awssdk.services.timestreamquery.model.ListScheduledQueriesRequest)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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.timestreamquery.paginators.ListScheduledQueriesPublisher publisher = client.listScheduledQueriesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.timestreamquery.paginators.ListScheduledQueriesPublisher publisher = client.listScheduledQueriesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.timestreamquery.model.ListScheduledQueriesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.timestreamquery.model.ListScheduledQueriesResponse 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
listScheduledQueries(software.amazon.awssdk.services.timestreamquery.model.ListScheduledQueriesRequest)operation.- Parameters:
listScheduledQueriesRequest-- 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listScheduledQueriesPaginator
default ListScheduledQueriesPublisher listScheduledQueriesPaginator(Consumer<ListScheduledQueriesRequest.Builder> listScheduledQueriesRequest) This is a variant of
listScheduledQueries(software.amazon.awssdk.services.timestreamquery.model.ListScheduledQueriesRequest)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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.timestreamquery.paginators.ListScheduledQueriesPublisher publisher = client.listScheduledQueriesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.timestreamquery.paginators.ListScheduledQueriesPublisher publisher = client.listScheduledQueriesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.timestreamquery.model.ListScheduledQueriesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.timestreamquery.model.ListScheduledQueriesResponse 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
listScheduledQueries(software.amazon.awssdk.services.timestreamquery.model.ListScheduledQueriesRequest)operation.
This is a convenience which creates an instance of the
ListScheduledQueriesRequest.Builderavoiding the need to create one manually viaListScheduledQueriesRequest.builder()- Parameters:
listScheduledQueriesRequest- AConsumerthat will call methods onListScheduledQueriesRequest.Builderto 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listTagsForResource
default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) List all tags on a Timestream query resource.
- Parameters:
listTagsForResourceRequest-- Returns:
- A Java Future containing the result of the ListTagsForResource 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.- ResourceNotFoundException The requested resource could not be found.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listTagsForResource
default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) List all tags on a Timestream query resource.
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builderavoiding the need to create one manually viaListTagsForResourceRequest.builder()- Parameters:
listTagsForResourceRequest- AConsumerthat will call methods onListTagsForResourceRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListTagsForResource 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.- ResourceNotFoundException The requested resource could not be found.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listTagsForResourcePaginator
default ListTagsForResourcePublisher listTagsForResourcePaginator(ListTagsForResourceRequest listTagsForResourceRequest) This is a variant of
listTagsForResource(software.amazon.awssdk.services.timestreamquery.model.ListTagsForResourceRequest)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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.timestreamquery.paginators.ListTagsForResourcePublisher publisher = client.listTagsForResourcePaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.timestreamquery.paginators.ListTagsForResourcePublisher publisher = client.listTagsForResourcePaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.timestreamquery.model.ListTagsForResourceResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.timestreamquery.model.ListTagsForResourceResponse 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
listTagsForResource(software.amazon.awssdk.services.timestreamquery.model.ListTagsForResourceRequest)operation.- Parameters:
listTagsForResourceRequest-- 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.- ResourceNotFoundException The requested resource could not be found.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listTagsForResourcePaginator
default ListTagsForResourcePublisher listTagsForResourcePaginator(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) This is a variant of
listTagsForResource(software.amazon.awssdk.services.timestreamquery.model.ListTagsForResourceRequest)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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.timestreamquery.paginators.ListTagsForResourcePublisher publisher = client.listTagsForResourcePaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.timestreamquery.paginators.ListTagsForResourcePublisher publisher = client.listTagsForResourcePaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.timestreamquery.model.ListTagsForResourceResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.timestreamquery.model.ListTagsForResourceResponse 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
listTagsForResource(software.amazon.awssdk.services.timestreamquery.model.ListTagsForResourceRequest)operation.
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builderavoiding the need to create one manually viaListTagsForResourceRequest.builder()- Parameters:
listTagsForResourceRequest- AConsumerthat will call methods onListTagsForResourceRequest.Builderto 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.- ResourceNotFoundException The requested resource could not be found.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
prepareQuery
default CompletableFuture<PrepareQueryResponse> prepareQuery(PrepareQueryRequest prepareQueryRequest) A synchronous operation that allows you to submit a query with parameters to be stored by Timestream for later running. Timestream only supports using this operation with
ValidateOnlyset totrue.- Parameters:
prepareQueryRequest-- Returns:
- A Java Future containing the result of the PrepareQuery 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
prepareQuery
default CompletableFuture<PrepareQueryResponse> prepareQuery(Consumer<PrepareQueryRequest.Builder> prepareQueryRequest) A synchronous operation that allows you to submit a query with parameters to be stored by Timestream for later running. Timestream only supports using this operation with
ValidateOnlyset totrue.
This is a convenience which creates an instance of the
PrepareQueryRequest.Builderavoiding the need to create one manually viaPrepareQueryRequest.builder()- Parameters:
prepareQueryRequest- AConsumerthat will call methods onPrepareQueryRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the PrepareQuery 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
query
Queryis a synchronous operation that enables you to run a query against your Amazon Timestream data.Querywill time out after 60 seconds. You must update the default timeout in the SDK to support a timeout of 60 seconds. See the code sample for details.Your query request will fail in the following cases:
-
If you submit a
Queryrequest with the same client token outside of the 5-minute idempotency window. -
If you submit a
Queryrequest with the same client token, but change other parameters, within the 5-minute idempotency window. -
If the size of the row (including the query metadata) exceeds 1 MB, then the query will fail with the following error message:
Query aborted as max page response size has been exceeded by the output result row -
If the IAM principal of the query initiator and the result reader are not the same and/or the query initiator and the result reader do not have the same query string in the query requests, the query will fail with an
Invalid pagination tokenerror.
- Parameters:
queryRequest-- Returns:
- A Java Future containing the result of the Query 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.- AccessDeniedException You are not authorized to perform this action.
- ConflictException Unable to poll results for a cancelled query.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- QueryExecutionException Timestream was unable to run the query successfully.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
query
Queryis a synchronous operation that enables you to run a query against your Amazon Timestream data.Querywill time out after 60 seconds. You must update the default timeout in the SDK to support a timeout of 60 seconds. See the code sample for details.Your query request will fail in the following cases:
-
If you submit a
Queryrequest with the same client token outside of the 5-minute idempotency window. -
If you submit a
Queryrequest with the same client token, but change other parameters, within the 5-minute idempotency window. -
If the size of the row (including the query metadata) exceeds 1 MB, then the query will fail with the following error message:
Query aborted as max page response size has been exceeded by the output result row -
If the IAM principal of the query initiator and the result reader are not the same and/or the query initiator and the result reader do not have the same query string in the query requests, the query will fail with an
Invalid pagination tokenerror.
This is a convenience which creates an instance of the
QueryRequest.Builderavoiding the need to create one manually viaQueryRequest.builder()- Parameters:
queryRequest- AConsumerthat will call methods onQueryRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the Query 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.- AccessDeniedException You are not authorized to perform this action.
- ConflictException Unable to poll results for a cancelled query.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- QueryExecutionException Timestream was unable to run the query successfully.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
queryPaginator
This is a variant of
query(software.amazon.awssdk.services.timestreamquery.model.QueryRequest)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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.timestreamquery.paginators.QueryPublisher publisher = client.queryPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.timestreamquery.paginators.QueryPublisher publisher = client.queryPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.timestreamquery.model.QueryResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.timestreamquery.model.QueryResponse response) { //... }; });Please notice that the configuration of MaxRows 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
query(software.amazon.awssdk.services.timestreamquery.model.QueryRequest)operation.- Parameters:
queryRequest-- 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.- AccessDeniedException You are not authorized to perform this action.
- ConflictException Unable to poll results for a cancelled query.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- QueryExecutionException Timestream was unable to run the query successfully.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
queryPaginator
This is a variant of
query(software.amazon.awssdk.services.timestreamquery.model.QueryRequest)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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.timestreamquery.paginators.QueryPublisher publisher = client.queryPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.timestreamquery.paginators.QueryPublisher publisher = client.queryPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.timestreamquery.model.QueryResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.timestreamquery.model.QueryResponse response) { //... }; });Please notice that the configuration of MaxRows 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
query(software.amazon.awssdk.services.timestreamquery.model.QueryRequest)operation.
This is a convenience which creates an instance of the
QueryRequest.Builderavoiding the need to create one manually viaQueryRequest.builder()- Parameters:
queryRequest- AConsumerthat will call methods onQueryRequest.Builderto 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.- AccessDeniedException You are not authorized to perform this action.
- ConflictException Unable to poll results for a cancelled query.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- QueryExecutionException Timestream was unable to run the query successfully.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
tagResource
Associate a set of tags with a Timestream resource. You can then activate these user-defined tags so that they appear on the Billing and Cost Management console for cost allocation tracking.
- Parameters:
tagResourceRequest-- Returns:
- A Java Future containing the result of the TagResource 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.- ResourceNotFoundException The requested resource could not be found.
- ServiceQuotaExceededException You have exceeded the service quota.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
tagResource
default CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) Associate a set of tags with a Timestream resource. You can then activate these user-defined tags so that they appear on the Billing and Cost Management console for cost allocation tracking.
This is a convenience which creates an instance of the
TagResourceRequest.Builderavoiding the need to create one manually viaTagResourceRequest.builder()- Parameters:
tagResourceRequest- AConsumerthat will call methods onTagResourceRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the TagResource 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.- ResourceNotFoundException The requested resource could not be found.
- ServiceQuotaExceededException You have exceeded the service quota.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
untagResource
default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest) Removes the association of tags from a Timestream query resource.
- Parameters:
untagResourceRequest-- Returns:
- A Java Future containing the result of the UntagResource 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.- ValidationException Invalid or malformed request.
- ThrottlingException The request was denied due to request throttling.
- ResourceNotFoundException The requested resource could not be found.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
untagResource
default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes the association of tags from a Timestream query resource.
This is a convenience which creates an instance of the
UntagResourceRequest.Builderavoiding the need to create one manually viaUntagResourceRequest.builder()- Parameters:
untagResourceRequest- AConsumerthat will call methods onUntagResourceRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the UntagResource 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.- ValidationException Invalid or malformed request.
- ThrottlingException The request was denied due to request throttling.
- ResourceNotFoundException The requested resource could not be found.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateAccountSettings
default CompletableFuture<UpdateAccountSettingsResponse> updateAccountSettings(UpdateAccountSettingsRequest updateAccountSettingsRequest) Transitions your account to use TCUs for query pricing and modifies the maximum query compute units that you've configured. If you reduce the value of
MaxQueryTCUto a desired configuration, the new value can take up to 24 hours to be effective.After you've transitioned your account to use TCUs for query pricing, you can't transition to using bytes scanned for query pricing.
- Parameters:
updateAccountSettingsRequest-- Returns:
- A Java Future containing the result of the UpdateAccountSettings 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateAccountSettings
default CompletableFuture<UpdateAccountSettingsResponse> updateAccountSettings(Consumer<UpdateAccountSettingsRequest.Builder> updateAccountSettingsRequest) Transitions your account to use TCUs for query pricing and modifies the maximum query compute units that you've configured. If you reduce the value of
MaxQueryTCUto a desired configuration, the new value can take up to 24 hours to be effective.After you've transitioned your account to use TCUs for query pricing, you can't transition to using bytes scanned for query pricing.
This is a convenience which creates an instance of the
UpdateAccountSettingsRequest.Builderavoiding the need to create one manually viaUpdateAccountSettingsRequest.builder()- Parameters:
updateAccountSettingsRequest- AConsumerthat will call methods onUpdateAccountSettingsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the UpdateAccountSettings 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateScheduledQuery
default CompletableFuture<UpdateScheduledQueryResponse> updateScheduledQuery(UpdateScheduledQueryRequest updateScheduledQueryRequest) Update a scheduled query.
- Parameters:
updateScheduledQueryRequest-- Returns:
- A Java Future containing the result of the UpdateScheduledQuery 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ResourceNotFoundException The requested resource could not be found.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateScheduledQuery
default CompletableFuture<UpdateScheduledQueryResponse> updateScheduledQuery(Consumer<UpdateScheduledQueryRequest.Builder> updateScheduledQueryRequest) Update a scheduled query.
This is a convenience which creates an instance of the
UpdateScheduledQueryRequest.Builderavoiding the need to create one manually viaUpdateScheduledQueryRequest.builder()- Parameters:
updateScheduledQueryRequest- AConsumerthat will call methods onUpdateScheduledQueryRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the UpdateScheduledQuery 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.- AccessDeniedException You are not authorized to perform this action.
- InternalServerException The service was unable to fully process this request because of an internal server error.
- ResourceNotFoundException The requested resource could not be found.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid or malformed request.
- InvalidEndpointException The requested endpoint was not valid.
- 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.
- TimestreamQueryException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
serviceClientConfiguration
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-
create
Create aTimestreamQueryAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aTimestreamQueryAsyncClient.
-