/* * 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.*; import com.amazonaws.regions.*; import com.amazonaws.services.timestreamquery.model.*; /** * Interface for accessing Timestream Query. *

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

*

* Amazon Timestream Query *

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public interface AmazonTimestreamQuery { /** * The region metadata service name for computing region endpoints. You can use this value to retrieve metadata * (such as supported regions) of the service. * * @see RegionUtils#getRegionsForService(String) */ String ENDPOINT_PREFIX = "query.timestream"; /** *

* 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 Result of the CancelQuery operation returned by the service. * @throws AccessDeniedException * You are not authorized to perform this action. * @throws InternalServerException * Timestream was unable to fully process this request because of an internal server error. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * Invalid or malformed request. * @throws InvalidEndpointException * The requested endpoint was not valid. * @sample AmazonTimestreamQuery.CancelQuery * @see AWS * API Documentation */ CancelQueryResult cancelQuery(CancelQueryRequest cancelQueryRequest); /** *

* 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 Result of the CreateScheduledQuery operation returned by the service. * @throws AccessDeniedException * You are not authorized to perform this action. * @throws ConflictException * Unable to poll results for a cancelled query. * @throws InternalServerException * Timestream was unable to fully process this request because of an internal server error. * @throws ServiceQuotaExceededException * You have exceeded the service quota. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * Invalid or malformed request. * @throws InvalidEndpointException * The requested endpoint was not valid. * @sample AmazonTimestreamQuery.CreateScheduledQuery * @see AWS API Documentation */ CreateScheduledQueryResult createScheduledQuery(CreateScheduledQueryRequest createScheduledQueryRequest); /** *

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

* * @param deleteScheduledQueryRequest * @return Result of the DeleteScheduledQuery operation returned by the service. * @throws AccessDeniedException * You are not authorized to perform this action. * @throws InternalServerException * Timestream was unable to fully process this request because of an internal server error. * @throws ResourceNotFoundException * The requested resource could not be found. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * Invalid or malformed request. * @throws InvalidEndpointException * The requested endpoint was not valid. * @sample AmazonTimestreamQuery.DeleteScheduledQuery * @see AWS API Documentation */ DeleteScheduledQueryResult deleteScheduledQuery(DeleteScheduledQueryRequest deleteScheduledQueryRequest); /** *

* 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 Result of the DescribeEndpoints operation returned by the service. * @throws InternalServerException * Timestream was unable to fully process this request because of an internal server error. * @throws ValidationException * Invalid or malformed request. * @throws ThrottlingException * The request was denied due to request throttling. * @sample AmazonTimestreamQuery.DescribeEndpoints * @see AWS API Documentation */ DescribeEndpointsResult describeEndpoints(DescribeEndpointsRequest describeEndpointsRequest); /** *

* Provides detailed information about a scheduled query. *

* * @param describeScheduledQueryRequest * @return Result of the DescribeScheduledQuery operation returned by the service. * @throws AccessDeniedException * You are not authorized to perform this action. * @throws InternalServerException * Timestream was unable to fully process this request because of an internal server error. * @throws ResourceNotFoundException * The requested resource could not be found. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * Invalid or malformed request. * @throws InvalidEndpointException * The requested endpoint was not valid. * @sample AmazonTimestreamQuery.DescribeScheduledQuery * @see AWS API Documentation */ DescribeScheduledQueryResult describeScheduledQuery(DescribeScheduledQueryRequest describeScheduledQueryRequest); /** *

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

* * @param executeScheduledQueryRequest * @return Result of the ExecuteScheduledQuery operation returned by the service. * @throws AccessDeniedException * You are not authorized to perform this action. * @throws InternalServerException * Timestream was unable to fully process this request because of an internal server error. * @throws ResourceNotFoundException * The requested resource could not be found. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * Invalid or malformed request. * @throws InvalidEndpointException * The requested endpoint was not valid. * @sample AmazonTimestreamQuery.ExecuteScheduledQuery * @see AWS API Documentation */ ExecuteScheduledQueryResult executeScheduledQuery(ExecuteScheduledQueryRequest executeScheduledQueryRequest); /** *

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

* * @param listScheduledQueriesRequest * @return Result of the ListScheduledQueries operation returned by the service. * @throws AccessDeniedException * You are not authorized to perform this action. * @throws InternalServerException * Timestream was unable to fully process this request because of an internal server error. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * Invalid or malformed request. * @throws InvalidEndpointException * The requested endpoint was not valid. * @sample AmazonTimestreamQuery.ListScheduledQueries * @see AWS API Documentation */ ListScheduledQueriesResult listScheduledQueries(ListScheduledQueriesRequest listScheduledQueriesRequest); /** *

* List all tags on a Timestream query resource. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws ResourceNotFoundException * The requested resource could not be found. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * Invalid or malformed request. * @throws InvalidEndpointException * The requested endpoint was not valid. * @sample AmazonTimestreamQuery.ListTagsForResource * @see AWS API Documentation */ ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest); /** *

* 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 Result of the PrepareQuery operation returned by the service. * @throws AccessDeniedException * You are not authorized to perform this action. * @throws InternalServerException * Timestream was unable to fully process this request because of an internal server error. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * Invalid or malformed request. * @throws InvalidEndpointException * The requested endpoint was not valid. * @sample AmazonTimestreamQuery.PrepareQuery * @see AWS * API Documentation */ PrepareQueryResult prepareQuery(PrepareQueryRequest prepareQueryRequest); /** *

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

* * * @param queryRequest * @return Result of the Query operation returned by the service. * @throws AccessDeniedException * You are not authorized to perform this action. * @throws ConflictException * Unable to poll results for a cancelled query. * @throws InternalServerException * Timestream was unable to fully process this request because of an internal server error. * @throws QueryExecutionException * Timestream was unable to run the query successfully. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * Invalid or malformed request. * @throws InvalidEndpointException * The requested endpoint was not valid. * @sample AmazonTimestreamQuery.Query * @see AWS API * Documentation */ QueryResult query(QueryRequest queryRequest); /** *

* 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 Result of the TagResource operation returned by the service. * @throws ResourceNotFoundException * The requested resource could not be found. * @throws ServiceQuotaExceededException * You have exceeded the service quota. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * Invalid or malformed request. * @throws InvalidEndpointException * The requested endpoint was not valid. * @sample AmazonTimestreamQuery.TagResource * @see AWS * API Documentation */ TagResourceResult tagResource(TagResourceRequest tagResourceRequest); /** *

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

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws ValidationException * Invalid or malformed request. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ResourceNotFoundException * The requested resource could not be found. * @throws InvalidEndpointException * The requested endpoint was not valid. * @sample AmazonTimestreamQuery.UntagResource * @see AWS * API Documentation */ UntagResourceResult untagResource(UntagResourceRequest untagResourceRequest); /** *

* Update a scheduled query. *

* * @param updateScheduledQueryRequest * @return Result of the UpdateScheduledQuery operation returned by the service. * @throws AccessDeniedException * You are not authorized to perform this action. * @throws InternalServerException * Timestream was unable to fully process this request because of an internal server error. * @throws ResourceNotFoundException * The requested resource could not be found. * @throws ThrottlingException * The request was denied due to request throttling. * @throws ValidationException * Invalid or malformed request. * @throws InvalidEndpointException * The requested endpoint was not valid. * @sample AmazonTimestreamQuery.UpdateScheduledQuery * @see AWS API Documentation */ UpdateScheduledQueryResult updateScheduledQuery(UpdateScheduledQueryRequest updateScheduledQueryRequest); /** * Shuts down this client object, releasing any resources that might be held open. This is an optional method, and * callers are not expected to call it, but can if they want to explicitly release any open resources. Once a client * has been shutdown, it should not be used to make any more requests. */ void shutdown(); /** * Returns additional metadata for a previously executed successful request, typically used for debugging issues * where a service isn't acting as expected. This data isn't considered part of the result data returned by an * operation, so it's available through this separate, diagnostic interface. *

* Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic * information for an executed request, you should use this method to retrieve it as soon as possible after * executing a request. * * @param request * The originally executed request. * * @return The response metadata for the specified request, or null if none is available. */ ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request); }