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
441 changes: 441 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions examples/v2/synthetics/CreateSyntheticsSuite.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Synthetics: Create a test suite returns "OK" response

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

body = DatadogAPIClient::V2::SuiteCreateEditRequest.new({
data: DatadogAPIClient::V2::SuiteCreateEdit.new({
attributes: DatadogAPIClient::V2::SyntheticsSuite.new({
message: "Notification message",
name: "Example suite name",
options: DatadogAPIClient::V2::SyntheticsSuiteOptions.new({
alerting: DatadogAPIClient::V2::SyntheticsSuiteOptionsAlerting.new({}),
}),
tags: [
"env:production",
],
tests: [
DatadogAPIClient::V2::SyntheticsSuiteTest.new({
alerting_criticality: DatadogAPIClient::V2::SyntheticsSuiteTestAlertingCriticality::CRITICAL,
public_id: "",
}),
],
type: DatadogAPIClient::V2::SyntheticsSuiteType::SUITE,
}),
type: DatadogAPIClient::V2::SyntheticsSuiteType::SUITE,
}),
})
p api_instance.create_synthetics_suite(body)
16 changes: 16 additions & 0 deletions examples/v2/synthetics/DeleteSyntheticsSuites.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Synthetics: Bulk delete suites returns "OK" response

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

body = DatadogAPIClient::V2::DeletedSuitesRequestDeleteRequest.new({
data: DatadogAPIClient::V2::DeletedSuitesRequestDelete.new({
attributes: DatadogAPIClient::V2::DeletedSuitesRequestDeleteAttributes.new({
public_ids: [
"",
],
}),
type: DatadogAPIClient::V2::DeletedSuitesRequestType::DELETE_SUITES_REQUEST,
}),
})
p api_instance.delete_synthetics_suites(body)
28 changes: 28 additions & 0 deletions examples/v2/synthetics/EditSyntheticsSuite.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Synthetics: edit a test suite returns "OK" response

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

