Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't create rule action of type sql #20

Closed
huguesv opened this issue Jun 11, 2012 · 2 comments
Closed

can't create rule action of type sql #20

huguesv opened this issue Jun 11, 2012 · 2 comments

Comments

@huguesv
Copy link
Contributor

huguesv commented Jun 11, 2012

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)

@huguesv
Copy link
Contributor Author

huguesv commented Jun 15, 2012

This may be useful:
https://github.com/WindowsAzure/azure-sdk-for-java/blob/master/microsoft-azure-api/src/main/resources/schemas.microsoft.com.netservices.2010.10.servicebus.connect.xsd

Based on that schema my guess is the xml is supposed to look like:
<SqlRuleAction>
<SqlExpression>set foo='hello world'</SqlExpression>
</SqlRuleAction>

@huguesv
Copy link
Contributor Author

huguesv commented Jun 18, 2012

Fixed.

@huguesv huguesv closed this as completed Jun 18, 2012
lmazuel pushed a commit that referenced this issue Jun 7, 2019
Add AccessTokenProcessor for sample code (and anything else using token-based authentication).
beltr0n pushed a commit to beltr0n/azure-sdk-for-python that referenced this issue Jan 25, 2021
…ty-redesign

update swagger + re-generate code
iscai-msft pushed a commit to iscai-msft/azure-sdk-for-python that referenced this issue Nov 8, 2021
add back in JSONType typehints and remove whitespace
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant