Skip to content

Commit 9ad06e5

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Update restriction policy tests to use separate resource names (#1055)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 76c45dc commit 9ad06e5

File tree

11 files changed

+61
-61
lines changed

11 files changed

+61
-61
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.4",
7-
"regenerated": "2023-03-06 17:22:51.508929",
8-
"spec_repo_commit": "5248c0df"
7+
"regenerated": "2023-03-06 21:45:24.920480",
8+
"spec_repo_commit": "c9d1fe42"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-03-06 17:22:51.521755",
13-
"spec_repo_commit": "5248c0df"
12+
"regenerated": "2023-03-06 21:45:24.933171",
13+
"spec_repo_commit": "c9d1fe42"
1414
}
1515
}
1616
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2023-02-14T03:05:45.924Z"
1+
"2023-03-06T18:17:17.689Z"

cassettes/v2/Restriction-Policies_171120229/Delete-a-restriction-policy-returns-No-Content-response_138051669/recording.har

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "33483023f65befaa604cec3dec861c4f",
11+
"_id": "daa09d87914785fe217159abeaff6c42",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -25,7 +25,7 @@
2525
"httpVersion": "HTTP/1.1",
2626
"method": "DELETE",
2727
"queryString": [],
28-
"url": "https://api.datadoghq.com/api/v2/restriction_policy/dashboard%3Aabc-def-ghi"
28+
"url": "https://api.datadoghq.com/api/v2/restriction_policy/dashboard%3Atest-delete"
2929
},
3030
"response": {
3131
"bodySize": 0,
@@ -46,8 +46,8 @@
4646
"status": 204,
4747
"statusText": "No Content"
4848
},
49-
"startedDateTime": "2023-02-14T03:05:45.929Z",
50-
"time": 381
49+
"startedDateTime": "2023-03-06T18:17:17.978Z",
50+
"time": 357
5151
}
5252
],
5353
"pages": [],
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2023-02-08T21:43:24.217Z"
1+
"2023-03-06T18:17:18.345Z"

cassettes/v2/Restriction-Policies_171120229/Get-a-restriction-policy-returns-OK-response_1820292926/recording.har

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "3cc81f356bd0a0d6ecefa82dd77dff1e",
11+
"_id": "ef55b9a7ebba2db05f014188eb8e0fa8",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -21,18 +21,18 @@
2121
"value": "application/json"
2222
}
2323
],
24-
"headersSize": 543,
24+
"headersSize": 540,
2525
"httpVersion": "HTTP/1.1",
2626
"method": "GET",
2727
"queryString": [],
28-
"url": "https://api.datadoghq.com/api/v2/restriction_policy/dashboard%3Aabc-def-ghi"
28+
"url": "https://api.datadoghq.com/api/v2/restriction_policy/dashboard%3Atest-get"
2929
},
3030
"response": {
31-
"bodySize": 97,
31+
"bodySize": 94,
3232
"content": {
3333
"mimeType": "application/json",
34-
"size": 97,
35-
"text": "{\"data\":{\"type\":\"restriction_policy\",\"id\":\"dashboard:abc-def-ghi\",\"attributes\":{\"bindings\":[]}}}\n"
34+
"size": 94,
35+
"text": "{\"data\":{\"type\":\"restriction_policy\",\"id\":\"dashboard:test-get\",\"attributes\":{\"bindings\":[]}}}\n"
3636
},
3737
"cookies": [],
3838
"headers": [
@@ -47,8 +47,8 @@
4747
"status": 200,
4848
"statusText": "OK"
4949
},
50-
"startedDateTime": "2023-02-08T21:43:24.221Z",
51-
"time": 250
50+
"startedDateTime": "2023-03-06T18:17:18.349Z",
51+
"time": 300
5252
}
5353
],
5454
"pages": [],
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2023-02-13T19:25:03.663Z"
1+
"2023-03-06T18:17:18.656Z"

