Skip to content
Merged
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
923 changes: 923 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions examples/v2/cloud-cost-management/GetCostAccountFilters.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get account filters returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
p api_instance.get_cost_account_filters(9223372036854775807)
24 changes: 24 additions & 0 deletions examples/v2/cloud-cost-management/UpdateCostAccountFilters.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Update account filters returns "OK" response

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

body = DatadogAPIClient::V2::AccountFiltersPatchRequest.new({
data: DatadogAPIClient::V2::AccountFiltersPatchData.new({
attributes: DatadogAPIClient::V2::AccountFiltersPatchRequestAttributes.new({
account_filters: DatadogAPIClient::V2::AccountFilteringConfig.new({
excluded_accounts: [
"123456789123",
"123456789143",
],
include_new_accounts: true,
included_accounts: [
"123456789123",
"123456789143",
],
}),
}),
type: DatadogAPIClient::V2::AccountFiltersPatchRequestType::ACCOUNT_FILTERS_PATCH_REQUEST,
}),
})
p api_instance.update_cost_account_filters(9223372036854775807, body)
29 changes: 29 additions & 0 deletions examples/v2/incidents/CreateIncidentUserDefinedRole.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Create an incident user-defined role returns "Created" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.create_incident_user_defined_role".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new

body = DatadogAPIClient::V2::IncidentUserDefinedRoleRequest.new({
data: DatadogAPIClient::V2::IncidentUserDefinedRoleDataRequest.new({
attributes: DatadogAPIClient::V2::IncidentUserDefinedRoleDataAttributesRequest.new({
description: "The technical lead for the incident.",
name: "Tech Lead",
policy: DatadogAPIClient::V2::IncidentUserDefinedRolePolicy.new({
is_single: true,
}),
}),
relationships: DatadogAPIClient::V2::IncidentUserDefinedRoleRelationshipsRequest.new({
incident_type: DatadogAPIClient::V2::IncidentUserDefinedRoleIncidentTypeRelationship.new({
data: DatadogAPIClient::V2::IncidentUserDefinedRoleIncidentTypeRelationshipData.new({
id: "00000000-0000-0000-0000-000000000001",
type: "incident_types",
}),
}),
}),
type: DatadogAPIClient::V2::IncidentUserDefinedRoleType::INCIDENT_USER_DEFINED_ROLES,
}),
})
p api_instance.create_incident_user_defined_role(body)
8 changes: 8 additions & 0 deletions examples/v2/incidents/DeleteIncidentUserDefinedRole.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Delete an incident user-defined role returns "No Content" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.delete_incident_user_defined_role".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
api_instance.delete_incident_user_defined_role("00000000-0000-0000-0000-000000000002")
8 changes: 8 additions & 0 deletions examples/v2/incidents/GetIncidentUserDefinedRole.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Get an incident user-defined role returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.get_incident_user_defined_role".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
p api_instance.get_incident_user_defined_role("00000000-0000-0000-0000-000000000002")
8 changes: 8 additions & 0 deletions examples/v2/incidents/ListIncidentUserDefinedRoles.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# List incident user-defined roles returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_incident_user_defined_roles".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
p api_instance.list_incident_user_defined_roles()
22 changes: 22 additions & 0 deletions examples/v2/incidents/UpdateIncidentUserDefinedRole.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Update an incident user-defined role returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.update_incident_user_defined_role".to_sym] = true
end
api_instance = DatadogAPIClient::V2::IncidentsAPI.new

