Skip to content

list_table_buckets async

list_table_buckets(
    *,
    config_overrides: Optional[AsyncS3TablesClientConfig] = None,
    prefix: Optional[str] = None,
    continuation_token: Optional[NextToken] = None,
    max_buckets: Optional[ListTableBucketsLimit] = None,
    type: Optional[TableBucketType] = None,
) -> ListTableBucketsResponse

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.

Parameters:

  • prefix (Optional[str], default: None ) –

    The prefix of the table buckets.

  • continuation_token (Optional[NextToken], default: None ) –

    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.

  • max_buckets (Optional[ListTableBucketsLimit], default: None ) –

    The maximum number of table buckets to return in the list.

  • type (Optional[TableBucketType], default: None ) –

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

Raises:

Source code in docs_src/capo_s3tables/_services/async_s3_tables.py
async def list_table_buckets(
    self,
    *,
    config_overrides: Optional[AsyncS3TablesClientConfig] = None,
    prefix: Optional[str] = None,
    continuation_token: Optional["capo_s3tables.types.next_token.NextToken"] = None,
    max_buckets: Optional[
        "capo_s3tables.types.list_table_buckets_limit.ListTableBucketsLimit"
    ] = None,
    type: Optional["capo_s3tables.types.table_bucket_type.TableBucketType"] = None,
) -> "capo_s3tables.types.list_table_buckets_response.ListTableBucketsResponse":
    """<p>Lists table buckets for your account. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-buckets.html">S3 Table buckets</a> in the <i>Amazon Simple Storage Service User Guide</i>.</p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3tables:ListTableBuckets</code> permission to use this operation. </p> </dd> </dl>

    Args:
        prefix: <p>The prefix of the table buckets.</p>
        continuation_token: <p> <code>ContinuationToken</code> indicates to Amazon S3 that the list is being continued on this bucket with a token. <code>ContinuationToken</code> is obfuscated and is not a real key. You can use this <code>ContinuationToken</code> for pagination of the list results.</p>
        max_buckets: <p>The maximum number of table buckets to return in the list.</p>
        type: <p>The type of table buckets to filter by in the list.</p>

    Raises:
        capo_s3tables.errors.access_denied_exception.AccessDeniedException: <p>The action cannot be performed because you do not have the required permission.</p>
        capo_s3tables.errors.bad_request_exception.BadRequestException: <p>The request is invalid or malformed.</p>
        capo_s3tables.errors.conflict_exception.ConflictException: <p>The request failed because there is a conflict with a previous write. You can retry the request.</p>
        capo_s3tables.errors.forbidden_exception.ForbiddenException: <p>The caller isn't authorized to make the request.</p>
        capo_s3tables.errors.internal_server_error_exception.InternalServerErrorException: <p>The request failed due to an internal server error.</p>
        capo_s3tables.errors.not_found_exception.NotFoundException: <p>The request was rejected because the specified resource could not be found.</p>
        capo_s3tables.errors.too_many_requests_exception.TooManyRequestsException: <p>The limit on the number of requests per second was exceeded.</p>
        capo_s3tables.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_s3tables.types.list_table_buckets_request.ListTableBucketsRequest]",
    ) -> AsyncOperationResponse[
        "capo_s3tables.types.list_table_buckets_response.ListTableBucketsResponse"
    ]:
        import capo_s3tables._operations.s3_table_buckets.list_table_buckets

        (
            output,
            http_response,
        ) = await capo_s3tables._operations.s3_table_buckets.list_table_buckets.async_list_table_buckets(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListTableBuckets")
    )
    input_: capo_s3tables.types.list_table_buckets_request.ListTableBucketsRequest = {}
    if prefix is not None:
        input_["prefix"] = prefix
    if continuation_token is not None:
        input_["continuation_token"] = continuation_token
    if max_buckets is not None:
        input_["max_buckets"] = max_buckets
    if type is not None:
        input_["type"] = type

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output