Soto icon

Soto

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

let client: AWSClient

config

Service configuration

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

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

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

queryPaginator(_:_:logger:on:onPage:)

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

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.

Parameters:

  • input: Input for request
  • initialValue: The value to use as the initial accumulating value. initialValue is passed to onPage the first time it is called.
  • logger: Logger used for logging output
  • 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 for logging output
  • eventLoop: EventLoop to run this process on
  • onPage: closure called with each block of entries. Returns boolean indicating whether we should continue.