listNamespaces method

Future<ListNamespacesResponse> listNamespaces({
  1. required String tableBucketARN,
  2. String? continuationToken,
  3. int? maxNamespaces,
  4. String? prefix,
})

Lists the namespaces within a table bucket. For more information, see Table namespaces in the Amazon Simple Storage Service User Guide.

Permissions
You must have the s3tables:ListNamespaces permission to use this operation.

May throw AccessDeniedException. May throw BadRequestException. May throw ConflictException. May throw ForbiddenException. May throw InternalServerErrorException. May throw NotFoundException. May throw TooManyRequestsException.

Parameter tableBucketARN : The Amazon Resource Name (ARN) of the table bucket.

Parameter continuationToken : ContinuationToken indicates to Amazon S3 that the list is being continued on this bucket with a token. ContinuationToken is obfuscated and is not a real key. You can use this ContinuationToken for pagination of the list results.

Parameter maxNamespaces : The maximum number of namespaces to return in the list.

Parameter prefix : The prefix of the namespaces.

Implementation

Future<ListNamespacesResponse> listNamespaces({
  required String tableBucketARN,
  String? continuationToken,
  int? maxNamespaces,
  String? prefix,
}) async {
  _s.validateNumRange(
    'maxNamespaces',
    maxNamespaces,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    if (continuationToken != null) 'continuationToken': [continuationToken],
    if (maxNamespaces != null) 'maxNamespaces': [maxNamespaces.toString()],
    if (prefix != null) 'prefix': [prefix],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/namespaces/${Uri.encodeComponent(tableBucketARN)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListNamespacesResponse.fromJson(response);
}