describeDataSources method
Returns a list of DataSource that match the search criteria
in the request.
May throw InvalidInputException. May throw InternalServerException.
Parameter eq :
The equal to operator. The DataSource results will have
FilterVariable values that exactly match the value specified
with EQ.
Parameter 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.
Parameter ge :
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.
Parameter gt :
The greater than operator. The DataSource results will have
FilterVariable values that are greater than the value
specified with GT.
Parameter le :
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.
Parameter lt :
The less than operator. The DataSource results will have
FilterVariable values that are less than the value specified
with LT.
Parameter limit :
The maximum number of DataSource to include in the result.
Parameter ne :
The not equal to operator. The DataSource results will have
FilterVariable values not equal to the value specified with
NE.
Parameter nextToken :
The ID of the page in the paginated results.
Parameter prefix :
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
Parameter 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).
FilterVariable.
Implementation
Future<DescribeDataSourcesOutput> describeDataSources({
String? eq,
DataSourceFilterVariable? filterVariable,
String? ge,
String? gt,
String? le,
String? lt,
int? limit,
String? ne,
String? nextToken,
String? prefix,
SortOrder? sortOrder,
}) async {
_s.validateStringLength(
'eq',
eq,
0,
1024,
);
_s.validateStringLength(
'ge',
ge,
0,
1024,
);
_s.validateStringLength(
'gt',
gt,
0,
1024,
);
_s.validateStringLength(
'le',
le,
0,
1024,
);
_s.validateStringLength(
'lt',
lt,
0,
1024,
);
_s.validateNumRange(
'limit',
limit,
1,
100,
);
_s.validateStringLength(
'ne',
ne,
0,
1024,
);
_s.validateStringLength(
'prefix',
prefix,
0,
1024,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonML_20141212.DescribeDataSources'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (eq != null) 'EQ': eq,
if (filterVariable != null) 'FilterVariable': filterVariable.toValue(),
if (ge != null) 'GE': ge,
if (gt != null) 'GT': gt,
if (le != null) 'LE': le,
if (lt != null) 'LT': lt,
if (limit != null) 'Limit': limit,
if (ne != null) 'NE': ne,
if (nextToken != null) 'NextToken': nextToken,
if (prefix != null) 'Prefix': prefix,
if (sortOrder != null) 'SortOrder': sortOrder.toValue(),
},
);
return DescribeDataSourcesOutput.fromJson(jsonResponse.body);
}