Class: Aws::MachineLearning::Client
- Inherits:
- 
      Seahorse::Client::Base
      
        - Object
- Seahorse::Client::Base
- Aws::MachineLearning::Client
 
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb
Overview
An API client for MachineLearning.  To construct a client, you need to configure a :region and :credentials.
client = Aws::MachineLearning::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
- 
  
    
      #add_tags(params = {})  ⇒ Types::AddTagsOutput 
    
    
  
  
  
  
  
  
  
  
  
    Adds one or more tags to an object, up to a limit of 10. 
- 
  
    
      #create_batch_prediction(params = {})  ⇒ Types::CreateBatchPredictionOutput 
    
    
  
  
  
  
  
  
  
  
  
    Generates predictions for a group of observations. 
- 
  
    
      #create_data_source_from_rds(params = {})  ⇒ Types::CreateDataSourceFromRDSOutput 
    
    
  
  
  
  
  
  
  
  
  
    Creates a DataSourceobject from an [ Amazon Relational Database Service][1] (Amazon RDS).
- 
  
    
      #create_data_source_from_redshift(params = {})  ⇒ Types::CreateDataSourceFromRedshiftOutput 
    
    
  
  
  
  
  
  
  
  
  
    Creates a DataSourcefrom a database hosted on an Amazon Redshift cluster.
- 
  
    
      #create_data_source_from_s3(params = {})  ⇒ Types::CreateDataSourceFromS3Output 
    
    
  
  
  
  
  
  
  
  
  
    Creates a DataSourceobject.
- 
  
    
      #create_evaluation(params = {})  ⇒ Types::CreateEvaluationOutput 
    
    
  
  
  
  
  
  
  
  
  
    Creates a new Evaluationof anMLModel.
- 
  
    
      #create_ml_model(params = {})  ⇒ Types::CreateMLModelOutput 
    
    
  
  
  
  
  
  
  
  
  
    Creates a new MLModelusing theDataSourceand the recipe as information sources.
- 
  
    
      #create_realtime_endpoint(params = {})  ⇒ Types::CreateRealtimeEndpointOutput 
    
    
  
  
  
  
  
  
  
  
  
    Creates a real-time endpoint for the MLModel.
- 
  
    
      #delete_batch_prediction(params = {})  ⇒ Types::DeleteBatchPredictionOutput 
    
    
  
  
  
  
  
  
  
  
  
    Assigns the DELETED status to a BatchPrediction, rendering it unusable.
- 
  
    
      #delete_data_source(params = {})  ⇒ Types::DeleteDataSourceOutput 
    
    
  
  
  
  
  
  
  
  
  
    Assigns the DELETED status to a DataSource, rendering it unusable.
- 
  
    
      #delete_evaluation(params = {})  ⇒ Types::DeleteEvaluationOutput 
    
    
  
  
  
  
  
  
  
  
  
    Assigns the DELETEDstatus to anEvaluation, rendering it unusable.
- 
  
    
      #delete_ml_model(params = {})  ⇒ Types::DeleteMLModelOutput 
    
    
  
  
  
  
  
  
  
  
  
    Assigns the DELETEDstatus to anMLModel, rendering it unusable.
- 
  
    
      #delete_realtime_endpoint(params = {})  ⇒ Types::DeleteRealtimeEndpointOutput 
    
    
  
  
  
  
  
  
  
  
  
    Deletes a real time endpoint of an MLModel.
- 
  
    
      #delete_tags(params = {})  ⇒ Types::DeleteTagsOutput 
    
    
  
  
  
  
  
  
  
  
  
    Deletes the specified tags associated with an ML object. 
- 
  
    
      #describe_batch_predictions(params = {})  ⇒ Types::DescribeBatchPredictionsOutput 
    
    
  
  
  
  
  
  
  
  
  
    Returns a list of BatchPredictionoperations that match the search criteria in the request.
- 
  
    
      #describe_data_sources(params = {})  ⇒ Types::DescribeDataSourcesOutput 
    
    
  
  
  
  
  
  
  
  
  
    Returns a list of DataSourcethat match the search criteria in the request.
- 
  
    
      #describe_evaluations(params = {})  ⇒ Types::DescribeEvaluationsOutput 
    
    
  
  
  
  
  
  
  
  
  
    Returns a list of DescribeEvaluationsthat match the search criteria in the request.
