UNPKG

5.07 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7interface Blob {}
8declare class ForecastQueryService extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: ForecastQueryService.Types.ClientConfiguration)
13 config: Config & ForecastQueryService.Types.ClientConfiguration;
14 /**
15 * 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.
16 */
17 queryForecast(params: ForecastQueryService.Types.QueryForecastRequest, callback?: (err: AWSError, data: ForecastQueryService.Types.QueryForecastResponse) => void): Request<ForecastQueryService.Types.QueryForecastResponse, AWSError>;
18 /**
19 * 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.
20 */
21 queryForecast(callback?: (err: AWSError, data: ForecastQueryService.Types.QueryForecastResponse) => void): Request<ForecastQueryService.Types.QueryForecastResponse, AWSError>;
22}
23declare namespace ForecastQueryService {
24 export type Arn = string;
25 export type AttributeName = string;
26 export type AttributeValue = string;
27 export interface DataPoint {
28 /**
29 * The timestamp of the specific forecast.
30 */
31 Timestamp?: Timestamp;
32 /**
33 * The forecast value.
34 */
35 Value?: Double;
36 }
37 export type DateTime = string;
38 export type Double = number;
39 export type Filters = {[key: string]: AttributeValue};
40 export interface Forecast {
41 /**
42 * The forecast. The string of the string-to-array map is one of the following values: p10 p50 p90
43 */
44 Predictions?: Predictions;
45 }
46 export type NextToken = string;
47 export type Predictions = {[key: string]: TimeSeries};
48 export interface QueryForecastRequest {
49 /**
50 * The Amazon Resource Name (ARN) of the forecast to query.
51 */
52 ForecastArn: Arn;
53 /**
54 * The start date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T08:00:00.
55 */
56 StartDate?: DateTime;
57 /**
58 * The end date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T20:00:00.
59 */
60 EndDate?: DateTime;
61 /**
62 * The filtering criteria to apply when retrieving the forecast. For example, to get the forecast for client_21 in the electricity usage dataset, specify the following: {"item_id" : "client_21"} To get the full forecast, use the CreateForecastExportJob operation.
63 */
64 Filters: Filters;
65 /**
66 * If the result of the previous request was truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.
67 */
68 NextToken?: NextToken;
69 }
70 export interface QueryForecastResponse {
71 /**
72 * The forecast.
73 */
74 Forecast?: Forecast;
75 }
76 export type Statistic = string;
77 export type TimeSeries = DataPoint[];
78 export type Timestamp = string;
79 /**
80 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
81 */
82 export type apiVersion = "2018-06-26"|"latest"|string;
83 export interface ClientApiVersions {
84 /**
85 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
86 */
87 apiVersion?: apiVersion;
88 }
89 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
90 /**
91 * Contains interfaces for use with the ForecastQueryService client.
92 */
93 export import Types = ForecastQueryService;
94}
95export = ForecastQueryService;