Skip to content

get_access_point_scope async

get_access_point_scope(
    account_id: AccountId,
    name: AccessPointName,
    *,
    config_overrides: Optional[AsyncS3ControlClientConfig] = None,
) -> GetAccessPointScopeResult

Returns the access point scope for a directory bucket.

To use this operation, you must have the permission to perform the s3express:GetAccessPointScope action.

For information about REST API errors, see REST error responses.

Parameters:

  • account_id (AccountId) –

    The Amazon Web Services account ID that owns the access point with the scope that you want to retrieve.

  • name (AccessPointName) –

    The name of the access point with the scope you want to retrieve.

Raises:

Source code in docs_src/capo_s3_control/_services/async_s3_control.py
async def get_access_point_scope(
    self,
    account_id: "capo_s3_control.types.account_id.AccountId",
    name: "capo_s3_control.types.access_point_name.AccessPointName",
    *,
    config_overrides: Optional[AsyncS3ControlClientConfig] = None,
) -> (
    "capo_s3_control.types.get_access_point_scope_result.GetAccessPointScopeResult"
):
    """<p> Returns the access point scope for a directory bucket.</p> <p>To use this operation, you must have the permission to perform the <code>s3express:GetAccessPointScope</code> action.</p> <p>For information about REST API errors, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses">REST error responses</a>.</p>

    Args:
        account_id: <p> The Amazon Web Services account ID that owns the access point with the scope that you want to retrieve. </p>
        name: <p>The name of the access point with the scope you want to retrieve.</p>

    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.get_access_point_scope_request.GetAccessPointScopeRequest]",
    ) -> AsyncOperationResponse[
        "capo_s3_control.types.get_access_point_scope_result.GetAccessPointScopeResult"
    ]:
        import capo_s3_control._operations.awss3_control_service_v20180820.get_access_point_scope

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetAccessPointScope")
    )
    input_: capo_s3_control.types.get_access_point_scope_request.GetAccessPointScopeRequest = {
        "account_id": account_id,
        "name": name,
    }

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