listKeyspaces method
The ListKeyspaces operation returns a list of keyspaces.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ValidationException.
Parameter maxResults :
The total number of keyspaces to return in the output. If the total number
of keyspaces available is more than the value specified, a
NextToken is provided in the output. To resume pagination,
provide the NextToken value as an argument of a subsequent
API invocation.
Parameter nextToken :
The pagination token. To resume pagination, provide the
NextToken value as argument of a subsequent API invocation.
Implementation
Future<ListKeyspacesResponse> listKeyspaces({
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'KeyspacesService.ListKeyspaces'
};
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 ListKeyspacesResponse.fromJson(jsonResponse.body);
}