TimestreamQuery
Service object for interacting with AWS TimestreamQuery service.
public struct TimestreamQuery: AWSService
Inheritance
AWSService
Initializers
init(client:region:partition:endpoint:timeout:byteBufferAllocator:options:)
Initialize the TimestreamQuery client
public init(
client: AWSClient,
region: SotoCore.Region? = nil,
partition: AWSPartition = .aws,
endpoint: String? = nil,
timeout: TimeAmount? = nil,
byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
options: AWSServiceConfig.Options = []
)
Parameters
- client: AWSClient used to process requests
- region: Region of server you want to communicate with. This will override the partition parameter.
- partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
- endpoint: Custom endpoint URL to use instead of standard AWS servers
- timeout: Timeout value for HTTP requests
init(from:patch:)
Initializer required by AWSService.with(middlewares:timeout:byteBufferAllocator:options)
. You are not able to use this initializer directly as there are no public initializers for AWSServiceConfig.Patch
. Please use AWSService.with(middlewares:timeout:byteBufferAllocator:options)
instead.
public init(from: TimestreamQuery, patch: AWSServiceConfig.Patch)
Properties
client
Client used for communication with AWS
public let client: AWSClient
config
Service configuration
public let config: AWSServiceConfig
Methods
cancelQuery(_:logger:on:)
public func cancelQuery(_ input: CancelQueryRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<CancelQueryResponse>
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.
createScheduledQuery(_:logger:on:)
public func createScheduledQuery(_ input: CreateScheduledQueryRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<CreateScheduledQueryResponse>
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.
deleteScheduledQuery(_:logger:on:)
@discardableResult public func deleteScheduledQuery(_ input: DeleteScheduledQueryRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<Void>
Deletes a given scheduled query. This is an irreversible operation.
describeEndpoints(_:logger:on:)
public func describeEndpoints(_ input: DescribeEndpointsRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<DescribeEndpointsResponse>
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.
describeScheduledQuery(_:logger:on:)
public func describeScheduledQuery(_ input: DescribeScheduledQueryRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<DescribeScheduledQueryResponse>
Provides detailed information about a scheduled query.
executeScheduledQuery(_:logger:on:)
@discardableResult public func executeScheduledQuery(_ input: ExecuteScheduledQueryRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<Void>
You can use this API to run a scheduled query manually.
listScheduledQueries(_:logger:on:)
public func listScheduledQueries(_ input: ListScheduledQueriesRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<ListScheduledQueriesResponse>
Gets a list of all scheduled queries in the caller's Amazon account and Region. ListScheduledQueries
is eventually consistent.
listTagsForResource(_:logger:on:)
public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<ListTagsForResourceResponse>
List all tags on a Timestream query resource.
prepareQuery(_:logger:on:)
public func prepareQuery(_ input: PrepareQueryRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<PrepareQueryResponse>
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
.
query(_:logger:on:)
public func query(_ input: QueryRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<QueryResponse>
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.
tagResource(_:logger:on:)
public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<TagResourceResponse>
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.
untagResource(_:logger:on:)
public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<UntagResourceResponse>
Removes the association of tags from a Timestream query resource.
updateScheduledQuery(_:logger:on:)
@discardableResult public func updateScheduledQuery(_ input: UpdateScheduledQueryRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<Void>
Update a scheduled query.
listScheduledQueriesPaginator(_:logger:on:)
compiler(>=5.5.2) && canImport(_Concurrency)
public func listScheduledQueriesPaginator( _ input: ListScheduledQueriesRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil ) -> AWSClient.PaginatorSequence<ListScheduledQueriesRequest, ListScheduledQueriesResponse>
Gets a list of all scheduled queries in the caller's Amazon account and Region.
Return PaginatorSequence for operation. - Parameters: - input: Input for request - logger: Logger used flot logging - eventLoop: EventLoop to run this process onListScheduledQueries
is eventually consistent.
listTagsForResourcePaginator(_:logger:on:)
compiler(>=5.5.2) && canImport(_Concurrency)
public func listTagsForResourcePaginator( _ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil ) -> AWSClient.PaginatorSequence<ListTagsForResourceRequest, ListTagsForResourceResponse>
List all tags on a Timestream query resource.
Return PaginatorSequence for operation. - Parameters: - input: Input for request - logger: Logger used flot logging - eventLoop: EventLoop to run this process on
queryPaginator(_:logger:on:)
compiler(>=5.5.2) && canImport(_Concurrency)
public func queryPaginator( _ input: QueryRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil ) -> AWSClient.PaginatorSequence<QueryRequest, QueryResponse>
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.
-
listScheduledQueriesPaginator(_:_:logger:on:onPage:)
Provide paginated results to closure onPage
for it to combine them into one result. This works in a similar manner to Array.reduce<Result>(_:_:) -> Result
.
public func listScheduledQueriesPaginator<Result>(
_ input: ListScheduledQueriesRequest,
_ initialValue: Result,
logger: Logger = AWSClient.loggingDisabled,
on eventLoop: EventLoop? = nil,
onPage: @escaping (Result, ListScheduledQueriesResponse, EventLoop) -> EventLoopFuture<(Bool, Result)>
) -> EventLoopFuture<Result>
Gets a list of all scheduled queries in the caller's Amazon account and Region. ListScheduledQueries
is eventually consistent.
Parameters:
- input: Input for request
- initialValue: The value to use as the initial accumulating value.
initialValue
is passed toonPage
the first time it is called.
- logger: Logger used flot logging
- eventLoop: EventLoop to run this process on
- onPage: closure called with each paginated response. It combines an accumulating result with the contents of response. This combined result is then returned along with a boolean indicating if the paginate operation should continue.
listScheduledQueriesPaginator(_:logger:on:onPage:)
Provide paginated results to closure onPage
.
public func listScheduledQueriesPaginator(
_ input: ListScheduledQueriesRequest,
logger: Logger = AWSClient.loggingDisabled,
on eventLoop: EventLoop? = nil,
onPage: @escaping (ListScheduledQueriesResponse, EventLoop) -> EventLoopFuture<Bool>
) -> EventLoopFuture<Void>
Parameters
- input: Input for request
- logger: Logger used flot logging
- eventLoop: EventLoop to run this process on
- onPage: closure called with each block of entries. Returns boolean indicating whether we should continue.
listTagsForResourcePaginator(_:_:logger:on:onPage:)
Provide paginated results to closure onPage
for it to combine them into one result. This works in a similar manner to Array.reduce<Result>(_:_:) -> Result
.
public func listTagsForResourcePaginator<Result>(
_ input: ListTagsForResourceRequest,
_ initialValue: Result,
logger: Logger = AWSClient.loggingDisabled,
on eventLoop: EventLoop? = nil,
onPage: @escaping (Result, ListTagsForResourceResponse, EventLoop) -> EventLoopFuture<(Bool, Result)>
) -> EventLoopFuture<Result>
List all tags on a Timestream query resource.
Parameters:
- input: Input for request
- initialValue: The value to use as the initial accumulating value.
initialValue
is passed toonPage
the first time it is called.
- logger: Logger used flot logging
- eventLoop: EventLoop to run this process on
- onPage: closure called with each paginated response. It combines an accumulating result with the contents of response. This combined result is then returned along with a boolean indicating if the paginate operation should continue.
listTagsForResourcePaginator(_:logger:on:onPage:)
Provide paginated results to closure onPage
.
public func listTagsForResourcePaginator(
_ input: ListTagsForResourceRequest,
logger: Logger = AWSClient.loggingDisabled,
on eventLoop: EventLoop? = nil,
onPage: @escaping (ListTagsForResourceResponse, EventLoop) -> EventLoopFuture<Bool>
) -> EventLoopFuture<Void>
Parameters
- input: Input for request
- logger: Logger used flot logging
- eventLoop: EventLoop to run this process on
- onPage: closure called with each block of entries. Returns boolean indicating whether we should continue.
queryPaginator(_:_:logger:on:onPage:)
Provide paginated results to closure onPage
for it to combine them into one result. This works in a similar manner to Array.reduce<Result>(_:_:) -> Result
.
public func queryPaginator<Result>(
_ input: QueryRequest,
_ initialValue: Result,
logger: Logger = AWSClient.loggingDisabled,
on eventLoop: EventLoop? = nil,
onPage: @escaping (Result, QueryResponse, EventLoop) -> EventLoopFuture<(Bool, Result)>
) -> EventLoopFuture<Result>
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.
Parameters:
- input: Input for request
- initialValue: The value to use as the initial accumulating value.
initialValue
is passed toonPage
the first time it is called.
- logger: Logger used flot logging
- eventLoop: EventLoop to run this process on
- onPage: closure called with each paginated response. It combines an accumulating result with the contents of response. This combined result is then returned along with a boolean indicating if the paginate operation should continue.
queryPaginator(_:logger:on:onPage:)
Provide paginated results to closure onPage
.
public func queryPaginator(
_ input: QueryRequest,
logger: Logger = AWSClient.loggingDisabled,
on eventLoop: EventLoop? = nil,
onPage: @escaping (QueryResponse, EventLoop) -> EventLoopFuture<Bool>
) -> EventLoopFuture<Void>
Parameters
- input: Input for request
- logger: Logger used flot logging
- eventLoop: EventLoop to run this process on
- onPage: closure called with each block of entries. Returns boolean indicating whether we should continue.