Skip to content

Commit c61c738

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 7cadfcd of spec repo
1 parent 357aba1 commit c61c738

File tree

10 files changed

+359
-8
lines changed

10 files changed

+359
-8
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32232,11 +32232,17 @@ components:
3223232232
recipients:
3223332233
$ref: '#/components/schemas/MonitorNotificationRuleRecipients'
3223432234
scope:
32235-
$ref: '#/components/schemas/MonitorNotificationRuleScope'
32235+
$ref: '#/components/schemas/MonitorNotificationRuleConditionScope'
3223632236
required:
3223732237
- scope
3223832238
- recipients
3223932239
type: object
32240+
MonitorNotificationRuleConditionScope:
32241+
description: The scope to which the monitor applied.
32242+
example: transition_type:alert
32243+
maxLength: 3000
32244+
minLength: 1
32245+
type: string
3224032246
MonitorNotificationRuleConditionalRecipients:
3224132247
description: Use conditional recipients to define different recipients for different
3224232248
situations.
@@ -32289,6 +32295,20 @@ components:
3228932295
description: Filter used to associate the notification rule with monitors.
3229032296
oneOf:
3229132297
- $ref: '#/components/schemas/MonitorNotificationRuleFilterTags'
32298+
- $ref: '#/components/schemas/MonitorNotificationRuleFilterScope'
32299+
MonitorNotificationRuleFilterScope:
32300+
additionalProperties: false
32301+
description: Filter monitors by scope. Monitors must match the scope evaluation.
32302+
properties:
32303+
scope:
32304+
description: The scope to which the monitor notification rule applies.
32305+
example: env:prod AND datacenter:us-east-1
32306+
maxLength: 3000
32307+
minLength: 1
32308+
type: string
32309+
required:
32310+
- scope
32311+
type: object
3229232312
MonitorNotificationRuleFilterTags:
3229332313
additionalProperties: false
3229432314
description: Filter monitors by tags. Monitors must match all tags.
@@ -32417,12 +32437,6 @@ components:
3241732437
description: An object related to a monitor notification rule.
3241832438
oneOf:
3241932439
- $ref: '#/components/schemas/User'
32420-
MonitorNotificationRuleScope:
32421-
description: The scope to which the monitor applied.
32422-
example: transition_type:alert
32423-
maxLength: 3000
32424-
minLength: 1
32425-
type: string
3242632440
MonitorNotificationRuleUpdateRequest:
3242732441
description: Request for updating a monitor notification rule.
3242832442
properties:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-11-11T20:25:57.473Z"
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"log": {
3+
"_recordingName": "Monitors/Create a monitor notification rule with scope returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.6"
8+
},
9+
"entries": [
10+
{
11+
"_id": "7789a802057c657d09b5fb2698ae6c02",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 235,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 590,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"filter\":{\"scope\":\"test:test-create_a_monitor_notification_rule_with_scope_returns_ok_response-1762892757\"},\"name\":\"test rule\",\"recipients\":[\"slack-test-channel\",\"jira-test\"]},\"type\":\"monitor-notification-rule\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/monitor/notification_rule"
39+
},
40+
"response": {
41+
"bodySize": 787,
42+
"content": {
43+
"encoding": "base64",
44+
"mimeType": "application/json",
45+
"size": 787,
46+
"text": "[\"H4sIAAAAAAAEA5RTTY/bIBC991dUHHppSMABY1tatf0Pua1WFgac0CWQAs5qtcp/78AmUbtSD5VGFob5eG/mzRvSMks0vKH8ejJoQMfgbQ4R+5DtbJXMNngcF2fQCsmco52WbFIJOAYNHkaPMkMc7QXBhILtCBmqfa1fiFPRyHxzbEjDMaVgu4YMDR+4WHPeN6y9+0ej7Mkan6HOI0pOqmcMRTNWB+m9cZDyp42y3qGnFfLyWKAXl89XqLN12cQCM6lQiZXX4T1LhTPK8cp1/JPrWBKMLzYfxho5RpOX6NMYnuGYTsEng6lom65vBBfoclkhq6F6P2+JNIxgJiaG2VZRLFs246kTLW96YNhrAB6Nqz1NB3uqbbw1Z3otaD9MY0kmJoiqFbZSc9ZPMzaTJNA/02MphMREEM66tm2JJoCnIvLKLdoArsf7ZP8/18eJX/s8x7AHTDALDbIYUPn/XoDrsD/8WqtwhNcbrSqOhtAeU9BHsyPdQPmw7dei54TT+8z/VlMVCYEYUUTC24GASOiWEXYPMEdp3b+qWxU8vB1yPqVhs0lGLdGs91GeAWYsEDfvx03TSdrq2WxbI7ZTSxTVnHeiUROZKRXNt/TAui/6AWQQA/DKNhfSfnFuhc4m1hVAQ46LWSGY1tkqM0qlwuJhLWbpEtxrm+TkyjiuF9K58AIb4cLe+vFo8iHoInYQc8oyL3BGP1S257J2TqZ89cy2Kh3aw+qysR3tBgb7xq99uVyeLp9+AwAA//8=\",\"AwA9EiOK1QMAAA==\"]"
47+
},
48+
"cookies": [],
49+
"headers": [
50+
{
51+
"name": "content-type",
52+
"value": "application/json"
53+
}
54+
],
55+
"headersSize": 714,
56+
"httpVersion": "HTTP/1.1",
57+
"redirectURL": "",
58+
"status": 200,
59+
"statusText": "OK"
60+
},
61+
"startedDateTime": "2025-11-11T20:25:57.481Z",
62+
"time": 129
63+
},
64+
{
65+
"_id": "24fd85c12cf09124eeaab7fd9d4d2f1f",
66+
"_order": 0,
67+
"cache": {},
68+
"request": {
69+
"bodySize": 0,
70+
"cookies": [],
71+
"headers": [
72+
{
73+
"_fromType": "array",
74+
"name": "accept",
75+
"value": "*/*"
76+
}
77+
],
78+
"headersSize": 563,
79+
"httpVersion": "HTTP/1.1",
80+
"method": "DELETE",
81+
"queryString": [],
82+
"url": "https://api.datadoghq.com/api/v2/monitor/notification_rule/9f30ae40-47b4-43c1-a64f-b8765295929d"
83+
},
84+
"response": {
85+
"bodySize": 0,
86+
"content": {
87+
"mimeType": "text/html; charset=utf-8",
88+
"size": 0
89+
},
90+
"cookies": [],
91+
"headers": [
92+
{
93+
"name": "content-type",
94+
"value": "text/html; charset=utf-8"
95+
}
96+
],
97+
"headersSize": 670,
98+
"httpVersion": "HTTP/1.1",
99+
"redirectURL": "",
100+
"status": 204,
101+
"statusText": "No Content"
102+
},
103+
"startedDateTime": "2025-11-11T20:25:57.626Z",
104+
"time": 116
105+
}
106+
],
107+
"pages": [],
108+
"version": "1.2"
109+
}
110+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-11-11T20:26:03.464Z"
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
{
2+
"log": {
3+
"_recordingName": "Monitors/Update a monitor notification rule with scope returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.6"
8+
},
9+
"entries": [
10+
{
11+
"_id": "5f683de9172c1d556320759a677fe4ba",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 222,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 590,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"filter\":{\"tags\":[\"app:test-update_a_monitor_notification_rule_with_scope_returns_ok_response-1762892763\"]},\"name\":\"test rule\",\"recipients\":[\"slack-monitor-app\"]},\"type\":\"monitor-notification-rule\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/monitor/notification_rule"
39+
},
40+
"response": {
41+
"bodySize": 775,
42+
"content": {
43+
"encoding": "base64",
44+
"mimeType": "application/json",
45+
"size": 775,
46+
"text": "[\"H4sIAAAAAAAEA5RTy47bIBTd9ysqFt00JGAbv6RR23/IbjSyMFwnaAi4gDMajfLvvbhOW400i0oseNzHuecc3oiWSZL+jaTXGUhPLt6Z5AN1PpnJKJmMdzQsFsiOyJSCGZcEMScEUGY24BKeHkm0Uj3Te7acZ/K0I05eck1MSJ+3GpOxCcLaUJ7WTIztcwRdZsQCgxy2KsO/GIacP7yYdB6i8jMMAdISXBz8M27j7F0Eypu6aLuiqUvydNsRFQAL6kEmBFGwQlDOcR0L1hd1z8q9EJy31VfGesZwvovXOPM9gXcNo4zjOq4BGLNFYukAdqUmns28snHvNb7m2d6RukQIERsYjUBKqUXVjROFUTKEAx2VTSMpa5io2rqumWbkdsMma/iIIFvGJRWqA1qpUtCxYDWtqqKVUznxtpUkBztlFw3Y4fGPmP/f973Im4JT8CfEf5ZOoxN6ks/f85Dan84/98pf8PVOwUY37yhHAosja3su+rLbN51ggn9A96oPw5wm6yNQn2YveFmxv/rARRr7UXejvMO3c0pz7A+HCGoJsD8FeUWYIUM8/N4ekDde6wnKGppyrJniWoi2KdTIJs6b4lt8qNov+gEdFjzOlUzKQ7vF2h25Qlg9QvoUFtgRVPZqFLpWKb84NNokbcR7baIcbZZju5DW+hf0lvUn44YLpLPX2f9PWCPJtOCe/FDJXPNPszKmLTKZ9Q8hPdXqxurI275Cx4q7G29Pt0+/AAAA//8=\",\"AwA9tQmDyAMAAA==\"]"
47+
},
48+
"cookies": [],
49+
"headers": [
50+
{
51+
"name": "content-type",
52+
"value": "application/json"
53+
}
54+
],
55+
"headersSize": 715,
56+
"httpVersion": "HTTP/1.1",
57+
"redirectURL": "",
58+
"status": 200,
59+
"statusText": "OK"
60+
},
61+
"startedDateTime": "2025-11-11T20:26:03.473Z",
62+
"time": 129
63+
},
64+
{
65+
"_id": "b894cfd722d475f1760d16959c4513d9",
66+
"_order": 0,
67+
"cache": {},
68+
"request": {
69+
"bodySize": 270,
70+
"cookies": [],
71+
"headers": [
72+
{
73+
"_fromType": "array",
74+
"name": "accept",
75+
"value": "application/json"
76+
},
77+
{
78+
"_fromType": "array",
79+
"name": "content-type",
80+
"value": "application/json"
81+
}
82+
],
83+
"headersSize": 628,
84+
"httpVersion": "HTTP/1.1",
85+
"method": "PATCH",
86+
"postData": {
87+
"mimeType": "application/json",
88+
"params": [],
89+
"text": "{\"data\":{\"attributes\":{\"filter\":{\"scope\":\"test:test-update_a_monitor_notification_rule_with_scope_returns_ok_response-1762892763\"},\"name\":\"updated rule\",\"recipients\":[\"slack-test-channel\"]},\"id\":\"b551801a-5c9e-4c35-b206-4428af3f188a\",\"type\":\"monitor-notification-rule\"}}"
90+
},
91+
"queryString": [],
92+
"url": "https://api.datadoghq.com/api/v2/monitor/notification_rule/b551801a-5c9e-4c35-b206-4428af3f188a"
93+
},
94+
"response": {
95+
"bodySize": 775,
96+
"content": {
97+
"encoding": "base64",
98+
"mimeType": "application/json",
99+
"size": 775,
100+
"text": "[\"H4sIAAAAAAAEA5RTwW7cIBC99ysqDr102QXbGNtS1PYf9hZFFobxLgoLW8AbRdH+ewdnE1VRc6jkA8MwM2/ee34hRmVFhheSn89ABnIK3uYQqQ/ZzlarbIOncXFANiSCW+N0tOdUanQElcGM03OJPnRaEsSEVdZg21oZ0fTTTGFSjHIOPVVSKsokE03Xti0zjFyv1w1ROUc7LRnWCRG0PVvwGaN7kpzSjxRTmeqj8h4cedgQr04F+XJGAGC+3sCegsEFEJzKmKxYJXAsfvuKDVU7sHorRSVk/Z2xgTHEOVuXIZZFkg4rF2XQsE577T2q8UbP+Dc9Y5k4Ptl8HNfKMUJeok9jeMRjOgefgHLZVl1fybYmuOQbcZ9iE4Lzrrlhw4KVxAlvO8YVFboH2uha0KliLW2aqlNzPfOuU6W79dotBpD3+3dd/1+Nj1LcaJ5jOCBbSL9BUwykxD+L9CYcjr+3Opww+2E/3lPOKKv2rBu4GOp+K3vBBH/n/h9iMayRRSyBYsmt4HXD3gjZEDgp6z6bbnXwmDvmfE7DbpdALxG2h6guCDMWiLvX4w55462ZoW5B1lPLNDdCdLLSE5s5l9WPdNd038wdKhoD7pVtLkv7xbkNuUBcHUaGHBfYEPT7xWoYldZh8ei6WbmE98YmNbkix+1CORee0JkuHKwfT5CPwRR/P2CPrPKCZ/JLZ3spP51TKd9eZrsaHb3cUMYpa/a8Gxq0r3gzyvXh+uUPAAAA//8=\",\"AwBhMlIR0wMAAA==\"]"
101+
},
102+
"cookies": [],
103+
"headers": [
104+
{
105+
"name": "content-type",
106+
"value": "application/json"
107+
}
108+
],
109+
"headersSize": 715,
110+
"httpVersion": "HTTP/1.1",
111+
"redirectURL": "",
112+
"status": 200,
113+
"statusText": "OK"
114+
},
115+
"startedDateTime": "2025-11-11T20:26:03.619Z",
116+
"time": 194
117+
},
118+
{
119+
"_id": "2fa41ea4927cf021c3781f3a19728a74",
120+
"_order": 0,
121+
"cache": {},
122+
"request": {
123+
"bodySize": 0,
124+
"cookies": [],
125+
"headers": [
126+
{
127+
"_fromType": "array",
128+
"name": "accept",
129+
"value": "*/*"
130+
}
131+
],
132+
"headersSize": 563,
133+
"httpVersion": "HTTP/1.1",
134+
"method": "DELETE",
135+
"queryString": [],
136+
"url": "https://api.datadoghq.com/api/v2/monitor/notification_rule/b551801a-5c9e-4c35-b206-4428af3f188a"
137+
},
138+
"response": {
139+
"bodySize": 0,
140+
"content": {
141+
"mimeType": "text/html; charset=utf-8",
142+
"size": 0
143+
},
144+
"cookies": [],
145+
"headers": [
146+
{
147+
"name": "content-type",
148+
"value": "text/html; charset=utf-8"
149+
}
150+
],
151+
"headersSize": 671,
152+
"httpVersion": "HTTP/1.1",
153+
"redirectURL": "",
154+
"status": 204,
155+
"statusText": "No Content"
156+
},
157+
"startedDateTime": "2025-11-11T20:26:03.827Z",
158+
"time": 129
159+
}
160+
],
161+
"pages": [],
162+
"version": "1.2"
163+
}
164+
}

