listTables method
The ListTables operation returns a list of tables for a
specified keyspace.
To read keyspace metadata using ListTables, the IAM principal
needs Select action permissions for the system keyspace.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ValidationException.
Parameter keyspaceName :
The name of the keyspace.
Parameter maxResults :
The total number of tables to return in the output. If the total number of
tables 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 an argument of a subsequent API
invocation.
Implementation
Future<ListTablesResponse> listTables({
required String keyspaceName,
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.ListTables'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'keyspaceName': keyspaceName,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
},
);
return ListTablesResponse.fromJson(jsonResponse.body);
}