cassettes/v2/Restriction-Policies_171120229/Update-a-restriction-policy-returns-OK-response_2853268231/recording.har

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "b443f621ed4c0ea1b705cb344225f372",
11+
"_id": "23eb48b9e52f36000b7f574885c46bb5",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -26,13 +26,13 @@
2626
"value": "application/json"
2727
}
2828
],
29-
"headersSize": 550,
29+
"headersSize": 549,
3030
"httpVersion": "HTTP/1.1",
3131
"method": "POST",
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"data\":{\"attributes\":{\"name\":\"Test-Update_a_restriction_policy_returns_OK_response-1676316303\"},\"type\":\"roles\"}}"
35+
"text": "{\"data\":{\"attributes\":{\"name\":\"Test-Update_a_restriction_policy_returns_OK_response-1678126638\"},\"type\":\"roles\"}}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v2/roles"
@@ -42,7 +42,7 @@
4242
"content": {
4343
"mimeType": "application/json",
4444
"size": 834,
45-
"text": "{\"data\":{\"type\":\"roles\",\"id\":\"1ddd79a8-abd4-11ed-912f-da7ad0900002\",\"attributes\":{\"name\":\"Test-Update_a_restriction_policy_returns_OK_response-1676316303\",\"created_at\":\"2023-02-13T19:25:04.081658+00:00\",\"modified_at\":\"2023-02-13T19:25:04.113751+00:00\"},\"relationships\":{\"permissions\":{\"data\":[{\"type\":\"permissions\",\"id\":\"d90f6830-d3d8-11e9-a77a-b3404e5e9ee2\"},{\"type\":\"permissions\",\"id\":\"4441648c-d8b1-11e9-a77a-1b899a04b304\"},{\"type\":\"permissions\",\"id\":\"417ba636-2dce-11eb-84c0-6bce5b0d9de0\"},{\"type\":\"permissions\",\"id\":\"12efc20e-d36c-11eb-a9b8-da7ad0900002\"},{\"type\":\"permissions\",\"id\":\"7605ef24-f376-11eb-b90b-da7ad0900002\"},{\"type\":\"permissions\",\"id\":\"b6bf9ac6-9a59-11ec-8480-da7ad0900002\"},{\"type\":\"permissions\",\"id\":\"f8e941cf-e746-11ec-b22d-da7ad0900002\"},{\"type\":\"permissions\",\"id\":\"6c5ad874-7aff-11ed-a5cd-da7ad0900002\"}]}}}}\n"
45+
"text": "{\"data\":{\"type\":\"roles\",\"id\":\"2186776c-bc4b-11ed-ac0f-da7ad0900002\",\"attributes\":{\"name\":\"Test-Update_a_restriction_policy_returns_OK_response-1678126638\",\"created_at\":\"2023-03-06T18:17:18.938117+00:00\",\"modified_at\":\"2023-03-06T18:17:18.971241+00:00\"},\"relationships\":{\"permissions\":{\"data\":[{\"type\":\"permissions\",\"id\":\"d90f6830-d3d8-11e9-a77a-b3404e5e9ee2\"},{\"type\":\"permissions\",\"id\":\"4441648c-d8b1-11e9-a77a-1b899a04b304\"},{\"type\":\"permissions\",\"id\":\"417ba636-2dce-11eb-84c0-6bce5b0d9de0\"},{\"type\":\"permissions\",\"id\":\"12efc20e-d36c-11eb-a9b8-da7ad0900002\"},{\"type\":\"permissions\",\"id\":\"7605ef24-f376-11eb-b90b-da7ad0900002\"},{\"type\":\"permissions\",\"id\":\"b6bf9ac6-9a59-11ec-8480-da7ad0900002\"},{\"type\":\"permissions\",\"id\":\"f8e941cf-e746-11ec-b22d-da7ad0900002\"},{\"type\":\"permissions\",\"id\":\"6c5ad874-7aff-11ed-a5cd-da7ad0900002\"}]}}}}\n"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -57,11 +57,11 @@
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2023-02-13T19:25:03.666Z",
61-
"time": 511
60+
"startedDateTime": "2023-03-06T18:17:18.659Z",
61+
"time": 367
6262
},
6363
{
64-
"_id": "2f8b08583635a81f0a9e899ce62e2673",
64+
"_id": "e74a78fb1dc26c47679a82e9fd7840ce",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -85,7 +85,7 @@
8585
"postData": {
8686
"mimeType": "application/json",
8787
"params": [],
88-
"text": "{\"data\":{\"attributes\":{\"email\":\"Test-Update_a_restriction_policy_returns_OK_response-1676316303@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}"
88+
"text": "{\"data\":{\"attributes\":{\"email\":\"Test-Update_a_restriction_policy_returns_OK_response-1678126638@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}"
8989
},
9090
"queryString": [],
9191
"url": "https://api.datadoghq.com/api/v2/users"
@@ -95,7 +95,7 @@
9595
"content": {
9696
"mimeType": "application/json",
9797
"size": 699,
98-
"text": "{\"data\":{\"type\":\"users\",\"id\":\"1e1c20a6-abd4-11ed-8f6f-aef7be6704b7\",\"attributes\":{\"name\":null,\"handle\":\"test-update_a_restriction_policy_returns_ok_response-1676316303@datadoghq.com\",\"created_at\":\"2023-02-13T19:25:04.494176+00:00\",\"modified_at\":\"2023-02-13T19:25:04.498139+00:00\",\"email\":\"test-update_a_restriction_policy_returns_ok_response-1676316303@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/5e45dad0fda850cc1e7c029b0297c5b6?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n"
98+
"text": "{\"data\":{\"type\":\"users\",\"id\":\"21b46718-bc4b-11ed-a2f5-764440ef0bc1\",\"attributes\":{\"name\":null,\"handle\":\"test-update_a_restriction_policy_returns_ok_response-1678126638@datadoghq.com\",\"created_at\":\"2023-03-06T18:17:19.240151+00:00\",\"modified_at\":\"2023-03-06T18:17:19.244292+00:00\",\"email\":\"test-update_a_restriction_policy_returns_ok_response-1678126638@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/aedbf1acbf22049a33e6e48c70252b04?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n"
9999
},
100100
"cookies": [],
101101
"headers": [
@@ -110,11 +110,11 @@
110110
"status": 201,
111111
"statusText": "Created"
112112
},
113-
"startedDateTime": "2023-02-13T19:25:04.183Z",
114-
"time": 394
113+
"startedDateTime": "2023-03-06T18:17:19.032Z",
114+
"time": 280
115115
},
116116
{
117-
"_id": "9bf45bec1fe6b368d93e4289f075fb84",
117+
"_id": "b7608eb59879c559c36e3b877f5287c2",
118118
"_order": 0,
119119
"cache": {},
120120
"request": {
@@ -138,17 +138,17 @@
138138
"postData": {
139139
"mimeType": "application/json",
140140
"params": [],
141-
"text": "{\"data\":{\"id\":\"1e1c20a6-abd4-11ed-8f6f-aef7be6704b7\",\"type\":\"users\"}}"
141+
"text": "{\"data\":{\"id\":\"21b46718-bc4b-11ed-a2f5-764440ef0bc1\",\"type\":\"users\"}}"
142142
},
143143
"queryString": [],
144-
"url": "https://api.datadoghq.com/api/v2/roles/1ddd79a8-abd4-11ed-912f-da7ad0900002/users"
144+
"url": "https://api.datadoghq.com/api/v2/roles/2186776c-bc4b-11ed-ac0f-da7ad0900002/users"
145145
},
146146
"response": {
147147
"bodySize": 795,
148148
"content": {
149149
"mimeType": "application/json",
150150
"size": 795,
151-
"text": "{\"data\":[{\"type\":\"users\",\"id\":\"1e1c20a6-abd4-11ed-8f6f-aef7be6704b7\",\"attributes\":{\"name\":null,\"handle\":\"test-update_a_restriction_policy_returns_ok_response-1676316303@datadoghq.com\",\"created_at\":\"2023-02-13T19:25:04.494176+00:00\",\"modified_at\":\"2023-02-13T19:25:04.498139+00:00\",\"email\":\"test-update_a_restriction_policy_returns_ok_response-1676316303@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/5e45dad0fda850cc1e7c029b0297c5b6?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[{\"type\":\"roles\",\"id\":\"1ddd79a8-abd4-11ed-912f-da7ad0900002\"}]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}],\"meta\":{\"page\":{\"total_count\":1}}}\n"
151+
"text": "{\"data\":[{\"type\":\"users\",\"id\":\"21b46718-bc4b-11ed-a2f5-764440ef0bc1\",\"attributes\":{\"name\":null,\"handle\":\"test-update_a_restriction_policy_returns_ok_response-1678126638@datadoghq.com\",\"created_at\":\"2023-03-06T18:17:19.240151+00:00\",\"modified_at\":\"2023-03-06T18:17:19.244292+00:00\",\"email\":\"test-update_a_restriction_policy_returns_ok_response-1678126638@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/aedbf1acbf22049a33e6e48c70252b04?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[{\"type\":\"roles\",\"id\":\"2186776c-bc4b-11ed-ac0f-da7ad0900002\"}]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}],\"meta\":{\"page\":{\"total_count\":1}}}\n"
152152
},
153153
"cookies": [],
154154
"headers": [
@@ -163,11 +163,11 @@
163163
"status": 200,
164164
"statusText": "OK"
165165
},
166-
"startedDateTime": "2023-02-13T19:25:04.587Z",
167-
"time": 434
166+
"startedDateTime": "2023-03-06T18:17:19.319Z",
167+
"time": 341
168168
},
169169
{
170-
"_id": "474100e34027aa3dec0224fd550f317a",
170+
"_id": "d9f3217fbf13dbb7f67a8274eeae684d",
171171
"_order": 0,
172172
"cache": {},
173173
"request": {
@@ -191,17 +191,17 @@
191191
"postData": {
192192
"mimeType": "application/json",
193193
"params": [],
194-
"text": "{\"data\":{\"attributes\":{\"bindings\":[{\"principals\":[\"org:4dee724d-00cc-11ea-a77b-570c9d03c6c5\"],\"relation\":\"editor\"}]},\"id\":\"dashboard:abc-def-ghi\",\"type\":\"restriction_policy\"}}"
194+
"text": "{\"data\":{\"attributes\":{\"bindings\":[{\"principals\":[\"org:4dee724d-00cc-11ea-a77b-570c9d03c6c5\"],\"relation\":\"editor\"}]},\"id\":\"dashboard:test-update\",\"type\":\"restriction_policy\"}}"
195195
},
196196
"queryString": [],
197-
"url": "https://api.datadoghq.com/api/v2/restriction_policy/dashboard%3Aabc-def-ghi"
197+
"url": "https://api.datadoghq.com/api/v2/restriction_policy/dashboard%3Atest-update"
198198
},
199199
"response": {
200200
"bodySize": 176,
201201
"content": {
202202
"mimeType": "application/json",
203203
"size": 176,
204-
"text": "{\"data\":{\"type\":\"restriction_policy\",\"id\":\"dashboard:abc-def-ghi\",\"attributes\":{\"bindings\":[{\"relation\":\"editor\",\"principals\":[\"org:4dee724d-00cc-11ea-a77b-570c9d03c6c5\"]}]}}}\n"
204+
"text": "{\"data\":{\"type\":\"restriction_policy\",\"id\":\"dashboard:test-update\",\"attributes\":{\"bindings\":[{\"relation\":\"editor\",\"principals\":[\"org:4dee724d-00cc-11ea-a77b-570c9d03c6c5\"]}]}}}\n"
205205
},
206206
"cookies": [],
207207
"headers": [
@@ -216,11 +216,11 @@
216216
"status": 200,
217217
"statusText": "OK"
218218
},
219-
"startedDateTime": "2023-02-13T19:25:05.028Z",
220-
"time": 389
219+
"startedDateTime": "2023-03-06T18:17:19.667Z",
220+
"time": 306
221221
},
222222
{
223-
"_id": "7a3622ef8e228d47705672d55856a0bc",
223+
"_id": "dae0adc3460e7db87ed81f58909d4060",
224224
"_order": 0,
225225
"cache": {},
226226
"request": {
@@ -237,7 +237,7 @@
237237
"httpVersion": "HTTP/1.1",
238238
"method": "DELETE",
239239
"queryString": [],
240-
"url": "https://api.datadoghq.com/api/v2/users/1e1c20a6-abd4-11ed-8f6f-aef7be6704b7"
240+
"url": "https://api.datadoghq.com/api/v2/users/21b46718-bc4b-11ed-a2f5-764440ef0bc1"
241241
},
242242
"response": {
243243
"bodySize": 0,
@@ -253,11 +253,11 @@
253253
"status": 204,
254254
"statusText": "No Content"
255255
},
256-
"startedDateTime": "2023-02-13T19:25:05.424Z",
257-
"time": 488
256+
"startedDateTime": "2023-03-06T18:17:19.980Z",
257+
"time": 432
258258
},
259259
{
260-
"_id": "4ef29bffe9b8dcfb3ccdd8c87d7bbcc5",
260+
"_id": "e2ee893315928767658bcf77bb85b7d1",
261261
"_order": 0,
262262
"cache": {},
263263
"request": {
@@ -270,11 +270,11 @@
270270
"value": "*/*"
271271
}
272272
],
273-
"headersSize": 523,
273+
"headersSize": 520,
274274
"httpVersion": "HTTP/1.1",
275275
"method": "DELETE",
276276
"queryString": [],
277-
"url": "https://api.datadoghq.com/api/v2/roles/1ddd79a8-abd4-11ed-912f-da7ad0900002"
277+
"url": "https://api.datadoghq.com/api/v2/roles/2186776c-bc4b-11ed-ac0f-da7ad0900002"
278278
},
279279
"response": {
280280
"bodySize": 0,
@@ -295,8 +295,8 @@
295295
"status": 204,
296296
"statusText": "No Content"
297297
},
298-
"startedDateTime": "2023-02-13T19:25:05.916Z",
299-
"time": 446
298+
"startedDateTime": "2023-03-06T18:17:20.416Z",
299+
"time": 421
300300
}
301301
],
302302
"pages": [],

