

# Actions
<a name="API_Operations"></a>

The following actions are supported:
+  [AddTags](API_AddTags.md) 
+  [CreateBatchPrediction](API_CreateBatchPrediction.md) 
+  [CreateDataSourceFromRDS](API_CreateDataSourceFromRDS.md) 
+  [CreateDataSourceFromRedshift](API_CreateDataSourceFromRedshift.md) 
+  [CreateDataSourceFromS3](API_CreateDataSourceFromS3.md) 
+  [CreateEvaluation](API_CreateEvaluation.md) 
+  [CreateMLModel](API_CreateMLModel.md) 
+  [CreateRealtimeEndpoint](API_CreateRealtimeEndpoint.md) 
+  [DeleteBatchPrediction](API_DeleteBatchPrediction.md) 
+  [DeleteDataSource](API_DeleteDataSource.md) 
+  [DeleteEvaluation](API_DeleteEvaluation.md) 
+  [DeleteMLModel](API_DeleteMLModel.md) 
+  [DeleteRealtimeEndpoint](API_DeleteRealtimeEndpoint.md) 
+  [DeleteTags](API_DeleteTags.md) 
+  [DescribeBatchPredictions](API_DescribeBatchPredictions.md) 
+  [DescribeDataSources](API_DescribeDataSources.md) 
+  [DescribeEvaluations](API_DescribeEvaluations.md) 
+  [DescribeMLModels](API_DescribeMLModels.md) 
+  [DescribeTags](API_DescribeTags.md) 
+  [GetBatchPrediction](API_GetBatchPrediction.md) 
+  [GetDataSource](API_GetDataSource.md) 
+  [GetEvaluation](API_GetEvaluation.md) 
+  [GetMLModel](API_GetMLModel.md) 
+  [Predict](API_Predict.md) 
+  [UpdateBatchPrediction](API_UpdateBatchPrediction.md) 
+  [UpdateDataSource](API_UpdateDataSource.md) 
+  [UpdateEvaluation](API_UpdateEvaluation.md) 
+  [UpdateMLModel](API_UpdateMLModel.md) 

# AddTags
<a name="API_AddTags"></a>

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.

## Request Syntax
<a name="API_AddTags_RequestSyntax"></a>

```
{
   "ResourceId": "string",
   "ResourceType": "string",
   "Tags": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ]
}
```

