forked from aws/aws-sdk-go-v2
/
api.go
8152 lines (6821 loc) · 261 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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package machinelearning
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
const opAddTags = "AddTags"
// AddTagsRequest is a API request type for the AddTags API operation.
type AddTagsRequest struct {
*aws.Request
Input *AddTagsInput
}
// Send marshals and sends the AddTags API request.
func (r AddTagsRequest) Send() (*AddTagsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*AddTagsOutput), nil
}
// AddTagsRequest returns a request value for making API operation for
// Amazon Machine Learning.
//
// Adds one or more tags to an object, up to a limit of 10. Each tag consists
// of a key and an optional value. If you add a tag using a key that is already
// associated with the ML object, AddTags updates the tag's value.
//
// // Example sending a request using the AddTagsRequest method.
// req := client.AddTagsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *MachineLearning) AddTagsRequest(input *AddTagsInput) AddTagsRequest {
op := &aws.Operation{
Name: opAddTags,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AddTagsInput{}
}
output := &AddTagsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return AddTagsRequest{Request: req, Input: input}
}
const opCreateBatchPrediction = "CreateBatchPrediction"
// CreateBatchPredictionRequest is a API request type for the CreateBatchPrediction API operation.
type CreateBatchPredictionRequest struct {
*aws.Request
Input *CreateBatchPredictionInput
}
// Send marshals and sends the CreateBatchPrediction API request.
func (r CreateBatchPredictionRequest) Send() (*CreateBatchPredictionOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateBatchPredictionOutput), nil
}
// CreateBatchPredictionRequest returns a request value for making API operation for
// Amazon Machine Learning.
//
// 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.
//
// // Example sending a request using the CreateBatchPredictionRequest method.
// req := client.CreateBatchPredictionRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *MachineLearning) CreateBatchPredictionRequest(input *CreateBatchPredictionInput) CreateBatchPredictionRequest {
op := &aws.Operation{
Name: opCreateBatchPrediction,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateBatchPredictionInput{}
}
output := &CreateBatchPredictionOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateBatchPredictionRequest{Request: req, Input: input}
}
const opCreateDataSourceFromRDS = "CreateDataSourceFromRDS"
// CreateDataSourceFromRDSRequest is a API request type for the CreateDataSourceFromRDS API operation.
type CreateDataSourceFromRDSRequest struct {
*aws.Request
Input *CreateDataSourceFromRDSInput
}
// Send marshals and sends the CreateDataSourceFromRDS API request.
func (r CreateDataSourceFromRDSRequest) Send() (*CreateDataSourceFromRDSOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateDataSourceFromRDSOutput), nil
}
// CreateDataSourceFromRDSRequest returns a request value for making API operation for
// Amazon Machine Learning.
//
// 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 the COMPLETED or
// PENDING state can be used only 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.
//
// // Example sending a request using the CreateDataSourceFromRDSRequest method.
// req := client.CreateDataSourceFromRDSRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *MachineLearning) CreateDataSourceFromRDSRequest(input *CreateDataSourceFromRDSInput) CreateDataSourceFromRDSRequest {
op := &aws.Operation{
Name: opCreateDataSourceFromRDS,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateDataSourceFromRDSInput{}
}
output := &CreateDataSourceFromRDSOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateDataSourceFromRDSRequest{Request: req, Input: input}
}
const opCreateDataSourceFromRedshift = "CreateDataSourceFromRedshift"
// CreateDataSourceFromRedshiftRequest is a API request type for the CreateDataSourceFromRedshift API operation.
type CreateDataSourceFromRedshiftRequest struct {
*aws.Request
Input *CreateDataSourceFromRedshiftInput
}
// Send marshals and sends the CreateDataSourceFromRedshift API request.
func (r CreateDataSourceFromRedshiftRequest) Send() (*CreateDataSourceFromRedshiftOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateDataSourceFromRedshiftOutput), nil
}
// CreateDataSourceFromRedshiftRequest returns a request value for making API operation for
// Amazon Machine Learning.
//
// Creates a DataSource from a database hosted on an Amazon Redshift cluster.
// 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 states can be used to perform only CreateMLModel,
// CreateEvaluation, or CreateBatchPrediction operations.
//
// If Amazon ML can't 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 be contained in the database hosted on an Amazon
// Redshift cluster and should be specified by a SelectSqlQuery query. Amazon
// ML executes an Unload command in Amazon Redshift to transfer the result set
// of the SelectSqlQuery query to S3StagingLocation.
//
// After the DataSource has been created, it's ready for use in evaluations
// and batch predictions. If you plan to use the DataSource to train an MLModel,
// the DataSource also requires a recipe. A recipe describes how each input
// variable will be used in training an MLModel. Will the variable be included
// or excluded from training? Will the variable be manipulated; for example,
// will it be combined with another variable or will it be split apart into
// word combinations? The recipe provides answers to these questions.
//
// You can't change an existing datasource, but you can copy and modify the
// settings from an existing Amazon Redshift datasource to create a new datasource.
// To do so, call GetDataSource for an existing datasource and copy the values
// to a CreateDataSource call. Change the settings that you want to change and
// make sure that all required fields have the appropriate values.
//
// // Example sending a request using the CreateDataSourceFromRedshiftRequest method.
// req := client.CreateDataSourceFromRedshiftRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *MachineLearning) CreateDataSourceFromRedshiftRequest(input *CreateDataSourceFromRedshiftInput) CreateDataSourceFromRedshiftRequest {
op := &aws.Operation{
Name: opCreateDataSourceFromRedshift,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateDataSourceFromRedshiftInput{}
}
output := &CreateDataSourceFromRedshiftOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateDataSourceFromRedshiftRequest{Request: req, Input: input}
}
const opCreateDataSourceFromS3 = "CreateDataSourceFromS3"
// CreateDataSourceFromS3Request is a API request type for the CreateDataSourceFromS3 API operation.
type CreateDataSourceFromS3Request struct {
*aws.Request
Input *CreateDataSourceFromS3Input
}
// Send marshals and sends the CreateDataSourceFromS3 API request.
func (r CreateDataSourceFromS3Request) Send() (*CreateDataSourceFromS3Output, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateDataSourceFromS3Output), nil
}
// CreateDataSourceFromS3Request returns a request value for making API operation for
// Amazon Machine Learning.
//
// 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 has been created and is ready for
// use, Amazon ML sets the Status parameter to COMPLETED. DataSource in the
// COMPLETED or PENDING state can be used to perform only CreateMLModel, CreateEvaluation
// or CreateBatchPrediction operations.
//
// If Amazon ML can't 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) location, 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 also needs a recipe. A recipe describes how each input variable
// will be used in training an MLModel. Will the variable be included or excluded
// from training? Will the variable be manipulated; for example, will it be
// combined with another variable or will it be split apart into word combinations?
// The recipe provides answers to these questions.
//
// // Example sending a request using the CreateDataSourceFromS3Request method.
// req := client.CreateDataSourceFromS3Request(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *MachineLearning) CreateDataSourceFromS3Request(input *CreateDataSourceFromS3Input) CreateDataSourceFromS3Request {
op := &aws.Operation{
Name: opCreateDataSourceFromS3,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateDataSourceFromS3Input{}
}
output := &CreateDataSourceFromS3Output{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateDataSourceFromS3Request{Request: req, Input: input}
}
const opCreateEvaluation = "CreateEvaluation"
// CreateEvaluationRequest is a API request type for the CreateEvaluation API operation.
type CreateEvaluationRequest struct {
*aws.Request
Input *CreateEvaluationInput
}
// Send marshals and sends the CreateEvaluation API request.
func (r CreateEvaluationRequest) Send() (*CreateEvaluationOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateEvaluationOutput), nil
}
// CreateEvaluationRequest returns a request value for making API operation for
// Amazon Machine Learning.
//
// 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.
//
// // Example sending a request using the CreateEvaluationRequest method.
// req := client.CreateEvaluationRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *MachineLearning) CreateEvaluationRequest(input *CreateEvaluationInput) CreateEvaluationRequest {
op := &aws.Operation{
Name: opCreateEvaluation,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateEvaluationInput{}
}
output := &CreateEvaluationOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateEvaluationRequest{Request: req, Input: input}
}
const opCreateMLModel = "CreateMLModel"
// CreateMLModelRequest is a API request type for the CreateMLModel API operation.
type CreateMLModelRequest struct {
*aws.Request
Input *CreateMLModelInput
}
// Send marshals and sends the CreateMLModel API request.
func (r CreateMLModelRequest) Send() (*CreateMLModelOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateMLModelOutput), nil
}
// CreateMLModelRequest returns a request value for making API operation for
// Amazon Machine Learning.
//
// Creates a new MLModel using the DataSource and the recipe as information
// sources.
//
// An MLModel is nearly immutable. Users can update only 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 has been created and ready is for use,
// Amazon ML sets the status to COMPLETED.
//
// You can use the GetMLModel operation to check the 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.
//
// // Example sending a request using the CreateMLModelRequest method.
// req := client.CreateMLModelRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *MachineLearning) CreateMLModelRequest(input *CreateMLModelInput) CreateMLModelRequest {
op := &aws.Operation{
Name: opCreateMLModel,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateMLModelInput{}
}
output := &CreateMLModelOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateMLModelRequest{Request: req, Input: input}
}
const opCreateRealtimeEndpoint = "CreateRealtimeEndpoint"
// CreateRealtimeEndpointRequest is a API request type for the CreateRealtimeEndpoint API operation.
type CreateRealtimeEndpointRequest struct {
*aws.Request
Input *CreateRealtimeEndpointInput
}
// Send marshals and sends the CreateRealtimeEndpoint API request.
func (r CreateRealtimeEndpointRequest) Send() (*CreateRealtimeEndpointOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateRealtimeEndpointOutput), nil
}
// CreateRealtimeEndpointRequest returns a request value for making API operation for
// Amazon Machine Learning.
//
// 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.
//
// // Example sending a request using the CreateRealtimeEndpointRequest method.
// req := client.CreateRealtimeEndpointRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *MachineLearning) CreateRealtimeEndpointRequest(input *CreateRealtimeEndpointInput) CreateRealtimeEndpointRequest {
op := &aws.Operation{
Name: opCreateRealtimeEndpoint,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateRealtimeEndpointInput{}
}
output := &CreateRealtimeEndpointOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateRealtimeEndpointRequest{Request: req, Input: input}
}
const opDeleteBatchPrediction = "DeleteBatchPrediction"
// DeleteBatchPredictionRequest is a API request type for the DeleteBatchPrediction API operation.
type DeleteBatchPredictionRequest struct {
*aws.Request
Input *DeleteBatchPredictionInput
}
// Send marshals and sends the DeleteBatchPrediction API request.
func (r DeleteBatchPredictionRequest) Send() (*DeleteBatchPredictionOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteBatchPredictionOutput), nil
}
// DeleteBatchPredictionRequest returns a request value for making API operation for
// Amazon Machine Learning.
//
// 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.
//
// // Example sending a request using the DeleteBatchPredictionRequest method.
// req := client.DeleteBatchPredictionRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *MachineLearning) DeleteBatchPredictionRequest(input *DeleteBatchPredictionInput) DeleteBatchPredictionRequest {
op := &aws.Operation{
Name: opDeleteBatchPrediction,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteBatchPredictionInput{}
}
output := &DeleteBatchPredictionOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteBatchPredictionRequest{Request: req, Input: input}
}
const opDeleteDataSource = "DeleteDataSource"
// DeleteDataSourceRequest is a API request type for the DeleteDataSource API operation.
type DeleteDataSourceRequest struct {
*aws.Request
Input *DeleteDataSourceInput
}
// Send marshals and sends the DeleteDataSource API request.
func (r DeleteDataSourceRequest) Send() (*DeleteDataSourceOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteDataSourceOutput), nil
}
// DeleteDataSourceRequest returns a request value for making API operation for
// Amazon Machine Learning.
//
// 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.
//
// // Example sending a request using the DeleteDataSourceRequest method.
// req := client.DeleteDataSourceRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *MachineLearning) DeleteDataSourceRequest(input *DeleteDataSourceInput) DeleteDataSourceRequest {
op := &aws.Operation{
Name: opDeleteDataSource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteDataSourceInput{}
}
output := &DeleteDataSourceOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteDataSourceRequest{Request: req, Input: input}
}
const opDeleteEvaluation = "DeleteEvaluation"
// DeleteEvaluationRequest is a API request type for the DeleteEvaluation API operation.
type DeleteEvaluationRequest struct {
*aws.Request
Input *DeleteEvaluationInput
}
// Send marshals and sends the DeleteEvaluation API request.
func (r DeleteEvaluationRequest) Send() (*DeleteEvaluationOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteEvaluationOutput), nil
}
// DeleteEvaluationRequest returns a request value for making API operation for
// Amazon Machine Learning.
//
// 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.
//
// CautionThe results of the DeleteEvaluation operation are irreversible.
//
// // Example sending a request using the DeleteEvaluationRequest method.
// req := client.DeleteEvaluationRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *MachineLearning) DeleteEvaluationRequest(input *DeleteEvaluationInput) DeleteEvaluationRequest {
op := &aws.Operation{
Name: opDeleteEvaluation,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteEvaluationInput{}
}
output := &DeleteEvaluationOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteEvaluationRequest{Request: req, Input: input}
}
const opDeleteMLModel = "DeleteMLModel"
// DeleteMLModelRequest is a API request type for the DeleteMLModel API operation.
type DeleteMLModelRequest struct {
*aws.Request
Input *DeleteMLModelInput
}
// Send marshals and sends the DeleteMLModel API request.
func (r DeleteMLModelRequest) Send() (*DeleteMLModelOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteMLModelOutput), nil
}
// DeleteMLModelRequest returns a request value for making API operation for
// Amazon Machine Learning.
//
// 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.
//
// // Example sending a request using the DeleteMLModelRequest method.
// req := client.DeleteMLModelRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *MachineLearning) DeleteMLModelRequest(input *DeleteMLModelInput) DeleteMLModelRequest {
op := &aws.Operation{
Name: opDeleteMLModel,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteMLModelInput{}
}
output := &DeleteMLModelOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteMLModelRequest{Request: req, Input: input}
}
const opDeleteRealtimeEndpoint = "DeleteRealtimeEndpoint"
// DeleteRealtimeEndpointRequest is a API request type for the DeleteRealtimeEndpoint API operation.
type DeleteRealtimeEndpointRequest struct {
*aws.Request
Input *DeleteRealtimeEndpointInput
}
// Send marshals and sends the DeleteRealtimeEndpoint API request.
func (r DeleteRealtimeEndpointRequest) Send() (*DeleteRealtimeEndpointOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteRealtimeEndpointOutput), nil
}
// DeleteRealtimeEndpointRequest returns a request value for making API operation for
// Amazon Machine Learning.
//
// Deletes a real time endpoint of an MLModel.
//
// // Example sending a request using the DeleteRealtimeEndpointRequest method.
// req := client.DeleteRealtimeEndpointRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *MachineLearning) DeleteRealtimeEndpointRequest(input *DeleteRealtimeEndpointInput) DeleteRealtimeEndpointRequest {
op := &aws.Operation{
Name: opDeleteRealtimeEndpoint,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteRealtimeEndpointInput{}
}
output := &DeleteRealtimeEndpointOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteRealtimeEndpointRequest{Request: req, Input: input}
}
const opDeleteTags = "DeleteTags"
// DeleteTagsRequest is a API request type for the DeleteTags API operation.
type DeleteTagsRequest struct {
*aws.Request
Input *DeleteTagsInput
}
// Send marshals and sends the DeleteTags API request.
func (r DeleteTagsRequest) Send() (*DeleteTagsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteTagsOutput), nil
}
// DeleteTagsRequest returns a request value for making API operation for
// Amazon Machine Learning.
//
// Deletes the specified tags associated with an ML object. After this operation
// is complete, you can't recover deleted tags.
//
// If you specify a tag that doesn't exist, Amazon ML ignores it.
//
// // Example sending a request using the DeleteTagsRequest method.
// req := client.DeleteTagsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *MachineLearning) DeleteTagsRequest(input *DeleteTagsInput) DeleteTagsRequest {
op := &aws.Operation{
Name: opDeleteTags,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteTagsInput{}
}
output := &DeleteTagsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteTagsRequest{Request: req, Input: input}
}
const opDescribeBatchPredictions = "DescribeBatchPredictions"
// DescribeBatchPredictionsRequest is a API request type for the DescribeBatchPredictions API operation.
type DescribeBatchPredictionsRequest struct {
*aws.Request
Input *DescribeBatchPredictionsInput
}
// Send marshals and sends the DescribeBatchPredictions API request.
func (r DescribeBatchPredictionsRequest) Send() (*DescribeBatchPredictionsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeBatchPredictionsOutput), nil
}
// DescribeBatchPredictionsRequest returns a request value for making API operation for
// Amazon Machine Learning.
//
// Returns a list of BatchPrediction operations that match the search criteria
// in the request.
//
// // Example sending a request using the DescribeBatchPredictionsRequest method.
// req := client.DescribeBatchPredictionsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *MachineLearning) DescribeBatchPredictionsRequest(input *DescribeBatchPredictionsInput) DescribeBatchPredictionsRequest {
op := &aws.Operation{
Name: opDescribeBatchPredictions,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &aws.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "Limit",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeBatchPredictionsInput{}
}
output := &DescribeBatchPredictionsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeBatchPredictionsRequest{Request: req, Input: input}
}
// DescribeBatchPredictionsPages iterates over the pages of a DescribeBatchPredictions operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribeBatchPredictions method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeBatchPredictions operation.
// pageNum := 0
// err := client.DescribeBatchPredictionsPages(params,
// func(page *DescribeBatchPredictionsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *MachineLearning) DescribeBatchPredictionsPages(input *DescribeBatchPredictionsInput, fn func(*DescribeBatchPredictionsOutput, bool) bool) error {
return c.DescribeBatchPredictionsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// DescribeBatchPredictionsPagesWithContext same as DescribeBatchPredictionsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *MachineLearning) DescribeBatchPredictionsPagesWithContext(ctx aws.Context, input *DescribeBatchPredictionsInput, fn func(*DescribeBatchPredictionsOutput, bool) bool, opts ...aws.Option) error {
p := aws.Pagination{
NewRequest: func() (*aws.Request, error) {
var inCpy *DescribeBatchPredictionsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req := c.DescribeBatchPredictionsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req.Request, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*DescribeBatchPredictionsOutput), !p.HasNextPage())
}
return p.Err()
}
const opDescribeDataSources = "DescribeDataSources"
// DescribeDataSourcesRequest is a API request type for the DescribeDataSources API operation.
type DescribeDataSourcesRequest struct {
*aws.Request
Input *DescribeDataSourcesInput
}
// Send marshals and sends the DescribeDataSources API request.
func (r DescribeDataSourcesRequest) Send() (*DescribeDataSourcesOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeDataSourcesOutput), nil
}
// DescribeDataSourcesRequest returns a request value for making API operation for
// Amazon Machine Learning.
//
// Returns a list of DataSource that match the search criteria in the request.
//
// // Example sending a request using the DescribeDataSourcesRequest method.
// req := client.DescribeDataSourcesRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
func (c *MachineLearning) DescribeDataSourcesRequest(input *DescribeDataSourcesInput) DescribeDataSourcesRequest {
op := &aws.Operation{
Name: opDescribeDataSources,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &aws.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "Limit",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeDataSourcesInput{}
}
output := &DescribeDataSourcesOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeDataSourcesRequest{Request: req, Input: input}
}
// DescribeDataSourcesPages iterates over the pages of a DescribeDataSources operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribeDataSources method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeDataSources operation.
// pageNum := 0
// err := client.DescribeDataSourcesPages(params,
// func(page *DescribeDataSourcesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *MachineLearning) DescribeDataSourcesPages(input *DescribeDataSourcesInput, fn func(*DescribeDataSourcesOutput, bool) bool) error {
return c.DescribeDataSourcesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// DescribeDataSourcesPagesWithContext same as DescribeDataSourcesPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *MachineLearning) DescribeDataSourcesPagesWithContext(ctx aws.Context, input *DescribeDataSourcesInput, fn func(*DescribeDataSourcesOutput, bool) bool, opts ...aws.Option) error {
p := aws.Pagination{