/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.timestreamquery; import javax.annotation.Generated; import com.amazonaws.services.timestreamquery.model.*; /** * Interface for accessing Timestream Query asynchronously. Each asynchronous method will return a Java Future object * representing the asynchronous operation; overloads which accept an {@code AsyncHandler} can be used to receive * notification when an asynchronous operation completes. *

* Note: Do not directly implement this interface, new methods are added to it regularly. Extend from * {@link com.amazonaws.services.timestreamquery.AbstractAmazonTimestreamQueryAsync} instead. *

*

* Amazon Timestream Query *

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public interface AmazonTimestreamQueryAsync extends AmazonTimestreamQuery { /** *

* 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. *

* * @param cancelQueryRequest * @return A Java Future containing the result of the CancelQuery operation returned by the service. * @sample AmazonTimestreamQueryAsync.CancelQuery * @see AWS * API Documentation */ java.util.concurrent.Future cancelQueryAsync(CancelQueryRequest 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. *

* * @param cancelQueryRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the CancelQuery operation returned by the service. * @sample AmazonTimestreamQueryAsyncHandler.CancelQuery * @see AWS * API Documentation */ java.util.concurrent.Future cancelQueryAsync(CancelQueryRequest cancelQueryRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* 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 ScheduledQueryExecutionRoleArn parameter to run the query. * You can use the NotificationConfiguration parameter to configure notification for your scheduled * query operations. *

* * @param createScheduledQueryRequest * @return A Java Future containing the result of the CreateScheduledQuery operation returned by the service. * @sample AmazonTimestreamQueryAsync.CreateScheduledQuery * @see AWS API Documentation */ java.util.concurrent.Future createScheduledQueryAsync(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 ScheduledQueryExecutionRoleArn parameter to run the query. * You can use the NotificationConfiguration parameter to configure notification for your scheduled * query operations. *

* * @param createScheduledQueryRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the CreateScheduledQuery operation returned by the service. * @sample AmazonTimestreamQueryAsyncHandler.CreateScheduledQuery * @see AWS API Documentation */ java.util.concurrent.Future createScheduledQueryAsync(CreateScheduledQueryRequest createScheduledQueryRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Deletes a given scheduled query. This is an irreversible operation. *

* * @param deleteScheduledQueryRequest * @return A Java Future containing the result of the DeleteScheduledQuery operation returned by the service. * @sample AmazonTimestreamQueryAsync.DeleteScheduledQuery * @see AWS API Documentation */ java.util.concurrent.Future deleteScheduledQueryAsync(DeleteScheduledQueryRequest deleteScheduledQueryRequest); /** *

* Deletes a given scheduled query. This is an irreversible operation. *

* * @param deleteScheduledQueryRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the DeleteScheduledQuery operation returned by the service. * @sample AmazonTimestreamQueryAsyncHandler.DeleteScheduledQuery * @see AWS API Documentation */ java.util.concurrent.Future deleteScheduledQueryAsync(DeleteScheduledQueryRequest deleteScheduledQueryRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* 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: *

* *

* For detailed information on how and when to use and implement DescribeEndpoints, see The Endpoint Discovery Pattern. *

* * @param describeEndpointsRequest * @return A Java Future containing the result of the DescribeEndpoints operation returned by the service. * @sample AmazonTimestreamQueryAsync.DescribeEndpoints * @see AWS API Documentation */ java.util.concurrent.Future describeEndpointsAsync(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: *

* *

* For detailed information on how and when to use and implement DescribeEndpoints, see The Endpoint Discovery Pattern. *

* * @param describeEndpointsRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the DescribeEndpoints operation returned by the service. * @sample AmazonTimestreamQueryAsyncHandler.DescribeEndpoints * @see AWS API Documentation */ java.util.concurrent.Future describeEndpointsAsync(DescribeEndpointsRequest describeEndpointsRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Provides detailed information about a scheduled query. *

* * @param describeScheduledQueryRequest * @return A Java Future containing the result of the DescribeScheduledQuery operation returned by the service. * @sample AmazonTimestreamQueryAsync.DescribeScheduledQuery * @see AWS API Documentation */ java.util.concurrent.Future describeScheduledQueryAsync(DescribeScheduledQueryRequest describeScheduledQueryRequest); /** *

* Provides detailed information about a scheduled query. *

* * @param describeScheduledQueryRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the DescribeScheduledQuery operation returned by the service. * @sample AmazonTimestreamQueryAsyncHandler.DescribeScheduledQuery * @see AWS API Documentation */ java.util.concurrent.Future describeScheduledQueryAsync(DescribeScheduledQueryRequest describeScheduledQueryRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* You can use this API to run a scheduled query manually. *

* * @param executeScheduledQueryRequest * @return A Java Future containing the result of the ExecuteScheduledQuery operation returned by the service. * @sample AmazonTimestreamQueryAsync.ExecuteScheduledQuery * @see AWS API Documentation */ java.util.concurrent.Future executeScheduledQueryAsync(ExecuteScheduledQueryRequest executeScheduledQueryRequest); /** *

* You can use this API to run a scheduled query manually. *

* * @param executeScheduledQueryRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the ExecuteScheduledQuery operation returned by the service. * @sample AmazonTimestreamQueryAsyncHandler.ExecuteScheduledQuery * @see AWS API Documentation */ java.util.concurrent.Future executeScheduledQueryAsync(ExecuteScheduledQueryRequest executeScheduledQueryRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Gets a list of all scheduled queries in the caller's Amazon account and Region. ListScheduledQueries * is eventually consistent. *

* * @param listScheduledQueriesRequest * @return A Java Future containing the result of the ListScheduledQueries operation returned by the service. * @sample AmazonTimestreamQueryAsync.ListScheduledQueries * @see AWS API Documentation */ java.util.concurrent.Future listScheduledQueriesAsync(ListScheduledQueriesRequest listScheduledQueriesRequest); /** *

* Gets a list of all scheduled queries in the caller's Amazon account and Region. ListScheduledQueries * is eventually consistent. *

* * @param listScheduledQueriesRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the ListScheduledQueries operation returned by the service. * @sample AmazonTimestreamQueryAsyncHandler.ListScheduledQueries * @see AWS API Documentation */ java.util.concurrent.Future listScheduledQueriesAsync(ListScheduledQueriesRequest listScheduledQueriesRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* List all tags on a Timestream query resource. *

* * @param listTagsForResourceRequest * @return A Java Future containing the result of the ListTagsForResource operation returned by the service. * @sample AmazonTimestreamQueryAsync.ListTagsForResource * @see AWS API Documentation */ java.util.concurrent.Future listTagsForResourceAsync(ListTagsForResourceRequest listTagsForResourceRequest); /** *

* List all tags on a Timestream query resource. *

* * @param listTagsForResourceRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the ListTagsForResource operation returned by the service. * @sample AmazonTimestreamQueryAsyncHandler.ListTagsForResource * @see AWS API Documentation */ java.util.concurrent.Future listTagsForResourceAsync(ListTagsForResourceRequest listTagsForResourceRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* 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 the PrepareQueryRequest$ValidateOnly set * to true. *

* * @param prepareQueryRequest * @return A Java Future containing the result of the PrepareQuery operation returned by the service. * @sample AmazonTimestreamQueryAsync.PrepareQuery * @see AWS * API Documentation */ java.util.concurrent.Future prepareQueryAsync(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 the PrepareQueryRequest$ValidateOnly set * to true. *

* * @param prepareQueryRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the PrepareQuery operation returned by the service. * @sample AmazonTimestreamQueryAsyncHandler.PrepareQuery * @see AWS * API Documentation */ java.util.concurrent.Future prepareQueryAsync(PrepareQueryRequest prepareQueryRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Query is a synchronous operation that enables you to run a query against your Amazon Timestream * data. Query will 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 Query request with the same client token outside of the 5-minute idempotency window. *

    *
  • *
  • *

    * If you submit a Query request 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 token error. *

    *
  • *
* * @param queryRequest * @return A Java Future containing the result of the Query operation returned by the service. * @sample AmazonTimestreamQueryAsync.Query * @see AWS API * Documentation */ java.util.concurrent.Future queryAsync(QueryRequest queryRequest); /** *

* Query is a synchronous operation that enables you to run a query against your Amazon Timestream * data. Query will 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 Query request with the same client token outside of the 5-minute idempotency window. *

    *
  • *
  • *

    * If you submit a Query request 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 token error. *

    *
  • *
* * @param queryRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the Query operation returned by the service. * @sample AmazonTimestreamQueryAsyncHandler.Query * @see AWS API * Documentation */ java.util.concurrent.Future queryAsync(QueryRequest queryRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* 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. *

* * @param tagResourceRequest * @return A Java Future containing the result of the TagResource operation returned by the service. * @sample AmazonTimestreamQueryAsync.TagResource * @see AWS * API Documentation */ java.util.concurrent.Future tagResourceAsync(TagResourceRequest 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. *

* * @param tagResourceRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the TagResource operation returned by the service. * @sample AmazonTimestreamQueryAsyncHandler.TagResource * @see AWS * API Documentation */ java.util.concurrent.Future tagResourceAsync(TagResourceRequest tagResourceRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Removes the association of tags from a Timestream query resource. *

* * @param untagResourceRequest * @return A Java Future containing the result of the UntagResource operation returned by the service. * @sample AmazonTimestreamQueryAsync.UntagResource * @see AWS * API Documentation */ java.util.concurrent.Future untagResourceAsync(UntagResourceRequest untagResourceRequest); /** *

* Removes the association of tags from a Timestream query resource. *

* * @param untagResourceRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the UntagResource operation returned by the service. * @sample AmazonTimestreamQueryAsyncHandler.UntagResource * @see AWS * API Documentation */ java.util.concurrent.Future untagResourceAsync(UntagResourceRequest untagResourceRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Update a scheduled query. *

* * @param updateScheduledQueryRequest * @return A Java Future containing the result of the UpdateScheduledQuery operation returned by the service. * @sample AmazonTimestreamQueryAsync.UpdateScheduledQuery * @see AWS API Documentation */ java.util.concurrent.Future updateScheduledQueryAsync(UpdateScheduledQueryRequest updateScheduledQueryRequest); /** *

* Update a scheduled query. *

* * @param updateScheduledQueryRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the UpdateScheduledQuery operation returned by the service. * @sample AmazonTimestreamQueryAsyncHandler.UpdateScheduledQuery * @see AWS API Documentation */ java.util.concurrent.Future updateScheduledQueryAsync(UpdateScheduledQueryRequest updateScheduledQueryRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); }