## Request Parameters
<a name="API_AddTags_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ResourceId](#API_AddTags_RequestSyntax) **   <a name="amazonml-AddTags-request-ResourceId"></a>
The ID of the ML object to tag. For example, `exampleModelId`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

 ** [ResourceType](#API_AddTags_RequestSyntax) **   <a name="amazonml-AddTags-request-ResourceType"></a>
The type of the ML object to tag.  
Type: String  
Valid Values: `BatchPrediction | DataSource | Evaluation | MLModel`   
Required: Yes

 ** [Tags](#API_AddTags_RequestSyntax) **   <a name="amazonml-AddTags-request-Tags"></a>
The key-value pairs to use to create tags. If you specify a key without specifying a value, Amazon ML creates a tag with the specified key and a value of null.  
Type: Array of [Tag](API_Tag.md) objects  
Array Members: Maximum number of 100 items.  
Required: Yes

## Response Syntax
<a name="API_AddTags_ResponseSyntax"></a>

```
{
   "ResourceId": "string",
   "ResourceType": "string"
}
```

## Response Elements
<a name="API_AddTags_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [ResourceId](#API_AddTags_ResponseSyntax) **   <a name="amazonml-AddTags-response-ResourceId"></a>
The ID of the ML object that was tagged.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

 ** [ResourceType](#API_AddTags_ResponseSyntax) **   <a name="amazonml-AddTags-response-ResourceType"></a>
The type of the ML object that was tagged.  
Type: String  
Valid Values: `BatchPrediction | DataSource | Evaluation | MLModel` 

## Errors
<a name="API_AddTags_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

 ** InvalidTagException **   
A submitted tag is invalid.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
A specified resource cannot be located.  
HTTP Status Code: 400

 ** TagLimitExceededException **   
The limit in the number of tags has been exceeded.  
HTTP Status Code: 400

## Examples
<a name="API_AddTags_Examples"></a>

### The following is an example of a request and response for the AddTags operation.
<a name="API_AddTags_Example_1"></a>

This example illustrates one usage of AddTags.

#### Sample Request
<a name="API_AddTags_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.AddTags
{
  "ResourceId": "exampleModelId", 
  "ResourceType": "MLModel", 
  "Tags": {
      "Key":"exampleKey",
      "Value":"exampleKeyValue"
  }
}
```

#### Sample Response
<a name="API_AddTags_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
  "ResourceId": "exampleModelId", 
  "ResourceType": "MLModel"
}
```

## See Also
<a name="API_AddTags_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/AddTags) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/AddTags) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/AddTags) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/AddTags) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/AddTags) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/AddTags) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/AddTags) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/AddTags) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/AddTags) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/AddTags) 

# CreateBatchPrediction
<a name="API_CreateBatchPrediction"></a>

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](API_GetBatchPrediction.md) 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.

## Request Syntax
<a name="API_CreateBatchPrediction_RequestSyntax"></a>

```
{
   "BatchPredictionDataSourceId": "string",
   "BatchPredictionId": "string",
   "BatchPredictionName": "string",
   "MLModelId": "string",
   "OutputUri": "string"
}
```

## Request Parameters
<a name="API_CreateBatchPrediction_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [BatchPredictionDataSourceId](#API_CreateBatchPrediction_RequestSyntax) **   <a name="amazonml-CreateBatchPrediction-request-BatchPredictionDataSourceId"></a>
The ID of the `DataSource` that points to the group of observations to predict.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

 ** [BatchPredictionId](#API_CreateBatchPrediction_RequestSyntax) **   <a name="amazonml-CreateBatchPrediction-request-BatchPredictionId"></a>
A user-supplied ID that uniquely identifies the `BatchPrediction`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

 ** [BatchPredictionName](#API_CreateBatchPrediction_RequestSyntax) **   <a name="amazonml-CreateBatchPrediction-request-BatchPredictionName"></a>
A user-supplied name or description of the `BatchPrediction`. `BatchPredictionName` can only use the UTF-8 character set.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [MLModelId](#API_CreateBatchPrediction_RequestSyntax) **   <a name="amazonml-CreateBatchPrediction-request-MLModelId"></a>
The ID of the `MLModel` that will generate predictions for the group of observations.   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

 ** [OutputUri](#API_CreateBatchPrediction_RequestSyntax) **   <a name="amazonml-CreateBatchPrediction-request-OutputUri"></a>
The location of an Amazon Simple Storage Service (Amazon S3) bucket or directory to store the batch prediction results. The following substrings are not allowed in the `s3 key` portion of the `outputURI` field: ':', '//', '/./', '/../'.  
Amazon ML needs permissions to store and retrieve the logs on your behalf. For information about how to set permissions, see the [Amazon Machine Learning Developer Guide](https://docs.aws.amazon.com/machine-learning/latest/dg).  
Type: String  
Length Constraints: Maximum length of 2048.  
Pattern: `s3://([^/]+)(/.*)?`   
Required: Yes

## Response Syntax
<a name="API_CreateBatchPrediction_ResponseSyntax"></a>

```
{
   "BatchPredictionId": "string"
}
```

## Response Elements
<a name="API_CreateBatchPrediction_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [BatchPredictionId](#API_CreateBatchPrediction_ResponseSyntax) **   <a name="amazonml-CreateBatchPrediction-response-BatchPredictionId"></a>
A user-supplied ID that uniquely identifies the `BatchPrediction`. This value is identical to the value of the `BatchPredictionId` in the request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

## Errors
<a name="API_CreateBatchPrediction_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** IdempotentParameterMismatchException **   
A second request to use or change an object was not allowed. This can result from retrying a request using a parameter that was not present in the original request.  
HTTP Status Code: 400

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

## Examples
<a name="API_CreateBatchPrediction_Examples"></a>

### The following is a sample request and response of the BatchPrediction operation.
<a name="API_CreateBatchPrediction_Example_1"></a>

This example illustrates one usage of CreateBatchPrediction.

#### Sample Request
<a name="API_CreateBatchPrediction_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.CreateBatchPrediction
{
  "BatchPredictionId": "EXAMPLE-bp-2014-09-12-15-14-04-156", 
  "BatchPredictionName": "EXAMPLE", 
  "MLModelId": "EXAMPLE-pr-2014-09-12-15-14-04-924", 
  "BatchPredictionDataSourceId": "EXAMPLE-tr-ds-2014-09-12-15-14-04-989", 
  "OutputUri": "s3://eml-test-EXAMPLE/test-outputs/EXAMPLE-bp-2014-09-12-15-14-04-156/results"
}
```

#### Sample Response
<a name="API_CreateBatchPrediction_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{"BatchPredictionId":"EXAMPLE-bp-2014-09-12-15-14-04-156"}
```

## See Also
<a name="API_CreateBatchPrediction_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/CreateBatchPrediction) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/CreateBatchPrediction) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/CreateBatchPrediction) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/CreateBatchPrediction) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/CreateBatchPrediction) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/CreateBatchPrediction) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/CreateBatchPrediction) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/CreateBatchPrediction) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/CreateBatchPrediction) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/CreateBatchPrediction) 

# CreateDataSourceFromRDS
<a name="API_CreateDataSourceFromRDS"></a>

Creates a `DataSource` object from an [ Amazon Relational Database Service](http://aws.amazon.com/rds/) (Amazon RDS). A `DataSource` references data that can be used to perform `CreateMLModel`, `CreateEvaluation`, or `CreateBatchPrediction` operations.

 `CreateDataSourceFromRDS` is an asynchronous operation. In response to `CreateDataSourceFromRDS`, Amazon Machine Learning (Amazon ML) immediately returns and sets the `DataSource` status to `PENDING`. After the `DataSource` is created and ready for use, Amazon ML sets the `Status` parameter to `COMPLETED`. `DataSource` in the `COMPLETED` or `PENDING` state can be used only to perform `>CreateMLModel`>, `CreateEvaluation`, or `CreateBatchPrediction` operations. 

 If Amazon ML cannot accept the input source, it sets the `Status` parameter to `FAILED` and includes an error message in the `Message` attribute of the `GetDataSource` operation response. 

## Request Syntax
<a name="API_CreateDataSourceFromRDS_RequestSyntax"></a>

```
{
   "ComputeStatistics": boolean,
   "DataSourceId": "string",
   "DataSourceName": "string",
   "RDSData": { 
      "DatabaseCredentials": { 
         "Password": "string",
         "Username": "string"
      },
      "DatabaseInformation": { 
         "DatabaseName": "string",
         "InstanceIdentifier": "string"
      },
      "DataRearrangement": "string",
      "DataSchema": "string",
      "DataSchemaUri": "string",
      "ResourceRole": "string",
      "S3StagingLocation": "string",
      "SecurityGroupIds": [ "string" ],
      "SelectSqlQuery": "string",
      "ServiceRole": "string",
      "SubnetId": "string"
   },
   "RoleARN": "string"
}
```

## Request Parameters
<a name="API_CreateDataSourceFromRDS_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ComputeStatistics](#API_CreateDataSourceFromRDS_RequestSyntax) **   <a name="amazonml-CreateDataSourceFromRDS-request-ComputeStatistics"></a>
The compute statistics for a `DataSource`. The statistics are generated from the observation data referenced by a `DataSource`. Amazon ML uses the statistics internally during `MLModel` training. This parameter must be set to `true` if the ``DataSource`` needs to be used for `MLModel` training.   
Type: Boolean  
Required: No

 ** [DataSourceId](#API_CreateDataSourceFromRDS_RequestSyntax) **   <a name="amazonml-CreateDataSourceFromRDS-request-DataSourceId"></a>
A user-supplied ID that uniquely identifies the `DataSource`. Typically, an Amazon Resource Number (ARN) becomes the ID for a `DataSource`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

 ** [DataSourceName](#API_CreateDataSourceFromRDS_RequestSyntax) **   <a name="amazonml-CreateDataSourceFromRDS-request-DataSourceName"></a>
A user-supplied name or description of the `DataSource`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [RDSData](#API_CreateDataSourceFromRDS_RequestSyntax) **   <a name="amazonml-CreateDataSourceFromRDS-request-RDSData"></a>
The data specification of an Amazon RDS `DataSource`:  
+ DatabaseInformation -
  +  `DatabaseName` - The name of the Amazon RDS database.
  +  `InstanceIdentifier ` - A unique identifier for the Amazon RDS database instance.
+ DatabaseCredentials - AWS Identity and Access Management (IAM) credentials that are used to connect to the Amazon RDS database.
+ ResourceRole - A role (DataPipelineDefaultResourceRole) assumed by an EC2 instance to carry out the copy task from Amazon RDS to Amazon Simple Storage Service (Amazon S3). For more information, see [Role templates](https://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-iam-roles.html) for data pipelines.
+ ServiceRole - A role (DataPipelineDefaultRole) assumed by the AWS Data Pipeline service to monitor the progress of the copy task from Amazon RDS to Amazon S3. For more information, see [Role templates](https://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-iam-roles.html) for data pipelines.
+ SecurityInfo - The security information to use to access an RDS DB instance. You need to set up appropriate ingress rules for the security entity IDs provided to allow access to the Amazon RDS instance. Specify a [`SubnetId`, `SecurityGroupIds`] pair for a VPC-based RDS DB instance.
+ SelectSqlQuery - A query that is used to retrieve the observation data for the `Datasource`.
+ S3StagingLocation - The Amazon S3 location for staging Amazon RDS data. The data retrieved from Amazon RDS using `SelectSqlQuery` is stored in this location.
+ DataSchemaUri - The Amazon S3 location of the `DataSchema`.
+ DataSchema - A JSON string representing the schema. This is not required if `DataSchemaUri` is specified. 
+ DataRearrangement - A JSON string that represents the splitting and rearrangement requirements for the `Datasource`. 

   Sample - ` "{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"` 
Type: [RDSDataSpec](API_RDSDataSpec.md) object  
Required: Yes

 ** [RoleARN](#API_CreateDataSourceFromRDS_RequestSyntax) **   <a name="amazonml-CreateDataSourceFromRDS-request-RoleARN"></a>
The role that Amazon ML assumes on behalf of the user to create and activate a data pipeline in the user's account and copy data using the `SelectSqlQuery` query from Amazon RDS to Amazon S3.  
  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 110.  
Required: Yes

## Response Syntax
<a name="API_CreateDataSourceFromRDS_ResponseSyntax"></a>

```
{
   "DataSourceId": "string"
}
```

## Response Elements
<a name="API_CreateDataSourceFromRDS_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [DataSourceId](#API_CreateDataSourceFromRDS_ResponseSyntax) **   <a name="amazonml-CreateDataSourceFromRDS-response-DataSourceId"></a>
A user-supplied ID that uniquely identifies the datasource. This value should be identical to the value of the `DataSourceID` in the request.   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

## Errors
<a name="API_CreateDataSourceFromRDS_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** IdempotentParameterMismatchException **   
A second request to use or change an object was not allowed. This can result from retrying a request using a parameter that was not present in the original request.  
HTTP Status Code: 400

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

## Examples
<a name="API_CreateDataSourceFromRDS_Examples"></a>

### The following is a sample HTTP request and response of the CreateDataSourceFromRDS operation.
<a name="API_CreateDataSourceFromRDS_Example_1"></a>

This example illustrates one usage of CreateDataSourceFromRDS.

#### Sample Request
<a name="API_CreateDataSourceFromRDS_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.CreateDataSourceFromRDS
{
  "DataSourceId": "ml-rds-data-source-demo",
  "DataSourceName": "ml-rds-data-source-demo",
  "RDSData":
  {
    "DatabaseInformation":
    {
      "InstanceIdentifier": "demo",
      "DatabaseName": "demo"
    },
    "SelectSqlQuery": "select feature1, feature2, feature3, ...., featureN from RDS_DEMO_TABLE;",
    "DatabaseCredentials":
    {
      "Username": "demo_user",
      "Password": "demo_password"
    },
    "S3StagingLocation": "s3://mldemo/data/",
    "DataSchemaUri": "s3://mldemo/schema/mldemo.csv.schema",
    "ResourceRole": "DataPipelineDefaultResourceRole",
    "ServiceRole": "DataPipelineDefaultRole",
    "SubnetId": "subnet-XXXX",
    "SecurityGroupIds":
      ["sg-XXXXXX", "sg-XXXXXX"]
  },
  "RoleARN": "arn:aws:iam::<awsAccountId>:role/<roleToAssume>"
}
```

#### Sample Response
<a name="API_CreateDataSourceFromRDS_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
  "DataSourceId":"ml-rds-data-source-demo"
}
```

## See Also
<a name="API_CreateDataSourceFromRDS_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/CreateDataSourceFromRDS) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/CreateDataSourceFromRDS) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/CreateDataSourceFromRDS) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/CreateDataSourceFromRDS) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/CreateDataSourceFromRDS) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/CreateDataSourceFromRDS) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/CreateDataSourceFromRDS) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/CreateDataSourceFromRDS) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/CreateDataSourceFromRDS) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/CreateDataSourceFromRDS) 

# CreateDataSourceFromRedshift
<a name="API_CreateDataSourceFromRedshift"></a>

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.

## Request Syntax
<a name="API_CreateDataSourceFromRedshift_RequestSyntax"></a>

```
{
   "ComputeStatistics": boolean,
   "DataSourceId": "string",
   "DataSourceName": "string",
   "DataSpec": { 
      "DatabaseCredentials": { 
         "Password": "string",
         "Username": "string"
      },
      "DatabaseInformation": { 
         "ClusterIdentifier": "string",
         "DatabaseName": "string"
      },
      "DataRearrangement": "string",
      "DataSchema": "string",
      "DataSchemaUri": "string",
      "S3StagingLocation": "string",
      "SelectSqlQuery": "string"
   },
   "RoleARN": "string"
}
```

## Request Parameters
<a name="API_CreateDataSourceFromRedshift_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ComputeStatistics](#API_CreateDataSourceFromRedshift_RequestSyntax) **   <a name="amazonml-CreateDataSourceFromRedshift-request-ComputeStatistics"></a>
The compute statistics for a `DataSource`. The statistics are generated from the observation data referenced by a `DataSource`. Amazon ML uses the statistics internally during `MLModel` training. This parameter must be set to `true` if the `DataSource` needs to be used for `MLModel` training.  
Type: Boolean  
Required: No

 ** [DataSourceId](#API_CreateDataSourceFromRedshift_RequestSyntax) **   <a name="amazonml-CreateDataSourceFromRedshift-request-DataSourceId"></a>
A user-supplied ID that uniquely identifies the `DataSource`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

 ** [DataSourceName](#API_CreateDataSourceFromRedshift_RequestSyntax) **   <a name="amazonml-CreateDataSourceFromRedshift-request-DataSourceName"></a>
A user-supplied name or description of the `DataSource`.   
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [DataSpec](#API_CreateDataSourceFromRedshift_RequestSyntax) **   <a name="amazonml-CreateDataSourceFromRedshift-request-DataSpec"></a>
The data specification of an Amazon Redshift `DataSource`:  
+ DatabaseInformation -
  +  `DatabaseName` - The name of the Amazon Redshift database.
  +  ` ClusterIdentifier` - The unique ID for the Amazon Redshift cluster.
+ DatabaseCredentials - The AWS Identity and Access Management (IAM) credentials that are used to connect to the Amazon Redshift database.
+ SelectSqlQuery - The query that is used to retrieve the observation data for the `Datasource`.
+ S3StagingLocation - The Amazon Simple Storage Service (Amazon S3) location for staging Amazon Redshift data. The data retrieved from Amazon Redshift using the `SelectSqlQuery` query is stored in this location.
+ DataSchemaUri - The Amazon S3 location of the `DataSchema`.
+ DataSchema - A JSON string representing the schema. This is not required if `DataSchemaUri` is specified. 
+ DataRearrangement - A JSON string that represents the splitting and rearrangement requirements for the `DataSource`.

   Sample - ` "{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"` 
Type: [RedshiftDataSpec](API_RedshiftDataSpec.md) object  
Required: Yes

 ** [RoleARN](#API_CreateDataSourceFromRedshift_RequestSyntax) **   <a name="amazonml-CreateDataSourceFromRedshift-request-RoleARN"></a>
A fully specified role Amazon Resource Name (ARN). Amazon ML assumes the role on behalf of the user to create the following:  
+ A security group to allow Amazon ML to execute the `SelectSqlQuery` query on an Amazon Redshift cluster
+ An Amazon S3 bucket policy to grant Amazon ML read/write permissions on the `S3StagingLocation` 
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 110.  
Required: Yes

## Response Syntax
<a name="API_CreateDataSourceFromRedshift_ResponseSyntax"></a>

```
{
   "DataSourceId": "string"
}
```

## Response Elements
<a name="API_CreateDataSourceFromRedshift_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [DataSourceId](#API_CreateDataSourceFromRedshift_ResponseSyntax) **   <a name="amazonml-CreateDataSourceFromRedshift-response-DataSourceId"></a>
A user-supplied ID that uniquely identifies the datasource. This value should be identical to the value of the `DataSourceID` in the request.   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

## Errors
<a name="API_CreateDataSourceFromRedshift_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** IdempotentParameterMismatchException **   
A second request to use or change an object was not allowed. This can result from retrying a request using a parameter that was not present in the original request.  
HTTP Status Code: 400

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

## Examples
<a name="API_CreateDataSourceFromRedshift_Examples"></a>

### The following is a sample request and response of the CreateDataSourceFromRedshift operation.
<a name="API_CreateDataSourceFromRedshift_Example_1"></a>

This example illustrates one usage of CreateDataSourceFromRedshift.

#### Sample Request
<a name="API_CreateDataSourceFromRedshift_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.CreateDataSourceFromRedshift
{
  "DataSourceId": "ds-exampleDatasourceId",
  "DataSourceName": "exampleDatasourceName",
  "DataSpec": 
  {
    "DatabaseInformation": 
    {
      "DatabaseName": "dev",
      "ClusterIdentifier": "test-cluster-1234"
    },
    "SelectSqlQuery": "select * from table",
    "DatabaseCredentials": 
    {
      "Username": "foo",
      "Password": "foo"
    },
   "S3StagingLocation": "s3://bucketName/",
   "DataSchemaUri": "s3://bucketName/locationToUri/example.schema.json"},
   "RoleARN": "arn:aws:iam::<awsAccountId>:role/username"
  }
}
```

#### Sample Response
<a name="API_CreateDataSourceFromRedshift_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{"DataSourceId": "ds-exampleDatasourceId"}
```

## See Also
<a name="API_CreateDataSourceFromRedshift_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/CreateDataSourceFromRedshift) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/CreateDataSourceFromRedshift) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/CreateDataSourceFromRedshift) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/CreateDataSourceFromRedshift) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/CreateDataSourceFromRedshift) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/CreateDataSourceFromRedshift) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/CreateDataSourceFromRedshift) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/CreateDataSourceFromRedshift) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/CreateDataSourceFromRedshift) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/CreateDataSourceFromRedshift) 

# CreateDataSourceFromS3
<a name="API_CreateDataSourceFromS3"></a>

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.

## Request Syntax
<a name="API_CreateDataSourceFromS3_RequestSyntax"></a>

```
{
   "ComputeStatistics": boolean,
   "DataSourceId": "string",
   "DataSourceName": "string",
   "DataSpec": { 
      "DataLocationS3": "string",
      "DataRearrangement": "string",
      "DataSchema": "string",
      "DataSchemaLocationS3": "string"
   }
}
```

## Request Parameters
<a name="API_CreateDataSourceFromS3_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ComputeStatistics](#API_CreateDataSourceFromS3_RequestSyntax) **   <a name="amazonml-CreateDataSourceFromS3-request-ComputeStatistics"></a>
The compute statistics for a `DataSource`. The statistics are generated from the observation data referenced by a `DataSource`. Amazon ML uses the statistics internally during `MLModel` training. This parameter must be set to `true` if the ``DataSource`` needs to be used for `MLModel` training.  
Type: Boolean  
Required: No

 ** [DataSourceId](#API_CreateDataSourceFromS3_RequestSyntax) **   <a name="amazonml-CreateDataSourceFromS3-request-DataSourceId"></a>
A user-supplied identifier that uniquely identifies the `DataSource`.   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

 ** [DataSourceName](#API_CreateDataSourceFromS3_RequestSyntax) **   <a name="amazonml-CreateDataSourceFromS3-request-DataSourceName"></a>
A user-supplied name or description of the `DataSource`.   
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [DataSpec](#API_CreateDataSourceFromS3_RequestSyntax) **   <a name="amazonml-CreateDataSourceFromS3-request-DataSpec"></a>
The data specification of a `DataSource`:  
+ DataLocationS3 - The Amazon S3 location of the observation data.
+ DataSchemaLocationS3 - The Amazon S3 location of the `DataSchema`.
+ DataSchema - A JSON string representing the schema. This is not required if `DataSchemaUri` is specified. 
+ DataRearrangement - A JSON string that represents the splitting and rearrangement requirements for the `Datasource`. 

   Sample - ` "{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"` 
Type: [S3DataSpec](API_S3DataSpec.md) object  
Required: Yes

## Response Syntax
<a name="API_CreateDataSourceFromS3_ResponseSyntax"></a>

```
{
   "DataSourceId": "string"
}
```

## Response Elements
<a name="API_CreateDataSourceFromS3_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [DataSourceId](#API_CreateDataSourceFromS3_ResponseSyntax) **   <a name="amazonml-CreateDataSourceFromS3-response-DataSourceId"></a>
A user-supplied ID that uniquely identifies the `DataSource`. This value should be identical to the value of the `DataSourceID` in the request.   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

## Errors
<a name="API_CreateDataSourceFromS3_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** IdempotentParameterMismatchException **   
A second request to use or change an object was not allowed. This can result from retrying a request using a parameter that was not present in the original request.  
HTTP Status Code: 400

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

## Examples
<a name="API_CreateDataSourceFromS3_Examples"></a>

### The following is a sample request and response of the CreateDataSourceFromS3 operation.
<a name="API_CreateDataSourceFromS3_Example_1"></a>

This example illustrates one usage of CreateDataSourceFromS3.

#### Sample Request
<a name="API_CreateDataSourceFromS3_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.CreateDataSourceFromS3
{
  "DataSourceId": "exampleDataSourceId", 
  "DataSourceName": "exampleDataSourceName", 
  "DataSpec": 
  {
    "DataLocationS3": "s3://eml-test-EXAMPLE/data.csv", 
    "DataSchemaLocationS3": "s3://eml-test-EXAMPLE/data.csv.schema",
    "DataRearrangement": "{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}"
  }
}
```

#### Sample Response
<a name="API_CreateDataSourceFromS3_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{"DataSourceId":"exampleDataSourceId"}
```

## See Also
<a name="API_CreateDataSourceFromS3_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/CreateDataSourceFromS3) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/CreateDataSourceFromS3) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/CreateDataSourceFromS3) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/CreateDataSourceFromS3) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/CreateDataSourceFromS3) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/CreateDataSourceFromS3) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/CreateDataSourceFromS3) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/CreateDataSourceFromS3) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/CreateDataSourceFromS3) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/CreateDataSourceFromS3) 

# CreateEvaluation
<a name="API_CreateEvaluation"></a>

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.

## Request Syntax
<a name="API_CreateEvaluation_RequestSyntax"></a>

```
{
   "EvaluationDataSourceId": "string",
   "EvaluationId": "string",
   "EvaluationName": "string",
   "MLModelId": "string"
}
```

## Request Parameters
<a name="API_CreateEvaluation_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [EvaluationDataSourceId](#API_CreateEvaluation_RequestSyntax) **   <a name="amazonml-CreateEvaluation-request-EvaluationDataSourceId"></a>
The ID of the `DataSource` for the evaluation. The schema of the `DataSource` must match the schema used to create the `MLModel`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

 ** [EvaluationId](#API_CreateEvaluation_RequestSyntax) **   <a name="amazonml-CreateEvaluation-request-EvaluationId"></a>
A user-supplied ID that uniquely identifies the `Evaluation`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

 ** [EvaluationName](#API_CreateEvaluation_RequestSyntax) **   <a name="amazonml-CreateEvaluation-request-EvaluationName"></a>
A user-supplied name or description of the `Evaluation`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [MLModelId](#API_CreateEvaluation_RequestSyntax) **   <a name="amazonml-CreateEvaluation-request-MLModelId"></a>
The ID of the `MLModel` to evaluate.  
The schema used in creating the `MLModel` must match the schema of the `DataSource` used in the `Evaluation`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

## Response Syntax
<a name="API_CreateEvaluation_ResponseSyntax"></a>

```
{
   "EvaluationId": "string"
}
```

## Response Elements
<a name="API_CreateEvaluation_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [EvaluationId](#API_CreateEvaluation_ResponseSyntax) **   <a name="amazonml-CreateEvaluation-response-EvaluationId"></a>
The user-supplied ID that uniquely identifies the `Evaluation`. This value should be identical to the value of the `EvaluationId` in the request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

## Errors
<a name="API_CreateEvaluation_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** IdempotentParameterMismatchException **   
A second request to use or change an object was not allowed. This can result from retrying a request using a parameter that was not present in the original request.  
HTTP Status Code: 400

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

## Examples
<a name="API_CreateEvaluation_Examples"></a>

### The following is a sample request and response of the CreateEvaluation operation:
<a name="API_CreateEvaluation_Example_1"></a>

This example illustrates one usage of CreateEvaluation.

#### Sample Request
<a name="API_CreateEvaluation_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.CreateEvaluation
{
  "EvaluationId": "CreateEvaluation-pr-2014-09-12-15-14-04-924", 
  "EvaluationName": "EXAMPLE", 
  "MLModelId": "EXAMPLE-pr-2014-09-12-15-14-04-924", 
  "EvaluationDataSourceId": "EXAMPLE-ev-ds-2014-09-12-15-14-04-411", 
}
```

#### Sample Response
<a name="API_CreateEvaluation_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{"EvaluationId":"CreateEvaluation-pr-2014-09-12-15-14-04-924"}
```

## See Also
<a name="API_CreateEvaluation_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/CreateEvaluation) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/CreateEvaluation) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/CreateEvaluation) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/CreateEvaluation) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/CreateEvaluation) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/CreateEvaluation) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/CreateEvaluation) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/CreateEvaluation) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/CreateEvaluation) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/CreateEvaluation) 

# CreateMLModel
<a name="API_CreateMLModel"></a>

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. 

## Request Syntax
<a name="API_CreateMLModel_RequestSyntax"></a>

```
{
   "MLModelId": "string",
   "MLModelName": "string",
   "MLModelType": "string",
   "Parameters": { 
      "string" : "string" 
   },
   "Recipe": "string",
   "RecipeUri": "string",
   "TrainingDataSourceId": "string"
}
```

## Request Parameters
<a name="API_CreateMLModel_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [MLModelId](#API_CreateMLModel_RequestSyntax) **   <a name="amazonml-CreateMLModel-request-MLModelId"></a>
A user-supplied ID that uniquely identifies the `MLModel`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

 ** [MLModelName](#API_CreateMLModel_RequestSyntax) **   <a name="amazonml-CreateMLModel-request-MLModelName"></a>
A user-supplied name or description of the `MLModel`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [MLModelType](#API_CreateMLModel_RequestSyntax) **   <a name="amazonml-CreateMLModel-request-MLModelType"></a>
The category of supervised learning that this `MLModel` will address. Choose from the following types:  
+ Choose `REGRESSION` if the `MLModel` will be used to predict a numeric value.
+ Choose `BINARY` if the `MLModel` result has two possible values.
+ Choose `MULTICLASS` if the `MLModel` result has a limited number of values.
 For more information, see the [Amazon Machine Learning Developer Guide](https://docs.aws.amazon.com/machine-learning/latest/dg).  
Type: String  
Valid Values: `REGRESSION | BINARY | MULTICLASS`   
Required: Yes

 ** [Parameters](#API_CreateMLModel_RequestSyntax) **   <a name="amazonml-CreateMLModel-request-Parameters"></a>
A list of the training parameters in the `MLModel`. The list is implemented as a map of key-value pairs.  
The following is the current set of training parameters:  
+  `sgd.maxMLModelSizeInBytes` - The maximum allowed size of the model. Depending on the input data, the size of the model might affect its performance.

   The value is an integer that ranges from `100000` to `2147483648`. The default value is `33554432`.
+  `sgd.maxPasses` - The number of times that the training process traverses the observations to build the `MLModel`. The value is an integer that ranges from `1` to `100`. The default value is `10`.
+  `sgd.shuffleType` - Whether Amazon ML shuffles the training data. Shuffling the data improves a model's ability to find the optimal solution for a variety of data types. The valid values are `auto` and `none`. The default value is `none`. We strongly recommend that you shuffle your data.
+  `sgd.l1RegularizationAmount` - The coefficient regularization L1 norm. It controls overfitting the data by penalizing large coefficients. This tends to drive coefficients to zero, resulting in a sparse feature set. If you use this parameter, start by specifying a small value, such as `1.0E-08`.

  The value is a double that ranges from `0` to `MAX_DOUBLE`. The default is to not use L1 normalization. This parameter can't be used when `L2` is specified. Use this parameter sparingly.
+  `sgd.l2RegularizationAmount` - The coefficient regularization L2 norm. It controls overfitting the data by penalizing large coefficients. This tends to drive coefficients to small, nonzero values. If you use this parameter, start by specifying a small value, such as `1.0E-08`.

  The value is a double that ranges from `0` to `MAX_DOUBLE`. The default is to not use L2 normalization. This parameter can't be used when `L1` is specified. Use this parameter sparingly.
Type: String to string map  
Required: No

 ** [Recipe](#API_CreateMLModel_RequestSyntax) **   <a name="amazonml-CreateMLModel-request-Recipe"></a>
The data recipe for creating the `MLModel`. You must specify either the recipe or its URI. If you don't specify a recipe or its URI, Amazon ML creates a default.  
Type: String  
Length Constraints: Maximum length of 131071.  
Required: No

 ** [RecipeUri](#API_CreateMLModel_RequestSyntax) **   <a name="amazonml-CreateMLModel-request-RecipeUri"></a>
The Amazon Simple Storage Service (Amazon S3) location and file name that contains the `MLModel` recipe. You must specify either the recipe or its URI. If you don't specify a recipe or its URI, Amazon ML creates a default.  
Type: String  
Length Constraints: Maximum length of 2048.  
Pattern: `s3://([^/]+)(/.*)?`   
Required: No

 ** [TrainingDataSourceId](#API_CreateMLModel_RequestSyntax) **   <a name="amazonml-CreateMLModel-request-TrainingDataSourceId"></a>
The `DataSource` that points to the training data.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

## Response Syntax
<a name="API_CreateMLModel_ResponseSyntax"></a>

```
{
   "MLModelId": "string"
}
```

## Response Elements
<a name="API_CreateMLModel_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [MLModelId](#API_CreateMLModel_ResponseSyntax) **   <a name="amazonml-CreateMLModel-response-MLModelId"></a>
A user-supplied ID that uniquely identifies the `MLModel`. This value should be identical to the value of the `MLModelId` in the request.   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

## Errors
<a name="API_CreateMLModel_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** IdempotentParameterMismatchException **   
A second request to use or change an object was not allowed. This can result from retrying a request using a parameter that was not present in the original request.  
HTTP Status Code: 400

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

## Examples
<a name="API_CreateMLModel_Examples"></a>

### The following is a sample request and response of the CreateMLModel operation.
<a name="API_CreateMLModel_Example_1"></a>

This example illustrates one usage of CreateMLModel.

#### Sample Request
<a name="API_CreateMLModel_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.CreateMLModel
{
  "MLModelId": "exampleModelId", 
  "MLModelName": "EXAMPLE", 
  "MLModelType": "BINARY", 
  "TrainingDataSourceId": "17SdAv6WC6r5vACAxF7U", 
  "RecipeUri": "s3://eml-test-EXAMPLE/data.recipe.json"
}
```

#### Sample Response
<a name="API_CreateMLModel_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{"MLModelId":"exampleModelId"}
```

## See Also
<a name="API_CreateMLModel_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/CreateMLModel) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/CreateMLModel) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/CreateMLModel) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/CreateMLModel) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/CreateMLModel) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/CreateMLModel) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/CreateMLModel) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/CreateMLModel) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/CreateMLModel) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/CreateMLModel) 

# CreateRealtimeEndpoint
<a name="API_CreateRealtimeEndpoint"></a>

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`.

## Request Syntax
<a name="API_CreateRealtimeEndpoint_RequestSyntax"></a>

```
{
   "MLModelId": "string"
}
```

## Request Parameters
<a name="API_CreateRealtimeEndpoint_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [MLModelId](#API_CreateRealtimeEndpoint_RequestSyntax) **   <a name="amazonml-CreateRealtimeEndpoint-request-MLModelId"></a>
The ID assigned to the `MLModel` during creation.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

## Response Syntax
<a name="API_CreateRealtimeEndpoint_ResponseSyntax"></a>

```
{
   "MLModelId": "string",
   "RealtimeEndpointInfo": { 
      "CreatedAt": number,
      "EndpointStatus": "string",
      "EndpointUrl": "string",
      "PeakRequestsPerSecond": number
   }
}
```

## Response Elements
<a name="API_CreateRealtimeEndpoint_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [MLModelId](#API_CreateRealtimeEndpoint_ResponseSyntax) **   <a name="amazonml-CreateRealtimeEndpoint-response-MLModelId"></a>
A user-supplied ID that uniquely identifies the `MLModel`. This value should be identical to the value of the `MLModelId` in the request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

 ** [RealtimeEndpointInfo](#API_CreateRealtimeEndpoint_ResponseSyntax) **   <a name="amazonml-CreateRealtimeEndpoint-response-RealtimeEndpointInfo"></a>
The endpoint information of the `MLModel`   
Type: [RealtimeEndpointInfo](API_RealtimeEndpointInfo.md) object

## Errors
<a name="API_CreateRealtimeEndpoint_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
A specified resource cannot be located.  
HTTP Status Code: 400

## Examples
<a name="API_CreateRealtimeEndpoint_Examples"></a>

### The following is a sample request and response of the CreateRealtimeEndpoint operation.
<a name="API_CreateRealtimeEndpoint_Example_1"></a>

This example illustrates one usage of CreateRealtimeEndpoint.

#### Sample Request
<a name="API_CreateRealtimeEndpoint_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.CreateRealtimeEndpoint
{
  "MLModelId": "ml-ModelExampleId",
}
```

#### Sample Response
<a name="API_CreateRealtimeEndpoint_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
  "MLModelId": "ml-ModelExampleId", 
  "EndpointInfo": 
  {
    "CreatedAt": 1422488124.71, 
    "EndpointUrl": "<realtime endpoint from Amazon Machine Learning for ml-ModelExampleId>", 
    "EndpointStatus": "READY", 
    "PeakRequestsPerSecond": 200
  }
}
```

## See Also
<a name="API_CreateRealtimeEndpoint_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/CreateRealtimeEndpoint) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/CreateRealtimeEndpoint) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/CreateRealtimeEndpoint) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/CreateRealtimeEndpoint) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/CreateRealtimeEndpoint) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/CreateRealtimeEndpoint) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/CreateRealtimeEndpoint) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/CreateRealtimeEndpoint) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/CreateRealtimeEndpoint) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/CreateRealtimeEndpoint) 

# DeleteBatchPrediction
<a name="API_DeleteBatchPrediction"></a>

Assigns the DELETED status to a `BatchPrediction`, rendering it unusable.

After using the `DeleteBatchPrediction` operation, you can use the [GetBatchPrediction](API_GetBatchPrediction.md) operation to verify that the status of the `BatchPrediction` changed to DELETED.

 **Caution:** The result of the `DeleteBatchPrediction` operation is irreversible.

## Request Syntax
<a name="API_DeleteBatchPrediction_RequestSyntax"></a>

```
{
   "BatchPredictionId": "string"
}
```

## Request Parameters
<a name="API_DeleteBatchPrediction_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [BatchPredictionId](#API_DeleteBatchPrediction_RequestSyntax) **   <a name="amazonml-DeleteBatchPrediction-request-BatchPredictionId"></a>
A user-supplied ID that uniquely identifies the `BatchPrediction`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

## Response Syntax
<a name="API_DeleteBatchPrediction_ResponseSyntax"></a>

```
{
   "BatchPredictionId": "string"
}
```

## Response Elements
<a name="API_DeleteBatchPrediction_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [BatchPredictionId](#API_DeleteBatchPrediction_ResponseSyntax) **   <a name="amazonml-DeleteBatchPrediction-response-BatchPredictionId"></a>
A user-supplied ID that uniquely identifies the `BatchPrediction`. This value should be identical to the value of the `BatchPredictionID` in the request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

## Errors
<a name="API_DeleteBatchPrediction_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
A specified resource cannot be located.  
HTTP Status Code: 400

## Examples
<a name="API_DeleteBatchPrediction_Examples"></a>

### The following is a sample request and response of the DeleteBatchPrediction operation.
<a name="API_DeleteBatchPrediction_Example_1"></a>

This example illustrates one usage of DeleteBatchPrediction.

#### Sample Request
<a name="API_DeleteBatchPrediction_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.DeleteBatchPrediction
{"BatchPredictionId": "exampleBatchPredictionId"}
```

#### Sample Response
<a name="API_DeleteBatchPrediction_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{"BatchPredictionId":"exampleBatchPredictionId"}
```

## See Also
<a name="API_DeleteBatchPrediction_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/DeleteBatchPrediction) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/DeleteBatchPrediction) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/DeleteBatchPrediction) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/DeleteBatchPrediction) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/DeleteBatchPrediction) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/DeleteBatchPrediction) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/DeleteBatchPrediction) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/DeleteBatchPrediction) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/DeleteBatchPrediction) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/DeleteBatchPrediction) 

# DeleteDataSource
<a name="API_DeleteDataSource"></a>

Assigns the DELETED status to a `DataSource`, rendering it unusable.

After using the `DeleteDataSource` operation, you can use the [GetDataSource](API_GetDataSource.md) operation to verify that the status of the `DataSource` changed to DELETED.

 **Caution:** The results of the `DeleteDataSource` operation are irreversible.

## Request Syntax
<a name="API_DeleteDataSource_RequestSyntax"></a>

```
{
   "DataSourceId": "string"
}
```

## Request Parameters
<a name="API_DeleteDataSource_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [DataSourceId](#API_DeleteDataSource_RequestSyntax) **   <a name="amazonml-DeleteDataSource-request-DataSourceId"></a>
A user-supplied ID that uniquely identifies the `DataSource`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

## Response Syntax
<a name="API_DeleteDataSource_ResponseSyntax"></a>

```
{
   "DataSourceId": "string"
}
```

## Response Elements
<a name="API_DeleteDataSource_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [DataSourceId](#API_DeleteDataSource_ResponseSyntax) **   <a name="amazonml-DeleteDataSource-response-DataSourceId"></a>
A user-supplied ID that uniquely identifies the `DataSource`. This value should be identical to the value of the `DataSourceID` in the request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

## Errors
<a name="API_DeleteDataSource_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
A specified resource cannot be located.  
HTTP Status Code: 400

## Examples
<a name="API_DeleteDataSource_Examples"></a>

### The following is a sample request and response of the DeleteDataSource operation:
<a name="API_DeleteDataSource_Example_1"></a>

This example illustrates one usage of DeleteDataSource.

#### Sample Request
<a name="API_DeleteDataSource_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.DeleteDataSource
{"DataSourceId": "exampleDataSourceId"}
```

#### Sample Response
<a name="API_DeleteDataSource_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{"DataSourceId":"exampleDataSourceId"}
```

## See Also
<a name="API_DeleteDataSource_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/DeleteDataSource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/DeleteDataSource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/DeleteDataSource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/DeleteDataSource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/DeleteDataSource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/DeleteDataSource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/DeleteDataSource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/DeleteDataSource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/DeleteDataSource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/DeleteDataSource) 

# DeleteEvaluation
<a name="API_DeleteEvaluation"></a>

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.

## Request Syntax
<a name="API_DeleteEvaluation_RequestSyntax"></a>

```
{
   "EvaluationId": "string"
}
```

## Request Parameters
<a name="API_DeleteEvaluation_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [EvaluationId](#API_DeleteEvaluation_RequestSyntax) **   <a name="amazonml-DeleteEvaluation-request-EvaluationId"></a>
A user-supplied ID that uniquely identifies the `Evaluation` to delete.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

## Response Syntax
<a name="API_DeleteEvaluation_ResponseSyntax"></a>

```
{
   "EvaluationId": "string"
}
```

## Response Elements
<a name="API_DeleteEvaluation_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [EvaluationId](#API_DeleteEvaluation_ResponseSyntax) **   <a name="amazonml-DeleteEvaluation-response-EvaluationId"></a>
A user-supplied ID that uniquely identifies the `Evaluation`. This value should be identical to the value of the `EvaluationId` in the request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

## Errors
<a name="API_DeleteEvaluation_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
A specified resource cannot be located.  
HTTP Status Code: 400

## Examples
<a name="API_DeleteEvaluation_Examples"></a>

### The following is a sample request and response of the DeleteEvaluation operation.
<a name="API_DeleteEvaluation_Example_1"></a>

This example illustrates one usage of DeleteEvaluation.

#### Sample Request
<a name="API_DeleteEvaluation_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.DeleteEvaluation
{"EvaluationId": "exampleEvaluationId"}
```

#### Sample Response
<a name="API_DeleteEvaluation_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{"EvaluationId":"exampleEvaluationId"}
```

## See Also
<a name="API_DeleteEvaluation_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/DeleteEvaluation) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/DeleteEvaluation) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/DeleteEvaluation) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/DeleteEvaluation) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/DeleteEvaluation) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/DeleteEvaluation) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/DeleteEvaluation) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/DeleteEvaluation) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/DeleteEvaluation) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/DeleteEvaluation) 

# DeleteMLModel
<a name="API_DeleteMLModel"></a>

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.

## Request Syntax
<a name="API_DeleteMLModel_RequestSyntax"></a>

```
{
   "MLModelId": "string"
}
```

## Request Parameters
<a name="API_DeleteMLModel_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [MLModelId](#API_DeleteMLModel_RequestSyntax) **   <a name="amazonml-DeleteMLModel-request-MLModelId"></a>
A user-supplied ID that uniquely identifies the `MLModel`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

## Response Syntax
<a name="API_DeleteMLModel_ResponseSyntax"></a>

```
{
   "MLModelId": "string"
}
```

## Response Elements
<a name="API_DeleteMLModel_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [MLModelId](#API_DeleteMLModel_ResponseSyntax) **   <a name="amazonml-DeleteMLModel-response-MLModelId"></a>
A user-supplied ID that uniquely identifies the `MLModel`. This value should be identical to the value of the `MLModelID` in the request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

## Errors
<a name="API_DeleteMLModel_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
A specified resource cannot be located.  
HTTP Status Code: 400

## Examples
<a name="API_DeleteMLModel_Examples"></a>

### The following is a sample request and response of the DeleteMLModel operation:
<a name="API_DeleteMLModel_Example_1"></a>

This example illustrates one usage of DeleteMLModel.

#### Sample Request
<a name="API_DeleteMLModel_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.DeleteMLModel
{"MLModelId": "exampleMLModelId"}
```

#### Sample Response
<a name="API_DeleteMLModel_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{"MLModelId": "exampleMLModelId"}
```

## See Also
<a name="API_DeleteMLModel_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/DeleteMLModel) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/DeleteMLModel) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/DeleteMLModel) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/DeleteMLModel) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/DeleteMLModel) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/DeleteMLModel) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/DeleteMLModel) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/DeleteMLModel) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/DeleteMLModel) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/DeleteMLModel) 

# DeleteRealtimeEndpoint
<a name="API_DeleteRealtimeEndpoint"></a>

Deletes a real time endpoint of an `MLModel`.

## Request Syntax
<a name="API_DeleteRealtimeEndpoint_RequestSyntax"></a>

```
{
   "MLModelId": "string"
}
```

## Request Parameters
<a name="API_DeleteRealtimeEndpoint_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [MLModelId](#API_DeleteRealtimeEndpoint_RequestSyntax) **   <a name="amazonml-DeleteRealtimeEndpoint-request-MLModelId"></a>
The ID assigned to the `MLModel` during creation.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

## Response Syntax
<a name="API_DeleteRealtimeEndpoint_ResponseSyntax"></a>

```
{
   "MLModelId": "string",
   "RealtimeEndpointInfo": { 
      "CreatedAt": number,
      "EndpointStatus": "string",
      "EndpointUrl": "string",
      "PeakRequestsPerSecond": number
   }
}
```

## Response Elements
<a name="API_DeleteRealtimeEndpoint_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [MLModelId](#API_DeleteRealtimeEndpoint_ResponseSyntax) **   <a name="amazonml-DeleteRealtimeEndpoint-response-MLModelId"></a>
A user-supplied ID that uniquely identifies the `MLModel`. This value should be identical to the value of the `MLModelId` in the request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

 ** [RealtimeEndpointInfo](#API_DeleteRealtimeEndpoint_ResponseSyntax) **   <a name="amazonml-DeleteRealtimeEndpoint-response-RealtimeEndpointInfo"></a>
The endpoint information of the `MLModel`   
Type: [RealtimeEndpointInfo](API_RealtimeEndpointInfo.md) object

## Errors
<a name="API_DeleteRealtimeEndpoint_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
A specified resource cannot be located.  
HTTP Status Code: 400

## Examples
<a name="API_DeleteRealtimeEndpoint_Examples"></a>

### The following is a sample request and response of the DeleteRealtimeEndpoint operation.
<a name="API_DeleteRealtimeEndpoint_Example_1"></a>

This example illustrates one usage of DeleteRealtimeEndpoint.

#### Sample Request
<a name="API_DeleteRealtimeEndpoint_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.DeleteRealtimeEndpoint
{
  "MLModelId": "ml-ModelExampleId",
}
```

#### Sample Response
<a name="API_DeleteRealtimeEndpoint_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
  "MLModelId": "ml-ModelExampleId", 
  "EndpointInfo": 
  {
    "EndpointStatus": "NONE", 
    "PeakRequestsPerSecond": 0
  }
}
```

## See Also
<a name="API_DeleteRealtimeEndpoint_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/DeleteRealtimeEndpoint) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/DeleteRealtimeEndpoint) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/DeleteRealtimeEndpoint) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/DeleteRealtimeEndpoint) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/DeleteRealtimeEndpoint) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/DeleteRealtimeEndpoint) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/DeleteRealtimeEndpoint) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/DeleteRealtimeEndpoint) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/DeleteRealtimeEndpoint) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/DeleteRealtimeEndpoint) 

# DeleteTags
<a name="API_DeleteTags"></a>

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.

## Request Syntax
<a name="API_DeleteTags_RequestSyntax"></a>

```
{
   "ResourceId": "string",
   "ResourceType": "string",
   "TagKeys": [ "string" ]
}
```

## Request Parameters
<a name="API_DeleteTags_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ResourceId](#API_DeleteTags_RequestSyntax) **   <a name="amazonml-DeleteTags-request-ResourceId"></a>
The ID of the tagged ML object. For example, `exampleModelId`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

 ** [ResourceType](#API_DeleteTags_RequestSyntax) **   <a name="amazonml-DeleteTags-request-ResourceType"></a>
The type of the tagged ML object.  
Type: String  
Valid Values: `BatchPrediction | DataSource | Evaluation | MLModel`   
Required: Yes

 ** [TagKeys](#API_DeleteTags_RequestSyntax) **   <a name="amazonml-DeleteTags-request-TagKeys"></a>
One or more tags to delete.  
Type: Array of strings  
Array Members: Maximum number of 100 items.  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$`   
Required: Yes

## Response Syntax
<a name="API_DeleteTags_ResponseSyntax"></a>

```
{
   "ResourceId": "string",
   "ResourceType": "string"
}
```

## Response Elements
<a name="API_DeleteTags_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [ResourceId](#API_DeleteTags_ResponseSyntax) **   <a name="amazonml-DeleteTags-response-ResourceId"></a>
The ID of the ML object from which tags were deleted.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

 ** [ResourceType](#API_DeleteTags_ResponseSyntax) **   <a name="amazonml-DeleteTags-response-ResourceType"></a>
The type of the ML object from which tags were deleted.  
Type: String  
Valid Values: `BatchPrediction | DataSource | Evaluation | MLModel` 

## Errors
<a name="API_DeleteTags_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

 ** InvalidTagException **   
A submitted tag is invalid.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
A specified resource cannot be located.  
HTTP Status Code: 400

## Examples
<a name="API_DeleteTags_Examples"></a>

### The following are an example request and response for the DeleteTags operation.
<a name="API_DeleteTags_Example_1"></a>

This example illustrates one usage of DeleteTags.

#### Sample Request
<a name="API_DeleteTags_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.DeleteTags
{
  "ResourceId": "exampleModelId", 
  "ResourceType": "MLModel", 
  "Tags": [
      "exampleKey"
  ]
}
```

#### Sample Response
<a name="API_DeleteTags_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
  "ResourceId": "exampleModelId", 
  "ResourceType": "MLModel"
}
```

## See Also
<a name="API_DeleteTags_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/DeleteTags) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/DeleteTags) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/DeleteTags) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/DeleteTags) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/DeleteTags) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/DeleteTags) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/DeleteTags) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/DeleteTags) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/DeleteTags) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/DeleteTags) 

# DescribeBatchPredictions
<a name="API_DescribeBatchPredictions"></a>

Returns a list of `BatchPrediction` operations that match the search criteria in the request.

## Request Syntax
<a name="API_DescribeBatchPredictions_RequestSyntax"></a>

```
{
   "EQ": "string",
   "FilterVariable": "string",
   "GE": "string",
   "GT": "string",
   "LE": "string",
   "Limit": number,
   "LT": "string",
   "NE": "string",
   "NextToken": "string",
   "Prefix": "string",
   "SortOrder": "string"
}
```

## Request Parameters
<a name="API_DescribeBatchPredictions_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [EQ](#API_DescribeBatchPredictions_RequestSyntax) **   <a name="amazonml-DescribeBatchPredictions-request-EQ"></a>
The equal to operator. The `BatchPrediction` results will have `FilterVariable` values that exactly match the value specified with `EQ`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [FilterVariable](#API_DescribeBatchPredictions_RequestSyntax) **   <a name="amazonml-DescribeBatchPredictions-request-FilterVariable"></a>
Use one of the following variables to filter a list of `BatchPrediction`:  
+  `CreatedAt` - Sets the search criteria to the `BatchPrediction` creation date.
+  `Status` - Sets the search criteria to the `BatchPrediction` status.
+  `Name` - Sets the search criteria to the contents of the `BatchPrediction` ** ** `Name`.
+  `IAMUser` - Sets the search criteria to the user account that invoked the `BatchPrediction` creation.
+  `MLModelId` - Sets the search criteria to the `MLModel` used in the `BatchPrediction`.
+  `DataSourceId` - Sets the search criteria to the `DataSource` used in the `BatchPrediction`.
+  `DataURI` - Sets the search criteria to the data file(s) used in the `BatchPrediction`. The URL can identify either a file or an Amazon Simple Storage Solution (Amazon S3) bucket or directory.
Type: String  
Valid Values: `CreatedAt | LastUpdatedAt | Status | Name | IAMUser | MLModelId | DataSourceId | DataURI`   
Required: No

 ** [GE](#API_DescribeBatchPredictions_RequestSyntax) **   <a name="amazonml-DescribeBatchPredictions-request-GE"></a>
The greater than or equal to operator. The `BatchPrediction` results will have `FilterVariable` values that are greater than or equal to the value specified with `GE`.   
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [GT](#API_DescribeBatchPredictions_RequestSyntax) **   <a name="amazonml-DescribeBatchPredictions-request-GT"></a>
The greater than operator. The `BatchPrediction` results will have `FilterVariable` values that are greater than the value specified with `GT`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [LE](#API_DescribeBatchPredictions_RequestSyntax) **   <a name="amazonml-DescribeBatchPredictions-request-LE"></a>
The less than or equal to operator. The `BatchPrediction` results will have `FilterVariable` values that are less than or equal to the value specified with `LE`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [Limit](#API_DescribeBatchPredictions_RequestSyntax) **   <a name="amazonml-DescribeBatchPredictions-request-Limit"></a>
The number of pages of information to include in the result. The range of acceptable values is `1` through `100`. The default value is `100`.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 100.  
Required: No

 ** [LT](#API_DescribeBatchPredictions_RequestSyntax) **   <a name="amazonml-DescribeBatchPredictions-request-LT"></a>
The less than operator. The `BatchPrediction` results will have `FilterVariable` values that are less than the value specified with `LT`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [NE](#API_DescribeBatchPredictions_RequestSyntax) **   <a name="amazonml-DescribeBatchPredictions-request-NE"></a>
The not equal to operator. The `BatchPrediction` results will have `FilterVariable` values not equal to the value specified with `NE`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [NextToken](#API_DescribeBatchPredictions_RequestSyntax) **   <a name="amazonml-DescribeBatchPredictions-request-NextToken"></a>
An ID of the page in the paginated results.  
Type: String  
Required: No

 ** [Prefix](#API_DescribeBatchPredictions_RequestSyntax) **   <a name="amazonml-DescribeBatchPredictions-request-Prefix"></a>
A string that is found at the beginning of a variable, such as `Name` or `Id`.  
For example, a `Batch Prediction` operation could have the `Name` `2014-09-09-HolidayGiftMailer`. To search for this `BatchPrediction`, select `Name` for the `FilterVariable` and any of the following strings for the `Prefix`:   
+ 2014-09
+ 2014-09-09
+ 2014-09-09-Holiday
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [SortOrder](#API_DescribeBatchPredictions_RequestSyntax) **   <a name="amazonml-DescribeBatchPredictions-request-SortOrder"></a>
A two-value parameter that determines the sequence of the resulting list of `MLModel`s.  
+  `asc` - Arranges the list in ascending order (A-Z, 0-9).
+  `dsc` - Arranges the list in descending order (Z-A, 9-0).
Results are sorted by `FilterVariable`.  
Type: String  
Valid Values: `asc | dsc`   
Required: No

## Response Syntax
<a name="API_DescribeBatchPredictions_ResponseSyntax"></a>

```
{
   "NextToken": "string",
   "Results": [ 
      { 
         "BatchPredictionDataSourceId": "string",
         "BatchPredictionId": "string",
         "ComputeTime": number,
         "CreatedAt": number,
         "CreatedByIamUser": "string",
         "FinishedAt": number,
         "InputDataLocationS3": "string",
         "InvalidRecordCount": number,
         "LastUpdatedAt": number,
         "Message": "string",
         "MLModelId": "string",
         "Name": "string",
         "OutputUri": "string",
         "StartedAt": number,
         "Status": "string",
         "TotalRecordCount": number
      }
   ]
}
```

## Response Elements
<a name="API_DescribeBatchPredictions_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [NextToken](#API_DescribeBatchPredictions_ResponseSyntax) **   <a name="amazonml-DescribeBatchPredictions-response-NextToken"></a>
The ID of the next page in the paginated results that indicates at least one more page follows.  
Type: String

 ** [Results](#API_DescribeBatchPredictions_ResponseSyntax) **   <a name="amazonml-DescribeBatchPredictions-response-Results"></a>
A list of `BatchPrediction` objects that meet the search criteria.   
Type: Array of [BatchPrediction](API_BatchPrediction.md) objects

## Errors
<a name="API_DescribeBatchPredictions_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

## Examples
<a name="API_DescribeBatchPredictions_Examples"></a>

### The following is a sample request and response of the DescribeBatchPredictions operation.
<a name="API_DescribeBatchPredictions_Example_1"></a>

This example illustrates one usage of DescribeBatchPredictions.

#### Sample Request
<a name="API_DescribeBatchPredictions_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.DescribeBatchPredictions
{
  "FilterVariable": "Name",
  "Prefix": "bp-",
  "SortOrder": "asc",
  "Limit": 1
}
```

#### Sample Response
<a name="API_DescribeBatchPredictions_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
  "Results": [
    {
      "BatchPredictionDataSourceId": "ds-exampleDataSourceId", 
      "BatchPredictionId": "bp-exampleBatchPredictionId", 
      "CreatedAt": 1422057670.697, 
      "CreatedByIamUser": "arn:aws:iam::<awsAccountId>:user/username", 
      "InputDataLocationS3": "s3://bucket/locationToInput/example-data.testing.csv", 
      "LastUpdatedAt": 1422057811.431, 
      "MLModelId": "pr-exampleModelId", 
      "Name": "bp-exampleBatchPredictionName", 
      "OutputUri": "s3://bucket/locationToLogs/", 
      "Status": "COMPLETED",
      "ComputeTime":"185200",
      "FinishedAt":"1422057711.192",
      "StartedAt":"14220557678.324",
      "TotalRecordCount":"21154",
      "InvalidRecordCount":"0"
    }
  ]
}
```

## See Also
<a name="API_DescribeBatchPredictions_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/DescribeBatchPredictions) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/DescribeBatchPredictions) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/DescribeBatchPredictions) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/DescribeBatchPredictions) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/DescribeBatchPredictions) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/DescribeBatchPredictions) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/DescribeBatchPredictions) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/DescribeBatchPredictions) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/DescribeBatchPredictions) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/DescribeBatchPredictions) 

# DescribeDataSources
<a name="API_DescribeDataSources"></a>

Returns a list of `DataSource` that match the search criteria in the request.

## Request Syntax
<a name="API_DescribeDataSources_RequestSyntax"></a>

```
{
   "EQ": "string",
   "FilterVariable": "string",
   "GE": "string",
   "GT": "string",
   "LE": "string",
   "Limit": number,
   "LT": "string",
   "NE": "string",
   "NextToken": "string",
   "Prefix": "string",
   "SortOrder": "string"
}
```

## Request Parameters
<a name="API_DescribeDataSources_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [EQ](#API_DescribeDataSources_RequestSyntax) **   <a name="amazonml-DescribeDataSources-request-EQ"></a>
The equal to operator. The `DataSource` results will have `FilterVariable` values that exactly match the value specified with `EQ`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [FilterVariable](#API_DescribeDataSources_RequestSyntax) **   <a name="amazonml-DescribeDataSources-request-FilterVariable"></a>
Use one of the following variables to filter a list of `DataSource`:  
+  `CreatedAt` - Sets the search criteria to `DataSource` creation dates.
+  `Status` - Sets the search criteria to `DataSource` statuses.
+  `Name` - Sets the search criteria to the contents of `DataSource` `Name`.
+  `DataUri` - Sets the search criteria to the URI of data files used to create the `DataSource`. The URI can identify either a file or an Amazon Simple Storage Service (Amazon S3) bucket or directory.
+  `IAMUser` - Sets the search criteria to the user account that invoked the `DataSource` creation.
Type: String  
Valid Values: `CreatedAt | LastUpdatedAt | Status | Name | DataLocationS3 | IAMUser`   
Required: No

 ** [GE](#API_DescribeDataSources_RequestSyntax) **   <a name="amazonml-DescribeDataSources-request-GE"></a>
The greater than or equal to operator. The `DataSource` results will have `FilterVariable` values that are greater than or equal to the value specified with `GE`.   
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [GT](#API_DescribeDataSources_RequestSyntax) **   <a name="amazonml-DescribeDataSources-request-GT"></a>
The greater than operator. The `DataSource` results will have `FilterVariable` values that are greater than the value specified with `GT`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [LE](#API_DescribeDataSources_RequestSyntax) **   <a name="amazonml-DescribeDataSources-request-LE"></a>
The less than or equal to operator. The `DataSource` results will have `FilterVariable` values that are less than or equal to the value specified with `LE`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [Limit](#API_DescribeDataSources_RequestSyntax) **   <a name="amazonml-DescribeDataSources-request-Limit"></a>
 The maximum number of `DataSource` to include in the result.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 100.  
Required: No

 ** [LT](#API_DescribeDataSources_RequestSyntax) **   <a name="amazonml-DescribeDataSources-request-LT"></a>
The less than operator. The `DataSource` results will have `FilterVariable` values that are less than the value specified with `LT`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [NE](#API_DescribeDataSources_RequestSyntax) **   <a name="amazonml-DescribeDataSources-request-NE"></a>
The not equal to operator. The `DataSource` results will have `FilterVariable` values not equal to the value specified with `NE`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [NextToken](#API_DescribeDataSources_RequestSyntax) **   <a name="amazonml-DescribeDataSources-request-NextToken"></a>
The ID of the page in the paginated results.  
Type: String  
Required: No

 ** [Prefix](#API_DescribeDataSources_RequestSyntax) **   <a name="amazonml-DescribeDataSources-request-Prefix"></a>
A string that is found at the beginning of a variable, such as `Name` or `Id`.  
For example, a `DataSource` could have the `Name` `2014-09-09-HolidayGiftMailer`. To search for this `DataSource`, select `Name` for the `FilterVariable` and any of the following strings for the `Prefix`:   
+ 2014-09
+ 2014-09-09
+ 2014-09-09-Holiday
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [SortOrder](#API_DescribeDataSources_RequestSyntax) **   <a name="amazonml-DescribeDataSources-request-SortOrder"></a>
A two-value parameter that determines the sequence of the resulting list of `DataSource`.  
+  `asc` - Arranges the list in ascending order (A-Z, 0-9).
+  `dsc` - Arranges the list in descending order (Z-A, 9-0).
Results are sorted by `FilterVariable`.  
Type: String  
Valid Values: `asc | dsc`   
Required: No

## Response Syntax
<a name="API_DescribeDataSources_ResponseSyntax"></a>

```
{
   "NextToken": "string",
   "Results": [ 
      { 
         "ComputeStatistics": boolean,
         "ComputeTime": number,
         "CreatedAt": number,
         "CreatedByIamUser": "string",
         "DataLocationS3": "string",
         "DataRearrangement": "string",
         "DataSizeInBytes": number,
         "DataSourceId": "string",
         "FinishedAt": number,
         "LastUpdatedAt": number,
         "Message": "string",
         "Name": "string",
         "NumberOfFiles": number,
         "RDSMetadata": { 
            "Database": { 
               "DatabaseName": "string",
               "InstanceIdentifier": "string"
            },
            "DatabaseUserName": "string",
            "DataPipelineId": "string",
            "ResourceRole": "string",
            "SelectSqlQuery": "string",
            "ServiceRole": "string"
         },
         "RedshiftMetadata": { 
            "DatabaseUserName": "string",
            "RedshiftDatabase": { 
               "ClusterIdentifier": "string",
               "DatabaseName": "string"
            },
            "SelectSqlQuery": "string"
         },
         "RoleARN": "string",
         "StartedAt": number,
         "Status": "string"
      }
   ]
}
```

## Response Elements
<a name="API_DescribeDataSources_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [NextToken](#API_DescribeDataSources_ResponseSyntax) **   <a name="amazonml-DescribeDataSources-response-NextToken"></a>
An ID of the next page in the paginated results that indicates at least one more page follows.  
Type: String

 ** [Results](#API_DescribeDataSources_ResponseSyntax) **   <a name="amazonml-DescribeDataSources-response-Results"></a>
A list of `DataSource` that meet the search criteria.   
Type: Array of [DataSource](API_DataSource.md) objects

## Errors
<a name="API_DescribeDataSources_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

## Examples
<a name="API_DescribeDataSources_Examples"></a>

### The following is a sample request and response of the DescribeDataSources operation.
<a name="API_DescribeDataSources_Example_1"></a>

This example illustrates one usage of DescribeDataSources.

#### Sample Request
<a name="API_DescribeDataSources_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.DescribeDataSources
{
  "FilterVariable": "Name",
  "Prefix": "bp-",
  "SortOrder": "asc",
  "Limit": 1
}
```

#### Sample Response
<a name="API_DescribeDataSources_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
  "NextToken": "{\"DataSourceId\":\"ds-exampleDataSource2\"}", 
  "Results": [
    {
      "ComputeStatistics": true, 
      "CreatedAt": 1428008286.077, 
      "CreatedByIamUser": "arn:aws:iam::<awsAccountId>:user/username", 
      "DataLocationS3": "s3://bucket/locationToInput/example-data.testing.csv", 
      "DataSourceId": "ds-exampleDatasourceId", 
      "LastUpdatedAt": 1428018286.654, 
      "Name": "exampleDatasource", 
      "Status": "COMPLETED",
      "ComputeTime":"185200",
      "FinishedAt":"1428018286.654",
      "StartedAt":"1428008287.324"
    },
    {
      "ComputeStatistics": true,
      "CreatedAt": 1428008286.077,
      "CreatedByIamUser": "arn:aws:iam::<awsAccountId>:user/username",
      "DataLocationS3": "s3://bucket/locationToInput/example-data.testing.csv",
      "DataSourceId": "ds-exampleDatasourceId",
      "LastUpdatedAt": 1428018286.654,
      "Name": "exampleDatasource",
      "Status": "PENDING"
    }
  ]
}
```

## See Also
<a name="API_DescribeDataSources_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/DescribeDataSources) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/DescribeDataSources) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/DescribeDataSources) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/DescribeDataSources) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/DescribeDataSources) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/DescribeDataSources) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/DescribeDataSources) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/DescribeDataSources) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/DescribeDataSources) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/DescribeDataSources) 

# DescribeEvaluations
<a name="API_DescribeEvaluations"></a>

Returns a list of `DescribeEvaluations` that match the search criteria in the request.

## Request Syntax
<a name="API_DescribeEvaluations_RequestSyntax"></a>

```
{
   "EQ": "string",
   "FilterVariable": "string",
   "GE": "string",
   "GT": "string",
   "LE": "string",
   "Limit": number,
   "LT": "string",
   "NE": "string",
   "NextToken": "string",
   "Prefix": "string",
   "SortOrder": "string"
}
```

## Request Parameters
<a name="API_DescribeEvaluations_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [EQ](#API_DescribeEvaluations_RequestSyntax) **   <a name="amazonml-DescribeEvaluations-request-EQ"></a>
The equal to operator. The `Evaluation` results will have `FilterVariable` values that exactly match the value specified with `EQ`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [FilterVariable](#API_DescribeEvaluations_RequestSyntax) **   <a name="amazonml-DescribeEvaluations-request-FilterVariable"></a>
Use one of the following variable to filter a list of `Evaluation` objects:  
+  `CreatedAt` - Sets the search criteria to the `Evaluation` creation date.
+  `Status` - Sets the search criteria to the `Evaluation` status.
+  `Name` - Sets the search criteria to the contents of `Evaluation` ** ** `Name`.
+  `IAMUser` - Sets the search criteria to the user account that invoked an `Evaluation`.
+  `MLModelId` - Sets the search criteria to the `MLModel` that was evaluated.
+  `DataSourceId` - Sets the search criteria to the `DataSource` used in `Evaluation`.
+  `DataUri` - Sets the search criteria to the data file(s) used in `Evaluation`. The URL can identify either a file or an Amazon Simple Storage Solution (Amazon S3) bucket or directory.
Type: String  
Valid Values: `CreatedAt | LastUpdatedAt | Status | Name | IAMUser | MLModelId | DataSourceId | DataURI`   
Required: No

 ** [GE](#API_DescribeEvaluations_RequestSyntax) **   <a name="amazonml-DescribeEvaluations-request-GE"></a>
The greater than or equal to operator. The `Evaluation` results will have `FilterVariable` values that are greater than or equal to the value specified with `GE`.   
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [GT](#API_DescribeEvaluations_RequestSyntax) **   <a name="amazonml-DescribeEvaluations-request-GT"></a>
The greater than operator. The `Evaluation` results will have `FilterVariable` values that are greater than the value specified with `GT`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [LE](#API_DescribeEvaluations_RequestSyntax) **   <a name="amazonml-DescribeEvaluations-request-LE"></a>
The less than or equal to operator. The `Evaluation` results will have `FilterVariable` values that are less than or equal to the value specified with `LE`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [Limit](#API_DescribeEvaluations_RequestSyntax) **   <a name="amazonml-DescribeEvaluations-request-Limit"></a>
 The maximum number of `Evaluation` to include in the result.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 100.  
Required: No

 ** [LT](#API_DescribeEvaluations_RequestSyntax) **   <a name="amazonml-DescribeEvaluations-request-LT"></a>
The less than operator. The `Evaluation` results will have `FilterVariable` values that are less than the value specified with `LT`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [NE](#API_DescribeEvaluations_RequestSyntax) **   <a name="amazonml-DescribeEvaluations-request-NE"></a>
The not equal to operator. The `Evaluation` results will have `FilterVariable` values not equal to the value specified with `NE`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [NextToken](#API_DescribeEvaluations_RequestSyntax) **   <a name="amazonml-DescribeEvaluations-request-NextToken"></a>
The ID of the page in the paginated results.  
Type: String  
Required: No

 ** [Prefix](#API_DescribeEvaluations_RequestSyntax) **   <a name="amazonml-DescribeEvaluations-request-Prefix"></a>
A string that is found at the beginning of a variable, such as `Name` or `Id`.  
For example, an `Evaluation` could have the `Name` `2014-09-09-HolidayGiftMailer`. To search for this `Evaluation`, select `Name` for the `FilterVariable` and any of the following strings for the `Prefix`:   
+ 2014-09
+ 2014-09-09
+ 2014-09-09-Holiday
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [SortOrder](#API_DescribeEvaluations_RequestSyntax) **   <a name="amazonml-DescribeEvaluations-request-SortOrder"></a>
A two-value parameter that determines the sequence of the resulting list of `Evaluation`.  
+  `asc` - Arranges the list in ascending order (A-Z, 0-9).
+  `dsc` - Arranges the list in descending order (Z-A, 9-0).
Results are sorted by `FilterVariable`.  
Type: String  
Valid Values: `asc | dsc`   
Required: No

## Response Syntax
<a name="API_DescribeEvaluations_ResponseSyntax"></a>

```
{
   "NextToken": "string",
   "Results": [ 
      { 
         "ComputeTime": number,
         "CreatedAt": number,
         "CreatedByIamUser": "string",
         "EvaluationDataSourceId": "string",
         "EvaluationId": "string",
         "FinishedAt": number,
         "InputDataLocationS3": "string",
         "LastUpdatedAt": number,
         "Message": "string",
         "MLModelId": "string",
         "Name": "string",
         "PerformanceMetrics": { 
            "Properties": { 
               "string" : "string" 
            }
         },
         "StartedAt": number,
         "Status": "string"
      }
   ]
}
```

## Response Elements
<a name="API_DescribeEvaluations_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [NextToken](#API_DescribeEvaluations_ResponseSyntax) **   <a name="amazonml-DescribeEvaluations-response-NextToken"></a>
The ID of the next page in the paginated results that indicates at least one more page follows.  
Type: String

 ** [Results](#API_DescribeEvaluations_ResponseSyntax) **   <a name="amazonml-DescribeEvaluations-response-Results"></a>
A list of `Evaluation` that meet the search criteria.   
Type: Array of [Evaluation](API_Evaluation.md) objects

## Errors
<a name="API_DescribeEvaluations_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

## Examples
<a name="API_DescribeEvaluations_Examples"></a>

### The following is a sample request and response of the DescribeEvaluations operation.
<a name="API_DescribeEvaluations_Example_1"></a>

This example illustrates one usage of DescribeEvaluations.

#### Sample Request
<a name="API_DescribeEvaluations_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.DescribeEvaluations
{
  "FilterVariable": "Name",
  "Prefix": "ev-",
  "SortOrder": "asc",
  "Limit": 1
}
```

#### Sample Response
<a name="API_DescribeEvaluations_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
  "NextToken": "{\"EvaluationId\":\"ev-exampleId2\"}", 
  "Results": [
    {
      "CreatedAt": 1420745248.785, 
      "CreatedByIamUser": "arn:aws:iam::<awsAccountId>:user/username", 
      "EvaluationDataSourceId": "ds-exampleDataSourceId", 
      "EvaluationId": "ev-exampleId1", 
      "InputDataLocationS3": "s3://bucket/locationToInput/example-data.testing.csv", 
      "LastUpdatedAt": 1420745524.506, 
      "MLModelId": "pr-exampleModelId",
      "Name": "ev-1", 
      "PerformanceMetrics": 
       {
         "Properties": {"BinaryAUC": "0.9228827246570067"}
       }, 
      "Status": "COMPLETED",
      "ComputeTime":"185200",
      "FinishedAt":"1420745524.506",
      "StartedAt":"1420745249.324"
    }
  ]
}
```

## See Also
<a name="API_DescribeEvaluations_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/DescribeEvaluations) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/DescribeEvaluations) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/DescribeEvaluations) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/DescribeEvaluations) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/DescribeEvaluations) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/DescribeEvaluations) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/DescribeEvaluations) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/DescribeEvaluations) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/DescribeEvaluations) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/DescribeEvaluations) 

# DescribeMLModels
<a name="API_DescribeMLModels"></a>

Returns a list of `MLModel` that match the search criteria in the request.

## Request Syntax
<a name="API_DescribeMLModels_RequestSyntax"></a>

```
{
   "EQ": "string",
   "FilterVariable": "string",
   "GE": "string",
   "GT": "string",
   "LE": "string",
   "Limit": number,
   "LT": "string",
   "NE": "string",
   "NextToken": "string",
   "Prefix": "string",
   "SortOrder": "string"
}
```

## Request Parameters
<a name="API_DescribeMLModels_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [EQ](#API_DescribeMLModels_RequestSyntax) **   <a name="amazonml-DescribeMLModels-request-EQ"></a>
The equal to operator. The `MLModel` results will have `FilterVariable` values that exactly match the value specified with `EQ`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [FilterVariable](#API_DescribeMLModels_RequestSyntax) **   <a name="amazonml-DescribeMLModels-request-FilterVariable"></a>
Use one of the following variables to filter a list of `MLModel`:  
+  `CreatedAt` - Sets the search criteria to `MLModel` creation date.
+  `Status` - Sets the search criteria to `MLModel` status.
+  `Name` - Sets the search criteria to the contents of `MLModel` ** ** `Name`.
+  `IAMUser` - Sets the search criteria to the user account that invoked the `MLModel` creation.
+  `TrainingDataSourceId` - Sets the search criteria to the `DataSource` used to train one or more `MLModel`.
+  `RealtimeEndpointStatus` - Sets the search criteria to the `MLModel` real-time endpoint status.
+  `MLModelType` - Sets the search criteria to `MLModel` type: binary, regression, or multi-class.
+  `Algorithm` - Sets the search criteria to the algorithm that the `MLModel` uses.
+  `TrainingDataURI` - Sets the search criteria to the data file(s) used in training a `MLModel`. The URL can identify either a file or an Amazon Simple Storage Service (Amazon S3) bucket or directory.
Type: String  
Valid Values: `CreatedAt | LastUpdatedAt | Status | Name | IAMUser | TrainingDataSourceId | RealtimeEndpointStatus | MLModelType | Algorithm | TrainingDataURI`   
Required: No

 ** [GE](#API_DescribeMLModels_RequestSyntax) **   <a name="amazonml-DescribeMLModels-request-GE"></a>
The greater than or equal to operator. The `MLModel` results will have `FilterVariable` values that are greater than or equal to the value specified with `GE`.   
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [GT](#API_DescribeMLModels_RequestSyntax) **   <a name="amazonml-DescribeMLModels-request-GT"></a>
The greater than operator. The `MLModel` results will have `FilterVariable` values that are greater than the value specified with `GT`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [LE](#API_DescribeMLModels_RequestSyntax) **   <a name="amazonml-DescribeMLModels-request-LE"></a>
The less than or equal to operator. The `MLModel` results will have `FilterVariable` values that are less than or equal to the value specified with `LE`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [Limit](#API_DescribeMLModels_RequestSyntax) **   <a name="amazonml-DescribeMLModels-request-Limit"></a>
The number of pages of information to include in the result. The range of acceptable values is `1` through `100`. The default value is `100`.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 100.  
Required: No

 ** [LT](#API_DescribeMLModels_RequestSyntax) **   <a name="amazonml-DescribeMLModels-request-LT"></a>
The less than operator. The `MLModel` results will have `FilterVariable` values that are less than the value specified with `LT`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [NE](#API_DescribeMLModels_RequestSyntax) **   <a name="amazonml-DescribeMLModels-request-NE"></a>
The not equal to operator. The `MLModel` results will have `FilterVariable` values not equal to the value specified with `NE`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [NextToken](#API_DescribeMLModels_RequestSyntax) **   <a name="amazonml-DescribeMLModels-request-NextToken"></a>
The ID of the page in the paginated results.  
Type: String  
Required: No

 ** [Prefix](#API_DescribeMLModels_RequestSyntax) **   <a name="amazonml-DescribeMLModels-request-Prefix"></a>
A string that is found at the beginning of a variable, such as `Name` or `Id`.  
For example, an `MLModel` could have the `Name` `2014-09-09-HolidayGiftMailer`. To search for this `MLModel`, select `Name` for the `FilterVariable` and any of the following strings for the `Prefix`:   
+ 2014-09
+ 2014-09-09
+ 2014-09-09-Holiday
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [SortOrder](#API_DescribeMLModels_RequestSyntax) **   <a name="amazonml-DescribeMLModels-request-SortOrder"></a>
A two-value parameter that determines the sequence of the resulting list of `MLModel`.  
+  `asc` - Arranges the list in ascending order (A-Z, 0-9).
+  `dsc` - Arranges the list in descending order (Z-A, 9-0).
Results are sorted by `FilterVariable`.  
Type: String  
Valid Values: `asc | dsc`   
Required: No

## Response Syntax
<a name="API_DescribeMLModels_ResponseSyntax"></a>

```
{
   "NextToken": "string",
   "Results": [ 
      { 
         "Algorithm": "string",
         "ComputeTime": number,
         "CreatedAt": number,
         "CreatedByIamUser": "string",
         "EndpointInfo": { 
            "CreatedAt": number,
            "EndpointStatus": "string",
            "EndpointUrl": "string",
            "PeakRequestsPerSecond": number
         },
         "FinishedAt": number,
         "InputDataLocationS3": "string",
         "LastUpdatedAt": number,
         "Message": "string",
         "MLModelId": "string",
         "MLModelType": "string",
         "Name": "string",
         "ScoreThreshold": number,
         "ScoreThresholdLastUpdatedAt": number,
         "SizeInBytes": number,
         "StartedAt": number,
         "Status": "string",
         "TrainingDataSourceId": "string",
         "TrainingParameters": { 
            "string" : "string" 
         }
      }
   ]
}
```

## Response Elements
<a name="API_DescribeMLModels_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [NextToken](#API_DescribeMLModels_ResponseSyntax) **   <a name="amazonml-DescribeMLModels-response-NextToken"></a>
The ID of the next page in the paginated results that indicates at least one more page follows.  
Type: String

 ** [Results](#API_DescribeMLModels_ResponseSyntax) **   <a name="amazonml-DescribeMLModels-response-Results"></a>
A list of `MLModel` that meet the search criteria.  
Type: Array of [MLModel](API_MLModel.md) objects

## Errors
<a name="API_DescribeMLModels_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

## Examples
<a name="API_DescribeMLModels_Examples"></a>

### The following is a sample request and response of the DescribeMLModels operation:
<a name="API_DescribeMLModels_Example_1"></a>

This example illustrates one usage of DescribeMLModels.

#### Sample Request
<a name="API_DescribeMLModels_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.DescribeMLModels
{
  "FilterVariable": "Name",
  "Prefix": "ml-",
  "SortOrder": "asc",
  "Limit": 1
}
```

#### Sample Response
<a name="API_DescribeMLModels_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
  "NextToken": "\"PredictorId\":\"Spr-ml-model-testing\"}", 
  "Results": [
    {
      "CreatedAt": 1422475435.595, 
      "CreatedByIamUser": "arn:aws:iam::<awsAccountId>:user/username", 
      "InputDataLocationS3": "s3://bucket/locationToInput/example-data.testing.csv",
      "LastUpdatedAt": 1422475709.691, 
      "MLModelId": "ml-model-testing", 
      "MLModelType": "MULTICLASS", 
      "EndpointInfo": {
        "CreatedAt": 1424378682.266, 
        "EndpointStatus": "READY", 
        "EndpointUrl": "<realtime endpoint from Amazon Machine Learning for ml-model-testing>",
        "PeakRequestsPerSecond": 200}
      "Name": "ml-model-name", 
      "Algorithm": "sgd",
      "SizeInBytes": 352720, 
      "Status": "COMPLETED", 
      "ComputeTime":"185200",
      "FinishedAt":"1422475709.691",
      "StartedAt":"1422475438.324",
      "TrainingDataSourceId": "exampleDataSourceId", 
      "TrainingParameters": 
       {
         "algorithm": "sgd", 
         "sgd.l1RegularizationAmount": "0.0", 
         "sgd.l2RegularizationAmount": "1E-6", 
         "sgd.maxMLModelSizeInBytes": "33554432", 
         "sgd.maxPasses": "10"
      }
    }
  ]
}
```

## See Also
<a name="API_DescribeMLModels_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/DescribeMLModels) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/DescribeMLModels) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/DescribeMLModels) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/DescribeMLModels) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/DescribeMLModels) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/DescribeMLModels) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/DescribeMLModels) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/DescribeMLModels) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/DescribeMLModels) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/DescribeMLModels) 

# DescribeTags
<a name="API_DescribeTags"></a>

Describes one or more of the tags for your Amazon ML object.

## Request Syntax
<a name="API_DescribeTags_RequestSyntax"></a>

```
{
   "ResourceId": "string",
   "ResourceType": "string"
}
```

## Request Parameters
<a name="API_DescribeTags_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [ResourceId](#API_DescribeTags_RequestSyntax) **   <a name="amazonml-DescribeTags-request-ResourceId"></a>
The ID of the ML object. For example, `exampleModelId`.   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

 ** [ResourceType](#API_DescribeTags_RequestSyntax) **   <a name="amazonml-DescribeTags-request-ResourceType"></a>
The type of the ML object.  
Type: String  
Valid Values: `BatchPrediction | DataSource | Evaluation | MLModel`   
Required: Yes

## Response Syntax
<a name="API_DescribeTags_ResponseSyntax"></a>

```
{
   "ResourceId": "string",
   "ResourceType": "string",
   "Tags": [ 
      { 
         "Key": "string",
         "Value": "string"
      }
   ]
}
```

## Response Elements
<a name="API_DescribeTags_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [ResourceId](#API_DescribeTags_ResponseSyntax) **   <a name="amazonml-DescribeTags-response-ResourceId"></a>
The ID of the tagged ML object.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

 ** [ResourceType](#API_DescribeTags_ResponseSyntax) **   <a name="amazonml-DescribeTags-response-ResourceType"></a>
The type of the tagged ML object.  
Type: String  
Valid Values: `BatchPrediction | DataSource | Evaluation | MLModel` 

 ** [Tags](#API_DescribeTags_ResponseSyntax) **   <a name="amazonml-DescribeTags-response-Tags"></a>
A list of tags associated with the ML object.  
Type: Array of [Tag](API_Tag.md) objects  
Array Members: Maximum number of 100 items.

## Errors
<a name="API_DescribeTags_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
A specified resource cannot be located.  
HTTP Status Code: 400

## Examples
<a name="API_DescribeTags_Examples"></a>

### The following are an example request and response for the DescribeTags operation.
<a name="API_DescribeTags_Example_1"></a>

This example illustrates one usage of DescribeTags.

#### Sample Request
<a name="API_DescribeTags_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.DescribeTags
{
  "ResourceId": "exampleModelId", 
  "ResourceType": "MLModel"
}
```

#### Sample Response
<a name="API_DescribeTags_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
  "ResourceId": "exampleModelId", 
  "ResourceType": "MLModel", 
  "Tags": {
      "Key":"exampleKey",
	  "Value":"exampleKeyValue"
  }
}
```

## See Also
<a name="API_DescribeTags_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/DescribeTags) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/DescribeTags) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/DescribeTags) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/DescribeTags) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/DescribeTags) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/DescribeTags) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/DescribeTags) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/DescribeTags) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/DescribeTags) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/DescribeTags) 

# GetBatchPrediction
<a name="API_GetBatchPrediction"></a>

Returns a `BatchPrediction` that includes detailed metadata, status, and data file information for a `Batch Prediction` request.

## Request Syntax
<a name="API_GetBatchPrediction_RequestSyntax"></a>

```
{
   "BatchPredictionId": "string"
}
```

## Request Parameters
<a name="API_GetBatchPrediction_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [BatchPredictionId](#API_GetBatchPrediction_RequestSyntax) **   <a name="amazonml-GetBatchPrediction-request-BatchPredictionId"></a>
An ID assigned to the `BatchPrediction` at creation.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

## Response Syntax
<a name="API_GetBatchPrediction_ResponseSyntax"></a>

```
{
   "BatchPredictionDataSourceId": "string",
   "BatchPredictionId": "string",
   "ComputeTime": number,
   "CreatedAt": number,
   "CreatedByIamUser": "string",
   "FinishedAt": number,
   "InputDataLocationS3": "string",
   "InvalidRecordCount": number,
   "LastUpdatedAt": number,
   "LogUri": "string",
   "Message": "string",
   "MLModelId": "string",
   "Name": "string",
   "OutputUri": "string",
   "StartedAt": number,
   "Status": "string",
   "TotalRecordCount": number
}
```

## Response Elements
<a name="API_GetBatchPrediction_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [BatchPredictionDataSourceId](#API_GetBatchPrediction_ResponseSyntax) **   <a name="amazonml-GetBatchPrediction-response-BatchPredictionDataSourceId"></a>
The ID of the `DataSource` that was used to create the `BatchPrediction`.   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

 ** [BatchPredictionId](#API_GetBatchPrediction_ResponseSyntax) **   <a name="amazonml-GetBatchPrediction-response-BatchPredictionId"></a>
An ID assigned to the `BatchPrediction` at creation. This value should be identical to the value of the `BatchPredictionID` in the request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

 ** [ComputeTime](#API_GetBatchPrediction_ResponseSyntax) **   <a name="amazonml-GetBatchPrediction-response-ComputeTime"></a>
The approximate CPU time in milliseconds that Amazon Machine Learning spent processing the `BatchPrediction`, normalized and scaled on computation resources. `ComputeTime` is only available if the `BatchPrediction` is in the `COMPLETED` state.  
Type: Long

 ** [CreatedAt](#API_GetBatchPrediction_ResponseSyntax) **   <a name="amazonml-GetBatchPrediction-response-CreatedAt"></a>
The time when the `BatchPrediction` was created. The time is expressed in epoch time.  
Type: Timestamp

 ** [CreatedByIamUser](#API_GetBatchPrediction_ResponseSyntax) **   <a name="amazonml-GetBatchPrediction-response-CreatedByIamUser"></a>
The AWS user account that invoked the `BatchPrediction`. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.  
Type: String  
Pattern: `arn:aws:iam::[0-9]+:((user/.+)|(root))` 

 ** [FinishedAt](#API_GetBatchPrediction_ResponseSyntax) **   <a name="amazonml-GetBatchPrediction-response-FinishedAt"></a>
The epoch time when Amazon Machine Learning marked the `BatchPrediction` as `COMPLETED` or `FAILED`. `FinishedAt` is only available when the `BatchPrediction` is in the `COMPLETED` or `FAILED` state.  
Type: Timestamp

 ** [InputDataLocationS3](#API_GetBatchPrediction_ResponseSyntax) **   <a name="amazonml-GetBatchPrediction-response-InputDataLocationS3"></a>
The location of the data file or directory in Amazon Simple Storage Service (Amazon S3).  
Type: String  
Length Constraints: Maximum length of 2048.  
Pattern: `s3://([^/]+)(/.*)?` 

 ** [InvalidRecordCount](#API_GetBatchPrediction_ResponseSyntax) **   <a name="amazonml-GetBatchPrediction-response-InvalidRecordCount"></a>
The number of invalid records that Amazon Machine Learning saw while processing the `BatchPrediction`.  
Type: Long

 ** [LastUpdatedAt](#API_GetBatchPrediction_ResponseSyntax) **   <a name="amazonml-GetBatchPrediction-response-LastUpdatedAt"></a>
The time of the most recent edit to `BatchPrediction`. The time is expressed in epoch time.  
Type: Timestamp

 ** [LogUri](#API_GetBatchPrediction_ResponseSyntax) **   <a name="amazonml-GetBatchPrediction-response-LogUri"></a>
A link to the file that contains logs of the `CreateBatchPrediction` operation.  
Type: String

 ** [Message](#API_GetBatchPrediction_ResponseSyntax) **   <a name="amazonml-GetBatchPrediction-response-Message"></a>
A description of the most recent details about processing the batch prediction request.  
Type: String  
Length Constraints: Maximum length of 10240.

 ** [MLModelId](#API_GetBatchPrediction_ResponseSyntax) **   <a name="amazonml-GetBatchPrediction-response-MLModelId"></a>
The ID of the `MLModel` that generated predictions for the `BatchPrediction` request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

 ** [Name](#API_GetBatchPrediction_ResponseSyntax) **   <a name="amazonml-GetBatchPrediction-response-Name"></a>
A user-supplied name or description of the `BatchPrediction`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$` 

 ** [OutputUri](#API_GetBatchPrediction_ResponseSyntax) **   <a name="amazonml-GetBatchPrediction-response-OutputUri"></a>
The location of an Amazon S3 bucket or directory to receive the operation results.  
Type: String  
Length Constraints: Maximum length of 2048.  
Pattern: `s3://([^/]+)(/.*)?` 

 ** [StartedAt](#API_GetBatchPrediction_ResponseSyntax) **   <a name="amazonml-GetBatchPrediction-response-StartedAt"></a>
The epoch time when Amazon Machine Learning marked the `BatchPrediction` as `INPROGRESS`. `StartedAt` isn't available if the `BatchPrediction` is in the `PENDING` state.  
Type: Timestamp

 ** [Status](#API_GetBatchPrediction_ResponseSyntax) **   <a name="amazonml-GetBatchPrediction-response-Status"></a>
The status of the `BatchPrediction`, which can be one of the following values:  
+  `PENDING` - Amazon Machine Learning (Amazon ML) submitted a request to generate batch predictions.
+  `INPROGRESS` - The batch predictions are in progress.
+  `FAILED` - The request to perform a batch prediction did not run to completion. It is not usable.
+  `COMPLETED` - The batch prediction process completed successfully.
+  `DELETED` - The `BatchPrediction` is marked as deleted. It is not usable.
Type: String  
Valid Values: `PENDING | INPROGRESS | FAILED | COMPLETED | DELETED` 

 ** [TotalRecordCount](#API_GetBatchPrediction_ResponseSyntax) **   <a name="amazonml-GetBatchPrediction-response-TotalRecordCount"></a>
The number of total records that Amazon Machine Learning saw while processing the `BatchPrediction`.  
Type: Long

## Errors
<a name="API_GetBatchPrediction_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
A specified resource cannot be located.  
HTTP Status Code: 400

## Examples
<a name="API_GetBatchPrediction_Examples"></a>

### The following is a sample request and response of the GetBatchPrediction operation.
<a name="API_GetBatchPrediction_Example_1"></a>

This example illustrates one usage of GetBatchPrediction.

#### Sample Request
<a name="API_GetBatchPrediction_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.GetBatchPrediction
{"BatchPredictionId": "EXAMPLE-bp-2014-09-12-15-14-04-156"}
```

#### Sample Response
<a name="API_GetBatchPrediction_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
  "BatchPredictionDataSourceId":"EXAMPLE-tr-ds-2014-09-12-15-14-04-989",
  "BatchPredictionId":"EXAMPLE-bp-2014-09-12-15-14-04-156",
  "CreatedAt":1410560632.327,
  "CreatedByIamUser":"arn:aws:iam::<awsAccountId>:user/user",
  "InputDataLocationS3": "s3://eml-test-EXAMPLE/example.csv", 
  "LastUpdatedAt":1410560632.327,
  "LogUri": "https://s3bucket/locationToLogs/logname.tar.gz",
  "Name":"EXAMPLE",
  "OutputUri":"s3://eml-test-EXAMPLE/test-outputs/EXAMPLE-bp-2014-09-12-15-14-04-156/results",
  "MLModelId":"EXAMPLE-pr-2014-09-12-15-14-04-924",
  "Status":"COMPLETED",
  "ComputeTime":"185200",
  "FinishedAt":1410560632.327,
  "StartedAt":1410560632.327,
  "TotalRecordCount":"21154",
  "InvalidRecordCount":"0"
}
```

## See Also
<a name="API_GetBatchPrediction_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/GetBatchPrediction) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/GetBatchPrediction) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/GetBatchPrediction) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/GetBatchPrediction) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/GetBatchPrediction) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/GetBatchPrediction) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/GetBatchPrediction) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/GetBatchPrediction) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/GetBatchPrediction) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/GetBatchPrediction) 

# GetDataSource
<a name="API_GetDataSource"></a>

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.

## Request Syntax
<a name="API_GetDataSource_RequestSyntax"></a>

```
{
   "DataSourceId": "string",
   "Verbose": boolean
}
```

## Request Parameters
<a name="API_GetDataSource_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [DataSourceId](#API_GetDataSource_RequestSyntax) **   <a name="amazonml-GetDataSource-request-DataSourceId"></a>
The ID assigned to the `DataSource` at creation.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

 ** [Verbose](#API_GetDataSource_RequestSyntax) **   <a name="amazonml-GetDataSource-request-Verbose"></a>
Specifies whether the `GetDataSource` operation should return `DataSourceSchema`.  
If true, `DataSourceSchema` is returned.  
If false, `DataSourceSchema` is not returned.  
Type: Boolean  
Required: No

## Response Syntax
<a name="API_GetDataSource_ResponseSyntax"></a>

```
{
   "ComputeStatistics": boolean,
   "ComputeTime": number,
   "CreatedAt": number,
   "CreatedByIamUser": "string",
   "DataLocationS3": "string",
   "DataRearrangement": "string",
   "DataSizeInBytes": number,
   "DataSourceId": "string",
   "DataSourceSchema": "string",
   "FinishedAt": number,
   "LastUpdatedAt": number,
   "LogUri": "string",
   "Message": "string",
   "Name": "string",
   "NumberOfFiles": number,
   "RDSMetadata": { 
      "Database": { 
         "DatabaseName": "string",
         "InstanceIdentifier": "string"
      },
      "DatabaseUserName": "string",
      "DataPipelineId": "string",
      "ResourceRole": "string",
      "SelectSqlQuery": "string",
      "ServiceRole": "string"
   },
   "RedshiftMetadata": { 
      "DatabaseUserName": "string",
      "RedshiftDatabase": { 
         "ClusterIdentifier": "string",
         "DatabaseName": "string"
      },
      "SelectSqlQuery": "string"
   },
   "RoleARN": "string",
   "StartedAt": number,
   "Status": "string"
}
```

## Response Elements
<a name="API_GetDataSource_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [ComputeStatistics](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-ComputeStatistics"></a>
 The parameter is `true` if statistics need to be generated from the observation data.   
Type: Boolean

 ** [ComputeTime](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-ComputeTime"></a>
The approximate CPU time in milliseconds that Amazon Machine Learning spent processing the `DataSource`, normalized and scaled on computation resources. `ComputeTime` is only available if the `DataSource` is in the `COMPLETED` state and the `ComputeStatistics` is set to true.  
Type: Long

 ** [CreatedAt](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-CreatedAt"></a>
The time that the `DataSource` was created. The time is expressed in epoch time.  
Type: Timestamp

 ** [CreatedByIamUser](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-CreatedByIamUser"></a>
The AWS user account from which the `DataSource` was created. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.  
Type: String  
Pattern: `arn:aws:iam::[0-9]+:((user/.+)|(root))` 

 ** [DataLocationS3](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-DataLocationS3"></a>
The location of the data file or directory in Amazon Simple Storage Service (Amazon S3).  
Type: String  
Length Constraints: Maximum length of 2048.  
Pattern: `s3://([^/]+)(/.*)?` 

 ** [DataRearrangement](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-DataRearrangement"></a>
A JSON string that represents the splitting and rearrangement requirement used when this `DataSource` was created.  
Type: String

 ** [DataSizeInBytes](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-DataSizeInBytes"></a>
The total size of observations in the data files.  
Type: Long

 ** [DataSourceId](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-DataSourceId"></a>
The ID assigned to the `DataSource` at creation. This value should be identical to the value of the `DataSourceId` in the request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

 ** [DataSourceSchema](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-DataSourceSchema"></a>
The schema used by all of the data files of this `DataSource`.  
 **Note:** This parameter is provided as part of the verbose format.  
Type: String  
Length Constraints: Maximum length of 131071.

 ** [FinishedAt](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-FinishedAt"></a>
The epoch time when Amazon Machine Learning marked the `DataSource` as `COMPLETED` or `FAILED`. `FinishedAt` is only available when the `DataSource` is in the `COMPLETED` or `FAILED` state.  
Type: Timestamp

 ** [LastUpdatedAt](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-LastUpdatedAt"></a>
The time of the most recent edit to the `DataSource`. The time is expressed in epoch time.  
Type: Timestamp

 ** [LogUri](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-LogUri"></a>
A link to the file containing logs of `CreateDataSourceFrom*` operations.  
Type: String

 ** [Message](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-Message"></a>
The user-supplied description of the most recent details about creating the `DataSource`.  
Type: String  
Length Constraints: Maximum length of 10240.

 ** [Name](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-Name"></a>
A user-supplied name or description of the `DataSource`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$` 

 ** [NumberOfFiles](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-NumberOfFiles"></a>
The number of data files referenced by the `DataSource`.  
Type: Long

 ** [RDSMetadata](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-RDSMetadata"></a>
The datasource details that are specific to Amazon RDS.  
Type: [RDSMetadata](API_RDSMetadata.md) object

 ** [RedshiftMetadata](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-RedshiftMetadata"></a>
Describes the `DataSource` details specific to Amazon Redshift.  
Type: [RedshiftMetadata](API_RedshiftMetadata.md) object

 ** [RoleARN](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-RoleARN"></a>
The Amazon Resource Name (ARN) of an [AWS IAM Role](https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html#roles-about-termsandconcepts), such as the following: arn:aws:iam::account:role/rolename.   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 110.

 ** [StartedAt](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-StartedAt"></a>
The epoch time when Amazon Machine Learning marked the `DataSource` as `INPROGRESS`. `StartedAt` isn't available if the `DataSource` is in the `PENDING` state.  
Type: Timestamp

 ** [Status](#API_GetDataSource_ResponseSyntax) **   <a name="amazonml-GetDataSource-response-Status"></a>
The current status of the `DataSource`. This element can have one of the following values:  
+  `PENDING` - Amazon ML submitted a request to create a `DataSource`.
+  `INPROGRESS` - The creation process is underway.
+  `FAILED` - The request to create a `DataSource` did not run to completion. It is not usable.
+  `COMPLETED` - The creation process completed successfully.
+  `DELETED` - The `DataSource` is marked as deleted. It is not usable.
Type: String  
Valid Values: `PENDING | INPROGRESS | FAILED | COMPLETED | DELETED` 

## Errors
<a name="API_GetDataSource_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
A specified resource cannot be located.  
HTTP Status Code: 400

## Examples
<a name="API_GetDataSource_Examples"></a>

### The following is a sample request and response of the GetDataSource operation.
<a name="API_GetDataSource_Example_1"></a>

This example illustrates one usage of GetDataSource.

#### Sample Request
<a name="API_GetDataSource_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.GetDataSource
{"DataSourceId": "17SdAv6WC6r5vACAxF7U", "Verbose": true}
```

#### Sample Response
<a name="API_GetDataSource_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
  {
    "CreatedAt":141045168.275,
    "CreatedByIamUser":"arn:aws:iam::<awsAccountId>:user/testuser",
    "DataLocationS3":"s3://eml-test-EXAMPLE /data.csv",
    "DataRearrangement": "{\"splitting\":{\"percentBegin\":10,\"percentEnd\":60}}", 
    "DataSizeInBytes":0,"DataSourceId":"17SdAv6WC6r5vACAxF7U",
    "DataSourceSchema":"
    {
      \"version\":\"1.0\",
      \"recordAnnotationFieldName\":null,
      \"recordWeightFieldName\":\"weight\",
      \"targetFieldName\":\"label\",
      \"dataFormat\":\"CSV\",
      \"dataFileContainsHeader\":false,
      \"attributes\":
      [
        {\"attributeName\":\"obsId\",\"attributeType\":\"NUMERIC\"},
        {\"attributeName\":\"label\",\"attributeType\":\"BINARY\"},
        {\"attributeName\":\"weight\",\"attributeType\":\"NUMERIC\"},
        {\"attributeName\":\"x\",\"attributeType\":\"TEXT\"}
      ],
      \"excludedAttributeNames\":[]
    }",
    "DataStatisticsStatus":"COMPLETED",
    "LastUpdatedAt":141045168.275,
    "LogUri": "https://s3bucket/locationToLogs/logname.tar.gz",    
    "Name":"EXAMPLE",
    "Status":"COMPLETED",
    "ComputeTime":"185200",
    "FinishedAt":141045168.275,
    "StartedAt":141045168.275
  }
}
```

## See Also
<a name="API_GetDataSource_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/GetDataSource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/GetDataSource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/GetDataSource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/GetDataSource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/GetDataSource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/GetDataSource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/GetDataSource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/GetDataSource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/GetDataSource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/GetDataSource) 

# GetEvaluation
<a name="API_GetEvaluation"></a>

Returns an `Evaluation` that includes metadata as well as the current status of the `Evaluation`.

## Request Syntax
<a name="API_GetEvaluation_RequestSyntax"></a>

```
{
   "EvaluationId": "string"
}
```

## Request Parameters
<a name="API_GetEvaluation_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [EvaluationId](#API_GetEvaluation_RequestSyntax) **   <a name="amazonml-GetEvaluation-request-EvaluationId"></a>
The ID of the `Evaluation` to retrieve. The evaluation of each `MLModel` is recorded and cataloged. The ID provides the means to access the information.   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

## Response Syntax
<a name="API_GetEvaluation_ResponseSyntax"></a>

```
{
   "ComputeTime": number,
   "CreatedAt": number,
   "CreatedByIamUser": "string",
   "EvaluationDataSourceId": "string",
   "EvaluationId": "string",
   "FinishedAt": number,
   "InputDataLocationS3": "string",
   "LastUpdatedAt": number,
   "LogUri": "string",
   "Message": "string",
   "MLModelId": "string",
   "Name": "string",
   "PerformanceMetrics": { 
      "Properties": { 
         "string" : "string" 
      }
   },
   "StartedAt": number,
   "Status": "string"
}
```

## Response Elements
<a name="API_GetEvaluation_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [ComputeTime](#API_GetEvaluation_ResponseSyntax) **   <a name="amazonml-GetEvaluation-response-ComputeTime"></a>
The approximate CPU time in milliseconds that Amazon Machine Learning spent processing the `Evaluation`, normalized and scaled on computation resources. `ComputeTime` is only available if the `Evaluation` is in the `COMPLETED` state.  
Type: Long

 ** [CreatedAt](#API_GetEvaluation_ResponseSyntax) **   <a name="amazonml-GetEvaluation-response-CreatedAt"></a>
The time that the `Evaluation` was created. The time is expressed in epoch time.  
Type: Timestamp

 ** [CreatedByIamUser](#API_GetEvaluation_ResponseSyntax) **   <a name="amazonml-GetEvaluation-response-CreatedByIamUser"></a>
The AWS user account that invoked the evaluation. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.  
Type: String  
Pattern: `arn:aws:iam::[0-9]+:((user/.+)|(root))` 

 ** [EvaluationDataSourceId](#API_GetEvaluation_ResponseSyntax) **   <a name="amazonml-GetEvaluation-response-EvaluationDataSourceId"></a>
The `DataSource` used for this evaluation.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

 ** [EvaluationId](#API_GetEvaluation_ResponseSyntax) **   <a name="amazonml-GetEvaluation-response-EvaluationId"></a>
The evaluation ID which is same as the `EvaluationId` in the request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

 ** [FinishedAt](#API_GetEvaluation_ResponseSyntax) **   <a name="amazonml-GetEvaluation-response-FinishedAt"></a>
The epoch time when Amazon Machine Learning marked the `Evaluation` as `COMPLETED` or `FAILED`. `FinishedAt` is only available when the `Evaluation` is in the `COMPLETED` or `FAILED` state.  
Type: Timestamp

 ** [InputDataLocationS3](#API_GetEvaluation_ResponseSyntax) **   <a name="amazonml-GetEvaluation-response-InputDataLocationS3"></a>
The location of the data file or directory in Amazon Simple Storage Service (Amazon S3).  
Type: String  
Length Constraints: Maximum length of 2048.  
Pattern: `s3://([^/]+)(/.*)?` 

 ** [LastUpdatedAt](#API_GetEvaluation_ResponseSyntax) **   <a name="amazonml-GetEvaluation-response-LastUpdatedAt"></a>
The time of the most recent edit to the `Evaluation`. The time is expressed in epoch time.  
Type: Timestamp

 ** [LogUri](#API_GetEvaluation_ResponseSyntax) **   <a name="amazonml-GetEvaluation-response-LogUri"></a>
A link to the file that contains logs of the `CreateEvaluation` operation.  
Type: String

 ** [Message](#API_GetEvaluation_ResponseSyntax) **   <a name="amazonml-GetEvaluation-response-Message"></a>
A description of the most recent details about evaluating the `MLModel`.  
Type: String  
Length Constraints: Maximum length of 10240.

 ** [MLModelId](#API_GetEvaluation_ResponseSyntax) **   <a name="amazonml-GetEvaluation-response-MLModelId"></a>
The ID of the `MLModel` that was the focus of the evaluation.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

 ** [Name](#API_GetEvaluation_ResponseSyntax) **   <a name="amazonml-GetEvaluation-response-Name"></a>
A user-supplied name or description of the `Evaluation`.   
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$` 

 ** [PerformanceMetrics](#API_GetEvaluation_ResponseSyntax) **   <a name="amazonml-GetEvaluation-response-PerformanceMetrics"></a>
Measurements of how well the `MLModel` performed using observations referenced by the `DataSource`. One of the following metric is returned based on the type of the `MLModel`:   
+ BinaryAUC: A binary `MLModel` uses the Area Under the Curve (AUC) technique to measure performance. 
+ RegressionRMSE: A regression `MLModel` uses the Root Mean Square Error (RMSE) technique to measure performance. RMSE measures the difference between predicted and actual values for a single variable.
+ MulticlassAvgFScore: A multiclass `MLModel` uses the F1 score technique to measure performance. 
 For more information about performance metrics, please see the [Amazon Machine Learning Developer Guide](https://docs.aws.amazon.com/machine-learning/latest/dg).   
Type: [PerformanceMetrics](API_PerformanceMetrics.md) object

 ** [StartedAt](#API_GetEvaluation_ResponseSyntax) **   <a name="amazonml-GetEvaluation-response-StartedAt"></a>
The epoch time when Amazon Machine Learning marked the `Evaluation` as `INPROGRESS`. `StartedAt` isn't available if the `Evaluation` is in the `PENDING` state.  
Type: Timestamp

 ** [Status](#API_GetEvaluation_ResponseSyntax) **   <a name="amazonml-GetEvaluation-response-Status"></a>
The status of the evaluation. This element can have one of the following values:  
+  `PENDING` - Amazon Machine Language (Amazon ML) submitted a request to evaluate an `MLModel`.
+  `INPROGRESS` - The evaluation is underway.
+  `FAILED` - The request to evaluate an `MLModel` did not run to completion. It is not usable.
+  `COMPLETED` - The evaluation process completed successfully.
+  `DELETED` - The `Evaluation` is marked as deleted. It is not usable.
Type: String  
Valid Values: `PENDING | INPROGRESS | FAILED | COMPLETED | DELETED` 

## Errors
<a name="API_GetEvaluation_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
A specified resource cannot be located.  
HTTP Status Code: 400

## Examples
<a name="API_GetEvaluation_Examples"></a>

### The following is a sample request and response of the GetEvaluation operation.
<a name="API_GetEvaluation_Example_1"></a>

This example illustrates one usage of GetEvaluation.

#### Sample Request
<a name="API_GetEvaluation_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.GetEvaluation
{"EvaluationId": "ev-2014-09-12-15-14-04-924"}
```

#### Sample Response
<a name="API_GetEvaluation_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
  "CreatedAt":1410560805.669,
  "CreatedByIamUser":"arn:aws:iam::<awsAccountId>:user/user",
  "EvaluationDataSourceId":"EXAMPLE-ev-ds-2014-09-12-15-14-04-411",
  "EvaluationId":"ev-2014-09-12-15-14-04-924",
  "InputDataLocationS3": "s3://eml-test-EXAMPLE/example.csv", 
  "LastUpdatedAt":1410560805.669,
  "LogUri": "https://s3bucket/locationToLogs/logname.tar.gz",
  "Name":"EXAMPLE",
  "PerformanceMetrics":{"Properties":{}},
  "MLModelId":"EXAMPLE-pr-2014-09-12-15-14-04-924",
  "Status":"COMPLETED",
  "ComputeTime":"185200",
  "FinishedAt":1410560805.669,
  "StartedAt":1410560805.669
}
```

## See Also
<a name="API_GetEvaluation_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/GetEvaluation) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/GetEvaluation) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/GetEvaluation) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/GetEvaluation) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/GetEvaluation) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/GetEvaluation) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/GetEvaluation) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/GetEvaluation) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/GetEvaluation) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/GetEvaluation) 

# GetMLModel
<a name="API_GetMLModel"></a>

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. 

## Request Syntax
<a name="API_GetMLModel_RequestSyntax"></a>

```
{
   "MLModelId": "string",
   "Verbose": boolean
}
```

## Request Parameters
<a name="API_GetMLModel_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [MLModelId](#API_GetMLModel_RequestSyntax) **   <a name="amazonml-GetMLModel-request-MLModelId"></a>
The ID assigned to the `MLModel` at creation.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

 ** [Verbose](#API_GetMLModel_RequestSyntax) **   <a name="amazonml-GetMLModel-request-Verbose"></a>
Specifies whether the `GetMLModel` operation should return `Recipe`.  
If true, `Recipe` is returned.  
If false, `Recipe` is not returned.  
Type: Boolean  
Required: No

## Response Syntax
<a name="API_GetMLModel_ResponseSyntax"></a>

```
{
   "ComputeTime": number,
   "CreatedAt": number,
   "CreatedByIamUser": "string",
   "EndpointInfo": { 
      "CreatedAt": number,
      "EndpointStatus": "string",
      "EndpointUrl": "string",
      "PeakRequestsPerSecond": number
   },
   "FinishedAt": number,
   "InputDataLocationS3": "string",
   "LastUpdatedAt": number,
   "LogUri": "string",
   "Message": "string",
   "MLModelId": "string",
   "MLModelType": "string",
   "Name": "string",
   "Recipe": "string",
   "Schema": "string",
   "ScoreThreshold": number,
   "ScoreThresholdLastUpdatedAt": number,
   "SizeInBytes": number,
   "StartedAt": number,
   "Status": "string",
   "TrainingDataSourceId": "string",
   "TrainingParameters": { 
      "string" : "string" 
   }
}
```

## Response Elements
<a name="API_GetMLModel_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [ComputeTime](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-ComputeTime"></a>
The approximate CPU time in milliseconds that Amazon Machine Learning spent processing the `MLModel`, normalized and scaled on computation resources. `ComputeTime` is only available if the `MLModel` is in the `COMPLETED` state.  
Type: Long

 ** [CreatedAt](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-CreatedAt"></a>
The time that the `MLModel` was created. The time is expressed in epoch time.  
Type: Timestamp

 ** [CreatedByIamUser](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-CreatedByIamUser"></a>
The AWS user account from which the `MLModel` was created. The account type can be either an AWS root account or an AWS Identity and Access Management (IAM) user account.  
Type: String  
Pattern: `arn:aws:iam::[0-9]+:((user/.+)|(root))` 

 ** [EndpointInfo](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-EndpointInfo"></a>
The current endpoint of the `MLModel`   
Type: [RealtimeEndpointInfo](API_RealtimeEndpointInfo.md) object

 ** [FinishedAt](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-FinishedAt"></a>
The epoch time when Amazon Machine Learning marked the `MLModel` as `COMPLETED` or `FAILED`. `FinishedAt` is only available when the `MLModel` is in the `COMPLETED` or `FAILED` state.  
Type: Timestamp

 ** [InputDataLocationS3](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-InputDataLocationS3"></a>
The location of the data file or directory in Amazon Simple Storage Service (Amazon S3).  
Type: String  
Length Constraints: Maximum length of 2048.  
Pattern: `s3://([^/]+)(/.*)?` 

 ** [LastUpdatedAt](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-LastUpdatedAt"></a>
The time of the most recent edit to the `MLModel`. The time is expressed in epoch time.  
Type: Timestamp

 ** [LogUri](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-LogUri"></a>
A link to the file that contains logs of the `CreateMLModel` operation.  
Type: String

 ** [Message](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-Message"></a>
A description of the most recent details about accessing the `MLModel`.  
Type: String  
Length Constraints: Maximum length of 10240.

 ** [MLModelId](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-MLModelId"></a>
The MLModel ID, which is same as the `MLModelId` in the request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

 ** [MLModelType](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-MLModelType"></a>
Identifies the `MLModel` category. The following are the available types:   
+ REGRESSION -- Produces a numeric result. For example, "What price should a house be listed at?"
+ BINARY -- Produces one of two possible results. For example, "Is this an e-commerce website?"
+ MULTICLASS -- Produces one of several possible results. For example, "Is this a HIGH, LOW or MEDIUM risk trade?"
Type: String  
Valid Values: `REGRESSION | BINARY | MULTICLASS` 

 ** [Name](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-Name"></a>
A user-supplied name or description of the `MLModel`.  
Type: String  
Length Constraints: Maximum length of 1024.

 ** [Recipe](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-Recipe"></a>
The recipe to use when training the `MLModel`. The `Recipe` provides detailed information about the observation data to use during training, and manipulations to perform on the observation data during training.  
 **Note:** This parameter is provided as part of the verbose format.  
Type: String  
Length Constraints: Maximum length of 131071.

 ** [Schema](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-Schema"></a>
The schema used by all of the data files referenced by the `DataSource`.  
 **Note:** This parameter is provided as part of the verbose format.  
Type: String  
Length Constraints: Maximum length of 131071.

 ** [ScoreThreshold](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-ScoreThreshold"></a>
The scoring threshold is used in binary classification `MLModel` models. It marks the boundary between a positive prediction and a negative prediction.  
Output values greater than or equal to the threshold receive a positive result from the MLModel, such as `true`. Output values less than the threshold receive a negative response from the MLModel, such as `false`.  
Type: Float

 ** [ScoreThresholdLastUpdatedAt](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-ScoreThresholdLastUpdatedAt"></a>
The time of the most recent edit to the `ScoreThreshold`. The time is expressed in epoch time.  
Type: Timestamp

 ** [SizeInBytes](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-SizeInBytes"></a>
Long integer type that is a 64-bit signed number.  
Type: Long

 ** [StartedAt](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-StartedAt"></a>
The epoch time when Amazon Machine Learning marked the `MLModel` as `INPROGRESS`. `StartedAt` isn't available if the `MLModel` is in the `PENDING` state.  
Type: Timestamp

 ** [Status](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-Status"></a>
The current status of the `MLModel`. This element can have one of the following values:  
+  `PENDING` - Amazon Machine Learning (Amazon ML) submitted a request to describe a `MLModel`.
+  `INPROGRESS` - The request is processing.
+  `FAILED` - The request did not run to completion. The ML model isn't usable.
+  `COMPLETED` - The request completed successfully.
+  `DELETED` - The `MLModel` is marked as deleted. It isn't usable.
Type: String  
Valid Values: `PENDING | INPROGRESS | FAILED | COMPLETED | DELETED` 

 ** [TrainingDataSourceId](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-TrainingDataSourceId"></a>
The ID of the training `DataSource`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

 ** [TrainingParameters](#API_GetMLModel_ResponseSyntax) **   <a name="amazonml-GetMLModel-response-TrainingParameters"></a>
A list of the training parameters in the `MLModel`. The list is implemented as a map of key-value pairs.  
The following is the current set of training parameters:  
+  `sgd.maxMLModelSizeInBytes` - The maximum allowed size of the model. Depending on the input data, the size of the model might affect its performance.

   The value is an integer that ranges from `100000` to `2147483648`. The default value is `33554432`.
+  `sgd.maxPasses` - The number of times that the training process traverses the observations to build the `MLModel`. The value is an integer that ranges from `1` to `100`. The default value is `10`.
+  `sgd.shuffleType` - Whether Amazon ML shuffles the training data. Shuffling data improves a model's ability to find the optimal solution for a variety of data types. The valid values are `auto` and `none`. The default value is `none`. We strongly recommend that you shuffle your data.
+  `sgd.l1RegularizationAmount` - The coefficient regularization L1 norm. It controls overfitting the data by penalizing large coefficients. This tends to drive coefficients to zero, resulting in a sparse feature set. If you use this parameter, start by specifying a small value, such as `1.0E-08`.

  The value is a double that ranges from `0` to `MAX_DOUBLE`. The default is to not use L1 normalization. This parameter can't be used when `L2` is specified. Use this parameter sparingly.
+  `sgd.l2RegularizationAmount` - The coefficient regularization L2 norm. It controls overfitting the data by penalizing large coefficients. This tends to drive coefficients to small, nonzero values. If you use this parameter, start by specifying a small value, such as `1.0E-08`.

  The value is a double that ranges from `0` to `MAX_DOUBLE`. The default is to not use L2 normalization. This parameter can't be used when `L1` is specified. Use this parameter sparingly.
Type: String to string map

## Errors
<a name="API_GetMLModel_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
A specified resource cannot be located.  
HTTP Status Code: 400

## Examples
<a name="API_GetMLModel_Examples"></a>

### The following is a sample request and response of the GetMLModel operation.
<a name="API_GetMLModel_Example_1"></a>

This example illustrates one usage of GetMLModel.

#### Sample Request
<a name="API_GetMLModel_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.GetMLModel
{"MLModelId": "EXAMPLE-pr-2014-09-12-15-14-04-924", "Verbose": true}
```

#### Sample Response
<a name="API_GetMLModel_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{
  "CreatedAt":1410560408.264,
  "CreatedByIamUser":"arn:aws:iam::<awsAccountId>:user/user",
  "HasCalibration":false,
  "LastUpdatedAt":1410560416.338,
  "LogUri": "https://s3bucket/locationToLogs/logname.tar.gz",
  "Name":"Name-ml-model",
  "Algorithm": "sgd",
  "MLModelId":"ml-model",
  "EndpointInfo": {
    "CreatedAt": 1424378682.266, 
   "EndpointStatus": "READY", 
   "EndpointUrl": "<realtime endpoint from Amazon Machine Learning for ml-model>", 
   "PeakRequestsPerSecond": 200}
  "MLModelType":"BINARY",
  "Recipe":"{
    \"groups\": {},
    \n\"assignments\": {},
    \n\"dependencies\": {},
    \n\"outputs\": [\n    \"'x'\"\n]
  }\n",
  "Schema": "{
  \"version\":\"1.0\",
  \"rowId\":null,
  \"rowWeight\":null,
  \"targetAttributeName\":\"y\",
  \"dataFormat\":\"CSV\",
  \"dataFileContainsHeader\":false,
  \"attributes\":[{\"attributeName\":\"age\",
  \"attributeType\":\"NUMERIC\"},
  {\"attributeName\":\"job\",
  \"attributeType\":\"CATEGORICAL\"},
  {\"attributeName\":\"contact\",
  \"attributeType\":\"CATEGORICAL\"},
  {\"attributeName\":\"month\",
  \"attributeType\":\"CATEGORICAL\"},
  {\"attributeName\":\"day_of_week\",
  \"attributeType\":\"CATEGORICAL\"},
  {\"attributeName\":\"duration\",
  \"attributeType\":\"NUMERIC\"},
  {\"attributeName\":\"poutcome\",
  \"attributeType\":\"CATEGORICAL\"},
  {\"attributeName\":\"nr_employed\",
  \"attributeType\":\"NUMERIC\"},
  {\"attributeName\":\"y\",
  \"attributeType\":\"BINARY\"}],
  \"excludedAttributeNames\":[]}"
  "SizeInBytes": 400374, 
  "Status":"COMPLETED",
  "ComputeTime":"185200",
  "FinishedAt":1410560416.338,
  "StartedAt":1410560409.264,
  "TrainingDataSourceId":"EXAMPLE-tr-ds-2014-09-12-15-14-04-989",
  "TrainingParameters":{
      "algorithm":"sgd",
      "sgd.l1":"0.0",
      "sgd.l2":"0.0",
      "sgd.likelihood":"logreg",
      "sgd.passes":"1"
  }
}
```

## See Also
<a name="API_GetMLModel_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/GetMLModel) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/GetMLModel) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/GetMLModel) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/GetMLModel) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/GetMLModel) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/GetMLModel) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/GetMLModel) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/GetMLModel) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/GetMLModel) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/GetMLModel) 

# Predict
<a name="API_Predict"></a>

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.

## Request Syntax
<a name="API_Predict_RequestSyntax"></a>

```
{
   "MLModelId": "string",
   "PredictEndpoint": "string",
   "Record": { 
      "string" : "string" 
   }
}
```

## Request Parameters
<a name="API_Predict_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [MLModelId](#API_Predict_RequestSyntax) **   <a name="amazonml-Predict-request-MLModelId"></a>
A unique identifier of the `MLModel`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

 ** [PredictEndpoint](#API_Predict_RequestSyntax) **   <a name="amazonml-Predict-request-PredictEndpoint"></a>
The predicted endpoint for the input.  
Type: String  
Required: Yes

 ** [Record](#API_Predict_RequestSyntax) **   <a name="amazonml-Predict-request-Record"></a>
A map of variable name-value pairs that represent an observation.  
Type: String to string map  
Required: Yes

## Response Syntax
<a name="API_Predict_ResponseSyntax"></a>

```
{
   "Prediction": { 
      "details": { 
         "string" : "string" 
      },
      "predictedLabel": "string",
      "predictedScores": { 
         "string" : number 
      },
      "predictedValue": number
   }
}
```

## Response Elements
<a name="API_Predict_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Prediction](#API_Predict_ResponseSyntax) **   <a name="amazonml-Predict-response-Prediction"></a>
The output from a `Predict` operation:   
+  `Details` - Contains the following attributes: `DetailsAttributes.PREDICTIVE_MODEL_TYPE - REGRESSION | BINARY | MULTICLASS` `DetailsAttributes.ALGORITHM - SGD` 
+  `PredictedLabel` - Present for either a `BINARY` or `MULTICLASS` `MLModel` request. 
+  `PredictedScores` - Contains the raw classification score corresponding to each label. 
+  `PredictedValue` - Present for a `REGRESSION` `MLModel` request. 
Type: [Prediction](API_Prediction.md) object

## Errors
<a name="API_Predict_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

 ** LimitExceededException **   
The subscriber exceeded the maximum number of operations. This exception can occur when listing objects such as `DataSource`.  
HTTP Status Code: 400

 ** PredictorNotMountedException **   
The exception is thrown when a predict request is made to an unmounted `MLModel`.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
A specified resource cannot be located.  
HTTP Status Code: 400

## Examples
<a name="API_Predict_Examples"></a>

### The following is a sample request and response of the Predict operation.
<a name="API_Predict_Example_1"></a>

This example illustrates one usage of Predict.

#### Sample Request
<a name="API_Predict_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: <hostname from the GetMLModel response EndpointUrl object>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.Predict
{"MLModelId" : "exampleMLModelId",
 "Record" : {
   "ExampleData" : "exampleValue"
 },
 "PredictEndpoint" : "<realtime endpoint from Amazon Machine Learning for exampleMLModelId>"
}
```

#### Sample Response
<a name="API_Predict_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{"PredictedLabel" : "0"
 "PredictedScores" : {
   "0" : "0.446588516"
 },
 "Details" : {
   "PredictiveModelType" : "BINARY",
   "Algorithm" : "SGD"
 }
}
```

## See Also
<a name="API_Predict_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/Predict) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/Predict) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/Predict) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/Predict) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/Predict) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/Predict) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/Predict) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/Predict) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/Predict) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/Predict) 

# UpdateBatchPrediction
<a name="API_UpdateBatchPrediction"></a>

Updates the `BatchPredictionName` of a `BatchPrediction`.

You can use the `GetBatchPrediction` operation to view the contents of the updated data element.

## Request Syntax
<a name="API_UpdateBatchPrediction_RequestSyntax"></a>

```
{
   "BatchPredictionId": "string",
   "BatchPredictionName": "string"
}
```

## Request Parameters
<a name="API_UpdateBatchPrediction_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [BatchPredictionId](#API_UpdateBatchPrediction_RequestSyntax) **   <a name="amazonml-UpdateBatchPrediction-request-BatchPredictionId"></a>
The ID assigned to the `BatchPrediction` during creation.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

 ** [BatchPredictionName](#API_UpdateBatchPrediction_RequestSyntax) **   <a name="amazonml-UpdateBatchPrediction-request-BatchPredictionName"></a>
A new user-supplied name or description of the `BatchPrediction`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: Yes

## Response Syntax
<a name="API_UpdateBatchPrediction_ResponseSyntax"></a>

```
{
   "BatchPredictionId": "string"
}
```

## Response Elements
<a name="API_UpdateBatchPrediction_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [BatchPredictionId](#API_UpdateBatchPrediction_ResponseSyntax) **   <a name="amazonml-UpdateBatchPrediction-response-BatchPredictionId"></a>
The ID assigned to the `BatchPrediction` during creation. This value should be identical to the value of the `BatchPredictionId` in the request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

## Errors
<a name="API_UpdateBatchPrediction_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
A specified resource cannot be located.  
HTTP Status Code: 400

## Examples
<a name="API_UpdateBatchPrediction_Examples"></a>

### The following is a sample request and response of the UpdateBatchPrediction operation.
<a name="API_UpdateBatchPrediction_Example_1"></a>

This example illustrates one usage of UpdateBatchPrediction.

#### Sample Request
<a name="API_UpdateBatchPrediction_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.UpdateBatchPrediction
{
  "BatchPredictionId": "bp-exampleBatchPredictionId",
  "BatchPredictionName": "bp-exampleBatchPredictionName"
}
```

#### Sample Response
<a name="API_UpdateBatchPrediction_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{"BatchPredictionId": "bp-exampleBatchPredictionId"}
```

## See Also
<a name="API_UpdateBatchPrediction_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/UpdateBatchPrediction) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/UpdateBatchPrediction) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/UpdateBatchPrediction) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/UpdateBatchPrediction) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/UpdateBatchPrediction) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/UpdateBatchPrediction) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/UpdateBatchPrediction) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/UpdateBatchPrediction) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/UpdateBatchPrediction) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/UpdateBatchPrediction) 

# UpdateDataSource
<a name="API_UpdateDataSource"></a>

Updates the `DataSourceName` of a `DataSource`.

You can use the `GetDataSource` operation to view the contents of the updated data element.

## Request Syntax
<a name="API_UpdateDataSource_RequestSyntax"></a>

```
{
   "DataSourceId": "string",
   "DataSourceName": "string"
}
```

## Request Parameters
<a name="API_UpdateDataSource_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [DataSourceId](#API_UpdateDataSource_RequestSyntax) **   <a name="amazonml-UpdateDataSource-request-DataSourceId"></a>
The ID assigned to the `DataSource` during creation.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

 ** [DataSourceName](#API_UpdateDataSource_RequestSyntax) **   <a name="amazonml-UpdateDataSource-request-DataSourceName"></a>
A new user-supplied name or description of the `DataSource` that will replace the current description.   
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: Yes

## Response Syntax
<a name="API_UpdateDataSource_ResponseSyntax"></a>

```
{
   "DataSourceId": "string"
}
```

## Response Elements
<a name="API_UpdateDataSource_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [DataSourceId](#API_UpdateDataSource_ResponseSyntax) **   <a name="amazonml-UpdateDataSource-response-DataSourceId"></a>
The ID assigned to the `DataSource` during creation. This value should be identical to the value of the `DataSourceID` in the request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

## Errors
<a name="API_UpdateDataSource_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
A specified resource cannot be located.  
HTTP Status Code: 400

## Examples
<a name="API_UpdateDataSource_Examples"></a>

### The following is a sample request and response of the UpdateDataSource operation.
<a name="API_UpdateDataSource_Example_1"></a>

This example illustrates one usage of UpdateDataSource.

#### Sample Request
<a name="API_UpdateDataSource_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.UpdateDataSource
{
  "DataSourceId": "ds-exampleDataSourceId",
  "DataSourceName": "ds-exampleDataSourceName"
}
```

#### Sample Response
<a name="API_UpdateDataSource_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{"DataSourceId": "ds-exampleDataSourceId"}
```

## See Also
<a name="API_UpdateDataSource_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/UpdateDataSource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/UpdateDataSource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/UpdateDataSource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/UpdateDataSource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/UpdateDataSource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/UpdateDataSource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/UpdateDataSource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/UpdateDataSource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/UpdateDataSource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/UpdateDataSource) 

# UpdateEvaluation
<a name="API_UpdateEvaluation"></a>

Updates the `EvaluationName` of an `Evaluation`.

You can use the `GetEvaluation` operation to view the contents of the updated data element.

## Request Syntax
<a name="API_UpdateEvaluation_RequestSyntax"></a>

```
{
   "EvaluationId": "string",
   "EvaluationName": "string"
}
```

## Request Parameters
<a name="API_UpdateEvaluation_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [EvaluationId](#API_UpdateEvaluation_RequestSyntax) **   <a name="amazonml-UpdateEvaluation-request-EvaluationId"></a>
The ID assigned to the `Evaluation` during creation.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

 ** [EvaluationName](#API_UpdateEvaluation_RequestSyntax) **   <a name="amazonml-UpdateEvaluation-request-EvaluationName"></a>
A new user-supplied name or description of the `Evaluation` that will replace the current content.   
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: Yes

## Response Syntax
<a name="API_UpdateEvaluation_ResponseSyntax"></a>

```
{
   "EvaluationId": "string"
}
```

## Response Elements
<a name="API_UpdateEvaluation_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [EvaluationId](#API_UpdateEvaluation_ResponseSyntax) **   <a name="amazonml-UpdateEvaluation-response-EvaluationId"></a>
The ID assigned to the `Evaluation` during creation. This value should be identical to the value of the `Evaluation` in the request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

## Errors
<a name="API_UpdateEvaluation_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
A specified resource cannot be located.  
HTTP Status Code: 400

## Examples
<a name="API_UpdateEvaluation_Examples"></a>

### The following is a sample request and response of the UpdateEvaluation operation.
<a name="API_UpdateEvaluation_Example_1"></a>

This example illustrates one usage of UpdateEvaluation.

#### Sample Request
<a name="API_UpdateEvaluation_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.UpdateEvaluation
{
  "EvaluationId": "ev-exampleEvaluationId",
  "EvaluationName": "ev-exampleEvaluationName"
}
```

#### Sample Response
<a name="API_UpdateEvaluation_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{"EvaluationId": "ev-exampleEvaluationId"}
```

## See Also
<a name="API_UpdateEvaluation_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/UpdateEvaluation) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/UpdateEvaluation) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/UpdateEvaluation) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/UpdateEvaluation) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/UpdateEvaluation) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/UpdateEvaluation) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/UpdateEvaluation) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/UpdateEvaluation) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/UpdateEvaluation) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/UpdateEvaluation) 

# UpdateMLModel
<a name="API_UpdateMLModel"></a>

Updates the `MLModelName` and the `ScoreThreshold` of an `MLModel`.

You can use the `GetMLModel` operation to view the contents of the updated data element.

## Request Syntax
<a name="API_UpdateMLModel_RequestSyntax"></a>

```
{
   "MLModelId": "string",
   "MLModelName": "string",
   "ScoreThreshold": number
}
```

## Request Parameters
<a name="API_UpdateMLModel_RequestParameters"></a>

For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

The request accepts the following data in JSON format.

 ** [MLModelId](#API_UpdateMLModel_RequestSyntax) **   <a name="amazonml-UpdateMLModel-request-MLModelId"></a>
The ID assigned to the `MLModel` during creation.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+`   
Required: Yes

 ** [MLModelName](#API_UpdateMLModel_RequestSyntax) **   <a name="amazonml-UpdateMLModel-request-MLModelName"></a>
A user-supplied name or description of the `MLModel`.  
Type: String  
Length Constraints: Maximum length of 1024.  
Pattern: `.*\S.*|^$`   
Required: No

 ** [ScoreThreshold](#API_UpdateMLModel_RequestSyntax) **   <a name="amazonml-UpdateMLModel-request-ScoreThreshold"></a>
The `ScoreThreshold` used in binary classification `MLModel` that marks the boundary between a positive prediction and a negative prediction.  
Output values greater than or equal to the `ScoreThreshold` receive a positive result from the `MLModel`, such as `true`. Output values less than the `ScoreThreshold` receive a negative response from the `MLModel`, such as `false`.  
Type: Float  
Required: No

## Response Syntax
<a name="API_UpdateMLModel_ResponseSyntax"></a>

```
{
   "MLModelId": "string"
}
```

## Response Elements
<a name="API_UpdateMLModel_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [MLModelId](#API_UpdateMLModel_ResponseSyntax) **   <a name="amazonml-UpdateMLModel-response-MLModelId"></a>
The ID assigned to the `MLModel` during creation. This value should be identical to the value of the `MLModelID` in the request.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Pattern: `[a-zA-Z0-9_.-]+` 

## Errors
<a name="API_UpdateMLModel_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
An error on the server occurred when trying to process a request.  
HTTP Status Code: 500

 ** InvalidInputException **   
An error on the client occurred. Typically, the cause is an invalid input value.  
HTTP Status Code: 400

 ** ResourceNotFoundException **   
A specified resource cannot be located.  
HTTP Status Code: 400

## Examples
<a name="API_UpdateMLModel_Examples"></a>

### The following is a sample request and response of the UpdateMLModel operation.
<a name="API_UpdateMLModel_Example_1"></a>

This example illustrates one usage of UpdateMLModel.

#### Sample Request
<a name="API_UpdateMLModel_Example_1_Request"></a>

```
POST / HTTP/1.1
Host: machinelearning.<region>.<domain>
x-amz-Date: <Date>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid,Signature=<Signature>
User-Agent: <UserAgentString>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Connection: Keep-Alive
X-Amz-Target: AmazonML_20141212.UpdateMLModel
{
  "MLModelId": "ml-exampleModelId",
  "MLModelName": "ml-exampleModelName",
  "ScoreThreshold": 0.8
}
```

#### Sample Response
<a name="API_UpdateMLModel_Example_1_Response"></a>

```
HTTP/1.1 200 OK
x-amzn-RequestId: <RequestId>
Content-Type: application/x-amz-json-1.1
Content-Length: <PayloadSizeBytes>
Date: <Date>
{"MLModelId": "pr-exampleModelId"}
```

## See Also
<a name="API_UpdateMLModel_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/machinelearning-2014-12-12/UpdateMLModel) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/machinelearning-2014-12-12/UpdateMLModel) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/machinelearning-2014-12-12/UpdateMLModel) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/machinelearning-2014-12-12/UpdateMLModel) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/machinelearning-2014-12-12/UpdateMLModel) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/machinelearning-2014-12-12/UpdateMLModel) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/machinelearning-2014-12-12/UpdateMLModel) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/machinelearning-2014-12-12/UpdateMLModel) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/machinelearning-2014-12-12/UpdateMLModel) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/machinelearning-2014-12-12/UpdateMLModel) 