in src/org_setup/resources/macie.py [0:0]
def create_members(self, accounts: List[Dict[str, str]]) -> None:
"""
Create members in Macie
"""
for account in accounts:
try:
self.client.create_member(
account={
"accountId": account["AccountId"],
"email": account["Email"],
}
)
except botocore.exceptions.ClientError as error:
if error.response["Error"]["Code"] != "ValidationException":
logger.exception(f"[{self.region}] Unable to create Macie member")
raise error