listTables method

Future<ListTablesOutput> listTables({
  1. String? exclusiveStartTableName,
  2. int? limit,
})

Retrieves a paginated list of table names created by the AWS Account of the caller in the AWS Region (e.g. us-east-1).

May throw InternalServerError.

Parameter exclusiveStartTableName : The name of the table that starts the list. If you already ran a ListTables operation and received a LastEvaluatedTableName value in the response, use that value here to continue the list.

Implementation

Future<ListTablesOutput> listTables({
  String? exclusiveStartTableName,
  int? limit,
}) async {
  _s.validateStringLength(
    'exclusiveStartTableName',
    exclusiveStartTableName,
    3,
    255,
  );
  _s.validateNumRange(
    'limit',
    limit,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'DynamoDB_20111205.ListTables'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (exclusiveStartTableName != null)
        'ExclusiveStartTableName': exclusiveStartTableName,
      if (limit != null) 'Limit': limit,
    },
  );

  return ListTablesOutput.fromJson(jsonResponse.body);
}