Skip to content

Commit 271c7f4

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Monitor Notif rule GA (#3187)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 899dba6 commit 271c7f4

10 files changed

Lines changed: 14 additions & 94 deletions

File tree

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-07-02 16:34:50.109675",
8-
"spec_repo_commit": "de2517ad"
7+
"regenerated": "2025-07-02 20:43:24.266572",
8+
"spec_repo_commit": "e327e6df"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-07-02 16:34:50.128559",
13-
"spec_repo_commit": "de2517ad"
12+
"regenerated": "2025-07-02 20:43:24.282854",
13+
"spec_repo_commit": "e327e6df"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53140,9 +53140,6 @@ paths:
5314053140
operator: OR
5314153141
permissions:
5314253142
- monitors_read
53143-
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
53144-
53145-
contact [Datadog support](https://docs.datadoghq.com/help/).'
5314653143
post:
5314753144
description: Creates a monitor notification rule.
5314853145
operationId: CreateMonitorNotificationRule
@@ -53186,9 +53183,6 @@ paths:
5318653183
operator: OR
5318753184
permissions:
5318853185
- monitor_config_policy_write
53189-
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
53190-
53191-
contact [Datadog support](https://docs.datadoghq.com/help/).'
5319253186
/api/v2/monitor/notification_rule/{rule_id}:
5319353187
delete:
5319453188
description: Deletes a monitor notification rule by `rule_id`.
@@ -53229,9 +53223,6 @@ paths:
5322953223
operator: OR
5323053224
permissions:
5323153225
- monitor_config_policy_write
53232-
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
53233-
53234-
contact [Datadog support](https://docs.datadoghq.com/help/).'
5323553226
get:
5323653227
description: Returns a monitor notification rule by `rule_id`.
5323753228
operationId: GetMonitorNotificationRule
@@ -53285,9 +53276,6 @@ paths:
5328553276
operator: OR
5328653277
permissions:
5328753278
- monitors_read
53288-
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
53289-
53290-
contact [Datadog support](https://docs.datadoghq.com/help/).'
5329153279
patch:
5329253280
description: Updates a monitor notification rule by `rule_id`.
5329353281
operationId: UpdateMonitorNotificationRule
@@ -53345,9 +53333,6 @@ paths:
5334553333
operator: OR
5334653334
permissions:
5334753335
- monitor_config_policy_write
53348-
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
53349-
53350-
contact [Datadog support](https://docs.datadoghq.com/help/).'
5335153336
/api/v2/monitor/policy:
5335253337
get:
5335353338
description: Get all monitor configuration policies.

api/datadog/configuration.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -619,15 +619,10 @@ func NewConfiguration() *Configuration {
619619
"v2.ListAWSNamespaces": false,
620620
"v2.UpdateAWSAccount": false,
621621
"v2.ListAWSLogsServices": false,
622-
"v2.CreateMonitorNotificationRule": false,
623622
"v2.CreateMonitorUserTemplate": false,
624-
"v2.DeleteMonitorNotificationRule": false,
625623
"v2.DeleteMonitorUserTemplate": false,
626-
"v2.GetMonitorNotificationRule": false,
627-
"v2.GetMonitorNotificationRules": false,
628624
"v2.GetMonitorUserTemplate": false,
629625
"v2.ListMonitorUserTemplates": false,
630-
"v2.UpdateMonitorNotificationRule": false,
631626
"v2.UpdateMonitorUserTemplate": false,
632627
"v2.ValidateExistingMonitorUserTemplate": false,
633628
"v2.ValidateMonitorUserTemplate": false,

api/datadogV2/api_monitors.go

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,6 @@ func (a *MonitorsApi) CreateMonitorNotificationRule(ctx _context.Context, body M
9999
localVarReturnValue MonitorNotificationRuleResponse
100100
)
101101

102-
operationId := "v2.CreateMonitorNotificationRule"
103-
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
104-
if !isOperationEnabled {
105-
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
106-
}
107-
if isOperationEnabled && a.Client.Cfg.Debug {
108-
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
109-
}
110-
111102
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.MonitorsApi.CreateMonitorNotificationRule")
112103
if err != nil {
113104
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
@@ -323,15 +314,6 @@ func (a *MonitorsApi) DeleteMonitorNotificationRule(ctx _context.Context, ruleId
323314
localVarPostBody interface{}
324315
)
325316

326-
operationId := "v2.DeleteMonitorNotificationRule"
327-
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
328-
if !isOperationEnabled {
329-
return nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
330-
}
331-
if isOperationEnabled && a.Client.Cfg.Debug {
332-
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
333-
}
334-
335317
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.MonitorsApi.DeleteMonitorNotificationRule")
336318
if err != nil {
337319
return nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
@@ -560,15 +542,6 @@ func (a *MonitorsApi) GetMonitorNotificationRule(ctx _context.Context, ruleId st
560542
optionalParams = o[0]
561543
}
562544

563-
operationId := "v2.GetMonitorNotificationRule"
564-
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
565-
if !isOperationEnabled {
566-
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
567-
}
568-
if isOperationEnabled && a.Client.Cfg.Debug {
569-
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
570-
}
571-
572545
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.MonitorsApi.GetMonitorNotificationRule")
573546
if err != nil {
574547
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
@@ -668,15 +641,6 @@ func (a *MonitorsApi) GetMonitorNotificationRules(ctx _context.Context, o ...Get
668641
optionalParams = o[0]
669642
}
670643

671-
operationId := "v2.GetMonitorNotificationRules"
672-
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
673-
if !isOperationEnabled {
674-
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
675-
}
676-
if isOperationEnabled && a.Client.Cfg.Debug {
677-
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
678-
}
679-
680644
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.MonitorsApi.GetMonitorNotificationRules")
681645
if err != nil {
682646
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
@@ -1081,15 +1045,6 @@ func (a *MonitorsApi) UpdateMonitorNotificationRule(ctx _context.Context, ruleId
10811045
localVarReturnValue MonitorNotificationRuleResponse
10821046
)
10831047

1084-
operationId := "v2.UpdateMonitorNotificationRule"
1085-
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
1086-
if !isOperationEnabled {
1087-
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
1088-
}
1089-
if isOperationEnabled && a.Client.Cfg.Debug {
1090-
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
1091-
}
1092-
10931048
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.MonitorsApi.UpdateMonitorNotificationRule")
10941049
if err != nil {
10951050
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}

examples/v2/monitors/CreateMonitorNotificationRule.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ func main() {
3333
}
3434
ctx := datadog.NewDefaultContext(context.Background())
3535
configuration := datadog.NewConfiguration()
36-
configuration.SetUnstableOperationEnabled("v2.CreateMonitorNotificationRule", true)
3736
apiClient := datadog.NewAPIClient(configuration)
3837
api := datadogV2.NewMonitorsApi(apiClient)
3938
resp, r, err := api.CreateMonitorNotificationRule(ctx, body)

examples/v2/monitors/DeleteMonitorNotificationRule.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ func main() {
1717

1818
ctx := datadog.NewDefaultContext(context.Background())
1919
configuration := datadog.NewConfiguration()
20-
configuration.SetUnstableOperationEnabled("v2.DeleteMonitorNotificationRule", true)
2120
apiClient := datadog.NewAPIClient(configuration)
2221
api := datadogV2.NewMonitorsApi(apiClient)
2322
r, err := api.DeleteMonitorNotificationRule(ctx, MonitorNotificationRuleDataID)

examples/v2/monitors/GetMonitorNotificationRule.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ func main() {
1818

1919
ctx := datadog.NewDefaultContext(context.Background())
2020
configuration := datadog.NewConfiguration()
21-
configuration.SetUnstableOperationEnabled("v2.GetMonitorNotificationRule", true)
2221
apiClient := datadog.NewAPIClient(configuration)
2322
api := datadogV2.NewMonitorsApi(apiClient)
2423
resp, r, err := api.GetMonitorNotificationRule(ctx, MonitorNotificationRuleDataID, *datadogV2.NewGetMonitorNotificationRuleOptionalParameters())

examples/v2/monitors/GetMonitorNotificationRules.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515
func main() {
1616
ctx := datadog.NewDefaultContext(context.Background())
1717
configuration := datadog.NewConfiguration()
18-
configuration.SetUnstableOperationEnabled("v2.GetMonitorNotificationRules", true)
1918
apiClient := datadog.NewAPIClient(configuration)
2019
api := datadogV2.NewMonitorsApi(apiClient)
2120
resp, r, err := api.GetMonitorNotificationRules(ctx, *datadogV2.NewGetMonitorNotificationRulesOptionalParameters())

examples/v2/monitors/UpdateMonitorNotificationRule.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ func main() {
3737
}
3838
ctx := datadog.NewDefaultContext(context.Background())
3939
configuration := datadog.NewConfiguration()
40-
configuration.SetUnstableOperationEnabled("v2.UpdateMonitorNotificationRule", true)
4140
apiClient := datadog.NewAPIClient(configuration)
4241
api := datadogV2.NewMonitorsApi(apiClient)
4342
resp, r, err := api.UpdateMonitorNotificationRule(ctx, MonitorNotificationRuleDataID, body)

tests/scenarios/features/v2/monitors.feature

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,14 @@ Feature: Monitors
3131

3232
@skip-validation @team:DataDog/monitor-app
3333
Scenario: Create a monitor notification rule returns "Bad Request" response
34-
Given operation "CreateMonitorNotificationRule" enabled
35-
And new "CreateMonitorNotificationRule" request
34+
Given new "CreateMonitorNotificationRule" request
3635
And body with value {"data": {"attributes": {"filter": {"tags": ["test:{{ unique_lower }}", "host:abc"]}, "name": "test rule", "recipients": ["@slack-test-channel", "@jira-test"]}, "type": "monitor-notification-rule"}}
3736
When the request is sent
3837
Then the response status is 400 Bad Request
3938

4039
@team:DataDog/monitor-app
4140
Scenario: Create a monitor notification rule returns "OK" response
42-
Given operation "CreateMonitorNotificationRule" enabled
43-
And new "CreateMonitorNotificationRule" request
41+
Given new "CreateMonitorNotificationRule" request
4442
And body with value {"data": {"attributes": {"filter": {"tags": ["test:{{ unique_lower }}"]}, "name": "test rule", "recipients": ["slack-test-channel", "jira-test"]}, "type": "monitor-notification-rule"}}
4543
When the request is sent
4644
Then the response status is 200 OK
@@ -86,16 +84,14 @@ Feature: Monitors
8684

8785
@team:DataDog/monitor-app
8886
Scenario: Delete a monitor notification rule returns "Not Found" response
89-
Given operation "DeleteMonitorNotificationRule" enabled
90-
And new "DeleteMonitorNotificationRule" request
87+
Given new "DeleteMonitorNotificationRule" request
9188
And request contains "rule_id" parameter with value "00000000-0000-1234-0000-000000000000"
9289
When the request is sent
9390
Then the response status is 404 Not Found
9491

9592
@team:DataDog/monitor-app
9693
Scenario: Delete a monitor notification rule returns "OK" response
97-
Given operation "DeleteMonitorNotificationRule" enabled
98-
And there is a valid "monitor_notification_rule" in the system
94+
Given there is a valid "monitor_notification_rule" in the system
9995
And new "DeleteMonitorNotificationRule" request
10096
And request contains "rule_id" parameter from "monitor_notification_rule.data.id"
10197
When the request is sent
@@ -170,16 +166,14 @@ Feature: Monitors
170166

171167
@team:DataDog/monitor-app
172168
Scenario: Get a monitor notification rule returns "Not Found" response
173-
Given operation "GetMonitorNotificationRule" enabled
174-
And new "GetMonitorNotificationRule" request
169+
Given new "GetMonitorNotificationRule" request
175170
And request contains "rule_id" parameter with value "00000000-0000-1234-0000-000000000000"
176171
When the request is sent
177172
Then the response status is 404 Not Found
178173

179174
@team:DataDog/monitor-app
180175
Scenario: Get a monitor notification rule returns "OK" response
181-
Given operation "GetMonitorNotificationRule" enabled
182-
And there is a valid "monitor_notification_rule" in the system
176+
Given there is a valid "monitor_notification_rule" in the system
183177
And new "GetMonitorNotificationRule" request
184178
And request contains "rule_id" parameter from "monitor_notification_rule.data.id"
185179
When the request is sent
@@ -218,8 +212,7 @@ Feature: Monitors
218212

219213
@team:DataDog/monitor-app
220214
Scenario: Get all monitor notification rules returns "OK" response
221-
Given operation "GetMonitorNotificationRules" enabled
222-
And there is a valid "monitor_notification_rule" in the system
215+
Given there is a valid "monitor_notification_rule" in the system
223216
And new "GetMonitorNotificationRules" request
224217
When the request is sent
225218
Then the response status is 200 OK
@@ -237,8 +230,7 @@ Feature: Monitors
237230

238231
@skip-validation @team:DataDog/monitor-app
239232
Scenario: Update a monitor notification rule returns "Bad Request" response
240-
Given operation "UpdateMonitorNotificationRule" enabled
241-
And there is a valid "monitor_notification_rule" in the system
233+
Given there is a valid "monitor_notification_rule" in the system
242234
And new "UpdateMonitorNotificationRule" request
243235
And request contains "rule_id" parameter from "monitor_notification_rule.data.id"
244236
And body with value {"data": {"attributes": {"filter": {"tags": ["test:{{ unique_lower }}", "host:abc"]}, "name": "updated rule", "recipients": ["@slack-test-channel"]}, "id": "{{ monitor_notification_rule.data.id }}", "type": "monitor-notification-rule"}}
@@ -247,17 +239,15 @@ Feature: Monitors
247239

248240
@team:DataDog/monitor-app
249241
Scenario: Update a monitor notification rule returns "Not Found" response
250-
Given operation "UpdateMonitorNotificationRule" enabled
251-
And new "UpdateMonitorNotificationRule" request
242+
Given new "UpdateMonitorNotificationRule" request
252243
And request contains "rule_id" parameter with value "00000000-0000-1234-0000-000000000000"
253244
And body with value {"data": {"attributes": {"filter": {"tags": ["test:{{ unique_lower }}", "host:abc"]}, "name": "updated rule", "recipients": ["slack-test-channel", "jira-test"]}, "id": "00000000-0000-1234-0000-000000000000", "type": "monitor-notification-rule"}}
254245
When the request is sent
255246
Then the response status is 404 Not Found
256247

257248
@team:DataDog/monitor-app
258249
Scenario: Update a monitor notification rule returns "OK" response
259-
Given operation "UpdateMonitorNotificationRule" enabled
260-
And there is a valid "monitor_notification_rule" in the system
250+
Given there is a valid "monitor_notification_rule" in the system
261251
And new "UpdateMonitorNotificationRule" request
262252
And request contains "rule_id" parameter from "monitor_notification_rule.data.id"
263253
And body with value {"data": {"attributes": {"filter": {"tags": ["test:{{ unique_lower }}", "host:abc"]}, "name": "updated rule", "recipients": ["slack-test-channel"]}, "id": "{{ monitor_notification_rule.data.id }}", "type": "monitor-notification-rule"}}

0 commit comments

Comments
 (0)