Skip to content

get_access_point_policy_status async

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

This operation is not supported by directory buckets.

Indicates whether the specified access point currently has a policy that allows public access. For more information about public access through access points, see Managing Data Access with Amazon S3 access points in the Amazon S3 User Guide.

Parameters:

  • account_id (AccountId) –

    The account ID for the account that owns the specified access point.

  • name (AccessPointName) –

    The name of the access point whose policy status you want to retrieve.

Raises:

Source code in docs_src/capo_s3_control/_services/async_s3_control.py
async def get_access_point_policy_status(
    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_policy_status_result.GetAccessPointPolicyStatusResult":
    """<note> <p>This operation is not supported by directory buckets.</p> </note> <p>Indicates whether the specified access point currently has a policy that allows public access. For more information about public access through access points, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html">Managing Data Access with Amazon S3 access points</a> in the <i>Amazon S3 User Guide</i>.</p>

    Args:
        account_id: <p>The account ID for the account that owns the specified access point.</p>
        name: <p>The name of the access point whose policy status 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_policy_status_request.GetAccessPointPolicyStatusRequest]",
    ) -> AsyncOperationResponse[
        "capo_s3_control.types.get_access_point_policy_status_result.GetAccessPointPolicyStatusResult"
    ]:
        import capo_s3_control._operations.awss3_control_service_v20180820.get_access_point_policy_status

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetAccessPointPolicyStatus")
    )
    input_: capo_s3_control.types.get_access_point_policy_status_request.GetAccessPointPolicyStatusRequest = {
        "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