Skip to content

list_regional_buckets async

list_regional_buckets(
    account_id: AccountId,
    *,
    config_overrides: Optional[AsyncS3ControlClientConfig] = None,
    next_token: Optional[NonEmptyMaxLength1024String] = None,
    max_results: Optional[MaxResults] = None,
    outpost_id: Optional[NonEmptyMaxLength64String] = None,
) -> ListRegionalBucketsResult

This operation is not supported by directory buckets.

Returns a list of all Outposts buckets in an Outpost that are owned by the authenticated sender of the request. For more information, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and x-amz-outpost-id in your request, see the Examples section.

Parameters:

Raises:

Source code in docs_src/capo_s3_control/_services/async_s3_control.py
async def list_regional_buckets(
    self,
    account_id: "capo_s3_control.types.account_id.AccountId",
    *,
    config_overrides: Optional[AsyncS3ControlClientConfig] = None,
    next_token: Optional[
        "capo_s3_control.types.non_empty_max_length1024_string.NonEmptyMaxLength1024String"
    ] = None,
    max_results: Optional["capo_s3_control.types.max_results.MaxResults"] = None,
    outpost_id: Optional[
        "capo_s3_control.types.non_empty_max_length64_string.NonEmptyMaxLength64String"
    ] = None,
) -> "capo_s3_control.types.list_regional_buckets_result.ListRegionalBucketsResult":
    """<note> <p>This operation is not supported by directory buckets.</p> </note> <p>Returns a list of all Outposts buckets in an Outpost that are owned by the authenticated sender of the request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using Amazon S3 on Outposts</a> in the <i>Amazon S3 User Guide</i>.</p> <p>For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and <code>x-amz-outpost-id</code> in your request, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_ListRegionalBuckets.html#API_control_ListRegionalBuckets_Examples">Examples</a> section.</p>

    Args:
        account_id: <p>The Amazon Web Services account ID of the Outposts bucket.</p>
        next_token: <p></p>
        max_results: <p></p>
        outpost_id: <p>The ID of the Outposts resource.</p> <note> <p>This ID is required by Amazon S3 on Outposts buckets.</p> </note>

    Raises:
        capo_s3_control.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_s3_control.types.list_regional_buckets_request.ListRegionalBucketsRequest]",
    ) -> AsyncOperationResponse[
        "capo_s3_control.types.list_regional_buckets_result.ListRegionalBucketsResult"
    ]:
        import capo_s3_control._operations.awss3_control_service_v20180820.list_regional_buckets

        (
            output,
            http_response,
        ) = await capo_s3_control._operations.awss3_control_service_v20180820.list_regional_buckets.async_list_regional_buckets(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListRegionalBuckets")
    )
    input_: capo_s3_control.types.list_regional_buckets_request.ListRegionalBucketsRequest = {
        "account_id": account_id
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if outpost_id is not None:
        input_["outpost_id"] = outpost_id

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