Soto icon

Soto

ForecastQueryService

Service object for interacting with AWS ForecastQueryService service.

public struct ForecastQueryService: AWSService

Provides APIs for creating and managing Amazon Forecast resources.

Inheritance

AWSService

Initializers

init(client:region:partition:endpoint:timeout:byteBufferAllocator:options:)

Initialize the ForecastQueryService 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: ForecastQueryService, patch: AWSServiceConfig.Patch)

Properties

client

Client used for communication with AWS

let client: AWSClient

config

Service configuration

let config: AWSServiceConfig

Methods

queryForecast(_:logger:on:)

public func queryForecast(_ input: QueryForecastRequest, logger: Logger = AWSClient.loggingDisabled, on eventLoop: EventLoop? = nil) -> EventLoopFuture<QueryForecastResponse>

Retrieves a forecast for a single item, filtered by the supplied criteria.

The criteria is a key-value pair. The key is either item_id (or the equivalent non-timestamp, non-target field) from the TARGET_TIME_SERIES dataset, or one of the forecast dimensions specified as part of the FeaturizationConfig object.

By default, QueryForecast returns the complete date range for the filtered forecast. You can request a specific date range.

To get the full forecast, use the CreateForecastExportJob operation.

The forecasts generated by Amazon Forecast are in the same timezone as the dataset that was used to create the predictor.