Skip to content

deregister_organization_delegated_admin

deregister_organization_delegated_admin(
    account_id: AwsAccountId,
    *,
    config_overrides: Optional[AssuranceClientConfig] = None,
) -> DeregisterOrganizationDelegatedAdminOutput

Removes the delegated administrator for AWS Assurance from your organization. The account that was the delegated administrator can no longer manage organization-scoped environments. The management account keeps ownership of any resources that the delegated administrator created.

Only the management account of the organization can call this operation.

Parameters:

  • account_id (AwsAccountId) –

    The 12-digit AWS account ID of the delegated administrator to deregister. Must currently be registered as a delegated administrator for AWS Assurance in the caller's organization.

Raises:

Examples:

Deregister the delegated administrator Removes the delegated administrator for AWS Assurance after the payments team's PCI-DSS assessment is complete, returning administration to the management account.

>>> client.deregister_organization_delegated_admin(account_id='444455556666')
Source code in docs_src/capo_assurance/_services/assurance.py
def deregister_organization_delegated_admin(
    self,
    account_id: "capo_assurance.types.aws_account_id.AwsAccountId",
    *,
    config_overrides: Optional[AssuranceClientConfig] = None,
) -> "capo_assurance.types.deregister_organization_delegated_admin_output.DeregisterOrganizationDelegatedAdminOutput":
    """<p>Removes the delegated administrator for AWS Assurance from your organization. The account that was the delegated administrator can no longer manage organization-scoped environments. The management account keeps ownership of any resources that the delegated administrator created.</p> <p>Only the management account of the organization can call this operation.</p>

    Args:
        account_id: <p>The 12-digit AWS account ID of the delegated administrator to deregister. Must currently be registered as a delegated administrator for AWS Assurance in the caller's organization.</p>

    Raises:
        capo_assurance.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. This error occurs when the request is unauthenticated, or is authenticated but lacks permission to invoke the operation.</p>
        capo_assurance.errors.conflict_exception.ConflictException: <p>A conflict occurred (for example, resource already exists).</p>
        capo_assurance.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred.</p>
        capo_assurance.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</p>
        capo_assurance.errors.throttling_exception.ThrottlingException: <p>The request was throttled.</p>
        capo_assurance.errors.validation_exception.ValidationException: <p>The request failed validation.</p>
        capo_assurance.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Deregister the delegated administrator
        Removes the delegated administrator for AWS Assurance after the payments team's PCI-DSS assessment is complete, returning administration to the management account.

        >>> client.deregister_organization_delegated_admin(account_id='444455556666')
    """

    def _handler(
        req: "OperationRequest[capo_assurance.types.deregister_organization_delegated_admin_input.DeregisterOrganizationDelegatedAdminInput]",
    ) -> OperationResponse[
        "capo_assurance.types.deregister_organization_delegated_admin_output.DeregisterOrganizationDelegatedAdminOutput"
    ]:
        import capo_assurance._operations.assurance.deregister_organization_delegated_admin

        output, http_response = (
            capo_assurance._operations.assurance.deregister_organization_delegated_admin.deregister_organization_delegated_admin(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeregisterOrganizationDelegatedAdmin")
    )
    input_: capo_assurance.types.deregister_organization_delegated_admin_input.DeregisterOrganizationDelegatedAdminInput = {
        "account_id": account_id
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output