forked from aws/aws-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.go
3860 lines (3169 loc) · 137 KB
/
api.go
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
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Package machinelearning provides a client for Amazon Machine Learning.
package machinelearning
import (
"time"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/service"
)
const opCreateBatchPrediction = "CreateBatchPrediction"
// CreateBatchPredictionRequest generates a request for the CreateBatchPrediction operation.
func (c *MachineLearning) CreateBatchPredictionRequest(input *CreateBatchPredictionInput) (req *service.Request, output *CreateBatchPredictionOutput) {
op := &service.Operation{
Name: opCreateBatchPrediction,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateBatchPredictionInput{}
}
req = c.newRequest(op, input, output)
output = &CreateBatchPredictionOutput{}
req.Data = output
return
}
// Generates predictions for a group of observations. The observations to process
// exist in one or more data files referenced by a DataSource. This operation
// creates a new BatchPrediction, and uses an MLModel and the data files referenced
// by the DataSource as information sources.
//
// CreateBatchPrediction is an asynchronous operation. In response to CreateBatchPrediction,
// Amazon Machine Learning (Amazon ML) immediately returns and sets the BatchPrediction
// status to PENDING. After the BatchPrediction completes, Amazon ML sets the
// status to COMPLETED.
//
// You can poll for status updates by using the GetBatchPrediction operation
// and checking the Status parameter of the result. After the COMPLETED status
// appears, the results are available in the location specified by the OutputUri
// parameter.
func (c *MachineLearning) CreateBatchPrediction(input *CreateBatchPredictionInput) (*CreateBatchPredictionOutput, error) {
req, out := c.CreateBatchPredictionRequest(input)
err := req.Send()
return out, err
}
const opCreateDataSourceFromRDS = "CreateDataSourceFromRDS"
// CreateDataSourceFromRDSRequest generates a request for the CreateDataSourceFromRDS operation.
func (c *MachineLearning) CreateDataSourceFromRDSRequest(input *CreateDataSourceFromRDSInput) (req *service.Request, output *CreateDataSourceFromRDSOutput) {
op := &service.Operation{
Name: opCreateDataSourceFromRDS,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateDataSourceFromRDSInput{}
}
req = c.newRequest(op, input, output)
output = &CreateDataSourceFromRDSOutput{}
req.Data = output
return
}
// Creates a DataSource object from an Amazon Relational Database Service (http://aws.amazon.com/rds/)
// (Amazon RDS). A DataSource references data that can be used to perform CreateMLModel,
// CreateEvaluation, or CreateBatchPrediction operations.
//
// CreateDataSourceFromRDS is an asynchronous operation. In response to CreateDataSourceFromRDS,
// Amazon Machine Learning (Amazon ML) immediately returns and sets the DataSource
// status to PENDING. After the DataSource is created and ready for use, Amazon
// ML sets the Status parameter to COMPLETED. DataSource in COMPLETED or PENDING
// status can only be used to perform CreateMLModel, CreateEvaluation, or CreateBatchPrediction
// operations.
//
// If Amazon ML cannot accept the input source, it sets the Status parameter
// to FAILED and includes an error message in the Message attribute of the GetDataSource
// operation response.
func (c *MachineLearning) CreateDataSourceFromRDS(input *CreateDataSourceFromRDSInput) (*CreateDataSourceFromRDSOutput, error) {
req, out := c.CreateDataSourceFromRDSRequest(input)
err := req.Send()
return out, err
}
const opCreateDataSourceFromRedshift = "CreateDataSourceFromRedshift"
// CreateDataSourceFromRedshiftRequest generates a request for the CreateDataSourceFromRedshift operation.
func (c *MachineLearning) CreateDataSourceFromRedshiftRequest(input *CreateDataSourceFromRedshiftInput) (req *service.Request, output *CreateDataSourceFromRedshiftOutput) {
op := &service.Operation{
Name: opCreateDataSourceFromRedshift,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateDataSourceFromRedshiftInput{}
}
req = c.newRequest(op, input, output)
output = &CreateDataSourceFromRedshiftOutput{}
req.Data = output
return
}
// Creates a DataSource from Amazon Redshift (http://aws.amazon.com/redshift/).
// A DataSource references data that can be used to perform either CreateMLModel,
// CreateEvaluation or CreateBatchPrediction operations.
//
// CreateDataSourceFromRedshift is an asynchronous operation. In response to
// CreateDataSourceFromRedshift, Amazon Machine Learning (Amazon ML) immediately
// returns and sets the DataSource status to PENDING. After the DataSource is
// created and ready for use, Amazon ML sets the Status parameter to COMPLETED.
// DataSource in COMPLETED or PENDING status can only be used to perform CreateMLModel,
// CreateEvaluation, or CreateBatchPrediction operations.
//
// If Amazon ML cannot accept the input source, it sets the Status parameter
// to FAILED and includes an error message in the Message attribute of the GetDataSource
// operation response.
//
// The observations should exist in the database hosted on an Amazon Redshift
// cluster and should be specified by a SelectSqlQuery. Amazon ML executes
// Unload (http://docs.aws.amazon.com/redshift/latest/dg/t_Unloading_tables.html)
// command in Amazon Redshift to transfer the result set of SelectSqlQuery to
// S3StagingLocation.
//
// After the DataSource is created, it's ready for use in evaluations and batch
// predictions. If you plan to use the DataSource to train an MLModel, the DataSource
// requires another item -- a recipe. A recipe describes the observation variables
// that participate in training an MLModel. A recipe describes how each input
// variable will be used in training. Will the variable be included or excluded
// from training? Will the variable be manipulated, for example, combined with
// another variable or split apart into word combinations? The recipe provides
// answers to these questions. For more information, see the Amazon Machine
// Learning Developer Guide.
func (c *MachineLearning) CreateDataSourceFromRedshift(input *CreateDataSourceFromRedshiftInput) (*CreateDataSourceFromRedshiftOutput, error) {
req, out := c.CreateDataSourceFromRedshiftRequest(input)
err := req.Send()
return out, err
}
const opCreateDataSourceFromS3 = "CreateDataSourceFromS3"
// CreateDataSourceFromS3Request generates a request for the CreateDataSourceFromS3 operation.
func (c *MachineLearning) CreateDataSourceFromS3Request(input *CreateDataSourceFromS3Input) (req *service.Request, output *CreateDataSourceFromS3Output) {
op := &service.Operation{
Name: opCreateDataSourceFromS3,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateDataSourceFromS3Input{}
}
req = c.newRequest(op, input, output)
output = &CreateDataSourceFromS3Output{}
req.Data = output
return
}
// Creates a DataSource object. A DataSource references data that can be used
// to perform CreateMLModel, CreateEvaluation, or CreateBatchPrediction operations.
//
// CreateDataSourceFromS3 is an asynchronous operation. In response to CreateDataSourceFromS3,
// Amazon Machine Learning (Amazon ML) immediately returns and sets the DataSource
// status to PENDING. After the DataSource is created and ready for use, Amazon
// ML sets the Status parameter to COMPLETED. DataSource in COMPLETED or PENDING
// status can only be used to perform CreateMLModel, CreateEvaluation or CreateBatchPrediction
// operations.
//
// If Amazon ML cannot accept the input source, it sets the Status parameter
// to FAILED and includes an error message in the Message attribute of the GetDataSource
// operation response.
//
// The observation data used in a DataSource should be ready to use; that is,
// it should have a consistent structure, and missing data values should be
// kept to a minimum. The observation data must reside in one or more CSV files
// in an Amazon Simple Storage Service (Amazon S3) bucket, along with a schema
// that describes the data items by name and type. The same schema must be used
// for all of the data files referenced by the DataSource.
//
// After the DataSource has been created, it's ready to use in evaluations
// and batch predictions. If you plan to use the DataSource to train an MLModel,
// the DataSource requires another item: a recipe. A recipe describes the observation
// variables that participate in training an MLModel. A recipe describes how
// each input variable will be used in training. Will the variable be included
// or excluded from training? Will the variable be manipulated, for example,
// combined with another variable, or split apart into word combinations? The
// recipe provides answers to these questions. For more information, see the
// Amazon Machine Learning Developer Guide (http://docs.aws.amazon.com/machine-learning/latest/dg).
func (c *MachineLearning) CreateDataSourceFromS3(input *CreateDataSourceFromS3Input) (*CreateDataSourceFromS3Output, error) {
req, out := c.CreateDataSourceFromS3Request(input)
err := req.Send()
return out, err
}
const opCreateEvaluation = "CreateEvaluation"
// CreateEvaluationRequest generates a request for the CreateEvaluation operation.
func (c *MachineLearning) CreateEvaluationRequest(input *CreateEvaluationInput) (req *service.Request, output *CreateEvaluationOutput) {
op := &service.Operation{
Name: opCreateEvaluation,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateEvaluationInput{}
}
req = c.newRequest(op, input, output)
output = &CreateEvaluationOutput{}
req.Data = output
return
}
// Creates a new Evaluation of an MLModel. An MLModel is evaluated on a set
// of observations associated to a DataSource. Like a DataSource for an MLModel,
// the DataSource for an Evaluation contains values for the Target Variable.
// The Evaluation compares the predicted result for each observation to the
// actual outcome and provides a summary so that you know how effective the
// MLModel functions on the test data. Evaluation generates a relevant performance
// metric such as BinaryAUC, RegressionRMSE or MulticlassAvgFScore based on
// the corresponding MLModelType: BINARY, REGRESSION or MULTICLASS.
//
// CreateEvaluation is an asynchronous operation. In response to CreateEvaluation,
// Amazon Machine Learning (Amazon ML) immediately returns and sets the evaluation
// status to PENDING. After the Evaluation is created and ready for use, Amazon
// ML sets the status to COMPLETED.
//
// You can use the GetEvaluation operation to check progress of the evaluation
// during the creation operation.
func (c *MachineLearning) CreateEvaluation(input *CreateEvaluationInput) (*CreateEvaluationOutput, error) {
req, out := c.CreateEvaluationRequest(input)
err := req.Send()
return out, err
}
const opCreateMLModel = "CreateMLModel"
// CreateMLModelRequest generates a request for the CreateMLModel operation.
func (c *MachineLearning) CreateMLModelRequest(input *CreateMLModelInput) (req *service.Request, output *CreateMLModelOutput) {
op := &service.Operation{
Name: opCreateMLModel,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateMLModelInput{}
}
req = c.newRequest(op, input, output)
output = &CreateMLModelOutput{}
req.Data = output
return
}
// Creates a new MLModel using the data files and the recipe as information
// sources.
//
// An MLModel is nearly immutable. Users can only update the MLModelName and
// the ScoreThreshold in an MLModel without creating a new MLModel.
//
// CreateMLModel is an asynchronous operation. In response to CreateMLModel,
// Amazon Machine Learning (Amazon ML) immediately returns and sets the MLModel
// status to PENDING. After the MLModel is created and ready for use, Amazon
// ML sets the status to COMPLETED.
//
// You can use the GetMLModel operation to check progress of the MLModel during
// the creation operation.
//
// CreateMLModel requires a DataSource with computed statistics, which can
// be created by setting ComputeStatistics to true in CreateDataSourceFromRDS,
// CreateDataSourceFromS3, or CreateDataSourceFromRedshift operations.
func (c *MachineLearning) CreateMLModel(input *CreateMLModelInput) (*CreateMLModelOutput, error) {
req, out := c.CreateMLModelRequest(input)
err := req.Send()
return out, err
}
const opCreateRealtimeEndpoint = "CreateRealtimeEndpoint"
// CreateRealtimeEndpointRequest generates a request for the CreateRealtimeEndpoint operation.
func (c *MachineLearning) CreateRealtimeEndpointRequest(input *CreateRealtimeEndpointInput) (req *service.Request, output *CreateRealtimeEndpointOutput) {
op := &service.Operation{
Name: opCreateRealtimeEndpoint,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateRealtimeEndpointInput{}
}
req = c.newRequest(op, input, output)
output = &CreateRealtimeEndpointOutput{}
req.Data = output
return
}
// Creates a real-time endpoint for the MLModel. The endpoint contains the URI
// of the MLModel; that is, the location to send real-time prediction requests
// for the specified MLModel.
func (c *MachineLearning) CreateRealtimeEndpoint(input *CreateRealtimeEndpointInput) (*CreateRealtimeEndpointOutput, error) {
req, out := c.CreateRealtimeEndpointRequest(input)
err := req.Send()
return out, err
}
const opDeleteBatchPrediction = "DeleteBatchPrediction"
// DeleteBatchPredictionRequest generates a request for the DeleteBatchPrediction operation.
func (c *MachineLearning) DeleteBatchPredictionRequest(input *DeleteBatchPredictionInput) (req *service.Request, output *DeleteBatchPredictionOutput) {
op := &service.Operation{
Name: opDeleteBatchPrediction,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteBatchPredictionInput{}
}
req = c.newRequest(op, input, output)
output = &DeleteBatchPredictionOutput{}
req.Data = output
return
}
// Assigns the DELETED status to a BatchPrediction, rendering it unusable.
//
// After using the DeleteBatchPrediction operation, you can use the GetBatchPrediction
// operation to verify that the status of the BatchPrediction changed to DELETED.
//
// Caution The result of the DeleteBatchPrediction operation is irreversible.
func (c *MachineLearning) DeleteBatchPrediction(input *DeleteBatchPredictionInput) (*DeleteBatchPredictionOutput, error) {
req, out := c.DeleteBatchPredictionRequest(input)
err := req.Send()
return out, err
}
const opDeleteDataSource = "DeleteDataSource"
// DeleteDataSourceRequest generates a request for the DeleteDataSource operation.
func (c *MachineLearning) DeleteDataSourceRequest(input *DeleteDataSourceInput) (req *service.Request, output *DeleteDataSourceOutput) {
op := &service.Operation{
Name: opDeleteDataSource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteDataSourceInput{}
}
req = c.newRequest(op, input, output)
output = &DeleteDataSourceOutput{}
req.Data = output
return
}
// Assigns the DELETED status to a DataSource, rendering it unusable.
//
// After using the DeleteDataSource operation, you can use the GetDataSource
// operation to verify that the status of the DataSource changed to DELETED.
//
// Caution The results of the DeleteDataSource operation are irreversible.
func (c *MachineLearning) DeleteDataSource(input *DeleteDataSourceInput) (*DeleteDataSourceOutput, error) {
req, out := c.DeleteDataSourceRequest(input)
err := req.Send()
return out, err
}
const opDeleteEvaluation = "DeleteEvaluation"
// DeleteEvaluationRequest generates a request for the DeleteEvaluation operation.
func (c *MachineLearning) DeleteEvaluationRequest(input *DeleteEvaluationInput) (req *service.Request, output *DeleteEvaluationOutput) {
op := &service.Operation{
Name: opDeleteEvaluation,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteEvaluationInput{}
}
req = c.newRequest(op, input, output)
output = &DeleteEvaluationOutput{}
req.Data = output
return
}
// Assigns the DELETED status to an Evaluation, rendering it unusable.
//
// After invoking the DeleteEvaluation operation, you can use the GetEvaluation
// operation to verify that the status of the Evaluation changed to DELETED.
//
// Caution The results of the DeleteEvaluation operation are irreversible.
func (c *MachineLearning) DeleteEvaluation(input *DeleteEvaluationInput) (*DeleteEvaluationOutput, error) {
req, out := c.DeleteEvaluationRequest(input)
err := req.Send()
return out, err
}
const opDeleteMLModel = "DeleteMLModel"
// DeleteMLModelRequest generates a request for the DeleteMLModel operation.
func (c *MachineLearning) DeleteMLModelRequest(input *DeleteMLModelInput) (req *service.Request, output *DeleteMLModelOutput) {
op := &service.Operation{
Name: opDeleteMLModel,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteMLModelInput{}
}
req = c.newRequest(op, input, output)
output = &DeleteMLModelOutput{}
req.Data = output
return
}
// Assigns the DELETED status to an MLModel, rendering it unusable.
//
// After using the DeleteMLModel operation, you can use the GetMLModel operation
// to verify that the status of the MLModel changed to DELETED.
//
// Caution The result of the DeleteMLModel operation is irreversible.
func (c *MachineLearning) DeleteMLModel(input *DeleteMLModelInput) (*DeleteMLModelOutput, error) {
req, out := c.DeleteMLModelRequest(input)
err := req.Send()
return out, err
}
const opDeleteRealtimeEndpoint = "DeleteRealtimeEndpoint"
// DeleteRealtimeEndpointRequest generates a request for the DeleteRealtimeEndpoint operation.
func (c *MachineLearning) DeleteRealtimeEndpointRequest(input *DeleteRealtimeEndpointInput) (req *service.Request, output *DeleteRealtimeEndpointOutput) {
op := &service.Operation{
Name: opDeleteRealtimeEndpoint,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteRealtimeEndpointInput{}
}
req = c.newRequest(op, input, output)
output = &DeleteRealtimeEndpointOutput{}
req.Data = output
return
}
// Deletes a real time endpoint of an MLModel.
func (c *MachineLearning) DeleteRealtimeEndpoint(input *DeleteRealtimeEndpointInput) (*DeleteRealtimeEndpointOutput, error) {
req, out := c.DeleteRealtimeEndpointRequest(input)
err := req.Send()
return out, err
}
const opDescribeBatchPredictions = "DescribeBatchPredictions"
// DescribeBatchPredictionsRequest generates a request for the DescribeBatchPredictions operation.
func (c *MachineLearning) DescribeBatchPredictionsRequest(input *DescribeBatchPredictionsInput) (req *service.Request, output *DescribeBatchPredictionsOutput) {
op := &service.Operation{
Name: opDescribeBatchPredictions,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &service.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "Limit",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeBatchPredictionsInput{}
}
req = c.newRequest(op, input, output)
output = &DescribeBatchPredictionsOutput{}
req.Data = output
return
}
// Returns a list of BatchPrediction operations that match the search criteria
// in the request.
func (c *MachineLearning) DescribeBatchPredictions(input *DescribeBatchPredictionsInput) (*DescribeBatchPredictionsOutput, error) {
req, out := c.DescribeBatchPredictionsRequest(input)
err := req.Send()
return out, err
}
func (c *MachineLearning) DescribeBatchPredictionsPages(input *DescribeBatchPredictionsInput, fn func(p *DescribeBatchPredictionsOutput, lastPage bool) (shouldContinue bool)) error {
page, _ := c.DescribeBatchPredictionsRequest(input)
return page.EachPage(func(p interface{}, lastPage bool) bool {
return fn(p.(*DescribeBatchPredictionsOutput), lastPage)
})
}
const opDescribeDataSources = "DescribeDataSources"
// DescribeDataSourcesRequest generates a request for the DescribeDataSources operation.
func (c *MachineLearning) DescribeDataSourcesRequest(input *DescribeDataSourcesInput) (req *service.Request, output *DescribeDataSourcesOutput) {
op := &service.Operation{
Name: opDescribeDataSources,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &service.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "Limit",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeDataSourcesInput{}
}
req = c.newRequest(op, input, output)
output = &DescribeDataSourcesOutput{}
req.Data = output
return
}
// Returns a list of DataSource that match the search criteria in the request.
func (c *MachineLearning) DescribeDataSources(input *DescribeDataSourcesInput) (*DescribeDataSourcesOutput, error) {
req, out := c.DescribeDataSourcesRequest(input)
err := req.Send()
return out, err
}
func (c *MachineLearning) DescribeDataSourcesPages(input *DescribeDataSourcesInput, fn func(p *DescribeDataSourcesOutput, lastPage bool) (shouldContinue bool)) error {
page, _ := c.DescribeDataSourcesRequest(input)
return page.EachPage(func(p interface{}, lastPage bool) bool {
return fn(p.(*DescribeDataSourcesOutput), lastPage)
})
}
const opDescribeEvaluations = "DescribeEvaluations"
// DescribeEvaluationsRequest generates a request for the DescribeEvaluations operation.
func (c *MachineLearning) DescribeEvaluationsRequest(input *DescribeEvaluationsInput) (req *service.Request, output *DescribeEvaluationsOutput) {
op := &service.Operation{
Name: opDescribeEvaluations,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &service.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "Limit",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeEvaluationsInput{}
}
req = c.newRequest(op, input, output)
output = &DescribeEvaluationsOutput{}
req.Data = output
return
}
// Returns a list of DescribeEvaluations that match the search criteria in the
// request.
func (c *MachineLearning) DescribeEvaluations(input *DescribeEvaluationsInput) (*DescribeEvaluationsOutput, error) {
req, out := c.DescribeEvaluationsRequest(input)
err := req.Send()
return out, err
}
func (c *MachineLearning) DescribeEvaluationsPages(input *DescribeEvaluationsInput, fn func(p *DescribeEvaluationsOutput, lastPage bool) (shouldContinue bool)) error {
page, _ := c.DescribeEvaluationsRequest(input)
return page.EachPage(func(p interface{}, lastPage bool) bool {
return fn(p.(*DescribeEvaluationsOutput), lastPage)
})
}
const opDescribeMLModels = "DescribeMLModels"
// DescribeMLModelsRequest generates a request for the DescribeMLModels operation.
func (c *MachineLearning) DescribeMLModelsRequest(input *DescribeMLModelsInput) (req *service.Request, output *DescribeMLModelsOutput) {
op := &service.Operation{
Name: opDescribeMLModels,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &service.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "Limit",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeMLModelsInput{}
}
req = c.newRequest(op, input, output)
output = &DescribeMLModelsOutput{}
req.Data = output
return
}
// Returns a list of MLModel that match the search criteria in the request.
func (c *MachineLearning) DescribeMLModels(input *DescribeMLModelsInput) (*DescribeMLModelsOutput, error) {
req, out := c.DescribeMLModelsRequest(input)
err := req.Send()
return out, err
}
func (c *MachineLearning) DescribeMLModelsPages(input *DescribeMLModelsInput, fn func(p *DescribeMLModelsOutput, lastPage bool) (shouldContinue bool)) error {
page, _ := c.DescribeMLModelsRequest(input)
return page.EachPage(func(p interface{}, lastPage bool) bool {
return fn(p.(*DescribeMLModelsOutput), lastPage)
})
}
const opGetBatchPrediction = "GetBatchPrediction"
// GetBatchPredictionRequest generates a request for the GetBatchPrediction operation.
func (c *MachineLearning) GetBatchPredictionRequest(input *GetBatchPredictionInput) (req *service.Request, output *GetBatchPredictionOutput) {
op := &service.Operation{
Name: opGetBatchPrediction,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetBatchPredictionInput{}
}
req = c.newRequest(op, input, output)
output = &GetBatchPredictionOutput{}
req.Data = output
return
}
// Returns a BatchPrediction that includes detailed metadata, status, and data
// file information for a Batch Prediction request.
func (c *MachineLearning) GetBatchPrediction(input *GetBatchPredictionInput) (*GetBatchPredictionOutput, error) {
req, out := c.GetBatchPredictionRequest(input)
err := req.Send()
return out, err
}
const opGetDataSource = "GetDataSource"
// GetDataSourceRequest generates a request for the GetDataSource operation.
func (c *MachineLearning) GetDataSourceRequest(input *GetDataSourceInput) (req *service.Request, output *GetDataSourceOutput) {
op := &service.Operation{
Name: opGetDataSource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetDataSourceInput{}
}
req = c.newRequest(op, input, output)
output = &GetDataSourceOutput{}
req.Data = output
return
}
// Returns a DataSource that includes metadata and data file information, as
// well as the current status of the DataSource.
//
// GetDataSource provides results in normal or verbose format. The verbose
// format adds the schema description and the list of files pointed to by the
// DataSource to the normal format.
func (c *MachineLearning) GetDataSource(input *GetDataSourceInput) (*GetDataSourceOutput, error) {
req, out := c.GetDataSourceRequest(input)
err := req.Send()
return out, err
}
const opGetEvaluation = "GetEvaluation"
// GetEvaluationRequest generates a request for the GetEvaluation operation.
func (c *MachineLearning) GetEvaluationRequest(input *GetEvaluationInput) (req *service.Request, output *GetEvaluationOutput) {
op := &service.Operation{
Name: opGetEvaluation,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetEvaluationInput{}
}
req = c.newRequest(op, input, output)
output = &GetEvaluationOutput{}
req.Data = output
return
}
// Returns an Evaluation that includes metadata as well as the current status
// of the Evaluation.
func (c *MachineLearning) GetEvaluation(input *GetEvaluationInput) (*GetEvaluationOutput, error) {
req, out := c.GetEvaluationRequest(input)
err := req.Send()
return out, err
}
const opGetMLModel = "GetMLModel"
// GetMLModelRequest generates a request for the GetMLModel operation.
func (c *MachineLearning) GetMLModelRequest(input *GetMLModelInput) (req *service.Request, output *GetMLModelOutput) {
op := &service.Operation{
Name: opGetMLModel,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetMLModelInput{}
}
req = c.newRequest(op, input, output)
output = &GetMLModelOutput{}
req.Data = output
return
}
// Returns an MLModel that includes detailed metadata, and data source information
// as well as the current status of the MLModel.
//
// GetMLModel provides results in normal or verbose format.
func (c *MachineLearning) GetMLModel(input *GetMLModelInput) (*GetMLModelOutput, error) {
req, out := c.GetMLModelRequest(input)
err := req.Send()
return out, err
}
const opPredict = "Predict"
// PredictRequest generates a request for the Predict operation.
func (c *MachineLearning) PredictRequest(input *PredictInput) (req *service.Request, output *PredictOutput) {
op := &service.Operation{
Name: opPredict,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &PredictInput{}
}
req = c.newRequest(op, input, output)
output = &PredictOutput{}
req.Data = output
return
}
// Generates a prediction for the observation using the specified MLModel.
//
// Note Not all response parameters will be populated because this is dependent
// on the type of requested model.
func (c *MachineLearning) Predict(input *PredictInput) (*PredictOutput, error) {
req, out := c.PredictRequest(input)
err := req.Send()
return out, err
}
const opUpdateBatchPrediction = "UpdateBatchPrediction"
// UpdateBatchPredictionRequest generates a request for the UpdateBatchPrediction operation.
func (c *MachineLearning) UpdateBatchPredictionRequest(input *UpdateBatchPredictionInput) (req *service.Request, output *UpdateBatchPredictionOutput) {
op := &service.Operation{
Name: opUpdateBatchPrediction,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateBatchPredictionInput{}
}
req = c.newRequest(op, input, output)
output = &UpdateBatchPredictionOutput{}
req.Data = output
return
}
// Updates the BatchPredictionName of a BatchPrediction.
//
// You can use the GetBatchPrediction operation to view the contents of the
// updated data element.
func (c *MachineLearning) UpdateBatchPrediction(input *UpdateBatchPredictionInput) (*UpdateBatchPredictionOutput, error) {
req, out := c.UpdateBatchPredictionRequest(input)
err := req.Send()
return out, err
}
const opUpdateDataSource = "UpdateDataSource"
// UpdateDataSourceRequest generates a request for the UpdateDataSource operation.
func (c *MachineLearning) UpdateDataSourceRequest(input *UpdateDataSourceInput) (req *service.Request, output *UpdateDataSourceOutput) {
op := &service.Operation{
Name: opUpdateDataSource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateDataSourceInput{}
}
req = c.newRequest(op, input, output)
output = &UpdateDataSourceOutput{}
req.Data = output
return
}
// Updates the DataSourceName of a DataSource.
//
// You can use the GetDataSource operation to view the contents of the updated
// data element.
func (c *MachineLearning) UpdateDataSource(input *UpdateDataSourceInput) (*UpdateDataSourceOutput, error) {
req, out := c.UpdateDataSourceRequest(input)
err := req.Send()
return out, err
}
const opUpdateEvaluation = "UpdateEvaluation"
// UpdateEvaluationRequest generates a request for the UpdateEvaluation operation.
func (c *MachineLearning) UpdateEvaluationRequest(input *UpdateEvaluationInput) (req *service.Request, output *UpdateEvaluationOutput) {
op := &service.Operation{
Name: opUpdateEvaluation,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateEvaluationInput{}
}
req = c.newRequest(op, input, output)
output = &UpdateEvaluationOutput{}
req.Data = output
return
}
// Updates the EvaluationName of an Evaluation.
//
// You can use the GetEvaluation operation to view the contents of the updated
// data element.
func (c *MachineLearning) UpdateEvaluation(input *UpdateEvaluationInput) (*UpdateEvaluationOutput, error) {
req, out := c.UpdateEvaluationRequest(input)
err := req.Send()
return out, err
}
const opUpdateMLModel = "UpdateMLModel"
// UpdateMLModelRequest generates a request for the UpdateMLModel operation.
func (c *MachineLearning) UpdateMLModelRequest(input *UpdateMLModelInput) (req *service.Request, output *UpdateMLModelOutput) {
op := &service.Operation{
Name: opUpdateMLModel,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateMLModelInput{}
}
req = c.newRequest(op, input, output)
output = &UpdateMLModelOutput{}
req.Data = output
return
}
// Updates the MLModelName and the ScoreThreshold of an MLModel.
//
// You can use the GetMLModel operation to view the contents of the updated
// data element.
func (c *MachineLearning) UpdateMLModel(input *UpdateMLModelInput) (*UpdateMLModelOutput, error) {
req, out := c.UpdateMLModelRequest(input)
err := req.Send()
return out, err
}
// Represents the output of GetBatchPrediction operation.
//
// The content consists of the detailed metadata, the status, and the data
// file information of a Batch Prediction.
type BatchPrediction struct {
// The ID of the DataSource that points to the group of observations to predict.
BatchPredictionDataSourceID *string `locationName:"BatchPredictionDataSourceId" type:"string"`
// The ID assigned to the BatchPrediction at creation. This value should be
// identical to the value of the BatchPredictionID in the request.
BatchPredictionID *string `locationName:"BatchPredictionId" type:"string"`
// The time that the BatchPrediction was created. The time is expressed in epoch
// time.
CreatedAt *time.Time `type:"timestamp" timestampFormat:"unix"`
// The AWS user account that invoked the BatchPrediction. The account type can
// be either an AWS root account or an AWS Identity and Access Management (IAM)
// user account.
CreatedByIAMUser *string `locationName:"CreatedByIamUser" type:"string"`
// The location of the data file or directory in Amazon Simple Storage Service
// (Amazon S3).
InputDataLocationS3 *string `type:"string"`
// The time of the most recent edit to the BatchPrediction. The time is expressed
// in epoch time.
LastUpdatedAt *time.Time `type:"timestamp" timestampFormat:"unix"`
// The ID of the MLModel that generated predictions for the BatchPrediction
// request.
MLModelID *string `locationName:"MLModelId" type:"string"`
// A description of the most recent details about processing the batch prediction
// request.
Message *string `type:"string"`
// A user-supplied name or description of the BatchPrediction.
Name *string `type:"string"`
// The location of an Amazon S3 bucket or directory to receive the operation
// results. The following substrings are not allowed in the s3 key portion of
// the "outputURI" field: ':', '//', '/./', '/../'.
OutputURI *string `locationName:"OutputUri" type:"string"`
// The status of the BatchPrediction. This element can have one of the following
// values:
//
// PENDING - Amazon Machine Learning (Amazon ML) submitted a request to generate
// predictions for a batch of observations. INPROGRESS - The process is underway.
// FAILED - The request to peform a batch prediction did not run to completion.
// It is not usable. COMPLETED - The batch prediction process completed successfully.
// DELETED - The BatchPrediction is marked as deleted. It is not usable.
Status *string `type:"string" enum:"EntityStatus"`
metadataBatchPrediction `json:"-" xml:"-"`
}
type metadataBatchPrediction struct {
SDKShapeTraits bool `type:"structure"`
}
// String returns the string representation
func (s BatchPrediction) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s BatchPrediction) GoString() string {
return s.String()
}
type CreateBatchPredictionInput struct {
// The ID of the DataSource that points to the group of observations to predict.
BatchPredictionDataSourceID *string `locationName:"BatchPredictionDataSourceId" type:"string" required:"true"`
// A user-supplied ID that uniquely identifies the BatchPrediction.
BatchPredictionID *string `locationName:"BatchPredictionId" type:"string" required:"true"`
// A user-supplied name or description of the BatchPrediction. BatchPredictionName
// can only use the UTF-8 character set.
BatchPredictionName *string `type:"string"`
// The ID of the MLModel that will generate predictions for the group of observations.
MLModelID *string `locationName:"MLModelId" type:"string" required:"true"`
// The location of an Amazon Simple Storage Service (Amazon S3) bucket or directory
// to store the batch prediction results. The following substrings are not allowed
// in the s3 key portion of the "outputURI" field: ':', '//', '/./', '/../'.
//
// Amazon ML needs permissions to store and retrieve the logs on your behalf.
// For information about how to set permissions, see the Amazon Machine Learning
// Developer Guide (http://docs.aws.amazon.com/machine-learning/latest/dg).
OutputURI *string `locationName:"OutputUri" type:"string" required:"true"`
metadataCreateBatchPredictionInput `json:"-" xml:"-"`
}