Skip to content

Commit 89ea222

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 36c325e of spec repo (#3577)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent b30e677 commit 89ea222

29 files changed

Lines changed: 3395 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 529 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Create an incident user-defined role returns "Created" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.create_incident_user_defined_role".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8+
9+
body = DatadogAPIClient::V2::IncidentUserDefinedRoleRequest.new({
10+
data: DatadogAPIClient::V2::IncidentUserDefinedRoleDataRequest.new({
11+
attributes: DatadogAPIClient::V2::IncidentUserDefinedRoleDataAttributesRequest.new({
12+
description: "The technical lead for the incident.",
13+
name: "Tech Lead",
14+
policy: DatadogAPIClient::V2::IncidentUserDefinedRolePolicy.new({
15+
is_single: true,
16+
}),
17+
}),
18+
relationships: DatadogAPIClient::V2::IncidentUserDefinedRoleRelationshipsRequest.new({
19+
incident_type: DatadogAPIClient::V2::IncidentUserDefinedRoleIncidentTypeRelationship.new({
20+
data: DatadogAPIClient::V2::IncidentUserDefinedRoleIncidentTypeRelationshipData.new({
21+
id: "00000000-0000-0000-0000-000000000001",
22+
type: "incident_types",
23+
}),
24+
}),
25+
}),
26+
type: DatadogAPIClient::V2::IncidentUserDefinedRoleType::INCIDENT_USER_DEFINED_ROLES,
27+
}),
28+
})
29+
p api_instance.create_incident_user_defined_role(body)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Delete an incident user-defined role returns "No Content" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.delete_incident_user_defined_role".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8+
api_instance.delete_incident_user_defined_role("00000000-0000-0000-0000-000000000002")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get an incident user-defined role returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.get_incident_user_defined_role".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8+
p api_instance.get_incident_user_defined_role("00000000-0000-0000-0000-000000000002")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# List incident user-defined roles returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_incident_user_defined_roles".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8+
p api_instance.list_incident_user_defined_roles()
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Update an incident user-defined role returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.update_incident_user_defined_role".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8+
9+
body = DatadogAPIClient::V2::IncidentUserDefinedRolePatchRequest.new({
10+
data: DatadogAPIClient::V2::IncidentUserDefinedRolePatchDataRequest.new({
11+
attributes: DatadogAPIClient::V2::IncidentUserDefinedRolePatchDataAttributesRequest.new({
12+
description: "The technical lead for the incident.",
13+
name: "Tech Lead",
14+
policy: DatadogAPIClient::V2::IncidentUserDefinedRolePolicy.new({
15+
is_single: true,
16+
}),
17+
}),
18+
id: "00000000-0000-0000-0000-000000000002",
19+
type: DatadogAPIClient::V2::IncidentUserDefinedRoleType::INCIDENT_USER_DEFINED_ROLES,
20+
}),
21+
})
22+
p api_instance.update_incident_user_defined_role("00000000-0000-0000-0000-000000000002", body)

features/scenarios_model_mapping.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3553,6 +3553,26 @@
35533553
"include" => "String",
35543554
"body" => "IncidentUserDefinedFieldUpdateRequest",
35553555
},
3556+
"v2.ListIncidentUserDefinedRoles" => {
3557+
"filter_incident_type" => "UUID",
3558+
"include" => "String",
3559+
},
3560+
"v2.CreateIncidentUserDefinedRole" => {
3561+
"include" => "String",
3562+
"body" => "IncidentUserDefinedRoleRequest",
3563+
},
3564+
"v2.DeleteIncidentUserDefinedRole" => {
3565+
"role_id" => "UUID",
3566+
},
3567+
"v2.GetIncidentUserDefinedRole" => {
3568+
"role_id" => "UUID",
3569+
"include" => "String",
3570+
},
3571+
"v2.UpdateIncidentUserDefinedRole" => {
3572+
"role_id" => "UUID",
3573+
"include" => "String",
3574+
"body" => "IncidentUserDefinedRolePatchRequest",
3575+
},
35563576
"v2.ImportIncident" => {
35573577
"include" => "Array<IncidentImportRelatedObject>",
35583578
"body" => "IncidentImportRequest",

features/v2/incidents.feature

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,22 @@ Feature: Incidents
210210
When the request is sent
211211
Then the response status is 404 Not Found
212212

213+
@generated @skip @team:DataDog/incident-app
214+
Scenario: Create an incident user-defined role returns "Bad Request" response
215+
Given operation "CreateIncidentUserDefinedRole" enabled
216+
And new "CreateIncidentUserDefinedRole" request
217+
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"}}
218+
When the request is sent
219+
Then the response status is 400 Bad Request
220+
221+
@generated @skip @team:DataDog/incident-app
222+
Scenario: Create an incident user-defined role returns "Created" response
223+
Given operation "CreateIncidentUserDefinedRole" enabled
224+
And new "CreateIncidentUserDefinedRole" request
225+
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"}}
226+
When the request is sent
227+
Then the response status is 201 Created
228+
213229
@generated @skip @team:DataDog/incident-app
214230
Scenario: Create global incident handle returns "Bad Request" response
215231
Given operation "CreateGlobalIncidentHandle" enabled
@@ -530,6 +546,30 @@ Feature: Incidents
530546
When the request is sent
531547
Then the response status is 404 Not Found
532548

549+
@generated @skip @team:DataDog/incident-app
550+
Scenario: Delete an incident user-defined role returns "Bad Request" response
551+
Given operation "DeleteIncidentUserDefinedRole" enabled
552+
And new "DeleteIncidentUserDefinedRole" request
553+
And request contains "role_id" parameter from "REPLACE.ME"
554+
When the request is sent
555+
Then the response status is 400 Bad Request
556+
557+
@generated @skip @team:DataDog/incident-app
558+
Scenario: Delete an incident user-defined role returns "No Content" response
559+
Given operation "DeleteIncidentUserDefinedRole" enabled
560+
And new "DeleteIncidentUserDefinedRole" request
561+
And request contains "role_id" parameter from "REPLACE.ME"
562+
When the request is sent
563+
Then the response status is 204 No Content
564+
565+
@generated @skip @team:DataDog/incident-app
566+
Scenario: Delete an incident user-defined role returns "Not Found" response
567+
Given operation "DeleteIncidentUserDefinedRole" enabled
568+
And new "DeleteIncidentUserDefinedRole" request
569+
And request contains "role_id" parameter from "REPLACE.ME"
570+
When the request is sent
571+
Then the response status is 404 Not Found
572+
533573
@generated @skip @team:DataDog/incident-app
534574
Scenario: Delete global incident handle returns "Bad Request" response
535575
Given operation "DeleteGlobalIncidentHandle" enabled
@@ -781,6 +821,30 @@ Feature: Incidents
781821
When the request is sent
782822
Then the response status is 200 OK
783823

824+
@generated @skip @team:DataDog/incident-app
825+
Scenario: Get an incident user-defined role returns "Bad Request" response
826+
Given operation "GetIncidentUserDefinedRole" enabled
827+
And new "GetIncidentUserDefinedRole" request
828+
And request contains "role_id" parameter from "REPLACE.ME"
829+
When the request is sent
830+
Then the response status is 400 Bad Request
831+
832+
@generated @skip @team:DataDog/incident-app
833+
Scenario: Get an incident user-defined role returns "Not Found" response
834+
Given operation "GetIncidentUserDefinedRole" enabled
835+
And new "GetIncidentUserDefinedRole" request
836+
And request contains "role_id" parameter from "REPLACE.ME"
837+
When the request is sent
838+
Then the response status is 404 Not Found
839+
840+
@generated @skip @team:DataDog/incident-app
841+
Scenario: Get an incident user-defined role returns "OK" response
842+
Given operation "GetIncidentUserDefinedRole" enabled
843+
And new "GetIncidentUserDefinedRole" request
844+
And request contains "role_id" parameter from "REPLACE.ME"
845+
When the request is sent
846+
Then the response status is 200 OK
847+
784848
@generated @skip @team:DataDog/incident-app
785849
Scenario: Get global incident settings returns "Bad Request" response
786850
Given operation "GetGlobalIncidentSettings" enabled
@@ -1108,6 +1172,20 @@ Feature: Incidents
11081172
Then the response status is 200 OK
11091173
And the response "data" has length 0
11101174

1175+
@generated @skip @team:DataDog/incident-app
1176+
Scenario: List incident user-defined roles returns "Bad Request" response
1177+
Given operation "ListIncidentUserDefinedRoles" enabled
1178+
And new "ListIncidentUserDefinedRoles" request
1179+
When the request is sent
1180+
Then the response status is 400 Bad Request
1181+
1182+
@generated @skip @team:DataDog/incident-app
1183+
Scenario: List incident user-defined roles returns "OK" response
1184+
Given operation "ListIncidentUserDefinedRoles" enabled
1185+
And new "ListIncidentUserDefinedRoles" request
1186+
When the request is sent
1187+
Then the response status is 200 OK
1188+
11111189
@generated @skip @team:DataDog/incident-app
11121190
Scenario: List postmortem templates returns "Bad Request" response
11131191
Given operation "ListIncidentPostmortemTemplates" enabled
@@ -1348,6 +1426,33 @@ Feature: Incidents
13481426
When the request is sent
13491427
Then the response status is 200 OK
13501428

1429+
@generated @skip @team:DataDog/incident-app
1430+
Scenario: Update an incident user-defined role returns "Bad Request" response
1431+
Given operation "UpdateIncidentUserDefinedRole" enabled
1432+
And new "UpdateIncidentUserDefinedRole" request
1433+
And request contains "role_id" parameter from "REPLACE.ME"
1434+
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"}}
1435+
When the request is sent
1436+
Then the response status is 400 Bad Request
1437+
1438+
@generated @skip @team:DataDog/incident-app
1439+
Scenario: Update an incident user-defined role returns "Not Found" response
1440+
Given operation "UpdateIncidentUserDefinedRole" enabled
1441+
And new "UpdateIncidentUserDefinedRole" request
1442+
And request contains "role_id" parameter from "REPLACE.ME"
1443+
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"}}
1444+
When the request is sent
1445+
Then the response status is 404 Not Found
1446+
1447+
@generated @skip @team:DataDog/incident-app
1448+
Scenario: Update an incident user-defined role returns "OK" response
1449+
Given operation "UpdateIncidentUserDefinedRole" enabled
1450+
And new "UpdateIncidentUserDefinedRole" request
1451+
And request contains "role_id" parameter from "REPLACE.ME"
1452+
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"}}
1453+
When the request is sent
1454+
Then the response status is 200 OK
1455+
13511456
@generated @skip @team:DataDog/incident-app
13521457
Scenario: Update global incident handle returns "Bad Request" response
13531458
Given operation "UpdateGlobalIncidentHandle" enabled

features/v2/undo.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3115,6 +3115,43 @@
31153115
"type": "idempotent"
31163116
}
31173117
},
3118+
"ListIncidentUserDefinedRoles": {
3119+
"tag": "Incidents",
3120+
"undo": {
3121+
"type": "safe"
3122+
}
3123+
},
3124+
"CreateIncidentUserDefinedRole": {
3125+
"tag": "Incidents",
3126+
"undo": {
3127+
"operationId": "DeleteIncidentUserDefinedRole",
3128+
"parameters": [
3129+
{
3130+
"name": "role_id",
3131+
"source": "data.id"
3132+
}
3133+
],
3134+
"type": "unsafe"
3135+
}
3136+
},
3137+
"DeleteIncidentUserDefinedRole": {
3138+
"tag": "Incidents",
3139+
"undo": {
3140+
"type": "idempotent"
3141+
}
3142+
},
3143+
"GetIncidentUserDefinedRole": {
3144+
"tag": "Incidents",
3145+
"undo": {
3146+
"type": "safe"
3147+
}
3148+
},
3149+
"UpdateIncidentUserDefinedRole": {
3150+
"tag": "Incidents",
3151+
"undo": {
3152+
"type": "idempotent"
3153+
}
3154+
},
31183155
"ImportIncident": {
31193156
"tag": "Incidents",
31203157
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,7 @@ def initialize
513513
"v2.create_incident_todo": false,
514514
"v2.create_incident_type": false,
515515
"v2.create_incident_user_defined_field": false,
516+
"v2.create_incident_user_defined_role": false,
516517
"v2.delete_global_incident_handle": false,
517518
"v2.delete_incident": false,
518519
"v2.delete_incident_attachment": false,
@@ -523,6 +524,7 @@ def initialize
523524
"v2.delete_incident_todo": false,
524525
"v2.delete_incident_type": false,
525526
"v2.delete_incident_user_defined_field": false,
527+
"v2.delete_incident_user_defined_role": false,
526528
"v2.get_global_incident_settings": false,
527529
"v2.get_incident": false,
528530
"v2.get_incident_integration": false,
@@ -532,6 +534,7 @@ def initialize
532534
"v2.get_incident_todo": false,
533535
"v2.get_incident_type": false,
534536
"v2.get_incident_user_defined_field": false,
537+
"v2.get_incident_user_defined_role": false,
535538
"v2.import_incident": false,
536539
"v2.list_global_incident_handles": false,
537540
"v2.list_incident_attachments": false,
@@ -543,6 +546,7 @@ def initialize
543546
"v2.list_incident_todos": false,
544547
"v2.list_incident_types": false,
545548
"v2.list_incident_user_defined_fields": false,
549+
"v2.list_incident_user_defined_roles": false,
546550
"v2.search_incidents": false,
547551
"v2.update_global_incident_handle": false,
548552
"v2.update_global_incident_settings": false,
@@ -555,6 +559,7 @@ def initialize
555559
"v2.update_incident_todo": false,
556560
"v2.update_incident_type": false,
557561
"v2.update_incident_user_defined_field": false,
562+
"v2.update_incident_user_defined_role": false,
558563
"v2.create_aws_account_ccm_config": false,
559564
"v2.delete_aws_account_ccm_config": false,
560565
"v2.get_aws_account_ccm_config": false,

0 commit comments

Comments
 (0)