body = DatadogAPIClient::V2::IncidentUserDefinedRolePatchRequest.new({
data: DatadogAPIClient::V2::IncidentUserDefinedRolePatchDataRequest.new({
attributes: DatadogAPIClient::V2::IncidentUserDefinedRolePatchDataAttributesRequest.new({
description: "The technical lead for the incident.",
name: "Tech Lead",
policy: DatadogAPIClient::V2::IncidentUserDefinedRolePolicy.new({
is_single: true,
}),
}),
id: "00000000-0000-0000-0000-000000000002",
type: DatadogAPIClient::V2::IncidentUserDefinedRoleType::INCIDENT_USER_DEFINED_ROLES,
}),
})
p api_instance.update_incident_user_defined_role("00000000-0000-0000-0000-000000000002", body)
8 changes: 8 additions & 0 deletions examples/v2/org-groups/ListOrgGroupPolicySuggestions.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# List org group policy suggestions returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_org_group_policy_suggestions".to_sym] = true
end
api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new
p api_instance.list_org_group_policy_suggestions("a1b2c3d4-e5f6-7890-abcd-ef0123456789")
30 changes: 30 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2661,6 +2661,13 @@
"page_size" => "Integer",
"page_cursor" => "String",
},
"v2.GetCostAccountFilters" => {
"cloud_account_id" => "Integer",
},
"v2.UpdateCostAccountFilters" => {
"cloud_account_id" => "Integer",
"body" => "AccountFiltersPatchRequest",
},
"v2.ListCostAnomalies" => {
"start" => "Integer",
"_end" => "Integer",
Expand Down Expand Up @@ -3553,6 +3560,26 @@
"include" => "String",
"body" => "IncidentUserDefinedFieldUpdateRequest",
},
"v2.ListIncidentUserDefinedRoles" => {
"filter_incident_type" => "UUID",
"include" => "String",
},
"v2.CreateIncidentUserDefinedRole" => {
"include" => "String",
"body" => "IncidentUserDefinedRoleRequest",
},
"v2.DeleteIncidentUserDefinedRole" => {
"role_id" => "UUID",
},
"v2.GetIncidentUserDefinedRole" => {
"role_id" => "UUID",
"include" => "String",
},
"v2.UpdateIncidentUserDefinedRole" => {
"role_id" => "UUID",
"include" => "String",
"body" => "IncidentUserDefinedRolePatchRequest",
},
"v2.ImportIncident" => {
"include" => "Array<IncidentImportRelatedObject>",
"body" => "IncidentImportRequest",
Expand Down Expand Up @@ -4679,6 +4706,9 @@
"org_group_policy_override_id" => "UUID",
"body" => "OrgGroupPolicyOverrideUpdateRequest",
},
"v2.ListOrgGroupPolicySuggestions" => {
"filter_org_group_id" => "UUID",
},
"v2.ListOrgGroups" => {
"page_number" => "Integer",
"page_size" => "Integer",
Expand Down
45 changes: 45 additions & 0 deletions features/v2/cloud_cost_management.feature
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,27 @@ Feature: Cloud Cost Management
And the response "data.type" is equal to "ruleset"
And the response "data.attributes.name" is equal to "EVP Cost Tags"

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Get account filters returns "Bad Request" response
Given new "GetCostAccountFilters" request
And request contains "cloud_account_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Get account filters returns "Not Found" response
Given new "GetCostAccountFilters" request
And request contains "cloud_account_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Get account filters returns "OK" response
Given new "GetCostAccountFilters" request
And request contains "cloud_account_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Get budget returns "Bad Request" response
Given new "GetBudget" request
Expand Down Expand Up @@ -962,6 +983,30 @@ Feature: Cloud Cost Management
Then the response status is 200 OK
And the response "data.attributes.account_id" is equal to "123456_A123BC_12AB34"

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Update account filters returns "Bad Request" response
Given new "UpdateCostAccountFilters" request
And request contains "cloud_account_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"account_filters": {"excluded_accounts": ["123456789123", "123456789143"], "include_new_accounts": true, "included_accounts": ["123456789123", "123456789143"]}}, "type": "account_filters_patch_request"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Update account filters returns "Not Found" response
Given new "UpdateCostAccountFilters" request
And request contains "cloud_account_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"account_filters": {"excluded_accounts": ["123456789123", "123456789143"], "include_new_accounts": true, "included_accounts": ["123456789123", "123456789143"]}}, "type": "account_filters_patch_request"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Update account filters returns "OK" response
Given new "UpdateCostAccountFilters" request
And request contains "cloud_account_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"account_filters": {"excluded_accounts": ["123456789123", "123456789143"], "include_new_accounts": true, "included_accounts": ["123456789123", "123456789143"]}}, "type": "account_filters_patch_request"}}
When the request is sent
Then the response status is 200 OK

@replay-only @team:DataDog/cloud-cost-management
Scenario: Update custom allocation rule returns "OK" response
Given new "UpdateCustomAllocationRule" request
Expand Down
105 changes: 105 additions & 0 deletions features/v2/incidents.feature
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,22 @@ Feature: Incidents
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/incident-app
Scenario: Create an incident user-defined role returns "Bad Request" response
Given operation "CreateIncidentUserDefinedRole" enabled
And new "CreateIncidentUserDefinedRole" request
And body with value {"data": {"attributes": {"description": "The technical lead for the incident.", "name": "Tech Lead", "policy": {"is_single": true}}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000001", "type": "incident_types"}}}, "type": "incident_user_defined_roles"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/incident-app
Scenario: Create an incident user-defined role returns "Created" response
Given operation "CreateIncidentUserDefinedRole" enabled
And new "CreateIncidentUserDefinedRole" request
And body with value {"data": {"attributes": {"description": "The technical lead for the incident.", "name": "Tech Lead", "policy": {"is_single": true}}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000001", "type": "incident_types"}}}, "type": "incident_user_defined_roles"}}
When the request is sent
Then the response status is 201 Created

@generated @skip @team:DataDog/incident-app
Scenario: Create global incident handle returns "Bad Request" response
Given operation "CreateGlobalIncidentHandle" enabled
Expand Down Expand Up @@ -530,6 +546,30 @@ Feature: Incidents
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/incident-app
Scenario: Delete an incident user-defined role returns "Bad Request" response
Given operation "DeleteIncidentUserDefinedRole" enabled
And new "DeleteIncidentUserDefinedRole" request
And request contains "role_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/incident-app
Scenario: Delete an incident user-defined role returns "No Content" response
Given operation "DeleteIncidentUserDefinedRole" enabled
And new "DeleteIncidentUserDefinedRole" request
And request contains "role_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 204 No Content

@generated @skip @team:DataDog/incident-app
Scenario: Delete an incident user-defined role returns "Not Found" response
Given operation "DeleteIncidentUserDefinedRole" enabled
And new "DeleteIncidentUserDefinedRole" request
And request contains "role_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/incident-app
Scenario: Delete global incident handle returns "Bad Request" response
Given operation "DeleteGlobalIncidentHandle" enabled
Expand Down Expand Up @@ -781,6 +821,30 @@ Feature: Incidents
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/incident-app
Scenario: Get an incident user-defined role returns "Bad Request" response
Given operation "GetIncidentUserDefinedRole" enabled
And new "GetIncidentUserDefinedRole" request
And request contains "role_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/incident-app
Scenario: Get an incident user-defined role returns "Not Found" response
Given operation "GetIncidentUserDefinedRole" enabled
And new "GetIncidentUserDefinedRole" request
And request contains "role_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/incident-app
Scenario: Get an incident user-defined role returns "OK" response
Given operation "GetIncidentUserDefinedRole" enabled
And new "GetIncidentUserDefinedRole" request
And request contains "role_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/incident-app
Scenario: Get global incident settings returns "Bad Request" response
Given operation "GetGlobalIncidentSettings" enabled
Expand Down Expand Up @@ -1108,6 +1172,20 @@ Feature: Incidents
Then the response status is 200 OK
And the response "data" has length 0

@generated @skip @team:DataDog/incident-app
Scenario: List incident user-defined roles returns "Bad Request" response
Given operation "ListIncidentUserDefinedRoles" enabled
And new "ListIncidentUserDefinedRoles" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/incident-app
Scenario: List incident user-defined roles returns "OK" response
Given operation "ListIncidentUserDefinedRoles" enabled
And new "ListIncidentUserDefinedRoles" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/incident-app
Scenario: List postmortem templates returns "Bad Request" response
Given operation "ListIncidentPostmortemTemplates" enabled
Expand Down Expand Up @@ -1348,6 +1426,33 @@ Feature: Incidents
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/incident-app
Scenario: Update an incident user-defined role returns "Bad Request" response
Given operation "UpdateIncidentUserDefinedRole" enabled
And new "UpdateIncidentUserDefinedRole" request
And request contains "role_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"description": "The technical lead for the incident.", "name": "Tech Lead", "policy": {"is_single": true}}, "id": "00000000-0000-0000-0000-000000000002", "type": "incident_user_defined_roles"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/incident-app
Scenario: Update an incident user-defined role returns "Not Found" response
Given operation "UpdateIncidentUserDefinedRole" enabled
And new "UpdateIncidentUserDefinedRole" request
And request contains "role_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"description": "The technical lead for the incident.", "name": "Tech Lead", "policy": {"is_single": true}}, "id": "00000000-0000-0000-0000-000000000002", "type": "incident_user_defined_roles"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/incident-app
Scenario: Update an incident user-defined role returns "OK" response
Given operation "UpdateIncidentUserDefinedRole" enabled
And new "UpdateIncidentUserDefinedRole" request
And request contains "role_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"description": "The technical lead for the incident.", "name": "Tech Lead", "policy": {"is_single": true}}, "id": "00000000-0000-0000-0000-000000000002", "type": "incident_user_defined_roles"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/incident-app
Scenario: Update global incident handle returns "Bad Request" response
Given operation "UpdateGlobalIncidentHandle" enabled
Expand Down
16 changes: 16 additions & 0 deletions features/v2/org_groups.feature
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,22 @@ Feature: Org Groups
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/org-management
Scenario: List org group policy suggestions returns "Bad Request" response
Given operation "ListOrgGroupPolicySuggestions" enabled
And new "ListOrgGroupPolicySuggestions" request
And request contains "filter[org_group_id]" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/org-management
Scenario: List org group policy suggestions returns "OK" response
Given operation "ListOrgGroupPolicySuggestions" enabled
And new "ListOrgGroupPolicySuggestions" request
And request contains "filter[org_group_id]" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/org-management
Scenario: List org groups returns "Bad Request" response
Given operation "ListOrgGroups" enabled
Expand Down
Loading
Loading