features/v2/monitors.feature

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ Feature: Monitors
5252
Then the response status is 200 OK
5353
And the response "data.attributes.name" is equal to "test rule"
5454

55+
@team:DataDog/monitor-app
56+
Scenario: Create a monitor notification rule with scope returns "OK" response
57+
Given new "CreateMonitorNotificationRule" request
58+
And body with value {"data": {"attributes": {"filter": {"scope": "test:{{ unique_lower }}"}, "name": "test rule", "recipients": ["slack-test-channel", "jira-test"]}, "type": "monitor-notification-rule"}}
59+
When the request is sent
60+
Then the response status is 200 OK
61+
And the response "data.attributes.name" is equal to "test rule"
62+
5563
@skip-validation @team:DataDog/monitor-app
5664
Scenario: Create a monitor user template returns "Bad Request" response
5765
Given new "CreateMonitorUserTemplate" request
@@ -272,6 +280,16 @@ Feature: Monitors
272280
Then the response status is 200 OK
273281
And the response "data.attributes.name" is equal to "updated rule"
274282

283+
@team:DataDog/monitor-app
284+
Scenario: Update a monitor notification rule with scope returns "OK" response
285+
Given there is a valid "monitor_notification_rule" in the system
286+
And new "UpdateMonitorNotificationRule" request
287+
And request contains "rule_id" parameter from "monitor_notification_rule.data.id"
288+
And body with value {"data": {"attributes": {"filter": {"scope": "test:{{ unique_lower }}"}, "name": "updated rule", "recipients": ["slack-test-channel"]}, "id": "{{ monitor_notification_rule.data.id }}", "type": "monitor-notification-rule"}}
289+
When the request is sent
290+
Then the response status is 200 OK
291+
And the response "data.attributes.name" is equal to "updated rule"
292+
275293
@skip-validation @team:DataDog/monitor-app
276294
Scenario: Update a monitor user template to a new version returns "Bad Request" response
277295
Given there is a valid "monitor_user_template" in the system

