def enable_aws_organizations_access()

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


    def enable_aws_organizations_access(self) -> None:
        """
        Enable Service Catalog sharing with organization

        Executes in: management account in all regions
        """
        logger.info(
            f"[{self.region}] Enabling organizational access for Service Catalog"
        )
        try:
            self.client.enable_aws_organizations_access()
            logger.debug(
                f"[{self.region}] Enabled organizational access for Service Catalog"
            )
        except botocore.exceptions.ClientError as error:
            if error.response["Error"]["Code"] != "InvalidStateException":
                logger.exception(
                    f"[{self.region}] Unable to enable organization access for Service Catalog"
                )
                raise error