listDataCatalogs method
Lists the data catalogs in the current AWS account.
May throw InternalServerException. May throw InvalidRequestException.
Parameter maxResults
:
Specifies the maximum number of data catalogs to return.
Parameter nextToken
:
A token generated by the Athena service that specifies where to continue
pagination if a previous request was truncated. To obtain the next set of
pages, pass in the NextToken from the response object of the previous page
call.
Implementation
Future<ListDataCatalogsOutput> listDataCatalogs({
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
2,
50,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
1024,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonAthena.ListDataCatalogs'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListDataCatalogsOutput.fromJson(jsonResponse.body);
}