Upgrade AWS SDK to the latest version

This commit is contained in:
Andrey Smirnov
2017-09-28 17:57:05 +03:00
parent 9a767b7631
commit 182c21e38c
1096 changed files with 309697 additions and 132612 deletions
+277 -290
View File
@@ -1,6 +1,5 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package machinelearning provides a client for Amazon Machine Learning.
package machinelearning
import (
@@ -16,19 +15,18 @@ 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.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See AddTags for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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.
// See AddTags for more information on using the AddTags
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// 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)
@@ -106,19 +104,18 @@ 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.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See CreateBatchPrediction for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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.
// See CreateBatchPrediction for more information on using the CreateBatchPrediction
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// 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)
@@ -205,19 +202,18 @@ 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.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See CreateDataSourceFromRDS for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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.
// See CreateDataSourceFromRDS for more information on using the CreateDataSourceFromRDS
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// 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)
@@ -304,19 +300,18 @@ 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.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See CreateDataSourceFromRedshift for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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.
// See CreateDataSourceFromRedshift for more information on using the CreateDataSourceFromRedshift
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// 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)
@@ -422,19 +417,18 @@ 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.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See CreateDataSourceFromS3 for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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.
// See CreateDataSourceFromS3 for more information on using the CreateDataSourceFromS3
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// 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)
@@ -535,19 +529,18 @@ 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.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See CreateEvaluation for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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.
// See CreateEvaluation for more information on using the CreateEvaluation
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// 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)
@@ -636,19 +629,18 @@ 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.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See CreateMLModel for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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.
// See CreateMLModel for more information on using the CreateMLModel
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// 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)
@@ -738,19 +730,18 @@ 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.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See CreateRealtimeEndpoint for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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.
// See CreateRealtimeEndpoint for more information on using the CreateRealtimeEndpoint
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// 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)
@@ -824,19 +815,18 @@ 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.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DeleteBatchPrediction for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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.
// See DeleteBatchPrediction for more information on using the DeleteBatchPrediction
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// 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)
@@ -913,19 +903,18 @@ 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.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DeleteDataSource for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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.
// See DeleteDataSource for more information on using the DeleteDataSource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// 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)
@@ -1002,19 +991,18 @@ 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.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DeleteEvaluation for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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.
// See DeleteEvaluation for more information on using the DeleteEvaluation
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// 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)
@@ -1091,19 +1079,18 @@ 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.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DeleteMLModel for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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.
// See DeleteMLModel for more information on using the DeleteMLModel
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// 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)
@@ -1180,19 +1167,18 @@ const opDeleteRealtimeEndpoint = "DeleteRealtimeEndpoint"
// DeleteRealtimeEndpointRequest generates a "aws/request.Request" representing the
// client's request for the DeleteRealtimeEndpoint operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DeleteRealtimeEndpoint for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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 DeleteRealtimeEndpoint method directly
// instead.
// See DeleteRealtimeEndpoint for more information on using the DeleteRealtimeEndpoint
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeleteRealtimeEndpointRequest method.
// req, resp := client.DeleteRealtimeEndpointRequest(params)
@@ -1264,19 +1250,18 @@ const opDeleteTags = "DeleteTags"
// DeleteTagsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteTags operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DeleteTags for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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 DeleteTags method directly
// instead.
// See DeleteTags for more information on using the DeleteTags
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeleteTagsRequest method.
// req, resp := client.DeleteTagsRequest(params)
@@ -1353,19 +1338,18 @@ const opDescribeBatchPredictions = "DescribeBatchPredictions"
// DescribeBatchPredictionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeBatchPredictions operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DescribeBatchPredictions for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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 DescribeBatchPredictions method directly
// instead.
// See DescribeBatchPredictions for more information on using the DescribeBatchPredictions
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeBatchPredictionsRequest method.
// req, resp := client.DescribeBatchPredictionsRequest(params)
@@ -1468,8 +1452,12 @@ func (c *MachineLearning) DescribeBatchPredictionsPages(input *DescribeBatchPred
func (c *MachineLearning) DescribeBatchPredictionsPagesWithContext(ctx aws.Context, input *DescribeBatchPredictionsInput, fn func(*DescribeBatchPredictionsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
inCpy := *input
req, _ := c.DescribeBatchPredictionsRequest(&inCpy)
var inCpy *DescribeBatchPredictionsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeBatchPredictionsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
@@ -1487,19 +1475,18 @@ const opDescribeDataSources = "DescribeDataSources"
// DescribeDataSourcesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeDataSources operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DescribeDataSources for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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 DescribeDataSources method directly
// instead.
// See DescribeDataSources for more information on using the DescribeDataSources
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeDataSourcesRequest method.
// req, resp := client.DescribeDataSourcesRequest(params)
@@ -1601,8 +1588,12 @@ func (c *MachineLearning) DescribeDataSourcesPages(input *DescribeDataSourcesInp
func (c *MachineLearning) DescribeDataSourcesPagesWithContext(ctx aws.Context, input *DescribeDataSourcesInput, fn func(*DescribeDataSourcesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
inCpy := *input
req, _ := c.DescribeDataSourcesRequest(&inCpy)
var inCpy *DescribeDataSourcesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeDataSourcesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
@@ -1620,19 +1611,18 @@ const opDescribeEvaluations = "DescribeEvaluations"
// DescribeEvaluationsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeEvaluations operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DescribeEvaluations for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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 DescribeEvaluations method directly
// instead.
// See DescribeEvaluations for more information on using the DescribeEvaluations
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeEvaluationsRequest method.
// req, resp := client.DescribeEvaluationsRequest(params)
@@ -1735,8 +1725,12 @@ func (c *MachineLearning) DescribeEvaluationsPages(input *DescribeEvaluationsInp
func (c *MachineLearning) DescribeEvaluationsPagesWithContext(ctx aws.Context, input *DescribeEvaluationsInput, fn func(*DescribeEvaluationsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
inCpy := *input
req, _ := c.DescribeEvaluationsRequest(&inCpy)
var inCpy *DescribeEvaluationsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeEvaluationsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
@@ -1754,19 +1748,18 @@ const opDescribeMLModels = "DescribeMLModels"
// DescribeMLModelsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeMLModels operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DescribeMLModels for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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 DescribeMLModels method directly
// instead.
// See DescribeMLModels for more information on using the DescribeMLModels
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeMLModelsRequest method.
// req, resp := client.DescribeMLModelsRequest(params)
@@ -1868,8 +1861,12 @@ func (c *MachineLearning) DescribeMLModelsPages(input *DescribeMLModelsInput, fn
func (c *MachineLearning) DescribeMLModelsPagesWithContext(ctx aws.Context, input *DescribeMLModelsInput, fn func(*DescribeMLModelsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
inCpy := *input
req, _ := c.DescribeMLModelsRequest(&inCpy)
var inCpy *DescribeMLModelsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeMLModelsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
@@ -1887,19 +1884,18 @@ const opDescribeTags = "DescribeTags"
// DescribeTagsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeTags operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DescribeTags for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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 DescribeTags method directly
// instead.
// See DescribeTags for more information on using the DescribeTags
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeTagsRequest method.
// req, resp := client.DescribeTagsRequest(params)
@@ -1971,19 +1967,18 @@ const opGetBatchPrediction = "GetBatchPrediction"
// GetBatchPredictionRequest generates a "aws/request.Request" representing the
// client's request for the GetBatchPrediction operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See GetBatchPrediction for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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 GetBatchPrediction method directly
// instead.
// See GetBatchPrediction for more information on using the GetBatchPrediction
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the GetBatchPredictionRequest method.
// req, resp := client.GetBatchPredictionRequest(params)
@@ -2056,19 +2051,18 @@ const opGetDataSource = "GetDataSource"
// GetDataSourceRequest generates a "aws/request.Request" representing the
// client's request for the GetDataSource operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See GetDataSource for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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 GetDataSource method directly
// instead.
// See GetDataSource for more information on using the GetDataSource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the GetDataSourceRequest method.
// req, resp := client.GetDataSourceRequest(params)
@@ -2145,19 +2139,18 @@ const opGetEvaluation = "GetEvaluation"
// GetEvaluationRequest generates a "aws/request.Request" representing the
// client's request for the GetEvaluation operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See GetEvaluation for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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 GetEvaluation method directly
// instead.
// See GetEvaluation for more information on using the GetEvaluation
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the GetEvaluationRequest method.
// req, resp := client.GetEvaluationRequest(params)
@@ -2230,19 +2223,18 @@ const opGetMLModel = "GetMLModel"
// GetMLModelRequest generates a "aws/request.Request" representing the
// client's request for the GetMLModel operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See GetMLModel for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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 GetMLModel method directly
// instead.
// See GetMLModel for more information on using the GetMLModel
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the GetMLModelRequest method.
// req, resp := client.GetMLModelRequest(params)
@@ -2317,19 +2309,18 @@ const opPredict = "Predict"
// PredictRequest generates a "aws/request.Request" representing the
// client's request for the Predict operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See Predict for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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 Predict method directly
// instead.
// See Predict for more information on using the Predict
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the PredictRequest method.
// req, resp := client.PredictRequest(params)
@@ -2411,19 +2402,18 @@ const opUpdateBatchPrediction = "UpdateBatchPrediction"
// UpdateBatchPredictionRequest generates a "aws/request.Request" representing the
// client's request for the UpdateBatchPrediction operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See UpdateBatchPrediction for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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 UpdateBatchPrediction method directly
// instead.
// See UpdateBatchPrediction for more information on using the UpdateBatchPrediction
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the UpdateBatchPredictionRequest method.
// req, resp := client.UpdateBatchPredictionRequest(params)
@@ -2498,19 +2488,18 @@ const opUpdateDataSource = "UpdateDataSource"
// UpdateDataSourceRequest generates a "aws/request.Request" representing the
// client's request for the UpdateDataSource operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See UpdateDataSource for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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 UpdateDataSource method directly
// instead.
// See UpdateDataSource for more information on using the UpdateDataSource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the UpdateDataSourceRequest method.
// req, resp := client.UpdateDataSourceRequest(params)
@@ -2585,19 +2574,18 @@ const opUpdateEvaluation = "UpdateEvaluation"
// UpdateEvaluationRequest generates a "aws/request.Request" representing the
// client's request for the UpdateEvaluation operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See UpdateEvaluation for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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 UpdateEvaluation method directly
// instead.
// See UpdateEvaluation for more information on using the UpdateEvaluation
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the UpdateEvaluationRequest method.
// req, resp := client.UpdateEvaluationRequest(params)
@@ -2672,19 +2660,18 @@ const opUpdateMLModel = "UpdateMLModel"
// UpdateMLModelRequest generates a "aws/request.Request" representing the
// client's request for the UpdateMLModel operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See UpdateMLModel for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// 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 UpdateMLModel method directly
// instead.
// See UpdateMLModel for more information on using the UpdateMLModel
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the UpdateMLModelRequest method.
// req, resp := client.UpdateMLModelRequest(params)
+26
View File
@@ -0,0 +1,26 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package machinelearning provides the client and types for making API
// requests to Amazon Machine Learning.
//
// Definition of the public APIs exposed by Amazon Machine Learning
//
// See machinelearning package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/machinelearning/
//
// Using the Client
//
// To Amazon Machine Learning with the SDK use the New function to create
// a new service client. With that client you can make API requests to the service.
// These clients are safe to use concurrently.
//
// See the SDK's documentation for more information on how to use the SDK.
// https://docs.aws.amazon.com/sdk-for-go/api/
//
// See aws.Config documentation for more information on configuring SDK clients.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
//
// See the Amazon Machine Learning client MachineLearning for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/machinelearning/#New
package machinelearning
+1 -1
View File
@@ -1,4 +1,4 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package machinelearning
@@ -1,737 +0,0 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
package machinelearning_test
import (
"bytes"
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/machinelearning"
)
var _ time.Duration
var _ bytes.Buffer
func ExampleMachineLearning_AddTags() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.AddTagsInput{
ResourceId: aws.String("EntityId"), // Required
ResourceType: aws.String("TaggableResourceType"), // Required
Tags: []*machinelearning.Tag{ // Required
{ // Required
Key: aws.String("TagKey"),
Value: aws.String("TagValue"),
},
// More values...
},
}
resp, err := svc.AddTags(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_CreateBatchPrediction() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.CreateBatchPredictionInput{
BatchPredictionDataSourceId: aws.String("EntityId"), // Required
BatchPredictionId: aws.String("EntityId"), // Required
MLModelId: aws.String("EntityId"), // Required
OutputUri: aws.String("S3Url"), // Required
BatchPredictionName: aws.String("EntityName"),
}
resp, err := svc.CreateBatchPrediction(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_CreateDataSourceFromRDS() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.CreateDataSourceFromRDSInput{
DataSourceId: aws.String("EntityId"), // Required
RDSData: &machinelearning.RDSDataSpec{ // Required
DatabaseCredentials: &machinelearning.RDSDatabaseCredentials{ // Required
Password: aws.String("RDSDatabasePassword"), // Required
Username: aws.String("RDSDatabaseUsername"), // Required
},
DatabaseInformation: &machinelearning.RDSDatabase{ // Required
DatabaseName: aws.String("RDSDatabaseName"), // Required
InstanceIdentifier: aws.String("RDSInstanceIdentifier"), // Required
},
ResourceRole: aws.String("EDPResourceRole"), // Required
S3StagingLocation: aws.String("S3Url"), // Required
SecurityGroupIds: []*string{ // Required
aws.String("EDPSecurityGroupId"), // Required
// More values...
},
SelectSqlQuery: aws.String("RDSSelectSqlQuery"), // Required
ServiceRole: aws.String("EDPServiceRole"), // Required
SubnetId: aws.String("EDPSubnetId"), // Required
DataRearrangement: aws.String("DataRearrangement"),
DataSchema: aws.String("DataSchema"),
DataSchemaUri: aws.String("S3Url"),
},
RoleARN: aws.String("RoleARN"), // Required
ComputeStatistics: aws.Bool(true),
DataSourceName: aws.String("EntityName"),
}
resp, err := svc.CreateDataSourceFromRDS(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_CreateDataSourceFromRedshift() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.CreateDataSourceFromRedshiftInput{
DataSourceId: aws.String("EntityId"), // Required
DataSpec: &machinelearning.RedshiftDataSpec{ // Required
DatabaseCredentials: &machinelearning.RedshiftDatabaseCredentials{ // Required
Password: aws.String("RedshiftDatabasePassword"), // Required
Username: aws.String("RedshiftDatabaseUsername"), // Required
},
DatabaseInformation: &machinelearning.RedshiftDatabase{ // Required
ClusterIdentifier: aws.String("RedshiftClusterIdentifier"), // Required
DatabaseName: aws.String("RedshiftDatabaseName"), // Required
},
S3StagingLocation: aws.String("S3Url"), // Required
SelectSqlQuery: aws.String("RedshiftSelectSqlQuery"), // Required
DataRearrangement: aws.String("DataRearrangement"),
DataSchema: aws.String("DataSchema"),
DataSchemaUri: aws.String("S3Url"),
},
RoleARN: aws.String("RoleARN"), // Required
ComputeStatistics: aws.Bool(true),
DataSourceName: aws.String("EntityName"),
}
resp, err := svc.CreateDataSourceFromRedshift(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_CreateDataSourceFromS3() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.CreateDataSourceFromS3Input{
DataSourceId: aws.String("EntityId"), // Required
DataSpec: &machinelearning.S3DataSpec{ // Required
DataLocationS3: aws.String("S3Url"), // Required
DataRearrangement: aws.String("DataRearrangement"),
DataSchema: aws.String("DataSchema"),
DataSchemaLocationS3: aws.String("S3Url"),
},
ComputeStatistics: aws.Bool(true),
DataSourceName: aws.String("EntityName"),
}
resp, err := svc.CreateDataSourceFromS3(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_CreateEvaluation() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.CreateEvaluationInput{
EvaluationDataSourceId: aws.String("EntityId"), // Required
EvaluationId: aws.String("EntityId"), // Required
MLModelId: aws.String("EntityId"), // Required
EvaluationName: aws.String("EntityName"),
}
resp, err := svc.CreateEvaluation(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_CreateMLModel() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.CreateMLModelInput{
MLModelId: aws.String("EntityId"), // Required
MLModelType: aws.String("MLModelType"), // Required
TrainingDataSourceId: aws.String("EntityId"), // Required
MLModelName: aws.String("EntityName"),
Parameters: map[string]*string{
"Key": aws.String("StringType"), // Required
// More values...
},
Recipe: aws.String("Recipe"),
RecipeUri: aws.String("S3Url"),
}
resp, err := svc.CreateMLModel(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_CreateRealtimeEndpoint() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.CreateRealtimeEndpointInput{
MLModelId: aws.String("EntityId"), // Required
}
resp, err := svc.CreateRealtimeEndpoint(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_DeleteBatchPrediction() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.DeleteBatchPredictionInput{
BatchPredictionId: aws.String("EntityId"), // Required
}
resp, err := svc.DeleteBatchPrediction(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_DeleteDataSource() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.DeleteDataSourceInput{
DataSourceId: aws.String("EntityId"), // Required
}
resp, err := svc.DeleteDataSource(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_DeleteEvaluation() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.DeleteEvaluationInput{
EvaluationId: aws.String("EntityId"), // Required
}
resp, err := svc.DeleteEvaluation(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_DeleteMLModel() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.DeleteMLModelInput{
MLModelId: aws.String("EntityId"), // Required
}
resp, err := svc.DeleteMLModel(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_DeleteRealtimeEndpoint() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.DeleteRealtimeEndpointInput{
MLModelId: aws.String("EntityId"), // Required
}
resp, err := svc.DeleteRealtimeEndpoint(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_DeleteTags() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.DeleteTagsInput{
ResourceId: aws.String("EntityId"), // Required
ResourceType: aws.String("TaggableResourceType"), // Required
TagKeys: []*string{ // Required
aws.String("TagKey"), // Required
// More values...
},
}
resp, err := svc.DeleteTags(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_DescribeBatchPredictions() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.DescribeBatchPredictionsInput{
EQ: aws.String("ComparatorValue"),
FilterVariable: aws.String("BatchPredictionFilterVariable"),
GE: aws.String("ComparatorValue"),
GT: aws.String("ComparatorValue"),
LE: aws.String("ComparatorValue"),
LT: aws.String("ComparatorValue"),
Limit: aws.Int64(1),
NE: aws.String("ComparatorValue"),
NextToken: aws.String("StringType"),
Prefix: aws.String("ComparatorValue"),
SortOrder: aws.String("SortOrder"),
}
resp, err := svc.DescribeBatchPredictions(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_DescribeDataSources() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.DescribeDataSourcesInput{
EQ: aws.String("ComparatorValue"),
FilterVariable: aws.String("DataSourceFilterVariable"),
GE: aws.String("ComparatorValue"),
GT: aws.String("ComparatorValue"),
LE: aws.String("ComparatorValue"),
LT: aws.String("ComparatorValue"),
Limit: aws.Int64(1),
NE: aws.String("ComparatorValue"),
NextToken: aws.String("StringType"),
Prefix: aws.String("ComparatorValue"),
SortOrder: aws.String("SortOrder"),
}
resp, err := svc.DescribeDataSources(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_DescribeEvaluations() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.DescribeEvaluationsInput{
EQ: aws.String("ComparatorValue"),
FilterVariable: aws.String("EvaluationFilterVariable"),
GE: aws.String("ComparatorValue"),
GT: aws.String("ComparatorValue"),
LE: aws.String("ComparatorValue"),
LT: aws.String("ComparatorValue"),
Limit: aws.Int64(1),
NE: aws.String("ComparatorValue"),
NextToken: aws.String("StringType"),
Prefix: aws.String("ComparatorValue"),
SortOrder: aws.String("SortOrder"),
}
resp, err := svc.DescribeEvaluations(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_DescribeMLModels() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.DescribeMLModelsInput{
EQ: aws.String("ComparatorValue"),
FilterVariable: aws.String("MLModelFilterVariable"),
GE: aws.String("ComparatorValue"),
GT: aws.String("ComparatorValue"),
LE: aws.String("ComparatorValue"),
LT: aws.String("ComparatorValue"),
Limit: aws.Int64(1),
NE: aws.String("ComparatorValue"),
NextToken: aws.String("StringType"),
Prefix: aws.String("ComparatorValue"),
SortOrder: aws.String("SortOrder"),
}
resp, err := svc.DescribeMLModels(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_DescribeTags() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.DescribeTagsInput{
ResourceId: aws.String("EntityId"), // Required
ResourceType: aws.String("TaggableResourceType"), // Required
}
resp, err := svc.DescribeTags(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_GetBatchPrediction() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.GetBatchPredictionInput{
BatchPredictionId: aws.String("EntityId"), // Required
}
resp, err := svc.GetBatchPrediction(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_GetDataSource() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.GetDataSourceInput{
DataSourceId: aws.String("EntityId"), // Required
Verbose: aws.Bool(true),
}
resp, err := svc.GetDataSource(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_GetEvaluation() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.GetEvaluationInput{
EvaluationId: aws.String("EntityId"), // Required
}
resp, err := svc.GetEvaluation(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_GetMLModel() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.GetMLModelInput{
MLModelId: aws.String("EntityId"), // Required
Verbose: aws.Bool(true),
}
resp, err := svc.GetMLModel(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_Predict() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.PredictInput{
MLModelId: aws.String("EntityId"), // Required
PredictEndpoint: aws.String("VipURL"), // Required
Record: map[string]*string{ // Required
"Key": aws.String("VariableValue"), // Required
// More values...
},
}
resp, err := svc.Predict(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_UpdateBatchPrediction() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.UpdateBatchPredictionInput{
BatchPredictionId: aws.String("EntityId"), // Required
BatchPredictionName: aws.String("EntityName"), // Required
}
resp, err := svc.UpdateBatchPrediction(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_UpdateDataSource() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.UpdateDataSourceInput{
DataSourceId: aws.String("EntityId"), // Required
DataSourceName: aws.String("EntityName"), // Required
}
resp, err := svc.UpdateDataSource(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_UpdateEvaluation() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.UpdateEvaluationInput{
EvaluationId: aws.String("EntityId"), // Required
EvaluationName: aws.String("EntityName"), // Required
}
resp, err := svc.UpdateEvaluation(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleMachineLearning_UpdateMLModel() {
sess := session.Must(session.NewSession())
svc := machinelearning.New(sess)
params := &machinelearning.UpdateMLModelInput{
MLModelId: aws.String("EntityId"), // Required
MLModelName: aws.String("EntityName"),
ScoreThreshold: aws.Float64(1.0),
}
resp, err := svc.UpdateMLModel(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
@@ -1,4 +1,4 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package machinelearningiface provides an interface to enable mocking the Amazon Machine Learning service client
// for testing your code.
@@ -21,7 +21,7 @@ import (
//
// The best way to use this interface is so the SDK's service client's calls
// can be stubbed out for unit testing your code with the SDK without needing
// to inject custom request handlers into the the SDK's request pipeline.
// to inject custom request handlers into the SDK's request pipeline.
//
// // myFunc uses an SDK service client to make a request to
// // Amazon Machine Learning.
+7 -4
View File
@@ -1,4 +1,4 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package machinelearning
@@ -11,9 +11,12 @@ import (
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
// Definition of the public APIs exposed by Amazon Machine Learning
// The service client's operations are safe to be used concurrently.
// It is not safe to mutate any of the client's properties though.
// MachineLearning provides the API operation methods for making requests to
// Amazon Machine Learning. See this package's package overview docs
// for details on the service.
//
// MachineLearning methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type MachineLearning struct {
*client.Client
}
+29 -9
View File
@@ -1,4 +1,4 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package machinelearning
@@ -11,7 +11,7 @@ import (
// WaitUntilBatchPredictionAvailable uses the Amazon Machine Learning API operation
// DescribeBatchPredictions to wait for a condition to be met before returning.
// If the condition is not meet within the max attempt window an error will
// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *MachineLearning) WaitUntilBatchPredictionAvailable(input *DescribeBatchPredictionsInput) error {
return c.WaitUntilBatchPredictionAvailableWithContext(aws.BackgroundContext(), input)
@@ -44,7 +44,12 @@ func (c *MachineLearning) WaitUntilBatchPredictionAvailableWithContext(ctx aws.C
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
req, _ := c.DescribeBatchPredictionsRequest(input)
var inCpy *DescribeBatchPredictionsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeBatchPredictionsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
@@ -57,7 +62,7 @@ func (c *MachineLearning) WaitUntilBatchPredictionAvailableWithContext(ctx aws.C
// WaitUntilDataSourceAvailable uses the Amazon Machine Learning API operation
// DescribeDataSources to wait for a condition to be met before returning.
// If the condition is not meet within the max attempt window an error will
// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *MachineLearning) WaitUntilDataSourceAvailable(input *DescribeDataSourcesInput) error {
return c.WaitUntilDataSourceAvailableWithContext(aws.BackgroundContext(), input)
@@ -90,7 +95,12 @@ func (c *MachineLearning) WaitUntilDataSourceAvailableWithContext(ctx aws.Contex
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
req, _ := c.DescribeDataSourcesRequest(input)
var inCpy *DescribeDataSourcesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeDataSourcesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
@@ -103,7 +113,7 @@ func (c *MachineLearning) WaitUntilDataSourceAvailableWithContext(ctx aws.Contex
// WaitUntilEvaluationAvailable uses the Amazon Machine Learning API operation
// DescribeEvaluations to wait for a condition to be met before returning.
// If the condition is not meet within the max attempt window an error will
// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *MachineLearning) WaitUntilEvaluationAvailable(input *DescribeEvaluationsInput) error {
return c.WaitUntilEvaluationAvailableWithContext(aws.BackgroundContext(), input)
@@ -136,7 +146,12 @@ func (c *MachineLearning) WaitUntilEvaluationAvailableWithContext(ctx aws.Contex
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
req, _ := c.DescribeEvaluationsRequest(input)
var inCpy *DescribeEvaluationsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeEvaluationsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
@@ -149,7 +164,7 @@ func (c *MachineLearning) WaitUntilEvaluationAvailableWithContext(ctx aws.Contex
// WaitUntilMLModelAvailable uses the Amazon Machine Learning API operation
// DescribeMLModels to wait for a condition to be met before returning.
// If the condition is not meet within the max attempt window an error will
// If the condition is not met within the max attempt window, an error will
// be returned.
func (c *MachineLearning) WaitUntilMLModelAvailable(input *DescribeMLModelsInput) error {
return c.WaitUntilMLModelAvailableWithContext(aws.BackgroundContext(), input)
@@ -182,7 +197,12 @@ func (c *MachineLearning) WaitUntilMLModelAvailableWithContext(ctx aws.Context,
},
Logger: c.Config.Logger,
NewRequest: func(opts []request.Option) (*request.Request, error) {
req, _ := c.DescribeMLModelsRequest(input)
var inCpy *DescribeMLModelsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeMLModelsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil