forked from demisto/content
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook-MySQL_test.yml
256 lines (256 loc) · 5.11 KB
/
playbook-MySQL_test.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
id: MySQL Test
version: -1
name: MySQL Test
description: Test MySQL queries via script execution and directly in playbook
starttaskid: "0"
tasks:
"0":
id: "0"
taskid: c9203936-01e5-4282-838b-106bd31cbdd3
type: start
task:
id: c9203936-01e5-4282-838b-106bd31cbdd3
version: -1
name: ""
iscommand: false
brand: ""
nexttasks:
'#none#':
- "1"
separatecontext: false
view: |-
{
"position": {
"x": 450,
"y": 50
}
}
note: false
timertriggers: []
"1":
id: "1"
taskid: b6ec96d3-467f-4175-84b3-1cde56a868ab
type: regular
task:
id: b6ec96d3-467f-4175-84b3-1cde56a868ab
version: -1
name: Delete Context
description: Delete field from context
scriptName: DeleteContext
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "2"
scriptarguments:
all:
simple: "yes"
index: {}
key: {}
keysToKeep: {}
subplaybook: {}
separatecontext: false
view: |-
{
"position": {
"x": 450,
"y": 230
}
}
note: false
timertriggers: []
"2":
id: "2"
taskid: 3ef2280a-ed48-4319-81ed-da161f31b8d4
type: regular
task:
id: 3ef2280a-ed48-4319-81ed-da161f31b8d4
version: -1
name: Run Mysql Test Script
description: Search for messages in the user's mailbox.
scriptName: TestMysqlQuery
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "6"
separatecontext: false
view: |-
{
"position": {
"x": 450,
"y": 410
}
}
note: false
timertriggers: []
"3":
id: "3"
taskid: 15661fc6-cac9-4e7d-8f84-8c6aa485f641
type: condition
task:
id: 15661fc6-cac9-4e7d-8f84-8c6aa485f641
version: -1
name: Check MySQL Result
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "5"
"yes":
- "4"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: isEqualString
left:
value:
complex:
root: MySQLResult
accessor: result
transformers:
- operator: toLowerCase
iscontext: true
right:
value:
simple: test is good
view: |-
{
"position": {
"x": 450,
"y": 950
}
}
note: false
timertriggers: []
"4":
id: "4"
taskid: 4821f2d5-9f8f-43d5-872a-a42b58c8fcd0
type: regular
task:
id: 4821f2d5-9f8f-43d5-872a-a42b58c8fcd0
version: -1
name: All is good
scriptName: PrintContext
type: regular
iscommand: false
brand: ""
scriptarguments:
outputformat: {}
separatecontext: false
view: |-
{
"position": {
"x": 230,
"y": 1200
}
}
note: false
timertriggers: []
"5":
id: "5"
taskid: 1c9ec9d6-e62e-4e40-8f3f-b2421f6034f5
type: regular
task:
id: 1c9ec9d6-e62e-4e40-8f3f-b2421f6034f5
version: -1
name: Failed validation
scriptName: PrintErrorEntry
type: regular
iscommand: false
brand: ""
scriptarguments:
message:
simple: result validation from context failed
separatecontext: false
view: |-
{
"position": {
"x": 680,
"y": 1200
}
}
note: false
timertriggers: []
"6":
id: "6"
taskid: d16b8156-438b-41e3-82c4-b38a8c191937
type: regular
task:
id: d16b8156-438b-41e3-82c4-b38a8c191937
version: -1
name: Mysql Long Query (sleep)
description: Query a rational DB using SQL
script: mysql|||query
type: regular
iscommand: true
brand: mysql
nexttasks:
'#none#':
- "7"
scriptarguments:
columns: {}
limit: {}
query:
simple: select sleep(30)
separatecontext: false
view: |-
{
"position": {
"x": 450,
"y": 580
}
}
note: false
timertriggers: []
"7":
id: "7"
taskid: 3b0272f9-244b-4262-88e6-b9a6b885b0c9
type: regular
task:
id: 3b0272f9-244b-4262-88e6-b9a6b885b0c9
version: -1
name: MySQl Simple Query
description: Query a rational DB using SQL
script: mysql|||query
type: regular
iscommand: true
brand: mysql
nexttasks:
'#none#':
- "3"
scriptarguments:
columns: {}
extend-context:
simple: MySQLResult=.
limit: {}
query:
simple: select "test is good" as result
separatecontext: false
view: |-
{
"position": {
"x": 450,
"y": 790
}
}
note: false
timertriggers: []
view: |-
{
"linkLabelsPosition": {},
"paper": {
"dimensions": {
"height": 1245,
"width": 830,
"x": 230,
"y": 50
}
}
}
inputs: []
outputs: []