listTableBuckets method

Future<ListTableBucketsResponse> listTableBuckets({
  1. String? continuationToken,
  2. int? maxBuckets,
  3. String? prefix,
  4. TableBucketType? type,
})

Lists table buckets for your account. For more information, see S3 Table buckets in the Amazon Simple Storage Service User Guide.

Permissions
You must have the s3tables:ListTableBuckets 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 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 maxBuckets : The maximum number of table buckets to return in the list.

Parameter prefix : The prefix of the table buckets.

Parameter type : The type of table buckets to filter by in the list.

Implementation

Future<ListTableBucketsResponse> listTableBuckets({
  String? continuationToken,
  int? maxBuckets,
  String? prefix,
  TableBucketType? type,
}) async {
  _s.validateNumRange(
    'maxBuckets',
    maxBuckets,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    if (continuationToken != null) 'continuationToken': [continuationToken],
    if (maxBuckets != null) 'maxBuckets': [maxBuckets.toString()],
    if (prefix != null) 'prefix': [prefix],
    if (type != null) 'type': [type.value],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/buckets',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListTableBucketsResponse.fromJson(response);
}