forked from aws/aws-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 1
/
api.go
8547 lines (7393 loc) · 286 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 (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
)
const opAddTags = "AddTags"
// AddTagsRequest generates a "aws/request.Request" representing the
// client's request for the AddTags operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See AddTags for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the AddTags method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the AddTagsRequest method.
// req, resp := client.AddTagsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *MachineLearning) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) {
op := &request.Operation{
Name: opAddTags,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AddTagsInput{}
}
req = c.newRequest(op, input, output)
output = &AddTagsOutput{}
req.Data = output
return
}
// AddTags 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.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Machine Learning's
// API operation AddTags for usage and error information.
//
// Returned Error Codes:
// * InvalidInputException
// An error on the client occurred. Typically, the cause is an invalid input
// value.
//
// * InvalidTagException
//
// * TagLimitExceededException
//
// * ResourceNotFoundException
// A specified resource cannot be located.
//
// * InternalServerException
// An error on the server occurred when trying to process a request.
//
func (c *MachineLearning) AddTags(input *AddTagsInput) (*AddTagsOutput, error) {
req, out := c.AddTagsRequest(input)
err := req.Send()
return out, err
}
const opCreateBatchPrediction = "CreateBatchPrediction"
// CreateBatchPredictionRequest generates a "aws/request.Request" representing the
// client's request for the CreateBatchPrediction operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateBatchPrediction for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateBatchPrediction method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the CreateBatchPredictionRequest method.
// req, resp := client.CreateBatchPredictionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *MachineLearning) CreateBatchPredictionRequest(input *CreateBatchPredictionInput) (req *request.Request, output *CreateBatchPredictionOutput) {
op := &request.Operation{
Name: opCreateBatchPrediction,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateBatchPredictionInput{}
}
req = c.newRequest(op, input, output)
output = &CreateBatchPredictionOutput{}
req.Data = output
return
}
// CreateBatchPrediction 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.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Machine Learning's
// API operation CreateBatchPrediction for usage and error information.
//
// Returned Error Codes:
// * InvalidInputException
// An error on the client occurred. Typically, the cause is an invalid input
// value.
//
// * InternalServerException
// An error on the server occurred when trying to process a request.
//
// * IdempotentParameterMismatchException
// A second request to use or change an object was not allowed. This can result
// from retrying a request using a parameter that was not present in the original
// request.
//
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 "aws/request.Request" representing the
// client's request for the CreateDataSourceFromRDS operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateDataSourceFromRDS for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateDataSourceFromRDS method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the CreateDataSourceFromRDSRequest method.
// req, resp := client.CreateDataSourceFromRDSRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *MachineLearning) CreateDataSourceFromRDSRequest(input *CreateDataSourceFromRDSInput) (req *request.Request, output *CreateDataSourceFromRDSOutput) {
op := &request.Operation{
Name: opCreateDataSourceFromRDS,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateDataSourceFromRDSInput{}
}
req = c.newRequest(op, input, output)
output = &CreateDataSourceFromRDSOutput{}
req.Data = output
return
}
// CreateDataSourceFromRDS 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.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Machine Learning's
// API operation CreateDataSourceFromRDS for usage and error information.
//
// Returned Error Codes:
// * InvalidInputException
// An error on the client occurred. Typically, the cause is an invalid input
// value.
//
// * InternalServerException
// An error on the server occurred when trying to process a request.
//
// * IdempotentParameterMismatchException
// A second request to use or change an object was not allowed. This can result
// from retrying a request using a parameter that was not present in the original
// request.
//
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 "aws/request.Request" representing the
// client's request for the CreateDataSourceFromRedshift operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateDataSourceFromRedshift for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateDataSourceFromRedshift method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the CreateDataSourceFromRedshiftRequest method.
// req, resp := client.CreateDataSourceFromRedshiftRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *MachineLearning) CreateDataSourceFromRedshiftRequest(input *CreateDataSourceFromRedshiftInput) (req *request.Request, output *CreateDataSourceFromRedshiftOutput) {
op := &request.Operation{
Name: opCreateDataSourceFromRedshift,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateDataSourceFromRedshiftInput{}
}
req = c.newRequest(op, input, output)
output = &CreateDataSourceFromRedshiftOutput{}
req.Data = output
return
}
// CreateDataSourceFromRedshift 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.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Machine Learning's
// API operation CreateDataSourceFromRedshift for usage and error information.
//
// Returned Error Codes:
// * InvalidInputException
// An error on the client occurred. Typically, the cause is an invalid input
// value.
//
// * InternalServerException
// An error on the server occurred when trying to process a request.
//
// * IdempotentParameterMismatchException
// A second request to use or change an object was not allowed. This can result
// from retrying a request using a parameter that was not present in the original
// request.
//
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 "aws/request.Request" representing the
// client's request for the CreateDataSourceFromS3 operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateDataSourceFromS3 for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateDataSourceFromS3 method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the CreateDataSourceFromS3Request method.
// req, resp := client.CreateDataSourceFromS3Request(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *MachineLearning) CreateDataSourceFromS3Request(input *CreateDataSourceFromS3Input) (req *request.Request, output *CreateDataSourceFromS3Output) {
op := &request.Operation{
Name: opCreateDataSourceFromS3,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateDataSourceFromS3Input{}
}
req = c.newRequest(op, input, output)
output = &CreateDataSourceFromS3Output{}
req.Data = output
return
}
// CreateDataSourceFromS3 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.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Machine Learning's
// API operation CreateDataSourceFromS3 for usage and error information.
//
// Returned Error Codes:
// * InvalidInputException
// An error on the client occurred. Typically, the cause is an invalid input
// value.
//
// * InternalServerException
// An error on the server occurred when trying to process a request.
//
// * IdempotentParameterMismatchException
// A second request to use or change an object was not allowed. This can result
// from retrying a request using a parameter that was not present in the original
// request.
//
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 "aws/request.Request" representing the
// client's request for the CreateEvaluation operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateEvaluation for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateEvaluation method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the CreateEvaluationRequest method.
// req, resp := client.CreateEvaluationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *MachineLearning) CreateEvaluationRequest(input *CreateEvaluationInput) (req *request.Request, output *CreateEvaluationOutput) {
op := &request.Operation{
Name: opCreateEvaluation,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateEvaluationInput{}
}
req = c.newRequest(op, input, output)
output = &CreateEvaluationOutput{}
req.Data = output
return
}
// CreateEvaluation 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.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Machine Learning's
// API operation CreateEvaluation for usage and error information.
//
// Returned Error Codes:
// * InvalidInputException
// An error on the client occurred. Typically, the cause is an invalid input
// value.
//
// * InternalServerException
// An error on the server occurred when trying to process a request.
//
// * IdempotentParameterMismatchException
// A second request to use or change an object was not allowed. This can result
// from retrying a request using a parameter that was not present in the original
// request.
//
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 "aws/request.Request" representing the
// client's request for the CreateMLModel operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateMLModel for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateMLModel method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the CreateMLModelRequest method.
// req, resp := client.CreateMLModelRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *MachineLearning) CreateMLModelRequest(input *CreateMLModelInput) (req *request.Request, output *CreateMLModelOutput) {
op := &request.Operation{
Name: opCreateMLModel,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateMLModelInput{}
}
req = c.newRequest(op, input, output)
output = &CreateMLModelOutput{}
req.Data = output
return
}
// CreateMLModel 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.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Machine Learning's
// API operation CreateMLModel for usage and error information.
//
// Returned Error Codes:
// * InvalidInputException
// An error on the client occurred. Typically, the cause is an invalid input
// value.
//
// * InternalServerException
// An error on the server occurred when trying to process a request.
//
// * IdempotentParameterMismatchException
// A second request to use or change an object was not allowed. This can result
// from retrying a request using a parameter that was not present in the original
// request.
//
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 "aws/request.Request" representing the
// client's request for the CreateRealtimeEndpoint operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See CreateRealtimeEndpoint for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateRealtimeEndpoint method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the CreateRealtimeEndpointRequest method.
// req, resp := client.CreateRealtimeEndpointRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *MachineLearning) CreateRealtimeEndpointRequest(input *CreateRealtimeEndpointInput) (req *request.Request, output *CreateRealtimeEndpointOutput) {
op := &request.Operation{
Name: opCreateRealtimeEndpoint,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateRealtimeEndpointInput{}
}
req = c.newRequest(op, input, output)
output = &CreateRealtimeEndpointOutput{}
req.Data = output
return
}
// CreateRealtimeEndpoint 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.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Machine Learning's
// API operation CreateRealtimeEndpoint for usage and error information.
//
// Returned Error Codes:
// * InvalidInputException
// An error on the client occurred. Typically, the cause is an invalid input
// value.
//
// * ResourceNotFoundException
// A specified resource cannot be located.
//
// * InternalServerException
// An error on the server occurred when trying to process a request.
//
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 "aws/request.Request" representing the
// client's request for the DeleteBatchPrediction operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteBatchPrediction for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteBatchPrediction method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeleteBatchPredictionRequest method.
// req, resp := client.DeleteBatchPredictionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *MachineLearning) DeleteBatchPredictionRequest(input *DeleteBatchPredictionInput) (req *request.Request, output *DeleteBatchPredictionOutput) {
op := &request.Operation{
Name: opDeleteBatchPrediction,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteBatchPredictionInput{}
}
req = c.newRequest(op, input, output)
output = &DeleteBatchPredictionOutput{}
req.Data = output
return
}
// DeleteBatchPrediction 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.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Machine Learning's
// API operation DeleteBatchPrediction for usage and error information.
//
// Returned Error Codes:
// * InvalidInputException
// An error on the client occurred. Typically, the cause is an invalid input
// value.
//
// * ResourceNotFoundException
// A specified resource cannot be located.
//
// * InternalServerException
// An error on the server occurred when trying to process a request.
//
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 "aws/request.Request" representing the
// client's request for the DeleteDataSource operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteDataSource for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteDataSource method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeleteDataSourceRequest method.
// req, resp := client.DeleteDataSourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *MachineLearning) DeleteDataSourceRequest(input *DeleteDataSourceInput) (req *request.Request, output *DeleteDataSourceOutput) {
op := &request.Operation{
Name: opDeleteDataSource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteDataSourceInput{}
}
req = c.newRequest(op, input, output)
output = &DeleteDataSourceOutput{}
req.Data = output
return
}
// DeleteDataSource 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.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Machine Learning's
// API operation DeleteDataSource for usage and error information.
//
// Returned Error Codes:
// * InvalidInputException
// An error on the client occurred. Typically, the cause is an invalid input
// value.
//
// * ResourceNotFoundException
// A specified resource cannot be located.
//
// * InternalServerException
// An error on the server occurred when trying to process a request.
//
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 "aws/request.Request" representing the
// client's request for the DeleteEvaluation operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteEvaluation for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteEvaluation method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeleteEvaluationRequest method.
// req, resp := client.DeleteEvaluationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *MachineLearning) DeleteEvaluationRequest(input *DeleteEvaluationInput) (req *request.Request, output *DeleteEvaluationOutput) {
op := &request.Operation{
Name: opDeleteEvaluation,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteEvaluationInput{}
}
req = c.newRequest(op, input, output)
output = &DeleteEvaluationOutput{}
req.Data = output
return
}
// DeleteEvaluation 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.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon Machine Learning's
// API operation DeleteEvaluation for usage and error information.
//
// Returned Error Codes:
// * InvalidInputException
// An error on the client occurred. Typically, the cause is an invalid input
// value.
//
// * ResourceNotFoundException
// A specified resource cannot be located.
//
// * InternalServerException
// An error on the server occurred when trying to process a request.
//
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 "aws/request.Request" representing the
// client's request for the DeleteMLModel operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
//
// See DeleteMLModel for usage and error information.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteMLModel method directly
// instead.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeleteMLModelRequest method.
// req, resp := client.DeleteMLModelRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
func (c *MachineLearning) DeleteMLModelRequest(input *DeleteMLModelInput) (req *request.Request, output *DeleteMLModelOutput) {
op := &request.Operation{
Name: opDeleteMLModel,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteMLModelInput{}
}
req = c.newRequest(op, input, output)
output = &DeleteMLModelOutput{}
req.Data = output
return
}
// DeleteMLModel 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.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions