Skip to content

Commit af990ce

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 0e32ffe of spec repo
1 parent 3496416 commit af990ce

34 files changed

Lines changed: 3823 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 437 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Create global incident handle returns "Created" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.create_global_incident_handle".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8+
9+
body = DatadogAPIClient::V2::IncidentHandleRequest.new({
10+
data: DatadogAPIClient::V2::IncidentHandleDataRequest.new({
11+
attributes: DatadogAPIClient::V2::IncidentHandleAttributesRequest.new({
12+
fields: DatadogAPIClient::V2::IncidentHandleAttributesFields.new({
13+
severity: [
14+
"SEV-1",
15+
],
16+
}),
17+
name: "@incident-sev-1",
18+
}),
19+
id: "b2494081-cdf0-4205-b366-4e1dd4fdf0bf",
20+
relationships: DatadogAPIClient::V2::IncidentHandleRelationshipsRequest.new({
21+
commander_user: DatadogAPIClient::V2::IncidentHandleRelationship.new({
22+
data: DatadogAPIClient::V2::IncidentHandleRelationshipData.new({
23+
id: "f7b538b1-ed7c-4e84-82de-fdf84a539d40",
24+
type: "incident_types",
25+
}),
26+
}),
27+
incident_type: DatadogAPIClient::V2::IncidentHandleRelationship.new({
28+
data: DatadogAPIClient::V2::IncidentHandleRelationshipData.new({
29+
id: "f7b538b1-ed7c-4e84-82de-fdf84a539d40",
30+
type: "incident_types",
31+
}),
32+
}),
33+
}),
34+
type: DatadogAPIClient::V2::IncidentHandleType::INCIDENTS_HANDLES,
35+
}),
36+
})
37+
p api_instance.create_global_incident_handle(body)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Delete global incident handle returns "No Content" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.delete_global_incident_handle".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8+
api_instance.delete_global_incident_handle()
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get global incident settings returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.get_global_incident_settings".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8+
p api_instance.get_global_incident_settings()
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# List global incident handles returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_global_incident_handles".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8+
p api_instance.list_global_incident_handles()
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Update global incident handle returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.update_global_incident_handle".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8+
9+
body = DatadogAPIClient::V2::IncidentHandleRequest.new({
10+
data: DatadogAPIClient::V2::IncidentHandleDataRequest.new({
11+
attributes: DatadogAPIClient::V2::IncidentHandleAttributesRequest.new({
12+
fields: DatadogAPIClient::V2::IncidentHandleAttributesFields.new({
13+
severity: [
14+
"SEV-1",
15+
],
16+
}),
17+
name: "@incident-sev-1",
18+
}),
19+
id: "b2494081-cdf0-4205-b366-4e1dd4fdf0bf",
20+
relationships: DatadogAPIClient::V2::IncidentHandleRelationshipsRequest.new({
21+
commander_user: DatadogAPIClient::V2::IncidentHandleRelationship.new({
22+
data: DatadogAPIClient::V2::IncidentHandleRelationshipData.new({
23+
id: "f7b538b1-ed7c-4e84-82de-fdf84a539d40",
24+
type: "incident_types",
25+
}),
26+
}),
27+
incident_type: DatadogAPIClient::V2::IncidentHandleRelationship.new({
28+
data: DatadogAPIClient::V2::IncidentHandleRelationshipData.new({
29+
id: "f7b538b1-ed7c-4e84-82de-fdf84a539d40",
30+
type: "incident_types",
31+
}),
32+
}),
33+
}),
34+
type: DatadogAPIClient::V2::IncidentHandleType::INCIDENTS_HANDLES,
35+
}),
36+
})
37+
p api_instance.update_global_incident_handle(body)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Update global incident settings returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.update_global_incident_settings".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8+
9+
body = DatadogAPIClient::V2::GlobalIncidentSettingsRequest.new({
10+
data: DatadogAPIClient::V2::GlobalIncidentSettingsDataRequest.new({
11+
attributes: DatadogAPIClient::V2::GlobalIncidentSettingsAttributesRequest.new({
12+
analytics_dashboard_id: "abc-123-def",
13+
}),
14+
type: DatadogAPIClient::V2::GlobalIncidentSettingsType::INCIDENTS_GLOBAL_SETTINGS,
15+
}),
16+
})
17+
p api_instance.update_global_incident_settings(body)

features/scenarios_model_mapping.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,6 +2059,20 @@
20592059
"v2.CreateIncident" => {
20602060
"body" => "IncidentCreateRequest",
20612061
},
2062+
"v2.ListGlobalIncidentHandles" => {
2063+
"include" => "String",
2064+
},
2065+
"v2.CreateGlobalIncidentHandle" => {
2066+
"include" => "String",
2067+
"body" => "IncidentHandleRequest",
2068+
},
2069+
"v2.UpdateGlobalIncidentHandle" => {
2070+
"include" => "String",
2071+
"body" => "IncidentHandleRequest",
2072+
},
2073+
"v2.UpdateGlobalIncidentSettings" => {
2074+
"body" => "GlobalIncidentSettingsRequest",
2075+
},
20622076
"v2.ListIncidentNotificationRules" => {
20632077
"include" => "String",
20642078
},

