Skip to content

Commit 4cf189c

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ad3ade2 of spec repo
1 parent 9fd0929 commit 4cf189c

28 files changed

Lines changed: 3935 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 862 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Add a test to a Synthetics downtime returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5+
p api_instance.add_test_to_synthetics_downtime("00000000-0000-0000-0000-000000000001", "abc-def-123")
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Create a Synthetics downtime returns "Created" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5+
6+
body = DatadogAPIClient::V2::SyntheticsDowntimeRequest.new({
7+
data: DatadogAPIClient::V2::SyntheticsDowntimeDataRequest.new({
8+
attributes: DatadogAPIClient::V2::SyntheticsDowntimeDataAttributesRequest.new({
9+
is_enabled: true,
10+
name: "Weekly maintenance",
11+
test_ids: [
12+
"abc-def-123",
13+
],
14+
time_slots: [
15+
DatadogAPIClient::V2::SyntheticsDowntimeTimeSlotRequest.new({
16+
duration: 3600,
17+
start: DatadogAPIClient::V2::SyntheticsDowntimeTimeSlotDate.new({
18+
day: 15,
19+
hour: 10,
20+
minute: 30,
21+
month: 1,
22+
year: 2024,
23+
}),
24+
timezone: "Europe/Paris",
25+
}),
26+
],
27+
}),
28+
type: DatadogAPIClient::V2::SyntheticsDowntimeResourceType::DOWNTIME,
29+
}),
30+
})
31+
p api_instance.create_synthetics_downtime(body)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Delete a Synthetics downtime returns "No Content" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5+
api_instance.delete_synthetics_downtime("00000000-0000-0000-0000-000000000001")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Get a Synthetics downtime returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5+
p api_instance.get_synthetics_downtime("00000000-0000-0000-0000-000000000001")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# List Synthetics downtimes returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5+
p api_instance.list_synthetics_downtimes()
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Remove a test from a Synthetics downtime returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5+
p api_instance.remove_test_from_synthetics_downtime("00000000-0000-0000-0000-000000000001", "abc-def-123")
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Update a Synthetics downtime returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
5+
6+
body = DatadogAPIClient::V2::SyntheticsDowntimeRequest.new({
7+
data: DatadogAPIClient::V2::SyntheticsDowntimeDataRequest.new({
8+
attributes: DatadogAPIClient::V2::SyntheticsDowntimeDataAttributesRequest.new({
9+
is_enabled: true,
10+
name: "Weekly maintenance",
11+
test_ids: [
12+
"abc-def-123",
13+
],
14+
time_slots: [
15+
DatadogAPIClient::V2::SyntheticsDowntimeTimeSlotRequest.new({
16+
duration: 3600,
17+
start: DatadogAPIClient::V2::SyntheticsDowntimeTimeSlotDate.new({
18+
day: 15,
19+
hour: 10,
20+
minute: 30,
21+
month: 1,
22+
year: 2024,
23+
}),
24+
timezone: "Europe/Paris",
25+
}),
26+
],
27+
}),
28+
type: DatadogAPIClient::V2::SyntheticsDowntimeResourceType::DOWNTIME,
29+
}),
30+
})
31+
p api_instance.update_synthetics_downtime("00000000-0000-0000-0000-000000000001", body)

features/scenarios_model_mapping.rb

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4300,6 +4300,31 @@
43004300
"v2.GetApiMultistepSubtestParents" => {
43014301
"public_id" => "String",
43024302
},
4303+
"v2.ListSyntheticsDowntimes" => {
4304+
"filter_test_ids" => "String",
4305+
"filter_active" => "String",
4306+
},
4307+
"v2.CreateSyntheticsDowntime" => {
4308+
"body" => "SyntheticsDowntimeRequest",
4309+
},
4310+
"v2.DeleteSyntheticsDowntime" => {
4311+
"downtime_id" => "String",
4312+
},
4313+
"v2.GetSyntheticsDowntime" => {
4314+
"downtime_id" => "String",
4315+
},
4316+
"v2.UpdateSyntheticsDowntime" => {
4317+
"downtime_id" => "String",
4318+
"body" => "SyntheticsDowntimeRequest",
4319+
},
4320+
"v2.RemoveTestFromSyntheticsDowntime" => {
4321+
"downtime_id" => "String",
4322+
"test_id" => "String",
4323+
},
4324+
"v2.AddTestToSyntheticsDowntime" => {
4325+
"downtime_id" => "String",
4326+
"test_id" => "String",
4327+
},
43034328
"v2.SetOnDemandConcurrencyCap" => {
43044329
"body" => "OnDemandConcurrencyCapAttributes",
43054330
},

features/v2/synthetics.feature

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,30 @@ Feature: Synthetics
3333
When the request is sent
3434
Then the response status is 204 No Content
3535

