DescribeDataSources
Returns a list of DataSource that match the search criteria in the request.
Request Syntax
{
   "EQ": "string",
   "FilterVariable": "string",
   "GE": "string",
   "GT": "string",
   "LE": "string",
   "Limit": number,
   "LT": "string",
   "NE": "string",
   "NextToken": "string",
   "Prefix": "string",
   "SortOrder": "string"
}Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- EQ
- 
               The equal to operator. The DataSourceresults will haveFilterVariablevalues that exactly match the value specified withEQ.Type: String Length Constraints: Maximum length of 1024. Pattern: .*\S.*|^$Required: No 
- FilterVariable
- 
               Use one of the following variables to filter a list of DataSource:- 
                     CreatedAt- Sets the search criteria toDataSourcecreation dates.
- 
                     Status- Sets the search criteria toDataSourcestatuses.
- 
                     Name- Sets the search criteria to the contents ofDataSourceName.
- 
                     DataUri- Sets the search criteria to the URI of data files used to create theDataSource. 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 theDataSourcecreation.
 Type: String Valid Values: CreatedAt | LastUpdatedAt | Status | Name | DataLocationS3 | IAMUserRequired: No 
- 
                     
- GE
- 
               The greater than or equal to operator. The DataSourceresults will haveFilterVariablevalues that are greater than or equal to the value specified withGE.Type: String Length Constraints: Maximum length of 1024. Pattern: .*\S.*|^$Required: No 
- GT
- 
               The greater than operator. The DataSourceresults will haveFilterVariablevalues that are greater than the value specified withGT.Type: String Length Constraints: Maximum length of 1024. Pattern: .*\S.*|^$Required: No 
- LE
- 
               The less than or equal to operator. The DataSourceresults will haveFilterVariablevalues that are less than or equal to the value specified withLE.Type: String Length Constraints: Maximum length of 1024. Pattern: .*\S.*|^$Required: No 
- Limit
- 
               The maximum number of DataSourceto include in the result.Type: Integer Valid Range: Minimum value of 1. Maximum value of 100. Required: No 
- LT
- 
               The less than operator. The DataSourceresults will haveFilterVariablevalues that are less than the value specified withLT.Type: String Length Constraints: Maximum length of 1024. Pattern: .*\S.*|^$Required: No 
- NE
- 
               The not equal to operator. The DataSourceresults will haveFilterVariablevalues not equal to the value specified withNE.Type: String Length Constraints: Maximum length of 1024. Pattern: .*\S.*|^$Required: No 
- NextToken
- 
               The ID of the page in the paginated results. Type: String Required: No 
- Prefix
- 
               A string that is found at the beginning of a variable, such as NameorId.For example, a DataSourcecould have theName2014-09-09-HolidayGiftMailer. To search for thisDataSource, selectNamefor theFilterVariableand any of the following strings for thePrefix:- 
                     2014-09 
- 
                     2014-09-09 
- 
                     2014-09-09-Holiday 
 Type: String Length Constraints: Maximum length of 1024. Pattern: .*\S.*|^$Required: No 
- 
                     
- SortOrder
- 
               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 | dscRequired: No 
- 
                     
Response Syntax
{
   "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
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
- 
               An ID of the next page in the paginated results that indicates at least one more page follows. Type: String 
- Results
- 
               A list of DataSourcethat meet the search criteria.Type: Array of DataSource objects 
Errors
For information about the errors that are common to all actions, see Common Errors.
- 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
The following is a sample request and response of the DescribeDataSources operation.
This example illustrates one usage of DescribeDataSources.
Sample Request
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
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
For more information about using this API in one of the language-specific AWS SDKs, see the following: