def enable_organization_admin_account()

in src/org_setup/resources/macie.py [0:0]


    def enable_organization_admin_account(self, account_id: str) -> None:
        """
        Delegate Macie administration to an account

        Executes in: management account in all regions
        """

        logger.info(
            f"[{self.region}] Delegating Macie administration to account {account_id}"
        )
        try:
            self.client.enable_organization_admin_account(adminAccountId=account_id)
            logger.debug(
                f"[{self.region}] Delegated Macie administration to account {account_id}"
            )
        except botocore.exceptions.ClientError as error:
            if error.response["Error"]["Code"] != "ConflictException":
                logger.exception(
                    f"[{self.region}] Unable to delegate Macie administration to account {account_id}"
                )
                raise error