Skip to content

Commit 156713a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Mark Incident Impact Endpoints stable (DataDog#3530)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 2a004b3 commit 156713a

4 files changed

Lines changed: 4 additions & 43 deletions

File tree

.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.

api/datadog/configuration.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ func NewConfiguration() *Configuration {
314314
"us3.datadoghq.com",
315315
"us5.datadoghq.com",
316316
"ap1.datadoghq.com",
317+
"ap2.datadoghq.com",
317318
"datadoghq.eu",
318319
"ddog-gov.com",
319320
},
@@ -660,14 +661,12 @@ func NewConfiguration() *Configuration {
660661
"v2.UpdateDeploymentGate": false,
661662
"v2.UpdateDeploymentRule": false,
662663
"v2.CreateIncident": false,
663-
"v2.CreateIncidentImpact": false,
664664
"v2.CreateIncidentIntegration": false,
665665
"v2.CreateIncidentNotificationRule": false,
666666
"v2.CreateIncidentNotificationTemplate": false,
667667
"v2.CreateIncidentTodo": false,
668668
"v2.CreateIncidentType": false,
669669
"v2.DeleteIncident": false,
670-
"v2.DeleteIncidentImpact": false,
671670
"v2.DeleteIncidentIntegration": false,
672671
"v2.DeleteIncidentNotificationRule": false,
673672
"v2.DeleteIncidentNotificationTemplate": false,
@@ -680,7 +679,6 @@ func NewConfiguration() *Configuration {
680679
"v2.GetIncidentTodo": false,
681680
"v2.GetIncidentType": false,
682681
"v2.ListIncidentAttachments": false,
683-
"v2.ListIncidentImpacts": false,
684682
"v2.ListIncidentIntegrations": false,
685683
"v2.ListIncidentNotificationRules": false,
686684
"v2.ListIncidentNotificationTemplates": false,

api/datadogV2/api_incidents.go

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,6 @@ func (a *IncidentsApi) CreateIncidentImpact(ctx _context.Context, incidentId str
141141
optionalParams = o[0]
142142
}
143143

144-
operationId := "v2.CreateIncidentImpact"
145-
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
146-
if !isOperationEnabled {
147-
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
148-
}
149-
if isOperationEnabled && a.Client.Cfg.Debug {
150-
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
151-
}
152-
153144
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.IncidentsApi.CreateIncidentImpact")
154145
if err != nil {
155146
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
@@ -757,15 +748,6 @@ func (a *IncidentsApi) DeleteIncidentImpact(ctx _context.Context, incidentId str
757748
localVarPostBody interface{}
758749
)
759750

760-
operationId := "v2.DeleteIncidentImpact"
761-
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
762-
if !isOperationEnabled {
763-
return nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
764-
}
765-
if isOperationEnabled && a.Client.Cfg.Debug {
766-
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
767-
}
768-
769751
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.IncidentsApi.DeleteIncidentImpact")
770752
if err != nil {
771753
return nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
@@ -2037,15 +2019,6 @@ func (a *IncidentsApi) ListIncidentImpacts(ctx _context.Context, incidentId stri
20372019
optionalParams = o[0]
20382020
}
20392021

2040-
operationId := "v2.ListIncidentImpacts"
2041-
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
2042-
if !isOperationEnabled {
2043-
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
2044-
}
2045-
if isOperationEnabled && a.Client.Cfg.Debug {
2046-
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
2047-
}
2048-
20492022
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.IncidentsApi.ListIncidentImpacts")
20502023
if err != nil {
20512024
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}

tests/scenarios/features/v2/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)