-
Notifications
You must be signed in to change notification settings - Fork 223
/
com.azure.messaging.servicebus.administration.models.SqlRuleAction.yml
62 lines (62 loc) · 6.56 KB
/
com.azure.messaging.servicebus.administration.models.SqlRuleAction.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
### YamlMime:JavaType
uid: "com.azure.messaging.servicebus.administration.models.SqlRuleAction"
fullName: "com.azure.messaging.servicebus.administration.models.SqlRuleAction"
name: "SqlRuleAction"
nameWithType: "SqlRuleAction"
summary: "Represents set of actions written in SQL language-based syntax that is performed against a <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"com.azure.messaging.servicebus.administration.models.RuleAction?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public class **SqlRuleAction**</br> extends <xref href=\"com.azure.messaging.servicebus.administration.models.RuleAction?alt=com.azure.messaging.servicebus.administration.models.RuleAction&text=RuleAction\" data-throw-if-not-resolved=\"False\" />"
constructors:
- uid: "com.azure.messaging.servicebus.administration.models.SqlRuleAction.SqlRuleAction(java.lang.String)"
fullName: "com.azure.messaging.servicebus.administration.models.SqlRuleAction.SqlRuleAction(String sqlExpression)"
name: "SqlRuleAction(String sqlExpression)"
nameWithType: "SqlRuleAction.SqlRuleAction(String sqlExpression)"
summary: "Creates a new instance with the given SQL expression."
parameters:
- description: "SQL expression for the action."
name: "sqlExpression"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public SqlRuleAction(String sqlExpression)"
desc: "Creates a new instance with the given SQL expression."
methods:
- uid: "com.azure.messaging.servicebus.administration.models.SqlRuleAction.getParameters()"
fullName: "com.azure.messaging.servicebus.administration.models.SqlRuleAction.getParameters()"
name: "getParameters()"
nameWithType: "SqlRuleAction.getParameters()"
summary: "Gets the properties for this action."
syntax: "public Map<String,Object> getParameters()"
desc: "Gets the properties for this action."
returns:
description: "the properties for this action."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>>"
- uid: "com.azure.messaging.servicebus.administration.models.SqlRuleAction.getSqlExpression()"
fullName: "com.azure.messaging.servicebus.administration.models.SqlRuleAction.getSqlExpression()"
name: "getSqlExpression()"
nameWithType: "SqlRuleAction.getSqlExpression()"
summary: "Gets the SQL expression."
syntax: "public String getSqlExpression()"
desc: "Gets the SQL expression."
returns:
description: "the SQL expression."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
type: "class"
desc: "Represents set of actions written in SQL language-based syntax that is performed against a <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>.\n\n**Sample: Create SQL rule filter with SQL rule action**\n\nThe code sample below creates a rule using a SQL filter and SQL action. The rule matches messages with:\n\n * <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage.getCorrelationId()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage#getCorrelationId()\"></xref> equal to `\"email\"`\n * <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage.getApplicationProperties()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage#getApplicationProperties()\"></xref> contains a key `\"sender\"` with value `\"joseph\"`\n * <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage.getApplicationProperties()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage#getApplicationProperties()\"></xref> contains a key `\"importance\"` with value \\* `\"joseph\"` OR the value is NULL.\n\nIf the filter matches, it will set/update the `\"importance\"` key in <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage.getApplicationProperties()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage#getApplicationProperties()\"></xref> with `\"critical\"`.\n\n```java\nString topicName = \"emails\";\n String subscriptionName = \"important-emails\";\n String ruleName = \"emails-from-joseph\";\n\n RuleFilter sqlRuleFilter = new SqlRuleFilter(\n \"sys.CorrelationId = 'email' AND sender = 'joseph' AND (importance IS NULL OR importance = 'high')\");\n RuleAction sqlRuleAction = new SqlRuleAction(\"SET importance = 'critical';\");\n CreateRuleOptions createRuleOptions = new CreateRuleOptions()\n .setFilter(sqlRuleFilter)\n .setAction(sqlRuleAction);\n\n RuleProperties rule = client.createRule(topicName, ruleName, subscriptionName, createRuleOptions);\n\n System.out.printf(\"Rule '%s' created for topic %s, subscription %s. Filter: %s%n\", rule.getName(), topicName,\n subscriptionName, rule.getFilter());\n```"
metadata: {}
package: "com.azure.messaging.servicebus.administration.models"
artifact: com.azure:azure-messaging-servicebus:7.17.1