Get API logical id from API event properties.

        Handles case where API id is not specified or is a reference to a logical id.

def _get_api_id(self, event_properties):
        """
        Get API logical id from API event properties.

        Handles case where API id is not specified or is a reference to a logical id.
        """
        api_id = event_properties.get("RestApiId")
        if isinstance(api_id, dict) and "Ref" in api_id:
            api_id = api_id["Ref"]
        return api_id