features/v2/incidents.feature

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,22 @@ Feature: Incidents
186186
When the request is sent
187187
Then the response status is 404 Not Found
188188

189+
@generated @skip @team:DataDog/incident-app
190+
Scenario: Create global incident handle returns "Bad Request" response
191+
Given operation "CreateGlobalIncidentHandle" enabled
192+
And new "CreateGlobalIncidentHandle" request
193+
And body with value {"data": {"attributes": {"fields": {"severity": ["SEV-1"]}, "name": "@incident-sev-1"}, "id": "b2494081-cdf0-4205-b366-4e1dd4fdf0bf", "relationships": {"commander_user": {"data": {"id": "f7b538b1-ed7c-4e84-82de-fdf84a539d40", "type": "incident_types"}}, "incident_type": {"data": {"id": "f7b538b1-ed7c-4e84-82de-fdf84a539d40", "type": "incident_types"}}}, "type": "incidents_handles"}}
194+
When the request is sent
195+
Then the response status is 400 Bad Request
196+
197+
@generated @skip @team:DataDog/incident-app
198+
Scenario: Create global incident handle returns "Created" response
199+
Given operation "CreateGlobalIncidentHandle" enabled
200+
And new "CreateGlobalIncidentHandle" request
201+
And body with value {"data": {"attributes": {"fields": {"severity": ["SEV-1"]}, "name": "@incident-sev-1"}, "id": "b2494081-cdf0-4205-b366-4e1dd4fdf0bf", "relationships": {"commander_user": {"data": {"id": "f7b538b1-ed7c-4e84-82de-fdf84a539d40", "type": "incident_types"}}, "incident_type": {"data": {"id": "f7b538b1-ed7c-4e84-82de-fdf84a539d40", "type": "incident_types"}}}, "type": "incidents_handles"}}
202+
When the request is sent
203+
Then the response status is 201 Created
204+
189205
@generated @skip @team:DataDog/incident-app
190206
Scenario: Create incident attachment returns "Bad Request" response
191207
Given operation "CreateIncidentAttachment" enabled
@@ -447,6 +463,20 @@ Feature: Incidents
447463
When the request is sent
448464
Then the response status is 204 OK
449465

466+
@generated @skip @team:DataDog/incident-app
467+
Scenario: Delete global incident handle returns "Bad Request" response
468+
Given operation "DeleteGlobalIncidentHandle" enabled
469+
And new "DeleteGlobalIncidentHandle" request
470+
When the request is sent
471+
Then the response status is 400 Bad Request
472+
473+
@generated @skip @team:DataDog/incident-app
474+
Scenario: Delete global incident handle returns "No Content" response
475+
Given operation "DeleteGlobalIncidentHandle" enabled
476+
And new "DeleteGlobalIncidentHandle" request
477+
When the request is sent
478+
Then the response status is 204 No Content
479+
450480
@generated @skip @team:DataDog/incident-app
451481
Scenario: Delete incident attachment returns "Bad Request" response
452482
Given operation "DeleteIncidentAttachment" enabled
@@ -628,6 +658,20 @@ Feature: Incidents
628658
When the request is sent
629659
Then the response status is 200 OK
630660

661+
@generated @skip @team:DataDog/incident-app
662+
Scenario: Get global incident settings returns "Bad Request" response
663+
Given operation "GetGlobalIncidentSettings" enabled
664+
And new "GetGlobalIncidentSettings" request
665+
When the request is sent
666+
Then the response status is 400 Bad Request
667+
668+
@generated @skip @team:DataDog/incident-app
669+
Scenario: Get global incident settings returns "OK" response
670+
Given operation "GetGlobalIncidentSettings" enabled
671+
And new "GetGlobalIncidentSettings" request
672+
When the request is sent
673+
Then the response status is 200 OK
674+
631675
@generated @skip @team:DataDog/incident-app
632676
Scenario: Get incident integration metadata details returns "Bad Request" response
633677
Given operation "GetIncidentIntegration" enabled
@@ -811,6 +855,20 @@ Feature: Incidents
811855
When the request is sent
812856
Then the response status is 200 OK
813857