body = DatadogAPIClient::V2::SuiteCreateEditRequest.new({
data: DatadogAPIClient::V2::SuiteCreateEdit.new({
attributes: DatadogAPIClient::V2::SyntheticsSuite.new({
message: "Notification message",
name: "Example suite name",
options: DatadogAPIClient::V2::SyntheticsSuiteOptions.new({
alerting: DatadogAPIClient::V2::SyntheticsSuiteOptionsAlerting.new({}),
}),
tags: [
"env:production",
],
tests: [
DatadogAPIClient::V2::SyntheticsSuiteTest.new({
alerting_criticality: DatadogAPIClient::V2::SyntheticsSuiteTestAlertingCriticality::CRITICAL,
public_id: "",
}),
],
type: DatadogAPIClient::V2::SyntheticsSuiteType::SUITE,
}),
type: DatadogAPIClient::V2::SyntheticsSuiteType::SUITE,
}),
})
p api_instance.edit_synthetics_suite("public_id", body)
5 changes: 5 additions & 0 deletions examples/v2/synthetics/GetSyntheticsSuite.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Synthetics: Get a suite returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
p api_instance.get_synthetics_suite("public_id")
5 changes: 5 additions & 0 deletions examples/v2/synthetics/SearchSuites.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Search Synthetics suites returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::SyntheticsAPI.new
p api_instance.search_suites()
20 changes: 20 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3090,6 +3090,26 @@
"v2.SetOnDemandConcurrencyCap" => {
"body" => "OnDemandConcurrencyCapAttributes",
},
"v2.CreateSyntheticsSuite" => {
"body" => "SuiteCreateEditRequest",
},
"v2.DeleteSyntheticsSuites" => {
"body" => "DeletedSuitesRequestDeleteRequest",
},
"v2.SearchSuites" => {
"query" => "String",
"sort" => "String",
"facets_only" => "Boolean",
"start" => "Integer",
"count" => "Integer",
},
"v2.GetSyntheticsSuite" => {
"public_id" => "String",
},
"v2.EditSyntheticsSuite" => {
"public_id" => "String",
"body" => "SuiteCreateEditRequest",
},
"v2.ListTeams" => {
"page_number" => "Integer",
"page_size" => "Integer",
Expand Down
70 changes: 70 additions & 0 deletions features/v2/synthetics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,73 @@ Feature: Synthetics
When the request is sent
Then the response status is 200 OK
And the response "data.attributes.on_demand_concurrency_cap" is equal to 20

@generated @skip @team:DataDog/synthetics-managing
Scenario: Search Synthetics suites returns "API error response." response
Given new "SearchSuites" request
When the request is sent
Then the response status is 400 API error response.

@generated @skip @team:DataDog/synthetics-managing
Scenario: Search Synthetics suites returns "OK" response
Given new "SearchSuites" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-managing
Scenario: Synthetics: Bulk delete suites returns "API error response." response
Given new "DeleteSyntheticsSuites" request
And body with value {"data": {"attributes": {"public_ids": [""]}, "type": "delete_suites_request"}}
When the request is sent
Then the response status is 400 API error response.

@generated @skip @team:DataDog/synthetics-managing
Scenario: Synthetics: Bulk delete suites returns "OK" response
Given new "DeleteSyntheticsSuites" request
And body with value {"data": {"attributes": {"public_ids": [""]}, "type": "delete_suites_request"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-managing
Scenario: Synthetics: Create a test suite returns "API error response." response
Given new "CreateSyntheticsSuite" request
And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {"alerting": {}}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suite"}}
When the request is sent
Then the response status is 400 API error response.

@generated @skip @team:DataDog/synthetics-managing
Scenario: Synthetics: Create a test suite returns "OK" response
Given new "CreateSyntheticsSuite" request
And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {"alerting": {}}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suite"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/synthetics-managing
Scenario: Synthetics: Get a suite returns "API error response." response
Given new "GetSyntheticsSuite" request
And request contains "public_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 API error response.

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

@generated @skip @team:DataDog/synthetics-managing
Scenario: Synthetics: edit a test suite returns "API error response." response
Given new "EditSyntheticsSuite" request
And request contains "public_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {"alerting": {}}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suite"}}
When the request is sent
Then the response status is 400 API error response.

@generated @skip @team:DataDog/synthetics-managing
Scenario: Synthetics: edit a test suite returns "OK" response
Given new "EditSyntheticsSuite" request
And request contains "public_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {"alerting": {}}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suite"}}
When the request is sent
Then the response status is 200 OK
34 changes: 34 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4284,6 +4284,40 @@
"type": "safe"
}
},
"CreateSyntheticsSuite": {
"tag": "Synthetics",
"undo": {
"operationId": "TODO",
"parameters": [],
"type": "unsafe"
}
},
"DeleteSyntheticsSuites": {
"tag": "Synthetics",
"undo": {
"operationId": "TODO",
"parameters": [],
"type": "unsafe"
}
},
"SearchSuites": {
"tag": "Synthetics",
"undo": {
"type": "safe"
}
},
"GetSyntheticsSuite": {
"tag": "Synthetics",
"undo": {
"type": "safe"
}
},
"EditSyntheticsSuite": {
"tag": "Synthetics",
"undo": {
"type": "idempotent"
}
},
"ListTagPipelinesRulesets": {
"tag": "Cloud Cost Management",
"undo": {
Expand Down
22 changes: 22 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1883,6 +1883,14 @@ def overrides
"v2.delete_apps_response" => "DeleteAppsResponse",
"v2.delete_apps_response_data_items" => "DeleteAppsResponseDataItems",
"v2.delete_custom_framework_response" => "DeleteCustomFrameworkResponse",
"v2.deleted_suite_response_data" => "DeletedSuiteResponseData",
"v2.deleted_suite_response_data_attributes" => "DeletedSuiteResponseDataAttributes",
"v2.deleted_suites_request_delete" => "DeletedSuitesRequestDelete",
"v2.deleted_suites_request_delete_attributes" => "DeletedSuitesRequestDeleteAttributes",
"v2.deleted_suites_request_delete_request" => "DeletedSuitesRequestDeleteRequest",
"v2.deleted_suites_request_type" => "DeletedSuitesRequestType",
"v2.deleted_suites_response" => "DeletedSuitesResponse",
"v2.deleted_suite_type" => "DeletedSuiteType",
"v2.dependency_location" => "DependencyLocation",
"v2.deployment" => "Deployment",
"v2.deployment_attributes" => "DeploymentAttributes",
Expand Down Expand Up @@ -4179,6 +4187,20 @@ def overrides
"v2.step" => "Step",
"v2.step_display" => "StepDisplay",
"v2.step_display_bounds" => "StepDisplayBounds",
"v2.suite_create_edit" => "SuiteCreateEdit",
"v2.suite_create_edit_request" => "SuiteCreateEditRequest",
"v2.suite_search_response_type" => "SuiteSearchResponseType",
"v2.synthetics_suite" => "SyntheticsSuite",
"v2.synthetics_suite_options" => "SyntheticsSuiteOptions",
"v2.synthetics_suite_options_alerting" => "SyntheticsSuiteOptionsAlerting",
"v2.synthetics_suite_response" => "SyntheticsSuiteResponse",
"v2.synthetics_suite_response_data" => "SyntheticsSuiteResponseData",
"v2.synthetics_suite_search_response" => "SyntheticsSuiteSearchResponse",
"v2.synthetics_suite_search_response_data" => "SyntheticsSuiteSearchResponseData",
"v2.synthetics_suite_search_response_data_attributes" => "SyntheticsSuiteSearchResponseDataAttributes",
"v2.synthetics_suite_test" => "SyntheticsSuiteTest",
"v2.synthetics_suite_test_alerting_criticality" => "SyntheticsSuiteTestAlertingCriticality",
"v2.synthetics_suite_type" => "SyntheticsSuiteType",
"v2.table_result_v2" => "TableResultV2",
"v2.table_result_v2_array" => "TableResultV2Array",
"v2.table_result_v2_data" => "TableResultV2Data",
Expand Down
Loading
Loading