Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
862 changes: 862 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions examples/v2/synthetics/AddTestToSyntheticsDowntime.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Add a test to a Synthetics downtime returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
p api_instance.add_test_to_synthetics_downtime("00000000-0000-0000-0000-000000000001", "abc-def-123")
31 changes: 31 additions & 0 deletions examples/v2/synthetics/CreateSyntheticsDowntime.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Create a Synthetics downtime returns "Created" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new

body = DatadogAPIClient::V2::SyntheticsDowntimeRequest.new({
data: DatadogAPIClient::V2::SyntheticsDowntimeDataRequest.new({
attributes: DatadogAPIClient::V2::SyntheticsDowntimeDataAttributesRequest.new({
is_enabled: true,
name: "Weekly maintenance",
test_ids: [
"abc-def-123",
],
time_slots: [
DatadogAPIClient::V2::SyntheticsDowntimeTimeSlotRequest.new({
duration: 3600,
start: DatadogAPIClient::V2::SyntheticsDowntimeTimeSlotDate.new({
day: 15,
hour: 10,
minute: 30,
month: 1,
year: 2024,
}),
timezone: "Europe/Paris",
}),
],
}),
type: DatadogAPIClient::V2::SyntheticsDowntimeResourceType::DOWNTIME,
}),
})
p api_instance.create_synthetics_downtime(body)
5 changes: 5 additions & 0 deletions examples/v2/synthetics/DeleteSyntheticsDowntime.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Delete a Synthetics downtime returns "No Content" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
api_instance.delete_synthetics_downtime("00000000-0000-0000-0000-000000000001")
5 changes: 5 additions & 0 deletions examples/v2/synthetics/GetSyntheticsDowntime.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get a Synthetics downtime returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
p api_instance.get_synthetics_downtime("00000000-0000-0000-0000-000000000001")
5 changes: 5 additions & 0 deletions examples/v2/synthetics/ListSyntheticsDowntimes.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# List Synthetics downtimes returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
p api_instance.list_synthetics_downtimes()
5 changes: 5 additions & 0 deletions examples/v2/synthetics/RemoveTestFromSyntheticsDowntime.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Remove a test from a Synthetics downtime returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
p api_instance.remove_test_from_synthetics_downtime("00000000-0000-0000-0000-000000000001", "abc-def-123")
31 changes: 31 additions & 0 deletions examples/v2/synthetics/UpdateSyntheticsDowntime.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Update a Synthetics downtime returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new

