in src/org_setup/resources/ram.py [0:0]
def enable_sharing_with_aws_organization(self) -> None:
"""
Enable Resource Access Manager sharing with organization
Executes in: management account in all regions
"""
logger.info(f"[{self.region}] Enabling RAM sharing with organization")
try:
self.client.enable_sharing_with_aws_organization()
logger.debug(f"[{self.region}] Enabled RAM sharing with organization")
except botocore.exceptions.ClientError as error:
if error.response["Error"]["Code"] != "OperationNotPermittedException":
logger.exception(
f"[{self.region}] Unable enable RAM sharing with organization"
)
raise error