Skip to content

delete_access_grant async

delete_access_grant(
    account_id: AccountId,
    access_grant_id: AccessGrantId,
    *,
    config_overrides: Optional[AsyncS3ControlClientConfig] = None,
) -> None

Deletes the access grant from the S3 Access Grants instance. You cannot undo an access grant deletion and the grantee will no longer have access to the S3 data.

Permissions

You must have the s3:DeleteAccessGrant permission to use this operation.

Parameters:

  • account_id (AccountId) –

    The Amazon Web Services account ID of the S3 Access Grants instance.

  • access_grant_id (AccessGrantId) –

    The ID of the access grant. S3 Access Grants auto-generates this ID when you create the access grant.

Raises:

Source code in docs_src/capo_s3_control/_services/async_s3_control.py
async def delete_access_grant(
    self,
    account_id: "capo_s3_control.types.account_id.AccountId",
    access_grant_id: "capo_s3_control.types.access_grant_id.AccessGrantId",
    *,
    config_overrides: Optional[AsyncS3ControlClientConfig] = None,
) -> None:
    """<p>Deletes the access grant from the S3 Access Grants instance. You cannot undo an access grant deletion and the grantee will no longer have access to the S3 data.</p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3:DeleteAccessGrant</code> permission to use this operation. </p> </dd> </dl>

    Args:
        account_id: <p>The Amazon Web Services account ID of the S3 Access Grants instance.</p>
        access_grant_id: <p>The ID of the access grant. S3 Access Grants auto-generates this ID when you create the access grant.</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.delete_access_grant_request.DeleteAccessGrantRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_s3_control._operations.awss3_control_service_v20180820.delete_access_grant

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteAccessGrant")
    )
    input_: capo_s3_control.types.delete_access_grant_request.DeleteAccessGrantRequest = {
        "account_id": account_id,
        "access_grant_id": access_grant_id,
    }

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