Skip to content

Commit cc15cdb

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Mark Incident Impact Endpoints stable (#3321)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 0fd3833 commit cc15cdb

File tree

4 files changed

+4
-67
lines changed

4 files changed

+4
-67
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67941,6 +67941,7 @@ paths:
6794167941
- us3.datadoghq.com
6794267942
- us5.datadoghq.com
6794367943
- ap1.datadoghq.com
67944+
- ap2.datadoghq.com
6794467945
- datadoghq.eu
6794567946
- ddog-gov.com
6794667947
subdomain:
@@ -69008,9 +69009,6 @@ paths:
6900869009
operator: OR
6900969010
permissions:
6901069011
- incident_read
69011-
x-unstable: '**Note**: This endpoint is in Preview.
69012-
69013-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6901469012
post:
6901569013
description: Create an impact for an incident.
6901669014
operationId: CreateIncidentImpact
@@ -69054,9 +69052,6 @@ paths:
6905469052
operator: OR
6905569053
permissions:
6905669054
- incident_write
69057-
x-unstable: '**Note**: This endpoint is in Preview.
69058-
69059-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6906069055
/api/v2/incidents/{incident_id}/impacts/{impact_id}:
6906169056
delete:
6906269057
description: Delete an incident impact.
@@ -69087,9 +69082,6 @@ paths:
6908769082
operator: OR
6908869083
permissions:
6908969084
- incident_write
69090-
x-unstable: '**Note**: This endpoint is in Preview.
69091-
69092-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6909369085
/api/v2/incidents/{incident_id}/relationships/integrations:
6909469086
get:
6909569087
description: Get all integration metadata for an incident.

src/main/java/com/datadog/api/client/ApiClient.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ public class ApiClient {
300300
"us3.datadoghq.com",
301301
"us5.datadoghq.com",
302302
"ap1.datadoghq.com",
303+
"ap2.datadoghq.com",
303304
"datadoghq.eu",
304305
"ddog-gov.com"))));
305306
put(
@@ -747,14 +748,12 @@ public class ApiClient {
747748
put("v2.updateDeploymentGate", false);
748749
put("v2.updateDeploymentRule", false);
749750
put("v2.createIncident", false);
750-
put("v2.createIncidentImpact", false);
751751
put("v2.createIncidentIntegration", false);
752752
put("v2.createIncidentNotificationRule", false);
753753
put("v2.createIncidentNotificationTemplate", false);
754754
put("v2.createIncidentTodo", false);
755755
put("v2.createIncidentType", false);
756756
put("v2.deleteIncident", false);
757-
put("v2.deleteIncidentImpact", false);
758757
put("v2.deleteIncidentIntegration", false);
759758
put("v2.deleteIncidentNotificationRule", false);
760759
put("v2.deleteIncidentNotificationTemplate", false);
@@ -767,7 +766,6 @@ public class ApiClient {
767766
put("v2.getIncidentTodo", false);
768767
put("v2.getIncidentType", false);
769768
put("v2.listIncidentAttachments", false);
770-
put("v2.listIncidentImpacts", false);
771769
put("v2.listIncidentIntegrations", false);
772770
put("v2.listIncidentNotificationRules", false);
773771
put("v2.listIncidentNotificationTemplates", false);

src/main/java/com/datadog/api/client/v2/api/IncidentsApi.java

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -353,13 +353,6 @@ public ApiResponse<IncidentImpactResponse> createIncidentImpactWithHttpInfo(
353353
IncidentImpactCreateRequest body,
354354
CreateIncidentImpactOptionalParameters parameters)
355355
throws ApiException {
356-
// Check if unstable operation is enabled
357-
String operationId = "createIncidentImpact";
358-
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
359-
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
360-
} else {
361-
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
362-
}
363356
Object localVarPostBody = body;
364357

365358
// verify the required parameter 'incidentId' is set
@@ -420,16 +413,6 @@ public ApiResponse<IncidentImpactResponse> createIncidentImpactWithHttpInfo(
420413
String incidentId,
421414
IncidentImpactCreateRequest body,
422415
CreateIncidentImpactOptionalParameters parameters) {
423-
// Check if unstable operation is enabled
424-
String operationId = "createIncidentImpact";
425-
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
426-
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
427-
} else {
428-
CompletableFuture<ApiResponse<IncidentImpactResponse>> result = new CompletableFuture<>();
429-
result.completeExceptionally(
430-
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
431-
return result;
432-
}
433416
Object localVarPostBody = body;
434417

435418
// verify the required parameter 'incidentId' is set
@@ -1518,13 +1501,6 @@ public CompletableFuture<Void> deleteIncidentImpactAsync(String incidentId, Stri
15181501
*/
15191502
public ApiResponse<Void> deleteIncidentImpactWithHttpInfo(String incidentId, String impactId)
15201503
throws ApiException {
1521-
// Check if unstable operation is enabled
1522-
String operationId = "deleteIncidentImpact";
1523-
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
1524-
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
1525-
} else {
1526-
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
1527-
}
15281504
Object localVarPostBody = null;
15291505

15301506
// verify the required parameter 'incidentId' is set
@@ -1578,16 +1554,6 @@ public ApiResponse<Void> deleteIncidentImpactWithHttpInfo(String incidentId, Str
15781554
*/
15791555
public CompletableFuture<ApiResponse<Void>> deleteIncidentImpactWithHttpInfoAsync(
15801556
String incidentId, String impactId) {
1581-
// Check if unstable operation is enabled
1582-
String operationId = "deleteIncidentImpact";
1583-
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
1584-
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
1585-
} else {
1586-
CompletableFuture<ApiResponse<Void>> result = new CompletableFuture<>();
1587-
result.completeExceptionally(
1588-
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
1589-
return result;
1590-
}
15911557
Object localVarPostBody = null;
15921558

15931559
// verify the required parameter 'incidentId' is set
@@ -4141,13 +4107,6 @@ public CompletableFuture<IncidentImpactsResponse> listIncidentImpactsAsync(
41414107
*/
41424108
public ApiResponse<IncidentImpactsResponse> listIncidentImpactsWithHttpInfo(
41434109
String incidentId, ListIncidentImpactsOptionalParameters parameters) throws ApiException {
4144-
// Check if unstable operation is enabled
4145-
String operationId = "listIncidentImpacts";
4146-
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
4147-
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
4148-
} else {
4149-
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
4150-
}
41514110
Object localVarPostBody = null;
41524111

41534112
// verify the required parameter 'incidentId' is set
@@ -4199,16 +4158,6 @@ public ApiResponse<IncidentImpactsResponse> listIncidentImpactsWithHttpInfo(
41994158
public CompletableFuture<ApiResponse<IncidentImpactsResponse>>
42004159
listIncidentImpactsWithHttpInfoAsync(
42014160
String incidentId, ListIncidentImpactsOptionalParameters parameters) {
4202-
// Check if unstable operation is enabled
4203-
String operationId = "listIncidentImpacts";
4204-
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
4205-
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
4206-
} else {
4207-
CompletableFuture<ApiResponse<IncidentImpactsResponse>> result = new CompletableFuture<>();
4208-
result.completeExceptionally(
4209-
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
4210-
return result;
4211-
}
42124161
Object localVarPostBody = null;
42134162

42144163
// verify the required parameter 'incidentId' is set

src/test/resources/com/datadog/api/client/v2/api/incidents.feature

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -806,16 +806,14 @@ Feature: Incidents
806806

807807
@generated @skip @team:DataDog/incident-app
808808
Scenario: List an incident's impacts returns "Bad Request" response
809-
Given operation "ListIncidentImpacts" enabled
810-
And new "ListIncidentImpacts" request
809+
Given new "ListIncidentImpacts" request
811810
And request contains "incident_id" parameter from "REPLACE.ME"
812811
When the request is sent
813812
Then the response status is 400 Bad Request
814813

815814
@generated @skip @team:DataDog/incident-app
816815
Scenario: List an incident's impacts returns "Not Found" response
817-
Given operation "ListIncidentImpacts" enabled
818-
And new "ListIncidentImpacts" request
816+
Given new "ListIncidentImpacts" request
819817
And request contains "incident_id" parameter from "REPLACE.ME"
820818
When the request is sent
821819
Then the response status is 404 Not Found

0 commit comments

Comments
 (0)