858+
@generated @skip @team:DataDog/incident-app
859+
Scenario: List global incident handles returns "Bad Request" response
860+
Given operation "ListGlobalIncidentHandles" enabled
861+
And new "ListGlobalIncidentHandles" request
862+
When the request is sent
863+
Then the response status is 400 Bad Request
864+
865+
@generated @skip @team:DataDog/incident-app
866+
Scenario: List global incident handles returns "OK" response
867+
Given operation "ListGlobalIncidentHandles" enabled
868+
And new "ListGlobalIncidentHandles" request
869+
When the request is sent
870+
Then the response status is 200 OK
871+
814872
@generated @skip @team:DataDog/incident-app
815873
Scenario: List incident attachments returns "Bad Request" response
816874
Given operation "ListIncidentAttachments" enabled
@@ -1073,6 +1131,38 @@ Feature: Incidents
10731131
When the request is sent
10741132
Then the response status is 200 OK
10751133

1134+
@generated @skip @team:DataDog/incident-app
1135+
Scenario: Update global incident handle returns "Bad Request" response
1136+
Given operation "UpdateGlobalIncidentHandle" enabled
1137+
And new "UpdateGlobalIncidentHandle" request
1138+
And body with value {"data": {"attributes": {"fields": {"severity": ["SEV-1"]}, "name": "@incident-sev-1"}, "id": "b2494081-cdf0-4205-b366-4e1dd4fdf0bf", "relationships": {"commander_user": {"data": {"id": "f7b538b1-ed7c-4e84-82de-fdf84a539d40", "type": "incident_types"}}, "incident_type": {"data": {"id": "f7b538b1-ed7c-4e84-82de-fdf84a539d40", "type": "incident_types"}}}, "type": "incidents_handles"}}
1139+
When the request is sent
1140+
Then the response status is 400 Bad Request
1141+
1142+
@generated @skip @team:DataDog/incident-app
1143+
Scenario: Update global incident handle returns "OK" response
1144+
Given operation "UpdateGlobalIncidentHandle" enabled
1145+
And new "UpdateGlobalIncidentHandle" request
1146+
And body with value {"data": {"attributes": {"fields": {"severity": ["SEV-1"]}, "name": "@incident-sev-1"}, "id": "b2494081-cdf0-4205-b366-4e1dd4fdf0bf", "relationships": {"commander_user": {"data": {"id": "f7b538b1-ed7c-4e84-82de-fdf84a539d40", "type": "incident_types"}}, "incident_type": {"data": {"id": "f7b538b1-ed7c-4e84-82de-fdf84a539d40", "type": "incident_types"}}}, "type": "incidents_handles"}}
1147+
When the request is sent
1148+
Then the response status is 200 OK
1149+
1150+
@generated @skip @team:DataDog/incident-app
1151+
Scenario: Update global incident settings returns "Bad Request" response
1152+
Given operation "UpdateGlobalIncidentSettings" enabled
1153+
And new "UpdateGlobalIncidentSettings" request
1154+
And body with value {"data": {"attributes": {"analytics_dashboard_id": "abc-123-def"}, "type": "incidents_global_settings"}}
1155+
When the request is sent
1156+
Then the response status is 400 Bad Request
1157+
1158+
@generated @skip @team:DataDog/incident-app
1159+
Scenario: Update global incident settings returns "OK" response
1160+
Given operation "UpdateGlobalIncidentSettings" enabled
1161+
And new "UpdateGlobalIncidentSettings" request
1162+
And body with value {"data": {"attributes": {"analytics_dashboard_id": "abc-123-def"}, "type": "incidents_global_settings"}}
1163+
When the request is sent
1164+
Then the response status is 200 OK
1165+
10761166
@generated @skip @team:DataDog/incident-app
10771167
Scenario: Update incident attachment returns "Bad Request" response
10781168
Given operation "UpdateIncidentAttachment" enabled

features/v2/undo.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,6 +1576,44 @@
15761576
"type": "unsafe"
15771577
}
15781578
},
1579+
"DeleteGlobalIncidentHandle": {
1580+
"tag": "Incidents",
1581+
"undo": {
1582+
"type": "idempotent"
1583+
}
1584+
},
1585+
"ListGlobalIncidentHandles": {
1586+
"tag": "Incidents",
1587+
"undo": {
1588+
"type": "safe"
1589+
}
1590+
},
1591+
"CreateGlobalIncidentHandle": {
1592+
"tag": "Incidents",
1593+
"undo": {
1594+
"operationId": "DeleteGlobalIncidentHandle",
1595+
"parameters": [],
1596+
"type": "unsafe"
1597+
}
1598+
},
1599+
"UpdateGlobalIncidentHandle": {
1600+
"tag": "Incidents",
1601+
"undo": {
1602+
"type": "idempotent"
1603+
}
1604+
},
1605+
"GetGlobalIncidentSettings": {
1606+
"tag": "Incidents",
1607+
"undo": {
1608+
"type": "safe"
1609+
}
1610+
},
1611+
"UpdateGlobalIncidentSettings": {
1612+
"tag": "Incidents",
1613+
"undo": {
1614+
"type": "idempotent"
1615+
}
1616+
},
15791617
"ListIncidentNotificationRules": {
15801618
"tag": "Incidents",
15811619
"undo": {

0 commit comments

Comments
 (0)