Skip to content

disassociate_from_administrator_account async

disassociate_from_administrator_account(
    detector_id: DetectorId,
    *,
    config_overrides: Optional[AsyncGuardDutyClientConfig] = None,
) -> DisassociateFromAdministratorAccountResponse

Disassociates the current GuardDuty member account from its administrator account.

When you disassociate an invited member from a GuardDuty delegated administrator, the member account details obtained from the CreateMembers API, including the associated email addresses, are retained. This is done so that the delegated administrator can invoke the InviteMembers API without the need to invoke the CreateMembers API again. To remove the details associated with a member account, the delegated administrator must invoke the DeleteMembers API.

With autoEnableOrganizationMembers configuration for your organization set to ALL, you'll receive an error if you attempt to disable GuardDuty in a member account.

Parameters:

  • detector_id (DetectorId) –

    The unique ID of the detector of the GuardDuty member account.

Raises:

Source code in docs_src/capo_guardduty/_services/async_guard_duty.py
async def disassociate_from_administrator_account(
    self,
    detector_id: "capo_guardduty.types.detector_id.DetectorId",
    *,
    config_overrides: Optional[AsyncGuardDutyClientConfig] = None,
) -> "capo_guardduty.types.disassociate_from_administrator_account_response.DisassociateFromAdministratorAccountResponse":
    """<p>Disassociates the current GuardDuty member account from its administrator account.</p> <p>When you disassociate an invited member from a GuardDuty delegated administrator, the member account details obtained from the <a href="https://docs.aws.amazon.com/guardduty/latest/APIReference/API_CreateMembers.html">CreateMembers</a> API, including the associated email addresses, are retained. This is done so that the delegated administrator can invoke the <a href="https://docs.aws.amazon.com/guardduty/latest/APIReference/API_InviteMembers.html">InviteMembers</a> API without the need to invoke the CreateMembers API again. To remove the details associated with a member account, the delegated administrator must invoke the <a href="https://docs.aws.amazon.com/guardduty/latest/APIReference/API_DeleteMembers.html">DeleteMembers</a> API. </p> <p>With <code>autoEnableOrganizationMembers</code> configuration for your organization set to <code>ALL</code>, you'll receive an error if you attempt to disable GuardDuty in a member account.</p>

    Args:
        detector_id: <p>The unique ID of the detector of the GuardDuty member account.</p>

    Raises:
        capo_guardduty.errors.bad_request_exception.BadRequestException: <p>A bad request exception object.</p>
        capo_guardduty.errors.internal_server_error_exception.InternalServerErrorException: <p>An internal server error exception object.</p>
        capo_guardduty.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_guardduty.types.disassociate_from_administrator_account_request.DisassociateFromAdministratorAccountRequest]",
    ) -> AsyncOperationResponse[
        "capo_guardduty.types.disassociate_from_administrator_account_response.DisassociateFromAdministratorAccountResponse"
    ]:
        import capo_guardduty._operations.guard_duty_api_service.disassociate_from_administrator_account

        (
            output,
            http_response,
        ) = await capo_guardduty._operations.guard_duty_api_service.disassociate_from_administrator_account.async_disassociate_from_administrator_account(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DisassociateFromAdministratorAccount")
    )
    input_: capo_guardduty.types.disassociate_from_administrator_account_request.DisassociateFromAdministratorAccountRequest = {
        "detector_id": detector_id
    }

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