def create_or_update_resource()

in src/pydolphinscheduler/core/resource.py [0:0]


    def create_or_update_resource(self):
        """Create or update resource via java gateway."""
        if not self.content or not self.user_name:
            raise PyDSParamException(
                "`user_name` and `content` are required when create or update resource from python gate."
            )
        return gateway.create_or_update_resource(
            self.user_name,
            self.name,
            self.content,
        )