You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/custom_search_commands.md
+52-4Lines changed: 52 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,9 +86,9 @@ If `requiredSearchAssistant` is set to True, the `syntax`, `description`, and `u
86
86
| name<spanclass="required-asterisk">\*</span> | string | Name of the argument |
87
87
| defaultValue | string/number | Default value of the argument. |
88
88
| required | boolean | Specify if the argument is required or not. |
89
-
| validate | object | Specify validation for the argument. It can be any of `Integer`, `Float`, `Boolean`, `RegularExpression` or `FieldName`. |
89
+
| validate | object | Specify validation for the argument. It can be any of `Integer`, `Float`, `Boolean`, `RegularExpression`, `FieldName`, `Set`, `Match`, `List`, `Map`, `Duration`. |
90
90
91
-
UCC currently supports five types of validations provided by `splunklib` library:
91
+
UCC currently supports some types of validations provided by `splunklib` library:
92
92
93
93
- IntegerValidator
94
94
+ you can optionally define `minimum` and `maximum` properties.
@@ -98,10 +98,29 @@ UCC currently supports five types of validations provided by `splunklib` library
98
98
+ no additional properties required.
99
99
- RegularExpressionValidator
100
100
+ no additional properties required.
101
+
+ validates if the argument value is a valid regex expression.
101
102
- FieldnameValidator
102
103
+ no additional properties required.
104
+
- SetValidator
105
+
- the property `values` is required, which is a list of allowed strings.
106
+
- validates if the values list contains the argument value.
107
+
- MatchValidator
108
+
- the properties `name` and `pattern` is required, where the name is only used for error messages and the pattern must be a valid regex pattern.
109
+
- validates of the argument value matches the specified regex expression.
103
110
104
-
For more information, refer [splunklib API docs](https://splunk-python-sdk.readthedocs.io/en/latest/searchcommands.html)
111
+
- ListValidator
112
+
- no additional properties required.
113
+
- validates if the argument value is a valid list and passes the parsed list to the property.
114
+
115
+
- MapValidator
116
+
- the property `map` is required, where the map must be a dictionary of key value pairs where the key must be a string and the value must either be a string, a number or a boolean.
117
+
- validates if the argument matches a key of the dictionary and passes the corresponding value to the property.
118
+
119
+
- DurationValidator
120
+
- no additional properties required.
121
+
122
+
123
+
For more information, refer [splunklib API docs](https://splunk-python-sdk.readthedocs.io/en/latest/searchcommands.html) or [validators.py source](https://github.com/splunk/splunk-sdk-python/blob/develop/splunklib/searchcommands/validators.py).
0 commit comments