body = DatadogAPIClient::V2::SyntheticsDowntimeRequest.new({
data: DatadogAPIClient::V2::SyntheticsDowntimeDataRequest.new({
attributes: DatadogAPIClient::V2::SyntheticsDowntimeDataAttributesRequest.new({
is_enabled: true,
name: "Weekly maintenance",
test_ids: [
"abc-def-123",
],
time_slots: [
DatadogAPIClient::V2::SyntheticsDowntimeTimeSlotRequest.new({
duration: 3600,
start: DatadogAPIClient::V2::SyntheticsDowntimeTimeSlotDate.new({
day: 15,
hour: 10,
minute: 30,
month: 1,
year: 2024,
}),
timezone: "Europe/Paris",
}),
],
}),
type: DatadogAPIClient::V2::SyntheticsDowntimeResourceType::DOWNTIME,
}),
})
p api_instance.update_synthetics_downtime("00000000-0000-0000-0000-000000000001", body)
25 changes: 25 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4300,6 +4300,31 @@
"v2.GetApiMultistepSubtestParents" => {
"public_id" => "String",
},
"v2.ListSyntheticsDowntimes" => {
"filter_test_ids" => "String",
"filter_active" => "String",
},
"v2.CreateSyntheticsDowntime" => {
"body" => "SyntheticsDowntimeRequest",
},
"v2.DeleteSyntheticsDowntime" => {
"downtime_id" => "String",
},
"v2.GetSyntheticsDowntime" => {
"downtime_id" => "String",
},
"v2.UpdateSyntheticsDowntime" => {
"downtime_id" => "String",
"body" => "SyntheticsDowntimeRequest",
},
"v2.RemoveTestFromSyntheticsDowntime" => {
"downtime_id" => "String",
"test_id" => "String",
},
"v2.AddTestToSyntheticsDowntime" => {
"downtime_id" => "String",
"test_id" => "String",
},
"v2.SetOnDemandConcurrencyCap" => {
"body" => "OnDemandConcurrencyCapAttributes",
},
Expand Down
140 changes: 140 additions & 0 deletions features/v2/synthetics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,30 @@ Feature: Synthetics
When the request is sent
Then the response status is 204 No Content

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Add a test to a Synthetics downtime returns "Bad Request" response
Given new "AddTestToSyntheticsDowntime" request
And request contains "downtime_id" parameter from "REPLACE.ME"
And request contains "test_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Add a test to a Synthetics downtime returns "Not Found" response
Given new "AddTestToSyntheticsDowntime" request
And request contains "downtime_id" parameter from "REPLACE.ME"
And request contains "test_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Add a test to a Synthetics downtime returns "OK" response
Given new "AddTestToSyntheticsDowntime" request
And request contains "downtime_id" parameter from "REPLACE.ME"
And request contains "test_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Bulk delete suites returns "API error response." response
Given new "DeleteSyntheticsSuites" request
Expand Down Expand Up @@ -91,6 +115,20 @@ Feature: Synthetics
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Create a Synthetics downtime returns "Bad Request" response
Given new "CreateSyntheticsDowntime" request
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"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Create a Synthetics downtime returns "Created" response
Given new "CreateSyntheticsDowntime" request
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"}}
When the request is sent
Then the response status is 201 Created

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Create a test suite returns "API error response." response
Given new "CreateSyntheticsSuite" request
Expand All @@ -105,6 +143,27 @@ Feature: Synthetics
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Delete a Synthetics downtime returns "Bad Request" response
Given new "DeleteSyntheticsDowntime" request
And request contains "downtime_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Delete a Synthetics downtime returns "No Content" response
Given new "DeleteSyntheticsDowntime" request
And request contains "downtime_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 204 No Content

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Delete a Synthetics downtime returns "Not Found" response
Given new "DeleteSyntheticsDowntime" request
And request contains "downtime_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Edit a Network Path test returns "API error response." response
Given new "UpdateSyntheticsNetworkTest" request
Expand Down Expand Up @@ -151,6 +210,27 @@ Feature: Synthetics
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Get a Synthetics downtime returns "Bad Request" response
Given new "GetSyntheticsDowntime" request
And request contains "downtime_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Get a Synthetics downtime returns "Not Found" response
Given new "GetSyntheticsDowntime" request
And request contains "downtime_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Get a Synthetics downtime returns "OK" response
Given new "GetSyntheticsDowntime" request
And request contains "downtime_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Get a fast test result returns "API error response." response
Given new "GetSyntheticsFastTestResult" request
Expand Down Expand Up @@ -282,6 +362,18 @@ Feature: Synthetics
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: List Synthetics downtimes returns "Bad Request" response
Given new "ListSyntheticsDowntimes" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: List Synthetics downtimes returns "OK" response
Given new "ListSyntheticsDowntimes" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Patch a global variable returns "Bad Request" response
Given new "PatchGlobalVariable" request
Expand Down Expand Up @@ -322,6 +414,30 @@ Feature: Synthetics
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Remove a test from a Synthetics downtime returns "Bad Request" response
Given new "RemoveTestFromSyntheticsDowntime" request
And request contains "downtime_id" parameter from "REPLACE.ME"
And request contains "test_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Remove a test from a Synthetics downtime returns "Not Found" response
Given new "RemoveTestFromSyntheticsDowntime" request
And request contains "downtime_id" parameter from "REPLACE.ME"
And request contains "test_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Remove a test from a Synthetics downtime returns "OK" response
Given new "RemoveTestFromSyntheticsDowntime" request
And request contains "downtime_id" parameter from "REPLACE.ME"
And request contains "test_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@team:DataDog/synthetics-orchestrating-managing
Scenario: Save new value for on-demand concurrency cap returns "OK" response
Given new "SetOnDemandConcurrencyCap" request
Expand All @@ -347,3 +463,27 @@ Feature: Synthetics
Given new "SearchSuites" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Update a Synthetics downtime returns "Bad Request" response
Given new "UpdateSyntheticsDowntime" request
And request contains "downtime_id" parameter from "REPLACE.ME"
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"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Update a Synthetics downtime returns "Not Found" response
Given new "UpdateSyntheticsDowntime" request
And request contains "downtime_id" parameter from "REPLACE.ME"
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"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/synthetics-orchestrating-managing
Scenario: Update a Synthetics downtime returns "OK" response
Given new "UpdateSyntheticsDowntime" request
And request contains "downtime_id" parameter from "REPLACE.ME"
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"}}
When the request is sent
Then the response status is 200 OK
64 changes: 64 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -6392,6 +6392,70 @@
"type": "safe"
}
},
"ListSyntheticsDowntimes": {
"tag": "Synthetics",
"undo": {
"type": "safe"
}
},
"CreateSyntheticsDowntime": {
"tag": "Synthetics",
"undo": {
"operationId": "DeleteSyntheticsDowntime",
"parameters": [
{
"name": "downtime_id",
"path": "data.id",
"source": "response",
"type": "body"
}
],
"type": "unsafe"
}
},
"DeleteSyntheticsDowntime": {
"tag": "Synthetics",
"undo": {
"type": "idempotent"
}
},
"GetSyntheticsDowntime": {
"tag": "Synthetics",
"undo": {
"type": "safe"
}
},
"UpdateSyntheticsDowntime": {
"tag": "Synthetics",
"undo": {
"type": "unsafe"
}
},
"RemoveTestFromSyntheticsDowntime": {
"tag": "Synthetics",
"undo": {
"type": "idempotent"
}
},
"AddTestToSyntheticsDowntime": {
"tag": "Synthetics",
"undo": {
"operationId": "RemoveTestFromSyntheticsDowntime",
"parameters": [
{
"name": "downtime_id",
"source": "request",
"type": "path"
},
{
"name": "test_id",
"source": "request",
"type": "path"
}
],
"type": "unsafe"
}
},
"GetOnDemandConcurrencyCap": {
"tag": "Synthetics",
"undo": {
Expand Down
Loading
Loading