-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
There are 2 types of action for service bus subscription rule: empty and sql
I have not been able to get sql action to work.
In .NET, the action types are named 'EmptyRuleAction' and 'SqlRuleAction'. If you create one from .NET and query it back in Python, that's what you will see.
In Python, it appears that the action types are 'EmptyRuleAction' and 'SqlFilterAction'. However, 'SqlFilterAction' doesn't work. I have also tried 'SqlRuleAction' and that doesn't work either (changing the code in convert_rule_to_xml to use 'SqlRuleAction' instead).
Here's a code snippet, this generates a 'bad request' error:
rule1 = Rule()
rule1.action_type = 'SqlFilterAction'
rule1.action_expression = "set foo='low'"
created = self.sbs.create_rule(self.topic_name, 'MySubscription', 'MyRule1', rule1)