@Generated(value="software.amazon.awssdk:codegen") @ThreadSafe public interface TimestreamQueryClient extends SdkClient
builder() method.
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider. |
static String |
SERVICE_NAME |
| Modifier and Type | Method and Description |
|---|---|
static TimestreamQueryClientBuilder |
builder()
Create a builder that can be used to configure and create a
TimestreamQueryClient. |
default CancelQueryResponse |
cancelQuery(CancelQueryRequest cancelQueryRequest)
Cancels a query that has been issued.
|
default CancelQueryResponse |
cancelQuery(Consumer<CancelQueryRequest.Builder> cancelQueryRequest)
Cancels a query that has been issued.
|
static TimestreamQueryClient |
create()
Create a
TimestreamQueryClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default DescribeEndpointsResponse |
describeEndpoints(Consumer<DescribeEndpointsRequest.Builder> describeEndpointsRequest)
DescribeEndpoints returns a list of available endpoints to make Timestream API calls against.
|
default DescribeEndpointsResponse |
describeEndpoints(DescribeEndpointsRequest describeEndpointsRequest)
DescribeEndpoints returns a list of available endpoints to make Timestream API calls against.
|
default QueryResponse |
query(Consumer<QueryRequest.Builder> queryRequest)
Query is a synchronous operation that enables you to execute a query.
|
default QueryResponse |
query(QueryRequest queryRequest)
Query is a synchronous operation that enables you to execute a query.
|
default QueryIterable |
queryPaginator(Consumer<QueryRequest.Builder> queryRequest)
Query is a synchronous operation that enables you to execute a query.
|
default QueryIterable |
queryPaginator(QueryRequest queryRequest)
Query is a synchronous operation that enables you to execute a query.
|
static ServiceMetadata |
serviceMetadata() |
serviceNameclosestatic final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider.static TimestreamQueryClient create()
TimestreamQueryClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static TimestreamQueryClientBuilder builder()
TimestreamQueryClient.default CancelQueryResponse cancelQuery(CancelQueryRequest cancelQueryRequest) throws AccessDeniedException, InternalServerException, ThrottlingException, ValidationException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamQueryException
Cancels a query that has been issued. Cancellation is guaranteed only if the query has not completed execution
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.
cancelQueryRequest - AccessDeniedException - You are not authorized to perform this action.InternalServerException - Timestream 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 invalid.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.AwsServiceExceptiondefault CancelQueryResponse cancelQuery(Consumer<CancelQueryRequest.Builder> cancelQueryRequest) throws AccessDeniedException, InternalServerException, ThrottlingException, ValidationException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamQueryException
Cancels a query that has been issued. Cancellation is guaranteed only if the query has not completed execution
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.
This is a convenience which creates an instance of the CancelQueryRequest.Builder avoiding the need to
create one manually via CancelQueryRequest.builder()
cancelQueryRequest - A Consumer that will call methods on CancelQueryRequest.Builder to create a request.AccessDeniedException - You are not authorized to perform this action.InternalServerException - Timestream 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 invalid.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.AwsServiceExceptiondefault DescribeEndpointsResponse describeEndpoints(DescribeEndpointsRequest describeEndpointsRequest) throws InternalServerException, ValidationException, ThrottlingException, AwsServiceException, SdkClientException, TimestreamQueryException
DescribeEndpoints returns a list of available endpoints to make Timestream API calls against. This API is available through both Write and Query.
Because Timestream’s 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:
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 to use DescribeEndpoints, see The Endpoint Discovery Pattern and REST APIs.
describeEndpointsRequest - InternalServerException - Timestream 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.AwsServiceExceptiondefault DescribeEndpointsResponse describeEndpoints(Consumer<DescribeEndpointsRequest.Builder> describeEndpointsRequest) throws InternalServerException, ValidationException, ThrottlingException, AwsServiceException, SdkClientException, TimestreamQueryException
DescribeEndpoints returns a list of available endpoints to make Timestream API calls against. This API is available through both Write and Query.
Because Timestream’s 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:
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 to use DescribeEndpoints, see The Endpoint Discovery Pattern and REST APIs.
This is a convenience which creates an instance of the DescribeEndpointsRequest.Builder avoiding the need
to create one manually via DescribeEndpointsRequest.builder()
describeEndpointsRequest - A Consumer that will call methods on DescribeEndpointsRequest.Builder to create a request.InternalServerException - Timestream 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.AwsServiceExceptiondefault QueryResponse query(QueryRequest queryRequest) throws AccessDeniedException, ConflictException, InternalServerException, QueryExecutionException, ThrottlingException, ValidationException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamQueryException
Query is a synchronous operation that enables you to execute a query. Query will timeout after 60 seconds. You must update the default timeout in the SDK to support a timeout of 60 seconds. The result set will be truncated to 1MB. Service quotas apply. For more information, see Quotas in the Timestream Developer Guide.
queryRequest - AccessDeniedException - You are not authorized to perform this action.ConflictException - Unable to poll results for a cancelled query.InternalServerException - Timestream 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 invalid.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.AwsServiceExceptiondefault QueryResponse query(Consumer<QueryRequest.Builder> queryRequest) throws AccessDeniedException, ConflictException, InternalServerException, QueryExecutionException, ThrottlingException, ValidationException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamQueryException
Query is a synchronous operation that enables you to execute a query. Query will timeout after 60 seconds. You must update the default timeout in the SDK to support a timeout of 60 seconds. The result set will be truncated to 1MB. Service quotas apply. For more information, see Quotas in the Timestream Developer Guide.
This is a convenience which creates an instance of the QueryRequest.Builder avoiding the need to create
one manually via QueryRequest.builder()
queryRequest - A Consumer that will call methods on QueryRequest.Builder to create a request.AccessDeniedException - You are not authorized to perform this action.ConflictException - Unable to poll results for a cancelled query.InternalServerException - Timestream 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 invalid.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.AwsServiceExceptiondefault QueryIterable queryPaginator(QueryRequest queryRequest) throws AccessDeniedException, ConflictException, InternalServerException, QueryExecutionException, ThrottlingException, ValidationException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamQueryException
Query is a synchronous operation that enables you to execute a query. Query will timeout after 60 seconds. You must update the default timeout in the SDK to support a timeout of 60 seconds. The result set will be truncated to 1MB. Service quotas apply. For more information, see Quotas in the Timestream Developer Guide.
This is a variant of query(software.amazon.awssdk.services.timestreamquery.model.QueryRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.timestreamquery.paginators.QueryIterable responses = client.queryPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.timestreamquery.paginators.QueryIterable responses = client.queryPaginator(request);
for (software.amazon.awssdk.services.timestreamquery.model.QueryResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.timestreamquery.paginators.QueryIterable responses = client.queryPaginator(request);
responses.iterator().forEachRemaining(....);
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.
queryRequest - AccessDeniedException - You are not authorized to perform this action.ConflictException - Unable to poll results for a cancelled query.InternalServerException - Timestream 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 invalid.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.AwsServiceExceptiondefault QueryIterable queryPaginator(Consumer<QueryRequest.Builder> queryRequest) throws AccessDeniedException, ConflictException, InternalServerException, QueryExecutionException, ThrottlingException, ValidationException, InvalidEndpointException, AwsServiceException, SdkClientException, TimestreamQueryException
Query is a synchronous operation that enables you to execute a query. Query will timeout after 60 seconds. You must update the default timeout in the SDK to support a timeout of 60 seconds. The result set will be truncated to 1MB. Service quotas apply. For more information, see Quotas in the Timestream Developer Guide.
This is a variant of query(software.amazon.awssdk.services.timestreamquery.model.QueryRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.timestreamquery.paginators.QueryIterable responses = client.queryPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.timestreamquery.paginators.QueryIterable responses = client.queryPaginator(request);
for (software.amazon.awssdk.services.timestreamquery.model.QueryResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.timestreamquery.paginators.QueryIterable responses = client.queryPaginator(request);
responses.iterator().forEachRemaining(....);
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.Builder avoiding the need to create
one manually via QueryRequest.builder()
queryRequest - A Consumer that will call methods on QueryRequest.Builder to create a request.AccessDeniedException - You are not authorized to perform this action.ConflictException - Unable to poll results for a cancelled query.InternalServerException - Timestream 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 invalid.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.AwsServiceExceptionstatic ServiceMetadata serviceMetadata()
Copyright © 2021. All rights reserved.