- 
  
    
      #describe_ml_models(params = {})  ⇒ Types::DescribeMLModelsOutput 
    
    
  
  
  
  
  
  
  
  
  
    Returns a list of MLModelthat match the search criteria in the request.
- 
  
    
      #describe_tags(params = {})  ⇒ Types::DescribeTagsOutput 
    
    
  
  
  
  
  
  
  
  
  
    Describes one or more of the tags for your Amazon ML object. 
- 
  
    
      #get_batch_prediction(params = {})  ⇒ Types::GetBatchPredictionOutput 
    
    
  
  
  
  
  
  
  
  
  
    Returns a BatchPredictionthat includes detailed metadata, status, and data file information for aBatch Predictionrequest.
- 
  
    
      #get_data_source(params = {})  ⇒ Types::GetDataSourceOutput 
    
    
  
  
  
  
  
  
  
  
  
    Returns a DataSourcethat includes metadata and data file information, as well as the current status of theDataSource.
- 
  
    
      #get_evaluation(params = {})  ⇒ Types::GetEvaluationOutput 
    
    
  
  
  
  
  
  
  
  
  
    Returns an Evaluationthat includes metadata as well as the current status of theEvaluation.
- 
  
    
      #get_ml_model(params = {})  ⇒ Types::GetMLModelOutput 
    
    
  
  
  
  
  
  
  
  
  
    Returns an MLModelthat includes detailed metadata, data source information, and the current status of theMLModel.
- 
  
    
      #predict(params = {})  ⇒ Types::PredictOutput 
    
    
  
  
  
  
  
  
  
  
  
    Generates a prediction for the observation using the specified ML Model.
- 
  
    
      #update_batch_prediction(params = {})  ⇒ Types::UpdateBatchPredictionOutput 
    
    
  
  
  
  
  
  
  
  
  
    Updates the BatchPredictionNameof aBatchPrediction.
- 
  
    
      #update_data_source(params = {})  ⇒ Types::UpdateDataSourceOutput 
    
    
  
  
  
  
  
  
  
  
  
    Updates the DataSourceNameof aDataSource.
- 
  
    
      #update_evaluation(params = {})  ⇒ Types::UpdateEvaluationOutput 
    
    
  
  
  
  
  
  
  
  
  
    Updates the EvaluationNameof anEvaluation.
- 
  
    
      #update_ml_model(params = {})  ⇒ Types::UpdateMLModelOutput 
    
    
  
  
  
  
  
  
  
  
  
    Updates the MLModelNameand theScoreThresholdof anMLModel.
Instance Method Summary collapse
- 
  
    
      #initialize(options)  ⇒ Client 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Client. 
