-
Notifications
You must be signed in to change notification settings - Fork 545
/
Forecast.ts
1645 lines (1612 loc) · 70.6 KB
/
Forecast.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import { ForecastClient } from "./ForecastClient";
import {
CreateDatasetCommand,
CreateDatasetCommandInput,
CreateDatasetCommandOutput,
} from "./commands/CreateDatasetCommand";
import {
CreateDatasetGroupCommand,
CreateDatasetGroupCommandInput,
CreateDatasetGroupCommandOutput,
} from "./commands/CreateDatasetGroupCommand";
import {
CreateDatasetImportJobCommand,
CreateDatasetImportJobCommandInput,
CreateDatasetImportJobCommandOutput,
} from "./commands/CreateDatasetImportJobCommand";
import {
CreateForecastCommand,
CreateForecastCommandInput,
CreateForecastCommandOutput,
} from "./commands/CreateForecastCommand";
import {
CreateForecastExportJobCommand,
CreateForecastExportJobCommandInput,
CreateForecastExportJobCommandOutput,
} from "./commands/CreateForecastExportJobCommand";
import {
CreatePredictorBacktestExportJobCommand,
CreatePredictorBacktestExportJobCommandInput,
CreatePredictorBacktestExportJobCommandOutput,
} from "./commands/CreatePredictorBacktestExportJobCommand";
import {
CreatePredictorCommand,
CreatePredictorCommandInput,
CreatePredictorCommandOutput,
} from "./commands/CreatePredictorCommand";
import {
DeleteDatasetCommand,
DeleteDatasetCommandInput,
DeleteDatasetCommandOutput,
} from "./commands/DeleteDatasetCommand";
import {
DeleteDatasetGroupCommand,
DeleteDatasetGroupCommandInput,
DeleteDatasetGroupCommandOutput,
} from "./commands/DeleteDatasetGroupCommand";
import {
DeleteDatasetImportJobCommand,
DeleteDatasetImportJobCommandInput,
DeleteDatasetImportJobCommandOutput,
} from "./commands/DeleteDatasetImportJobCommand";
import {
DeleteForecastCommand,
DeleteForecastCommandInput,
DeleteForecastCommandOutput,
} from "./commands/DeleteForecastCommand";
import {
DeleteForecastExportJobCommand,
DeleteForecastExportJobCommandInput,
DeleteForecastExportJobCommandOutput,
} from "./commands/DeleteForecastExportJobCommand";
import {
DeletePredictorBacktestExportJobCommand,
DeletePredictorBacktestExportJobCommandInput,
DeletePredictorBacktestExportJobCommandOutput,
} from "./commands/DeletePredictorBacktestExportJobCommand";
import {
DeletePredictorCommand,
DeletePredictorCommandInput,
DeletePredictorCommandOutput,
} from "./commands/DeletePredictorCommand";
import {
DescribeDatasetCommand,
DescribeDatasetCommandInput,
DescribeDatasetCommandOutput,
} from "./commands/DescribeDatasetCommand";
import {
DescribeDatasetGroupCommand,
DescribeDatasetGroupCommandInput,
DescribeDatasetGroupCommandOutput,
} from "./commands/DescribeDatasetGroupCommand";
import {
DescribeDatasetImportJobCommand,
DescribeDatasetImportJobCommandInput,
DescribeDatasetImportJobCommandOutput,
} from "./commands/DescribeDatasetImportJobCommand";
import {
DescribeForecastCommand,
DescribeForecastCommandInput,
DescribeForecastCommandOutput,
} from "./commands/DescribeForecastCommand";
import {
DescribeForecastExportJobCommand,
DescribeForecastExportJobCommandInput,
DescribeForecastExportJobCommandOutput,
} from "./commands/DescribeForecastExportJobCommand";
import {
DescribePredictorBacktestExportJobCommand,
DescribePredictorBacktestExportJobCommandInput,
DescribePredictorBacktestExportJobCommandOutput,
} from "./commands/DescribePredictorBacktestExportJobCommand";
import {
DescribePredictorCommand,
DescribePredictorCommandInput,
DescribePredictorCommandOutput,
} from "./commands/DescribePredictorCommand";
import {
GetAccuracyMetricsCommand,
GetAccuracyMetricsCommandInput,
GetAccuracyMetricsCommandOutput,
} from "./commands/GetAccuracyMetricsCommand";
import {
ListDatasetGroupsCommand,
ListDatasetGroupsCommandInput,
ListDatasetGroupsCommandOutput,
} from "./commands/ListDatasetGroupsCommand";
import {
ListDatasetImportJobsCommand,
ListDatasetImportJobsCommandInput,
ListDatasetImportJobsCommandOutput,
} from "./commands/ListDatasetImportJobsCommand";
import {
ListDatasetsCommand,
ListDatasetsCommandInput,
ListDatasetsCommandOutput,
} from "./commands/ListDatasetsCommand";
import {
ListForecastExportJobsCommand,
ListForecastExportJobsCommandInput,
ListForecastExportJobsCommandOutput,
} from "./commands/ListForecastExportJobsCommand";
import {
ListForecastsCommand,
ListForecastsCommandInput,
ListForecastsCommandOutput,
} from "./commands/ListForecastsCommand";
import {
ListPredictorBacktestExportJobsCommand,
ListPredictorBacktestExportJobsCommandInput,
ListPredictorBacktestExportJobsCommandOutput,
} from "./commands/ListPredictorBacktestExportJobsCommand";
import {
ListPredictorsCommand,
ListPredictorsCommandInput,
ListPredictorsCommandOutput,
} from "./commands/ListPredictorsCommand";
import {
ListTagsForResourceCommand,
ListTagsForResourceCommandInput,
ListTagsForResourceCommandOutput,
} from "./commands/ListTagsForResourceCommand";
import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
import {
UntagResourceCommand,
UntagResourceCommandInput,
UntagResourceCommandOutput,
} from "./commands/UntagResourceCommand";
import {
UpdateDatasetGroupCommand,
UpdateDatasetGroupCommandInput,
UpdateDatasetGroupCommandOutput,
} from "./commands/UpdateDatasetGroupCommand";
import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
/**
* <p>Provides APIs for creating and managing Amazon Forecast resources.</p>
*/
export class Forecast extends ForecastClient {
/**
* <p>Creates an Amazon Forecast dataset. The information about the dataset that you provide helps
* Forecast understand how to consume the data for model training. This includes the
* following:</p>
* <ul>
* <li>
* <p>
* <i>
* <code>DataFrequency</code>
* </i> - How frequently your historical
* time-series data is collected.</p>
* </li>
* <li>
* <p>
* <i>
* <code>Domain</code>
* </i> and
* <i>
* <code>DatasetType</code>
* </i> - Each dataset has an associated dataset
* domain and a type within the domain. Amazon Forecast provides a list of predefined domains and
* types within each domain. For each unique dataset domain and type within the domain,
* Amazon Forecast requires your data to include a minimum set of predefined fields.</p>
* </li>
* <li>
* <p>
* <i>
* <code>Schema</code>
* </i> - A schema specifies the fields in the dataset,
* including the field name and data type.</p>
* </li>
* </ul>
* <p>After creating a dataset, you import your training data into it and add the dataset to a
* dataset group. You use the dataset group to create a predictor. For more information, see
* <a>howitworks-datasets-groups</a>.</p>
* <p>To get a list of all your datasets, use the <a>ListDatasets</a>
* operation.</p>
* <p>For example Forecast datasets, see the <a href="https://github.com/aws-samples/amazon-forecast-samples">Amazon Forecast Sample GitHub
* repository</a>.</p>
* <note>
* <p>The <code>Status</code> of a dataset must be <code>ACTIVE</code> before you can import
* training data. Use the <a>DescribeDataset</a> operation to get the status.</p>
* </note>
*/
public createDataset(
args: CreateDatasetCommandInput,
options?: __HttpHandlerOptions
): Promise<CreateDatasetCommandOutput>;
public createDataset(
args: CreateDatasetCommandInput,
cb: (err: any, data?: CreateDatasetCommandOutput) => void
): void;
public createDataset(
args: CreateDatasetCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreateDatasetCommandOutput) => void
): void;
public createDataset(
args: CreateDatasetCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateDatasetCommandOutput) => void),
cb?: (err: any, data?: CreateDatasetCommandOutput) => void
): Promise<CreateDatasetCommandOutput> | void {
const command = new CreateDatasetCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}
/**
* <p>Creates a dataset group, which holds a collection of related datasets. You can add
* datasets to the dataset group when you create the dataset group, or later by using the <a>UpdateDatasetGroup</a> operation.</p>
* <p>After creating a dataset group and adding datasets, you use the dataset group when you
* create a predictor. For more information, see <a>howitworks-datasets-groups</a>.</p>
* <p>To get a list of all your datasets groups, use the <a>ListDatasetGroups</a>
* operation.</p>
* <note>
* <p>The <code>Status</code> of a dataset group must be <code>ACTIVE</code> before you can
* use the dataset group to create a predictor. To get the status, use the <a>DescribeDatasetGroup</a> operation.</p>
* </note>
*/
public createDatasetGroup(
args: CreateDatasetGroupCommandInput,
options?: __HttpHandlerOptions
): Promise<CreateDatasetGroupCommandOutput>;
public createDatasetGroup(
args: CreateDatasetGroupCommandInput,
cb: (err: any, data?: CreateDatasetGroupCommandOutput) => void
): void;
public createDatasetGroup(
args: CreateDatasetGroupCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreateDatasetGroupCommandOutput) => void
): void;
public createDatasetGroup(
args: CreateDatasetGroupCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateDatasetGroupCommandOutput) => void),
cb?: (err: any, data?: CreateDatasetGroupCommandOutput) => void
): Promise<CreateDatasetGroupCommandOutput> | void {
const command = new CreateDatasetGroupCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}
/**
* <p>Imports your training data to an Amazon Forecast dataset. You provide the location of your
* training data in an Amazon Simple Storage Service (Amazon S3) bucket and the Amazon Resource Name (ARN) of the dataset
* that you want to import the data to.</p>
* <p>You must specify a <a>DataSource</a> object that includes an AWS Identity and Access Management (IAM)
* role that Amazon Forecast can assume to access the data, as Amazon Forecast makes a copy of your data and
* processes it in an internal AWS system. For more information, see <a>aws-forecast-iam-roles</a>.</p>
* <p>The training data must be in CSV format. The delimiter must be a comma (,).</p>
* <p>You can specify the path to a specific CSV file, the S3 bucket, or to a folder in the S3
* bucket. For the latter two cases, Amazon Forecast imports all files up to the limit of 10,000
* files.</p>
*
*
* <p>Because dataset imports are not aggregated, your most recent dataset import is the one
* that is used when training a predictor or generating a forecast. Make sure that your most
* recent dataset import contains all of the data you want to model off of, and not just the new
* data collected since the previous import.</p>
*
*
* <p>To get a list of all your dataset import jobs, filtered by specified criteria, use the
* <a>ListDatasetImportJobs</a> operation.</p>
*/
public createDatasetImportJob(
args: CreateDatasetImportJobCommandInput,
options?: __HttpHandlerOptions
): Promise<CreateDatasetImportJobCommandOutput>;
public createDatasetImportJob(
args: CreateDatasetImportJobCommandInput,
cb: (err: any, data?: CreateDatasetImportJobCommandOutput) => void
): void;
public createDatasetImportJob(
args: CreateDatasetImportJobCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreateDatasetImportJobCommandOutput) => void
): void;
public createDatasetImportJob(
args: CreateDatasetImportJobCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateDatasetImportJobCommandOutput) => void),
cb?: (err: any, data?: CreateDatasetImportJobCommandOutput) => void
): Promise<CreateDatasetImportJobCommandOutput> | void {
const command = new CreateDatasetImportJobCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}
/**
* <p>Creates a forecast for each item in the <code>TARGET_TIME_SERIES</code> dataset that was
* used to train the predictor. This is known as inference. To retrieve the forecast for a single
* item at low latency, use the operation. To
* export the complete forecast into your Amazon Simple Storage Service (Amazon S3) bucket, use the <a>CreateForecastExportJob</a> operation.</p>
* <p>The range of the forecast is determined by the <code>ForecastHorizon</code> value, which
* you specify in the <a>CreatePredictor</a> request. When you query a forecast, you
* can request a specific date range within the forecast.</p>
* <p>To get a list of all your forecasts, use the <a>ListForecasts</a>
* operation.</p>
* <note>
* <p>The forecasts generated by Amazon Forecast are in the same time zone as the dataset that was
* used to create the predictor.</p>
* </note>
* <p>For more information, see <a>howitworks-forecast</a>.</p>
* <note>
* <p>The <code>Status</code> of the forecast must be <code>ACTIVE</code> before you can query
* or export the forecast. Use the <a>DescribeForecast</a> operation to get the
* status.</p>
* </note>
*/
public createForecast(
args: CreateForecastCommandInput,
options?: __HttpHandlerOptions
): Promise<CreateForecastCommandOutput>;
public createForecast(
args: CreateForecastCommandInput,
cb: (err: any, data?: CreateForecastCommandOutput) => void
): void;
public createForecast(
args: CreateForecastCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreateForecastCommandOutput) => void
): void;
public createForecast(
args: CreateForecastCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateForecastCommandOutput) => void),
cb?: (err: any, data?: CreateForecastCommandOutput) => void
): Promise<CreateForecastCommandOutput> | void {
const command = new CreateForecastCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}
/**
* <p>Exports a forecast created by the <a>CreateForecast</a> operation to your
* Amazon Simple Storage Service (Amazon S3) bucket. The forecast file name will match the following conventions:</p>
* <p><ForecastExportJobName>_<ExportTimestamp>_<PartNumber></p>
* <p>where the <ExportTimestamp> component is in Java SimpleDateFormat
* (yyyy-MM-ddTHH-mm-ssZ).</p>
* <p>You must specify a <a>DataDestination</a> object that includes an AWS Identity and Access Management
* (IAM) role that Amazon Forecast can assume to access the Amazon S3 bucket. For more information, see
* <a>aws-forecast-iam-roles</a>.</p>
* <p>For more information, see <a>howitworks-forecast</a>.</p>
* <p>To get a list of all your forecast export jobs, use the <a>ListForecastExportJobs</a> operation.</p>
* <note>
* <p>The <code>Status</code> of the forecast export job must be <code>ACTIVE</code> before
* you can access the forecast in your Amazon S3 bucket. To get the status, use the <a>DescribeForecastExportJob</a> operation.</p>
* </note>
*/
public createForecastExportJob(
args: CreateForecastExportJobCommandInput,
options?: __HttpHandlerOptions
): Promise<CreateForecastExportJobCommandOutput>;
public createForecastExportJob(
args: CreateForecastExportJobCommandInput,
cb: (err: any, data?: CreateForecastExportJobCommandOutput) => void
): void;
public createForecastExportJob(
args: CreateForecastExportJobCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreateForecastExportJobCommandOutput) => void
): void;
public createForecastExportJob(
args: CreateForecastExportJobCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateForecastExportJobCommandOutput) => void),
cb?: (err: any, data?: CreateForecastExportJobCommandOutput) => void
): Promise<CreateForecastExportJobCommandOutput> | void {
const command = new CreateForecastExportJobCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}
/**
* <p>Creates an Amazon Forecast predictor.</p>
* <p>In the request, provide a dataset group and either specify an algorithm or let
* Amazon Forecast choose an algorithm for you using AutoML. If you specify an algorithm, you also can
* override algorithm-specific hyperparameters.</p>
* <p>Amazon Forecast uses the algorithm to train a predictor using the latest version of the
* datasets in the specified dataset group. You can then generate a
* forecast using the <a>CreateForecast</a> operation.</p>
* <p>
* To see the evaluation metrics, use the <a>GetAccuracyMetrics</a> operation.
* </p>
* <p>You can specify a featurization configuration to fill and aggregate the data
* fields in the <code>TARGET_TIME_SERIES</code> dataset to improve model training. For more
* information, see <a>FeaturizationConfig</a>.</p>
* <p>For RELATED_TIME_SERIES datasets, <code>CreatePredictor</code> verifies that the
* <code>DataFrequency</code> specified when the dataset was created matches the
* <code>ForecastFrequency</code>. TARGET_TIME_SERIES datasets don't have this restriction.
* Amazon Forecast also verifies the delimiter and timestamp format. For more information, see <a>howitworks-datasets-groups</a>.</p>
* <p>By default, predictors are trained and evaluated at the 0.1 (P10), 0.5 (P50), and 0.9
* (P90) quantiles. You can choose custom forecast types to train and evaluate your predictor
* by setting the <code>ForecastTypes</code>.
* </p>
* <p>
* <b>AutoML</b>
* </p>
* <p>If you want Amazon Forecast to evaluate each algorithm and choose the one that minimizes the
* <code>objective function</code>, set <code>PerformAutoML</code> to <code>true</code>. The
* <code>objective function</code> is defined as the mean of the weighted losses over the
* forecast types. By default, these are the p10, p50, and p90
* quantile losses. For more information, see <a>EvaluationResult</a>.</p>
* <p>When AutoML is enabled, the following properties are disallowed:</p>
* <ul>
* <li>
* <p>
* <code>AlgorithmArn</code>
* </p>
* </li>
* <li>
* <p>
* <code>HPOConfig</code>
* </p>
* </li>
* <li>
* <p>
* <code>PerformHPO</code>
* </p>
* </li>
* <li>
* <p>
* <code>TrainingParameters</code>
* </p>
* </li>
* </ul>
*
*
*
* <p>To get a list of all of your predictors, use the <a>ListPredictors</a>
* operation.</p>
* <note>
* <p>Before you can use the predictor to create a forecast, the <code>Status</code> of the
* predictor must be <code>ACTIVE</code>, signifying that training has completed. To get the
* status, use the <a>DescribePredictor</a> operation.</p>
* </note>
*/
public createPredictor(
args: CreatePredictorCommandInput,
options?: __HttpHandlerOptions
): Promise<CreatePredictorCommandOutput>;
public createPredictor(
args: CreatePredictorCommandInput,
cb: (err: any, data?: CreatePredictorCommandOutput) => void
): void;
public createPredictor(
args: CreatePredictorCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreatePredictorCommandOutput) => void
): void;
public createPredictor(
args: CreatePredictorCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreatePredictorCommandOutput) => void),
cb?: (err: any, data?: CreatePredictorCommandOutput) => void
): Promise<CreatePredictorCommandOutput> | void {
const command = new CreatePredictorCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}
/**
* <p>Exports backtest forecasts and accuracy metrics generated by the <a>CreatePredictor</a> operation. Two folders containing CSV files are exported
* to your specified S3 bucket.</p>
* <p> The export file names will match the following conventions:</p>
* <p>
* <code><ExportJobName>_<ExportTimestamp>_<PartNumber>.csv</code>
* </p>
* <p>The <ExportTimestamp> component is in Java SimpleDate format
* (yyyy-MM-ddTHH-mm-ssZ).</p>
* <p>You must specify a <a>DataDestination</a> object that includes an Amazon S3
* bucket and an AWS Identity and Access Management (IAM) role that Amazon Forecast can assume to access the Amazon S3
* bucket. For more information, see <a>aws-forecast-iam-roles</a>.</p>
* <note>
* <p>The <code>Status</code> of the export job must be <code>ACTIVE</code> before
* you can access the export in your Amazon S3 bucket. To get the status, use the <a>DescribePredictorBacktestExportJob</a> operation.</p>
* </note>
*/
public createPredictorBacktestExportJob(
args: CreatePredictorBacktestExportJobCommandInput,
options?: __HttpHandlerOptions
): Promise<CreatePredictorBacktestExportJobCommandOutput>;
public createPredictorBacktestExportJob(
args: CreatePredictorBacktestExportJobCommandInput,
cb: (err: any, data?: CreatePredictorBacktestExportJobCommandOutput) => void
): void;
public createPredictorBacktestExportJob(
args: CreatePredictorBacktestExportJobCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreatePredictorBacktestExportJobCommandOutput) => void
): void;
public createPredictorBacktestExportJob(
args: CreatePredictorBacktestExportJobCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreatePredictorBacktestExportJobCommandOutput) => void),
cb?: (err: any, data?: CreatePredictorBacktestExportJobCommandOutput) => void
): Promise<CreatePredictorBacktestExportJobCommandOutput> | void {
const command = new CreatePredictorBacktestExportJobCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}
/**
* <p>Deletes an Amazon Forecast dataset that was created using the <a>CreateDataset</a>
* operation. You can only delete datasets that have a status of <code>ACTIVE</code> or
* <code>CREATE_FAILED</code>. To get the status use the <a>DescribeDataset</a>
* operation.</p>
* <note>
* <p>Forecast does not automatically update any dataset groups that contain the deleted dataset.
* In order to update the dataset group, use the
* operation, omitting the deleted dataset's ARN.</p>
* </note>
*/
public deleteDataset(
args: DeleteDatasetCommandInput,
options?: __HttpHandlerOptions
): Promise<DeleteDatasetCommandOutput>;
public deleteDataset(
args: DeleteDatasetCommandInput,
cb: (err: any, data?: DeleteDatasetCommandOutput) => void
): void;
public deleteDataset(
args: DeleteDatasetCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteDatasetCommandOutput) => void
): void;
public deleteDataset(
args: DeleteDatasetCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteDatasetCommandOutput) => void),
cb?: (err: any, data?: DeleteDatasetCommandOutput) => void
): Promise<DeleteDatasetCommandOutput> | void {
const command = new DeleteDatasetCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}
/**
* <p>Deletes a dataset group created using the <a>CreateDatasetGroup</a> operation.
* You can only delete dataset groups that have a status of <code>ACTIVE</code>,
* <code>CREATE_FAILED</code>, or <code>UPDATE_FAILED</code>. To get the status, use the <a>DescribeDatasetGroup</a> operation.</p>
* <p>This operation deletes only the dataset group, not the datasets in the group.</p>
*/
public deleteDatasetGroup(
args: DeleteDatasetGroupCommandInput,
options?: __HttpHandlerOptions
): Promise<DeleteDatasetGroupCommandOutput>;
public deleteDatasetGroup(
args: DeleteDatasetGroupCommandInput,
cb: (err: any, data?: DeleteDatasetGroupCommandOutput) => void
): void;
public deleteDatasetGroup(
args: DeleteDatasetGroupCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteDatasetGroupCommandOutput) => void
): void;
public deleteDatasetGroup(
args: DeleteDatasetGroupCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteDatasetGroupCommandOutput) => void),
cb?: (err: any, data?: DeleteDatasetGroupCommandOutput) => void
): Promise<DeleteDatasetGroupCommandOutput> | void {
const command = new DeleteDatasetGroupCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}
/**
* <p>Deletes a dataset import job created using the <a>CreateDatasetImportJob</a>
* operation. You can delete only dataset import jobs that have a status of <code>ACTIVE</code>
* or <code>CREATE_FAILED</code>. To get the status, use the <a>DescribeDatasetImportJob</a> operation.</p>
*/
public deleteDatasetImportJob(
args: DeleteDatasetImportJobCommandInput,
options?: __HttpHandlerOptions
): Promise<DeleteDatasetImportJobCommandOutput>;
public deleteDatasetImportJob(
args: DeleteDatasetImportJobCommandInput,
cb: (err: any, data?: DeleteDatasetImportJobCommandOutput) => void
): void;
public deleteDatasetImportJob(
args: DeleteDatasetImportJobCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteDatasetImportJobCommandOutput) => void
): void;
public deleteDatasetImportJob(
args: DeleteDatasetImportJobCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteDatasetImportJobCommandOutput) => void),
cb?: (err: any, data?: DeleteDatasetImportJobCommandOutput) => void
): Promise<DeleteDatasetImportJobCommandOutput> | void {
const command = new DeleteDatasetImportJobCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}
/**
* <p>Deletes a forecast created using the <a>CreateForecast</a> operation. You can
* delete only forecasts that have a status of <code>ACTIVE</code> or <code>CREATE_FAILED</code>.
* To get the status, use the <a>DescribeForecast</a> operation.</p>
* <p>You can't delete a forecast while it is being exported. After a forecast is deleted, you
* can no longer query the forecast.</p>
*/
public deleteForecast(
args: DeleteForecastCommandInput,
options?: __HttpHandlerOptions
): Promise<DeleteForecastCommandOutput>;
public deleteForecast(
args: DeleteForecastCommandInput,
cb: (err: any, data?: DeleteForecastCommandOutput) => void
): void;
public deleteForecast(
args: DeleteForecastCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteForecastCommandOutput) => void
): void;
public deleteForecast(
args: DeleteForecastCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteForecastCommandOutput) => void),
cb?: (err: any, data?: DeleteForecastCommandOutput) => void
): Promise<DeleteForecastCommandOutput> | void {
const command = new DeleteForecastCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}
/**
* <p>Deletes a forecast export job created using the <a>CreateForecastExportJob</a>
* operation. You can delete only export jobs that have a status of <code>ACTIVE</code> or
* <code>CREATE_FAILED</code>. To get the status, use the <a>DescribeForecastExportJob</a> operation.</p>
*/
public deleteForecastExportJob(
args: DeleteForecastExportJobCommandInput,
options?: __HttpHandlerOptions
): Promise<DeleteForecastExportJobCommandOutput>;
public deleteForecastExportJob(
args: DeleteForecastExportJobCommandInput,
cb: (err: any, data?: DeleteForecastExportJobCommandOutput) => void
): void;
public deleteForecastExportJob(
args: DeleteForecastExportJobCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteForecastExportJobCommandOutput) => void
): void;
public deleteForecastExportJob(
args: DeleteForecastExportJobCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteForecastExportJobCommandOutput) => void),
cb?: (err: any, data?: DeleteForecastExportJobCommandOutput) => void
): Promise<DeleteForecastExportJobCommandOutput> | void {
const command = new DeleteForecastExportJobCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}
/**
* <p>Deletes a predictor created using the <a>CreatePredictor</a> operation. You can
* delete only predictor that have a status of <code>ACTIVE</code> or <code>CREATE_FAILED</code>.
* To get the status, use the <a>DescribePredictor</a> operation.</p>
*/
public deletePredictor(
args: DeletePredictorCommandInput,
options?: __HttpHandlerOptions
): Promise<DeletePredictorCommandOutput>;
public deletePredictor(
args: DeletePredictorCommandInput,
cb: (err: any, data?: DeletePredictorCommandOutput) => void
): void;
public deletePredictor(
args: DeletePredictorCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeletePredictorCommandOutput) => void
): void;
public deletePredictor(
args: DeletePredictorCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeletePredictorCommandOutput) => void),
cb?: (err: any, data?: DeletePredictorCommandOutput) => void
): Promise<DeletePredictorCommandOutput> | void {
const command = new DeletePredictorCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}
/**
* <p>Deletes a predictor backtest export job.</p>
*/
public deletePredictorBacktestExportJob(
args: DeletePredictorBacktestExportJobCommandInput,
options?: __HttpHandlerOptions
): Promise<DeletePredictorBacktestExportJobCommandOutput>;
public deletePredictorBacktestExportJob(
args: DeletePredictorBacktestExportJobCommandInput,
cb: (err: any, data?: DeletePredictorBacktestExportJobCommandOutput) => void
): void;
public deletePredictorBacktestExportJob(
args: DeletePredictorBacktestExportJobCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeletePredictorBacktestExportJobCommandOutput) => void
): void;
public deletePredictorBacktestExportJob(
args: DeletePredictorBacktestExportJobCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeletePredictorBacktestExportJobCommandOutput) => void),
cb?: (err: any, data?: DeletePredictorBacktestExportJobCommandOutput) => void
): Promise<DeletePredictorBacktestExportJobCommandOutput> | void {
const command = new DeletePredictorBacktestExportJobCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}
/**
* <p>Describes an Amazon Forecast dataset created using the <a>CreateDataset</a>
* operation.</p>
* <p>In addition to listing the parameters specified in the <code>CreateDataset</code> request,
* this operation includes the following dataset properties:</p>
* <ul>
* <li>
* <p>
* <code>CreationTime</code>
* </p>
* </li>
* <li>
* <p>
* <code>LastModificationTime</code>
* </p>
* </li>
* <li>
* <p>
* <code>Status</code>
* </p>
* </li>
* </ul>
*/
public describeDataset(
args: DescribeDatasetCommandInput,
options?: __HttpHandlerOptions
): Promise<DescribeDatasetCommandOutput>;
public describeDataset(
args: DescribeDatasetCommandInput,
cb: (err: any, data?: DescribeDatasetCommandOutput) => void
): void;
public describeDataset(
args: DescribeDatasetCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DescribeDatasetCommandOutput) => void
): void;
public describeDataset(
args: DescribeDatasetCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeDatasetCommandOutput) => void),
cb?: (err: any, data?: DescribeDatasetCommandOutput) => void
): Promise<DescribeDatasetCommandOutput> | void {
const command = new DescribeDatasetCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}
/**
* <p>Describes a dataset group created using the <a>CreateDatasetGroup</a>
* operation.</p>
* <p>In addition to listing the parameters provided in the <code>CreateDatasetGroup</code>
* request, this operation includes the following properties:</p>
* <ul>
* <li>
* <p>
* <code>DatasetArns</code> - The datasets belonging to the group.</p>
* </li>
* <li>
* <p>
* <code>CreationTime</code>
* </p>
* </li>
* <li>
* <p>
* <code>LastModificationTime</code>
* </p>
* </li>
* <li>
* <p>
* <code>Status</code>
* </p>
* </li>
* </ul>
*/
public describeDatasetGroup(
args: DescribeDatasetGroupCommandInput,
options?: __HttpHandlerOptions
): Promise<DescribeDatasetGroupCommandOutput>;
public describeDatasetGroup(
args: DescribeDatasetGroupCommandInput,
cb: (err: any, data?: DescribeDatasetGroupCommandOutput) => void
): void;
public describeDatasetGroup(
args: DescribeDatasetGroupCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DescribeDatasetGroupCommandOutput) => void
): void;
public describeDatasetGroup(
args: DescribeDatasetGroupCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeDatasetGroupCommandOutput) => void),
cb?: (err: any, data?: DescribeDatasetGroupCommandOutput) => void
): Promise<DescribeDatasetGroupCommandOutput> | void {
const command = new DescribeDatasetGroupCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}
/**
* <p>Describes a dataset import job created using the <a>CreateDatasetImportJob</a>
* operation.</p>
* <p>In addition to listing the parameters provided in the <code>CreateDatasetImportJob</code>
* request, this operation includes the following properties:</p>
* <ul>
* <li>
* <p>
* <code>CreationTime</code>
* </p>
* </li>
* <li>
* <p>
* <code>LastModificationTime</code>
* </p>
* </li>
* <li>
* <p>
* <code>DataSize</code>
* </p>
* </li>
* <li>
* <p>
* <code>FieldStatistics</code>
* </p>
* </li>
* <li>
* <p>
* <code>Status</code>
* </p>
* </li>
* <li>
* <p>
* <code>Message</code> - If an error occurred, information about the error.</p>
* </li>
* </ul>
*/
public describeDatasetImportJob(
args: DescribeDatasetImportJobCommandInput,
options?: __HttpHandlerOptions
): Promise<DescribeDatasetImportJobCommandOutput>;
public describeDatasetImportJob(
args: DescribeDatasetImportJobCommandInput,
cb: (err: any, data?: DescribeDatasetImportJobCommandOutput) => void
): void;
public describeDatasetImportJob(
args: DescribeDatasetImportJobCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DescribeDatasetImportJobCommandOutput) => void
): void;
public describeDatasetImportJob(
args: DescribeDatasetImportJobCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeDatasetImportJobCommandOutput) => void),
cb?: (err: any, data?: DescribeDatasetImportJobCommandOutput) => void
): Promise<DescribeDatasetImportJobCommandOutput> | void {
const command = new DescribeDatasetImportJobCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}
/**
* <p>Describes a forecast created using the <a>CreateForecast</a> operation.</p>
* <p>In addition to listing the properties provided in the <code>CreateForecast</code> request,
* this operation lists the following properties:</p>
* <ul>
* <li>
* <p>
* <code>DatasetGroupArn</code> - The dataset group that provided the training
* data.</p>
* </li>
* <li>
* <p>
* <code>CreationTime</code>
* </p>