Skip to content

Commit cce28d1

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 9008213 of spec repo
1 parent 43b92ca commit cce28d1

28 files changed

Lines changed: 4021 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 949 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
@@ -4306,6 +4306,31 @@
43064306
"v2.GetApiMultistepSubtestParents" => {
43074307
"public_id" => "String",
43084308
},
4309+
"v2.ListSyntheticsDowntimes" => {
4310+
"filter_test_ids" => "String",
4311+
"filter_active" => "String",
4312+
},
4313+
"v2.CreateSyntheticsDowntime" => {
4314+
"body" => "SyntheticsDowntimeRequest",
4315+
},
4316+
"v2.DeleteSyntheticsDowntime" => {
4317+
"downtime_id" => "String",
4318+
},
4319+
"v2.GetSyntheticsDowntime" => {
4320+
"downtime_id" => "String",
4321+
},
4322+
"v2.UpdateSyntheticsDowntime" => {
4323+
"downtime_id" => "String",
4324+
"body" => "SyntheticsDowntimeRequest",
4325+
},
4326+
"v2.RemoveTestFromSyntheticsDowntime" => {
4327+
"downtime_id" => "String",
4328+
"test_id" => "String",
4329+
},
4330+
"v2.AddTestToSyntheticsDowntime" => {
4331+
"downtime_id" => "String",
4332+
"test_id" => "String",
4333+
},
43094334
"v2.SetOnDemandConcurrencyCap" => {
43104335
"body" => "OnDemandConcurrencyCapAttributes",
43114336
},

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 browser test result returns "API error response." response
156236
Given new "GetSyntheticsBrowserTestResult" request
@@ -342,6 +422,18 @@ Feature: Synthetics
342422
When the request is sent
343423
Then the response status is 200 OK
344424

425+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
426+
Scenario: List Synthetics downtimes returns "Bad Request" response
427+
Given new "ListSyntheticsDowntimes" request
428+
When the request is sent
429+
Then the response status is 400 Bad Request
430+
431+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
432+
Scenario: List Synthetics downtimes returns "OK" response
433+
Given new "ListSyntheticsDowntimes" request
434+
When the request is sent
435+
Then the response status is 200 OK
436+
345437
@generated @skip @team:DataDog/synthetics-orchestrating-managing
346438
Scenario: Patch a global variable returns "Bad Request" response
347439
Given new "PatchGlobalVariable" request
@@ -396,6 +488,30 @@ Feature: Synthetics
396488
When the request is sent
397489
Then the response status is 200 OK
398490

491+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
492+
Scenario: Remove a test from a Synthetics downtime returns "Bad Request" response
493+
Given new "RemoveTestFromSyntheticsDowntime" request
494+
And request contains "downtime_id" parameter from "REPLACE.ME"
495+
And request contains "test_id" parameter from "REPLACE.ME"
496+
When the request is sent
497+
Then the response status is 400 Bad Request
498+
499+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
500+
Scenario: Remove a test from a Synthetics downtime returns "Not Found" response
501+
Given new "RemoveTestFromSyntheticsDowntime" request
502+
And request contains "downtime_id" parameter from "REPLACE.ME"
503+
And request contains "test_id" parameter from "REPLACE.ME"
504+
When the request is sent
505+
Then the response status is 404 Not Found
506+
507+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
508+
Scenario: Remove a test from a Synthetics downtime returns "OK" response
509+
Given new "RemoveTestFromSyntheticsDowntime" request
510+
And request contains "downtime_id" parameter from "REPLACE.ME"
511+
And request contains "test_id" parameter from "REPLACE.ME"
512+
When the request is sent
513+
Then the response status is 200 OK
514+
399515
@team:DataDog/synthetics-orchestrating-managing
400516
Scenario: Save new value for on-demand concurrency cap returns "OK" response
401517
Given new "SetOnDemandConcurrencyCap" request
@@ -421,3 +537,27 @@ Feature: Synthetics
421537
Given new "SearchSuites" request
422538
When the request is sent
423539
Then the response status is 200 OK
540+
541+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
542+
Scenario: Update a Synthetics downtime returns "Bad Request" response
543+
Given new "UpdateSyntheticsDowntime" request
544+
And request contains "downtime_id" parameter from "REPLACE.ME"
545+
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"}}
546+
When the request is sent
547+
Then the response status is 400 Bad Request
548+
549+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
550+
Scenario: Update a Synthetics downtime returns "Not Found" response
551+
Given new "UpdateSyntheticsDowntime" request
552+
And request contains "downtime_id" parameter from "REPLACE.ME"
553+
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"}}
554+
When the request is sent
555+
Then the response status is 404 Not Found
556+
557+
@generated @skip @team:DataDog/synthetics-orchestrating-managing
558+
Scenario: Update a Synthetics downtime returns "OK" response
559+
Given new "UpdateSyntheticsDowntime" request
560+
And request contains "downtime_id" parameter from "REPLACE.ME"
561+
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"}}
562+
When the request is sent
563+
Then the response status is 200 OK

0 commit comments

Comments
 (0)