examples/v2/restriction-policies/DeleteRestrictionPolicy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const configuration = client.createConfiguration();
88
const apiInstance = new v2.RestrictionPoliciesApi(configuration);
99

1010
const params: v2.RestrictionPoliciesApiDeleteRestrictionPolicyRequest = {
11-
resourceId: "dashboard:abc-def-ghi",
11+
resourceId: "dashboard:test-delete",
1212
};
1313

1414
apiInstance

examples/v2/restriction-policies/GetRestrictionPolicy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const configuration = client.createConfiguration();
88
const apiInstance = new v2.RestrictionPoliciesApi(configuration);
99

1010
const params: v2.RestrictionPoliciesApiGetRestrictionPolicyRequest = {
11-
resourceId: "dashboard:abc-def-ghi",
11+
resourceId: "dashboard:test-get",
1212
};
1313

1414
apiInstance

examples/v2/restriction-policies/UpdateRestrictionPolicy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const apiInstance = new v2.RestrictionPoliciesApi(configuration);
1212
const params: v2.RestrictionPoliciesApiUpdateRestrictionPolicyRequest = {
1313
body: {
1414
data: {
15-
id: "dashboard:abc-def-ghi",
15+
id: "dashboard:test-update",
1616
type: "restriction_policy",
1717
attributes: {
1818
bindings: [
@@ -24,7 +24,7 @@ const params: v2.RestrictionPoliciesApiUpdateRestrictionPolicyRequest = {
2424
},
2525
},
2626
},
27-
resourceId: "dashboard:abc-def-ghi",
27+
resourceId: "dashboard:test-update",
2828
};
2929

3030
apiInstance

0 commit comments

Comments
 (0)