36+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
37+
Scenario: Add a test to a Synthetics downtime returns "Bad Request" response
38+
Given new "AddTestToSyntheticsDowntime" request
39+
And request contains "downtime_id" parameter from "REPLACE.ME"
40+
And request contains "test_id" parameter from "REPLACE.ME"
41+
When the request is sent
42+
Then the response status is 400 Bad Request
43+
44+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
45+
Scenario: Add a test to a Synthetics downtime returns "Not Found" response
46+
Given new "AddTestToSyntheticsDowntime" request
47+
And request contains "downtime_id" parameter from "REPLACE.ME"
48+
And request contains "test_id" parameter from "REPLACE.ME"
49+
When the request is sent
50+
Then the response status is 404 Not Found
51+
52+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
53+
Scenario: Add a test to a Synthetics downtime returns "OK" response
54+
Given new "AddTestToSyntheticsDowntime" request
55+
And request contains "downtime_id" parameter from "REPLACE.ME"
56+
And request contains "test_id" parameter from "REPLACE.ME"
57+
When the request is sent
58+
Then the response status is 200 OK
59+
3660
@generated @skip @team:DataDog/synthetics-orchestrating-managing
3761
Scenario: Bulk delete suites returns "API error response." response
3862
Given new "DeleteSyntheticsSuites" request
@@ -91,6 +115,20 @@ Feature: Synthetics
91115
When the request is sent
92116
Then the response status is 200 OK
93117

118+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
119+
Scenario: Create a Synthetics downtime returns "Bad Request" response
120+
Given new "CreateSyntheticsDowntime" request
121+
And body with value {"data": {"attributes": {"isEnabled": true, "name": "Weekly maintenance", "testIds": ["abc-def-123"], "timeSlots": [{"duration": 3600, "start": {"day": 15, "hour": 10, "minute": 30, "month": 1, "year": 2024}, "timezone": "Europe/Paris"}]}, "type": "downtime"}}
122+
When the request is sent
123+
Then the response status is 400 Bad Request
124+
125+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
126+
Scenario: Create a Synthetics downtime returns "Created" response
127+
Given new "CreateSyntheticsDowntime" request
128+
And body with value {"data": {"attributes": {"isEnabled": true, "name": "Weekly maintenance", "testIds": ["abc-def-123"], "timeSlots": [{"duration": 3600, "start": {"day": 15, "hour": 10, "minute": 30, "month": 1, "year": 2024}, "timezone": "Europe/Paris"}]}, "type": "downtime"}}
129+
When the request is sent
130+
Then the response status is 201 Created
131+
94132
@generated @skip @team:DataDog/synthetics-orchestrating-managing
95133
Scenario: Create a test suite returns "API error response." response
96134
Given new "CreateSyntheticsSuite" request
@@ -105,6 +143,27 @@ Feature: Synthetics
105143
When the request is sent
106144
Then the response status is 200 OK
107145

146+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
147+
Scenario: Delete a Synthetics downtime returns "Bad Request" response
148+
Given new "DeleteSyntheticsDowntime" request
149+
And request contains "downtime_id" parameter from "REPLACE.ME"
150+
When the request is sent
151+
Then the response status is 400 Bad Request
152+
153+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
154+
Scenario: Delete a Synthetics downtime returns "No Content" response
155+
Given new "DeleteSyntheticsDowntime" request
156+
And request contains "downtime_id" parameter from "REPLACE.ME"
157+
When the request is sent
158+
Then the response status is 204 No Content
159+
160+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
161+
Scenario: Delete a Synthetics downtime returns "Not Found" response
162+
Given new "DeleteSyntheticsDowntime" request
163+
And request contains "downtime_id" parameter from "REPLACE.ME"
164+
When the request is sent
165+
Then the response status is 404 Not Found
166+
108167
@generated @skip @team:DataDog/synthetics-orchestrating-managing
109168
Scenario: Edit a Network Path test returns "API error response." response
110169
Given new "UpdateSyntheticsNetworkTest" request
@@ -151,6 +210,27 @@ Feature: Synthetics
151210
When the request is sent
152211
Then the response status is 200 OK
153212

213+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
214+
Scenario: Get a Synthetics downtime returns "Bad Request" response
215+
Given new "GetSyntheticsDowntime" request
216+
And request contains "downtime_id" parameter from "REPLACE.ME"
217+
When the request is sent
218+
Then the response status is 400 Bad Request
219+
220+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
221+
Scenario: Get a Synthetics downtime returns "Not Found" response
222+
Given new "GetSyntheticsDowntime" request
223+
And request contains "downtime_id" parameter from "REPLACE.ME"
224+
When the request is sent
225+
Then the response status is 404 Not Found
226+
227+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
228+
Scenario: Get a Synthetics downtime returns "OK" response
229+
Given new "GetSyntheticsDowntime" request
230+
And request contains "downtime_id" parameter from "REPLACE.ME"
231+
When the request is sent
232+
Then the response status is 200 OK
233+
154234
@generated @skip @team:DataDog/synthetics-orchestrating-managing
155235
Scenario: Get a fast test result returns "API error response." response
156236
Given new "GetSyntheticsFastTestResult" request
@@ -282,6 +362,18 @@ Feature: Synthetics
282362
When the request is sent
283363
Then the response status is 200 OK
284364

