Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-07-02 16:34:48.280693",
"spec_repo_commit": "de2517ad"
"regenerated": "2025-07-02 20:43:23.766576",
"spec_repo_commit": "e327e6df"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-07-02 16:34:48.296503",
"spec_repo_commit": "de2517ad"
"regenerated": "2025-07-02 20:43:23.783767",
"spec_repo_commit": "e327e6df"
}
}
}
15 changes: 0 additions & 15 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53140,9 +53140,6 @@ paths:
operator: OR
permissions:
- monitors_read
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,

contact [Datadog support](https://docs.datadoghq.com/help/).'
post:
description: Creates a monitor notification rule.
operationId: CreateMonitorNotificationRule
Expand Down Expand Up @@ -53186,9 +53183,6 @@ paths:
operator: OR
permissions:
- monitor_config_policy_write
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,

contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/monitor/notification_rule/{rule_id}:
delete:
description: Deletes a monitor notification rule by `rule_id`.
Expand Down Expand Up @@ -53229,9 +53223,6 @@ paths:
operator: OR
permissions:
- monitor_config_policy_write
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,

contact [Datadog support](https://docs.datadoghq.com/help/).'
get:
description: Returns a monitor notification rule by `rule_id`.
operationId: GetMonitorNotificationRule
Expand Down Expand Up @@ -53285,9 +53276,6 @@ paths:
operator: OR
permissions:
- monitors_read
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,

contact [Datadog support](https://docs.datadoghq.com/help/).'
patch:
description: Updates a monitor notification rule by `rule_id`.
operationId: UpdateMonitorNotificationRule
Expand Down Expand Up @@ -53345,9 +53333,6 @@ paths:
operator: OR
permissions:
- monitor_config_policy_write
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,

contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/monitor/policy:
get:
description: Get all monitor configuration policies.
Expand Down
1 change: 0 additions & 1 deletion examples/v2/monitors/CreateMonitorNotificationRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.createMonitorNotificationRule", true);
MonitorsApi apiInstance = new MonitorsApi(defaultClient);

MonitorNotificationRuleCreateRequest body =
Expand Down
1 change: 0 additions & 1 deletion examples/v2/monitors/DeleteMonitorNotificationRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.deleteMonitorNotificationRule", true);
MonitorsApi apiInstance = new MonitorsApi(defaultClient);

// there is a valid "monitor_notification_rule" in the system
Expand Down
1 change: 0 additions & 1 deletion examples/v2/monitors/GetMonitorNotificationRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.getMonitorNotificationRule", true);
MonitorsApi apiInstance = new MonitorsApi(defaultClient);

// there is a valid "monitor_notification_rule" in the system
Expand Down
1 change: 0 additions & 1 deletion examples/v2/monitors/GetMonitorNotificationRules.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.getMonitorNotificationRules", true);
MonitorsApi apiInstance = new MonitorsApi(defaultClient);

try {
Expand Down
1 change: 0 additions & 1 deletion examples/v2/monitors/UpdateMonitorNotificationRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.updateMonitorNotificationRule", true);
MonitorsApi apiInstance = new MonitorsApi(defaultClient);

// there is a valid "monitor_notification_rule" in the system
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/com/datadog/api/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -735,15 +735,10 @@ public class ApiClient {
put("v2.listAWSNamespaces", false);
put("v2.updateAWSAccount", false);
put("v2.listAWSLogsServices", false);
put("v2.createMonitorNotificationRule", false);
put("v2.createMonitorUserTemplate", false);
put("v2.deleteMonitorNotificationRule", false);
put("v2.deleteMonitorUserTemplate", false);
put("v2.getMonitorNotificationRule", false);
put("v2.getMonitorNotificationRules", false);
put("v2.getMonitorUserTemplate", false);
put("v2.listMonitorUserTemplates", false);
put("v2.updateMonitorNotificationRule", false);
put("v2.updateMonitorUserTemplate", false);
put("v2.validateExistingMonitorUserTemplate", false);
put("v2.validateMonitorUserTemplate", false);
Expand Down
89 changes: 0 additions & 89 deletions src/main/java/com/datadog/api/client/v2/api/MonitorsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,6 @@ public CompletableFuture<MonitorNotificationRuleResponse> createMonitorNotificat
*/
public ApiResponse<MonitorNotificationRuleResponse> createMonitorNotificationRuleWithHttpInfo(
MonitorNotificationRuleCreateRequest body) throws ApiException {
// Check if unstable operation is enabled
String operationId = "createMonitorNotificationRule";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down Expand Up @@ -289,17 +282,6 @@ public ApiResponse<MonitorNotificationRuleResponse> createMonitorNotificationRul
*/
public CompletableFuture<ApiResponse<MonitorNotificationRuleResponse>>
createMonitorNotificationRuleWithHttpInfoAsync(MonitorNotificationRuleCreateRequest body) {
// Check if unstable operation is enabled
String operationId = "createMonitorNotificationRule";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<MonitorNotificationRuleResponse>> result =
new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = body;

// verify the required parameter 'body' is set
Expand Down Expand Up @@ -679,13 +661,6 @@ public CompletableFuture<Void> deleteMonitorNotificationRuleAsync(String ruleId)
*/
public ApiResponse<Void> deleteMonitorNotificationRuleWithHttpInfo(String ruleId)
throws ApiException {
// Check if unstable operation is enabled
String operationId = "deleteMonitorNotificationRule";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = null;

// verify the required parameter 'ruleId' is set
Expand Down Expand Up @@ -731,16 +706,6 @@ public ApiResponse<Void> deleteMonitorNotificationRuleWithHttpInfo(String ruleId
*/
public CompletableFuture<ApiResponse<Void>> deleteMonitorNotificationRuleWithHttpInfoAsync(
String ruleId) {
// Check if unstable operation is enabled
String operationId = "deleteMonitorNotificationRule";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<Void>> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = null;

// verify the required parameter 'ruleId' is set
Expand Down Expand Up @@ -1184,13 +1149,6 @@ public CompletableFuture<MonitorNotificationRuleResponse> getMonitorNotification
*/
public ApiResponse<MonitorNotificationRuleResponse> getMonitorNotificationRuleWithHttpInfo(
String ruleId, GetMonitorNotificationRuleOptionalParameters parameters) throws ApiException {
// Check if unstable operation is enabled
String operationId = "getMonitorNotificationRule";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = null;

// verify the required parameter 'ruleId' is set
Expand Down Expand Up @@ -1241,17 +1199,6 @@ public ApiResponse<MonitorNotificationRuleResponse> getMonitorNotificationRuleWi
public CompletableFuture<ApiResponse<MonitorNotificationRuleResponse>>
getMonitorNotificationRuleWithHttpInfoAsync(
String ruleId, GetMonitorNotificationRuleOptionalParameters parameters) {
// Check if unstable operation is enabled
String operationId = "getMonitorNotificationRule";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<MonitorNotificationRuleResponse>> result =
new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = null;

// verify the required parameter 'ruleId' is set
Expand Down Expand Up @@ -1398,13 +1345,6 @@ public CompletableFuture<MonitorNotificationRuleListResponse> getMonitorNotifica
*/
public ApiResponse<MonitorNotificationRuleListResponse> getMonitorNotificationRulesWithHttpInfo(
GetMonitorNotificationRulesOptionalParameters parameters) throws ApiException {
// Check if unstable operation is enabled
String operationId = "getMonitorNotificationRules";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = null;
String include = parameters.include;
// create path and map variables
Expand Down Expand Up @@ -1446,17 +1386,6 @@ public ApiResponse<MonitorNotificationRuleListResponse> getMonitorNotificationRu
public CompletableFuture<ApiResponse<MonitorNotificationRuleListResponse>>
getMonitorNotificationRulesWithHttpInfoAsync(
GetMonitorNotificationRulesOptionalParameters parameters) {
// Check if unstable operation is enabled
String operationId = "getMonitorNotificationRules";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<MonitorNotificationRuleListResponse>> result =
new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = null;
String include = parameters.include;
// create path and map variables
Expand Down Expand Up @@ -2175,13 +2104,6 @@ public CompletableFuture<MonitorNotificationRuleResponse> updateMonitorNotificat
*/
public ApiResponse<MonitorNotificationRuleResponse> updateMonitorNotificationRuleWithHttpInfo(
String ruleId, MonitorNotificationRuleUpdateRequest body) throws ApiException {
// Check if unstable operation is enabled
String operationId = "updateMonitorNotificationRule";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = body;

// verify the required parameter 'ruleId' is set
Expand Down Expand Up @@ -2235,17 +2157,6 @@ public ApiResponse<MonitorNotificationRuleResponse> updateMonitorNotificationRul
public CompletableFuture<ApiResponse<MonitorNotificationRuleResponse>>
updateMonitorNotificationRuleWithHttpInfoAsync(
String ruleId, MonitorNotificationRuleUpdateRequest body) {
// Check if unstable operation is enabled
String operationId = "updateMonitorNotificationRule";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<MonitorNotificationRuleResponse>> result =
new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = body;

// verify the required parameter 'ruleId' is set
Expand Down
30 changes: 10 additions & 20 deletions src/test/resources/com/datadog/api/client/v2/api/monitors.feature
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,14 @@ Feature: Monitors

@skip-validation @team:DataDog/monitor-app
Scenario: Create a monitor notification rule returns "Bad Request" response
Given operation "CreateMonitorNotificationRule" enabled
And new "CreateMonitorNotificationRule" request
Given new "CreateMonitorNotificationRule" request
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"}}
When the request is sent
Then the response status is 400 Bad Request

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

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

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

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

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

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

@skip-validation @team:DataDog/monitor-app
Scenario: Update a monitor notification rule returns "Bad Request" response
Given operation "UpdateMonitorNotificationRule" enabled
And there is a valid "monitor_notification_rule" in the system
Given there is a valid "monitor_notification_rule" in the system
And new "UpdateMonitorNotificationRule" request
And request contains "rule_id" parameter from "monitor_notification_rule.data.id"
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"}}
Expand All @@ -247,17 +239,15 @@ Feature: Monitors

@team:DataDog/monitor-app
Scenario: Update a monitor notification rule returns "Not Found" response
Given operation "UpdateMonitorNotificationRule" enabled
And new "UpdateMonitorNotificationRule" request
Given new "UpdateMonitorNotificationRule" request
And request contains "rule_id" parameter with value "00000000-0000-1234-0000-000000000000"
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"}}
When the request is sent
Then the response status is 404 Not Found

@team:DataDog/monitor-app
Scenario: Update a monitor notification rule returns "OK" response
Given operation "UpdateMonitorNotificationRule" enabled
And there is a valid "monitor_notification_rule" in the system
Given there is a valid "monitor_notification_rule" in the system
And new "UpdateMonitorNotificationRule" request
And request contains "rule_id" parameter from "monitor_notification_rule.data.id"
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"}}
Expand Down