- 
  
    
      #wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean 
    
    
  
  
  
  
  
  
  
  
  
    Polls an API operation until a resource enters a desired state. 
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
| 482 483 484 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 482 def initialize(*args) super end | 
Instance Method Details
#add_tags(params = {}) ⇒ Types::AddTagsOutput
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.
| 529 530 531 532 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 529 def (params = {}, = {}) req = build_request(:add_tags, params) req.send_request() end | 
#create_batch_prediction(params = {}) ⇒ Types::CreateBatchPredictionOutput
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.
| 600 601 602 603 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 600 def create_batch_prediction(params = {}, = {}) req = build_request(:create_batch_prediction, params) req.send_request() end | 
#create_data_source_from_rds(params = {}) ⇒ Types::CreateDataSourceFromRDSOutput
Creates a DataSource object from an  Amazon Relational Database
Service (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.
| 735 736 737 738 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 735 def create_data_source_from_rds(params = {}, = {}) req = build_request(:create_data_source_from_rds, params) req.send_request() end | 
#create_data_source_from_redshift(params = {}) ⇒ Types::CreateDataSourceFromRedshiftOutput
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.
| 869 870 871 872 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 869 def create_data_source_from_redshift(params = {}, = {}) req = build_request(:create_data_source_from_redshift, params) req.send_request() end | 
#create_data_source_from_s3(params = {}) ⇒ Types::CreateDataSourceFromS3Output
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.
| 962 963 964 965 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 962 def create_data_source_from_s3(params = {}, = {}) req = build_request(:create_data_source_from_s3, params) req.send_request() end | 
#create_evaluation(params = {}) ⇒ Types::CreateEvaluationOutput
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.
| 1022 1023 1024 1025 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 1022 def create_evaluation(params = {}, = {}) req = build_request(:create_evaluation, params) req.send_request() end | 
#create_ml_model(params = {}) ⇒ Types::CreateMLModelOutput
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.
| 1154 1155 1156 1157 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 1154 def create_ml_model(params = {}, = {}) req = build_request(:create_ml_model, params) req.send_request() end | 
#create_realtime_endpoint(params = {}) ⇒ Types::CreateRealtimeEndpointOutput
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.
| 1187 1188 1189 1190 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 1187 def create_realtime_endpoint(params = {}, = {}) req = build_request(:create_realtime_endpoint, params) req.send_request() end | 
#delete_batch_prediction(params = {}) ⇒ Types::DeleteBatchPredictionOutput
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.
| 1221 1222 1223 1224 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 1221 def delete_batch_prediction(params = {}, = {}) req = build_request(:delete_batch_prediction, params) req.send_request() end | 
#delete_data_source(params = {}) ⇒ Types::DeleteDataSourceOutput
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.
| 1254 1255 1256 1257 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 1254 def delete_data_source(params = {}, = {}) req = build_request(:delete_data_source, params) req.send_request() end | 
#delete_evaluation(params = {}) ⇒ Types::DeleteEvaluationOutput
Assigns the DELETED status to an Evaluation, rendering it
unusable.
After invoking the DeleteEvaluation operation, you can use the
GetEvaluation operation to verify that the status of the
Evaluation changed to DELETED.
Caution: The results of the DeleteEvaluation operation are
irreversible.
| 1289 1290 1291 1292 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 1289 def delete_evaluation(params = {}, = {}) req = build_request(:delete_evaluation, params) req.send_request() end | 
#delete_ml_model(params = {}) ⇒ Types::DeleteMLModelOutput
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.
| 1322 1323 1324 1325 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 1322 def delete_ml_model(params = {}, = {}) req = build_request(:delete_ml_model, params) req.send_request() end | 
#delete_realtime_endpoint(params = {}) ⇒ Types::DeleteRealtimeEndpointOutput
Deletes a real time endpoint of an MLModel.
| 1353 1354 1355 1356 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 1353 def delete_realtime_endpoint(params = {}, = {}) req = build_request(:delete_realtime_endpoint, params) req.send_request() end | 
#delete_tags(params = {}) ⇒ Types::DeleteTagsOutput
Deletes the specified tags associated with an ML object. After this operation is complete, you can't recover deleted tags.
If you specify a tag that doesn't exist, Amazon ML ignores it.
| 1392 1393 1394 1395 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 1392 def (params = {}, = {}) req = build_request(:delete_tags, params) req.send_request() end | 
#describe_batch_predictions(params = {}) ⇒ Types::DescribeBatchPredictionsOutput
Returns a list of BatchPrediction operations that match the search
criteria in the request.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- batch_prediction_available
| 1537 1538 1539 1540 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 1537 def describe_batch_predictions(params = {}, = {}) req = build_request(:describe_batch_predictions, params) req.send_request() end | 
#describe_data_sources(params = {}) ⇒ Types::DescribeDataSourcesOutput
Returns a list of DataSource that match the search criteria in the
request.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- data_source_available
| 1685 1686 1687 1688 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 1685 def describe_data_sources(params = {}, = {}) req = build_request(:describe_data_sources, params) req.send_request() end | 
#describe_evaluations(params = {}) ⇒ Types::DescribeEvaluationsOutput
Returns a list of DescribeEvaluations that match the search criteria
in the request.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- evaluation_available
| 1828 1829 1830 1831 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 1828 def describe_evaluations(params = {}, = {}) req = build_request(:describe_evaluations, params) req.send_request() end | 
#describe_ml_models(params = {}) ⇒ Types::DescribeMLModelsOutput
Returns a list of MLModel that match the search criteria in the
request.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- ml_model_available
| 1984 1985 1986 1987 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 1984 def describe_ml_models(params = {}, = {}) req = build_request(:describe_ml_models, params) req.send_request() end | 
#describe_tags(params = {}) ⇒ Types::DescribeTagsOutput
Describes one or more of the tags for your Amazon ML object.
| 2020 2021 2022 2023 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 2020 def (params = {}, = {}) req = build_request(:describe_tags, params) req.send_request() end | 
#get_batch_prediction(params = {}) ⇒ Types::GetBatchPredictionOutput
Returns a BatchPrediction that includes detailed metadata, status,
and data file information for a Batch Prediction request.
| 2079 2080 2081 2082 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 2079 def get_batch_prediction(params = {}, = {}) req = build_request(:get_batch_prediction, params) req.send_request() end | 
#get_data_source(params = {}) ⇒ Types::GetDataSourceOutput
Returns a DataSource that includes metadata and data file
information, as well as the current status of the DataSource.
GetDataSource provides results in normal or verbose format. The
verbose format adds the schema description and the list of files
pointed to by the DataSource to the normal format.
| 2166 2167 2168 2169 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 2166 def get_data_source(params = {}, = {}) req = build_request(:get_data_source, params) req.send_request() end | 
#get_evaluation(params = {}) ⇒ Types::GetEvaluationOutput
Returns an Evaluation that includes metadata as well as the current
status of the Evaluation.
| 2224 2225 2226 2227 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 2224 def get_evaluation(params = {}, = {}) req = build_request(:get_evaluation, params) req.send_request() end | 
#get_ml_model(params = {}) ⇒ Types::GetMLModelOutput
Returns an MLModel that includes detailed metadata, data source
information, and the current status of the MLModel.
GetMLModel provides results in normal or verbose format.
| 2305 2306 2307 2308 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 2305 def get_ml_model(params = {}, = {}) req = build_request(:get_ml_model, params) req.send_request() end | 
#predict(params = {}) ⇒ Types::PredictOutput
Generates a prediction for the observation using the specified ML
Model.
Note: Not all response parameters will be populated. Whether a response parameter is populated depends on the type of model requested.
| 2350 2351 2352 2353 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 2350 def predict(params = {}, = {}) req = build_request(:predict, params) req.send_request() end | 
#update_batch_prediction(params = {}) ⇒ Types::UpdateBatchPredictionOutput
Updates the BatchPredictionName of a BatchPrediction.
You can use the GetBatchPrediction operation to view the contents of
the updated data element.
| 2383 2384 2385 2386 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 2383 def update_batch_prediction(params = {}, = {}) req = build_request(:update_batch_prediction, params) req.send_request() end | 
#update_data_source(params = {}) ⇒ Types::UpdateDataSourceOutput
Updates the DataSourceName of a DataSource.
You can use the GetDataSource operation to view the contents of the
updated data element.
| 2417 2418 2419 2420 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 2417 def update_data_source(params = {}, = {}) req = build_request(:update_data_source, params) req.send_request() end | 
#update_evaluation(params = {}) ⇒ Types::UpdateEvaluationOutput
Updates the EvaluationName of an Evaluation.
You can use the GetEvaluation operation to view the contents of the
updated data element.
| 2451 2452 2453 2454 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 2451 def update_evaluation(params = {}, = {}) req = build_request(:update_evaluation, params) req.send_request() end | 
#update_ml_model(params = {}) ⇒ Types::UpdateMLModelOutput
Updates the MLModelName and the ScoreThreshold of an MLModel.
You can use the GetMLModel operation to view the contents of the
updated data element.
| 2495 2496 2497 2498 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 2495 def update_ml_model(params = {}, = {}) req = build_request(:update_ml_model, params) req.send_request() end | 
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
Basic Usage
A waiter will call an API operation until:
- It is successful
- It enters a terminal state
- It makes the maximum number of attempts
In between attempts, the waiter will sleep.
# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)
Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.
# poll for ~25 seconds
client.wait_until(waiter_name, params, {
  max_attempts: 5,
  delay: 5,
})
Callbacks
You can be notified before each polling attempt and before each
delay. If you throw :success or :failure from these callbacks,
it will terminate the waiter.
started_at = Time.now
client.wait_until(waiter_name, params, {
  # disable max attempts
  max_attempts: nil,
  # poll for 1 hour, instead of a number of attempts
  before_wait: -> (attempts, response) do
    throw :failure if Time.now - started_at > 3600
  end
})
Handling Errors
When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.
begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end
Valid Waiters
The following table lists the valid waiter names, the operations they call,
and the default :delay and :max_attempts values.
| waiter_name | params | :delay | :max_attempts | 
|---|---|---|---|
| batch_prediction_available | #describe_batch_predictions | 30 | 60 | 
| data_source_available | #describe_data_sources | 30 | 60 | 
| evaluation_available | #describe_evaluations | 30 | 60 | 
| ml_model_available | #describe_ml_models | 30 | 60 | 
| 2613 2614 2615 2616 2617 | # File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/client.rb', line 2613 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |