-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy pathTestMonitorAlertDefinition_CreateWithIdempotency.yaml
More file actions
268 lines (268 loc) · 9.87 KB
/
Copy pathTestMonitorAlertDefinition_CreateWithIdempotency.yaml
File metadata and controls
268 lines (268 loc) · 9.87 KB
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
257
258
259
260
261
262
263
264
265
266
267
268
---
version: 1
interactions:
- request:
body: ""
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/monitor/alert-channels?page=1
method: GET
response:
body: '{"pages": 1, "page": 1, "results": 2, "data": [{"id": 10000, "label": "Read-Write
Channel", "channel_type": "email", "type": "system", "details": {"email": {"usernames":
[], "recipient_type": "read_write_users"}}, "alerts": {"url": "/monitor/alert-channels/10000/alerts",
"type": "alerts-definitions", "alert_count": 9}, "created": "2018-01-02T03:04:05",
"updated": "2018-01-02T03:04:05", "created_by": "system", "updated_by": "system"},
{"id": 10118, "label": "notification channel", "channel_type": "email", "type": "user",
"details": {"email": {"usernames": ["tester"], "recipient_type":
"user"}}, "alerts": {"url": "/monitor/alert-channels/10118/alerts", "type":
"alerts-definitions", "alert_count": 0}, "created": "2018-01-02T03:04:05", "updated":
"2018-01-02T03:04:05", "created_by": "tester", "updated_by":
"tester"}]}'
headers:
Access-Control-Allow-Credentials:
- "true"
Access-Control-Allow-Headers:
- Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter
Access-Control-Allow-Methods:
- HEAD, GET, OPTIONS, POST, PUT, DELETE
Access-Control-Allow-Origin:
- '*'
Access-Control-Expose-Headers:
- X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status
Akamai-Internal-Account:
- '*'
Cache-Control:
- max-age=0, no-cache, no-store
Connection:
- keep-alive
Content-Security-Policy:
- default-src 'none'
Content-Type:
- application/json
Expires:
- Mon, 27 Apr 2026 12:32:45 GMT
Pragma:
- no-cache
Strict-Transport-Security:
- max-age=31536000
Vary:
- Authorization, X-Filter
- Authorization, X-Filter
- Accept-Encoding
X-Accepted-Oauth-Scopes:
- monitor:read_only
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
- DENY
X-Oauth-Scopes:
- account:read_only databases:read_only domains:read_only events:read_only firewall:read_only
images:read_only ips:read_only linodes:read_only lke:read_only longview:read_only
monitor:read_write nodebalancers:read_only object_storage:read_only stackscripts:read_only
volumes:read_only
X-Ratelimit-Limit:
- "1840"
X-Xss-Protection:
- 1; mode=block
status: 200 OK
code: 200
duration: ""
- request:
body: '{"label":"go-test-alert-definition-idempotency-1777293165535535919","severity":2,"channel_ids":[10000],"rule_criteria":{"rules":[{"aggregate_function":"avg","dimension_filters":[{"dimension_label":"node_type","operator":"eq","value":"primary"}],"metric":"memory_usage","operator":"gt","threshold":90}]},"trigger_conditions":{"criteria_condition":"ALL","evaluation_period_seconds":300,"polling_interval_seconds":300,"trigger_occurrences":1},"description":"Test
alert definition creation with idempotency"}'
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/monitor/services/dbaas/alert-definitions
method: POST
response:
body: '{"id": 11073, "label": "go-test-alert-definition-idempotency-1777293165535535919",
"description": "Test alert definition creation with idempotency", "service_type":
"dbaas", "type": "user", "scope": "entity", "class": null, "regions": [], "status":
"provisioning", "severity": 2, "rule_criteria": {"rules": [{"label": "Memory Usage", "metric": "memory_usage",
"unit": "percent", "aggregate_function": "avg", "operator": "gt", "threshold":
90, "dimension_filters": [{"label": "Node Type", "dimension_label": "node_type",
"operator": "eq", "value": "primary"}]}]}, "alert_channels": [{"id": 10000,
"label": "Read-Write Channel", "url": "/monitor/alert-channels/10000", "type":
"alert-channels"}], "trigger_conditions": {"criteria_condition": "ALL", "polling_interval_seconds":
300, "evaluation_period_seconds": 300, "trigger_occurrences": 1}, "created":
"2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05", "created_by": "tester",
"updated_by": "tester", "entities": {"url": "/monitor/services/dbaas/alert-definitions/11073/entities",
"has_more_resources": false, "count": 0}}'
headers:
Access-Control-Allow-Credentials:
- "true"
Access-Control-Allow-Headers:
- Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter
Access-Control-Allow-Methods:
- HEAD, GET, OPTIONS, POST, PUT, DELETE
Access-Control-Allow-Origin:
- '*'
Access-Control-Expose-Headers:
- X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status
Akamai-Internal-Account:
- '*'
Cache-Control:
- max-age=0, no-cache, no-store
Connection:
- keep-alive
Content-Security-Policy:
- default-src 'none'
Content-Type:
- application/json
Expires:
- Mon, 27 Apr 2026 12:32:46 GMT
Pragma:
- no-cache
Strict-Transport-Security:
- max-age=31536000
Vary:
- Authorization, X-Filter
- Accept-Encoding
X-Accepted-Oauth-Scopes:
- databases:read_only
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
- DENY
X-Oauth-Scopes:
- account:read_only databases:read_only domains:read_only events:read_only firewall:read_only
images:read_only ips:read_only linodes:read_only lke:read_only longview:read_only
monitor:read_write nodebalancers:read_only object_storage:read_only stackscripts:read_only
volumes:read_only
X-Ratelimit-Limit:
- "1840"
X-Xss-Protection:
- 1; mode=block
status: 200 OK
code: 200
duration: ""
- request:
body: '{"label":"go-test-alert-definition-idempotency-1777293165535535919","severity":2,"channel_ids":[10000],"rule_criteria":{"rules":[{"aggregate_function":"avg","dimension_filters":[{"dimension_label":"node_type","operator":"eq","value":"primary"}],"metric":"memory_usage","operator":"gt","threshold":90}]},"trigger_conditions":{"criteria_condition":"ALL","evaluation_period_seconds":300,"polling_interval_seconds":300,"trigger_occurrences":1},"description":"Test
alert definition creation with idempotency"}'
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/monitor/services/dbaas/alert-definitions
method: POST
response:
body: '{"errors": [{"reason": "An alert with this label already exists", "field":
"label"}]}'
headers:
Access-Control-Allow-Headers:
- Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter
Access-Control-Allow-Methods:
- HEAD, GET, OPTIONS, POST, PUT, DELETE
Access-Control-Allow-Origin:
- '*'
Akamai-Internal-Account:
- '*'
Cache-Control:
- max-age=0, no-cache, no-store
Content-Length:
- "85"
Content-Type:
- application/json
Expires:
- Mon, 27 Apr 2026 12:32:47 GMT
Pragma:
- no-cache
Strict-Transport-Security:
- max-age=31536000
X-Accepted-Oauth-Scopes:
- databases:read_only
X-Frame-Options:
- DENY
X-Oauth-Scopes:
- account:read_only databases:read_only domains:read_only events:read_only firewall:read_only
images:read_only ips:read_only linodes:read_only lke:read_only longview:read_only
monitor:read_write nodebalancers:read_only object_storage:read_only stackscripts:read_only
volumes:read_only
X-Ratelimit-Limit:
- "1840"
status: 400 Bad Request
code: 400
duration: ""
- request:
body: ""
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
User-Agent:
- linodego/dev https://github.com/linode/linodego
url: https://api.linode.com/v4beta/monitor/services/dbaas/alert-definitions/11073
method: DELETE
response:
body: '{}'
headers:
Access-Control-Allow-Credentials:
- "true"
Access-Control-Allow-Headers:
- Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter
Access-Control-Allow-Methods:
- HEAD, GET, OPTIONS, POST, PUT, DELETE
Access-Control-Allow-Origin:
- '*'
Access-Control-Expose-Headers:
- X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status
Akamai-Internal-Account:
- '*'
Cache-Control:
- max-age=0, no-cache, no-store
Connection:
- keep-alive
Content-Length:
- "2"
Content-Security-Policy:
- default-src 'none'
Content-Type:
- application/json
Expires:
- Mon, 27 Apr 2026 12:32:48 GMT
Pragma:
- no-cache
Strict-Transport-Security:
- max-age=31536000
Vary:
- Authorization, X-Filter
X-Accepted-Oauth-Scopes:
- databases:read_only
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
- DENY
X-Oauth-Scopes:
- account:read_only databases:read_only domains:read_only events:read_only firewall:read_only
images:read_only ips:read_only linodes:read_only lke:read_only longview:read_only
monitor:read_write nodebalancers:read_only object_storage:read_only stackscripts:read_only
volumes:read_only
X-Ratelimit-Limit:
- "1840"
X-Xss-Protection:
- 1; mode=block
status: 200 OK
code: 200
duration: ""