services/monitors/src/v2/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export { MonitorNotificationRuleCreateRequest } from "./models/MonitorNotificati
4141
export { MonitorNotificationRuleCreateRequestData } from "./models/MonitorNotificationRuleCreateRequestData";
4242
export { MonitorNotificationRuleData } from "./models/MonitorNotificationRuleData";
4343
export { MonitorNotificationRuleFilter } from "./models/MonitorNotificationRuleFilter";
44+
export { MonitorNotificationRuleFilterScope } from "./models/MonitorNotificationRuleFilterScope";
4445
export { MonitorNotificationRuleFilterTags } from "./models/MonitorNotificationRuleFilterTags";
4546
export { MonitorNotificationRuleListResponse } from "./models/MonitorNotificationRuleListResponse";
4647
export { MonitorNotificationRuleRelationships } from "./models/MonitorNotificationRuleRelationships";
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import { UnparsedObject } from "@datadog/datadog-api-client";
22

3+
import { MonitorNotificationRuleFilterScope } from "./MonitorNotificationRuleFilterScope";
34
import { MonitorNotificationRuleFilterTags } from "./MonitorNotificationRuleFilterTags";
45

56
/**
67
* Filter used to associate the notification rule with monitors.
78
*/
89
export type MonitorNotificationRuleFilter =
910
| MonitorNotificationRuleFilterTags
11+
| MonitorNotificationRuleFilterScope
1012
| UnparsedObject;

0 commit comments

Comments
 (0)