365+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
366+
Scenario: List Synthetics downtimes returns "Bad Request" response
367+
Given new "ListSyntheticsDowntimes" request
368+
When the request is sent
369+
Then the response status is 400 Bad Request
370+
371+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
372+
Scenario: List Synthetics downtimes returns "OK" response
373+
Given new "ListSyntheticsDowntimes" request
374+
When the request is sent
375+
Then the response status is 200 OK
376+
285377
@generated @skip @team:DataDog/synthetics-orchestrating-managing
286378
Scenario: Patch a global variable returns "Bad Request" response
287379
Given new "PatchGlobalVariable" request
@@ -322,6 +414,30 @@ Feature: Synthetics
322414
When the request is sent
323415
Then the response status is 200 OK
324416

417+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
418+
Scenario: Remove a test from a Synthetics downtime returns "Bad Request" response
419+
Given new "RemoveTestFromSyntheticsDowntime" request
420+
And request contains "downtime_id" parameter from "REPLACE.ME"
421+
And request contains "test_id" parameter from "REPLACE.ME"
422+
When the request is sent
423+
Then the response status is 400 Bad Request
424+
425+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
426+
Scenario: Remove a test from a Synthetics downtime returns "Not Found" response
427+
Given new "RemoveTestFromSyntheticsDowntime" request
428+
And request contains "downtime_id" parameter from "REPLACE.ME"
429+
And request contains "test_id" parameter from "REPLACE.ME"
430+
When the request is sent
431+
Then the response status is 404 Not Found
432+
433+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
434+
Scenario: Remove a test from a Synthetics downtime returns "OK" response
435+
Given new "RemoveTestFromSyntheticsDowntime" request
436+
And request contains "downtime_id" parameter from "REPLACE.ME"
437+
And request contains "test_id" parameter from "REPLACE.ME"
438+
When the request is sent
439+
Then the response status is 200 OK
440+
325441
@team:DataDog/synthetics-orchestrating-managing
326442
Scenario: Save new value for on-demand concurrency cap returns "OK" response
327443
Given new "SetOnDemandConcurrencyCap" request
@@ -347,3 +463,27 @@ Feature: Synthetics
347463
Given new "SearchSuites" request
348464
When the request is sent
349465
Then the response status is 200 OK
466+
467+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
468+
Scenario: Update a Synthetics downtime returns "Bad Request" response
469+
Given new "UpdateSyntheticsDowntime" request
470+
And request contains "downtime_id" parameter from "REPLACE.ME"
471+
And body with value {"data": {"attributes": {"isEnabled": true, "name": "Weekly maintenance", "testIds": ["abc-def-123"], "timeSlots": [{"duration": 3600, "start": {"day": 15, "hour": 10, "minute": 30, "month": 1, "year": 2024}, "timezone": "Europe/Paris"}]}, "type": "downtime"}}
472+
When the request is sent
473+
Then the response status is 400 Bad Request
474+
475+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
476+
Scenario: Update a Synthetics downtime returns "Not Found" response
477+
Given new "UpdateSyntheticsDowntime" request
478+
And request contains "downtime_id" parameter from "REPLACE.ME"
479+
And body with value {"data": {"attributes": {"isEnabled": true, "name": "Weekly maintenance", "testIds": ["abc-def-123"], "timeSlots": [{"duration": 3600, "start": {"day": 15, "hour": 10, "minute": 30, "month": 1, "year": 2024}, "timezone": "Europe/Paris"}]}, "type": "downtime"}}
480+
When the request is sent
481+
Then the response status is 404 Not Found
482+
483+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
484+
Scenario: Update a Synthetics downtime returns "OK" response
485+
Given new "UpdateSyntheticsDowntime" request
486+
And request contains "downtime_id" parameter from "REPLACE.ME"
487+
And body with value {"data": {"attributes": {"isEnabled": true, "name": "Weekly maintenance", "testIds": ["abc-def-123"], "timeSlots": [{"duration": 3600, "start": {"day": 15, "hour": 10, "minute": 30, "month": 1, "year": 2024}, "timezone": "Europe/Paris"}]}, "type": "downtime"}}
488+
When the request is sent
489+
Then the response status is 200 OK

0 commit comments

Comments
 (0)