From b531c3fb699d661b1459f9a8464a9f1b99f6d7f5 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 6 Feb 2025 14:58:46 +0000 Subject: [PATCH] Regenerate client from commit 3c39fb0c of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 25 +++--- .../CreateSignalNotificationRule.java | 3 +- .../CreateVulnerabilityNotificationRule.java | 4 +- .../DeleteSignalNotificationRule.java | 2 +- .../DeleteVulnerabilityNotificationRule.java | 2 +- .../GetSignalNotificationRule.java | 2 +- .../GetSignalNotificationRules.java | 3 +- .../GetVulnerabilityNotificationRule.java | 2 +- .../GetVulnerabilityNotificationRules.java | 3 +- .../PatchSignalNotificationRule.java | 2 +- .../PatchVulnerabilityNotificationRule.java | 3 +- .../client/v2/api/SecurityMonitoringApi.java | 60 +++++++------- .../api/client/v2/model/RuleTypesItems.java | 2 +- .../api/client/v2/model/Selectors.java | 2 +- ...ated_the_notification_rule_response.freeze | 1 + ...eated_the_notification_rule_response.json} | 8 +- ...ated_the_notification_rule_response.freeze | 1 - ...ated_the_notification_rule_response.freeze | 1 + ...eated_the_notification_rule_response.json} | 8 +- ...ated_the_notification_rule_response.freeze | 1 - ...ion_rule_returns_Not_Found_response.freeze | 1 + ...tion_rule_returns_Not_Found_response.json} | 0 ..._Rule_successfully_deleted_response.freeze | 1 + ...s_Rule_successfully_deleted_response.json} | 16 ++-- ...sed_rule_returns_Not_Found_response.freeze | 1 - ..._Rule_successfully_deleted_response.freeze | 1 - ...ion_rule_returns_Not_Found_response.freeze | 1 + ...tion_rule_returns_Not_Found_response.json} | 0 ..._Rule_successfully_deleted_response.freeze | 1 + ...s_Rule_successfully_deleted_response.json} | 16 ++-- ...sed_rule_returns_Not_Found_response.freeze | 1 - ..._Rule_successfully_deleted_response.freeze | 1 - ...ion_rule_returns_Not_Found_response.freeze | 1 + ...tion_rule_returns_Not_Found_response.json} | 0 ..._Notification_rule_details_response.freeze | 1 + ...ns_Notification_rule_details_response.json | 79 ++++++++++++++++++ ...sed_rule_returns_Not_Found_response.freeze | 1 - ..._Notification_rule_details_response.freeze | 1 - ...ns_Notification_rule_details_response.json | 79 ------------------ ...sed_rule_returns_Not_Found_response.freeze | 1 - ..._Notification_rule_details_response.freeze | 1 - ...ns_Notification_rule_details_response.json | 79 ------------------ ...ion_rule_returns_Not_Found_response.freeze | 1 + ...tion_rule_returns_Not_Found_response.json} | 0 ..._Notification_rule_details_response.freeze | 1 + ...ns_Notification_rule_details_response.json | 79 ++++++++++++++++++ ...list_of_notification_rules_response.freeze | 1 + ...e_list_of_notification_rules_response.json | 79 ++++++++++++++++++ ...list_of_notification_rules_response.freeze | 1 - ...e_list_of_notification_rules_response.json | 79 ------------------ ...list_of_notification_rules_response.freeze | 1 - ...e_list_of_notification_rules_response.json | 79 ------------------ ...list_of_notification_rules_response.freeze | 1 + ...e_list_of_notification_rules_response.json | 79 ++++++++++++++++++ ...n_rule_returns_Bad_Request_response.freeze | 1 + ...on_rule_returns_Bad_Request_response.json} | 14 ++-- ...ion_rule_returns_Not_Found_response.freeze | 1 + ...tion_rule_returns_Not_Found_response.json} | 0 ..._rule_successfully_patched_response.freeze | 1 + ...on_rule_successfully_patched_response.json | 83 +++++++++++++++++++ ...d_rule_returns_Bad_Request_response.freeze | 1 - ...sed_rule_returns_Not_Found_response.freeze | 1 - ..._rule_successfully_patched_response.freeze | 1 - ...on_rule_successfully_patched_response.json | 83 ------------------- ...n_rule_returns_Bad_Request_response.freeze | 1 + ...on_rule_returns_Bad_Request_response.json} | 14 ++-- ...ion_rule_returns_Not_Found_response.freeze | 1 + ...tion_rule_returns_Not_Found_response.json} | 0 ..._rule_successfully_patched_response.freeze | 1 + ...n_rule_successfully_patched_response.json} | 16 ++-- ...d_rule_returns_Bad_Request_response.freeze | 1 - ...sed_rule_returns_Not_Found_response.freeze | 1 - ..._rule_successfully_patched_response.freeze | 1 - .../client/v2/api/security_monitoring.feature | 48 +++++------ 75 files changed, 550 insertions(+), 547 deletions(-) create mode 100644 src/test/resources/cassettes/features/v2/Create_a_new_signal_based_notification_rule_returns_Successfully_created_the_notification_rule_response.freeze rename src/test/resources/cassettes/features/v2/{Create_a_new_signal_based_rule_returns_Successfully_created_the_notification_rule_response.json => Create_a_new_signal_based_notification_rule_returns_Successfully_created_the_notification_rule_response.json} (59%) delete mode 100644 src/test/resources/cassettes/features/v2/Create_a_new_signal_based_rule_returns_Successfully_created_the_notification_rule_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_notification_rule_returns_Successfully_created_the_notification_rule_response.freeze rename src/test/resources/cassettes/features/v2/{Create_a_new_vulnerability_based_rule_returns_Successfully_created_the_notification_rule_response.json => Create_a_new_vulnerability_based_notification_rule_returns_Successfully_created_the_notification_rule_response.json} (62%) delete mode 100644 src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_rule_returns_Successfully_created_the_notification_rule_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Not_Found_response.freeze rename src/test/resources/cassettes/features/v2/{Delete_a_signal_based_rule_returns_Not_Found_response.json => Delete_a_signal_based_notification_rule_returns_Not_Found_response.json} (100%) create mode 100644 src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response.freeze rename src/test/resources/cassettes/features/v2/{Delete_a_signal_based_rule_returns_Rule_successfully_deleted_response.json => Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response.json} (52%) delete mode 100644 src/test/resources/cassettes/features/v2/Delete_a_signal_based_rule_returns_Not_Found_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Delete_a_signal_based_rule_returns_Rule_successfully_deleted_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Not_Found_response.freeze rename src/test/resources/cassettes/features/v2/{Delete_a_vulnerability_based_rule_returns_Not_Found_response.json => Delete_a_vulnerability_based_notification_rule_returns_Not_Found_response.json} (100%) create mode 100644 src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response.freeze rename src/test/resources/cassettes/features/v2/{Delete_a_vulnerability_based_rule_returns_Rule_successfully_deleted_response.json => Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response.json} (55%) delete mode 100644 src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_rule_returns_Not_Found_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_rule_returns_Rule_successfully_deleted_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Not_Found_response.freeze rename src/test/resources/cassettes/features/v2/{Get_details_of_a_signal_based_rule_returns_Not_Found_response.json => Get_details_of_a_signal_based_notification_rule_returns_Not_Found_response.json} (100%) create mode 100644 src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response.json delete mode 100644 src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_rule_returns_Not_Found_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_rule_returns_Notification_rule_details_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_rule_returns_Notification_rule_details_response.json delete mode 100644 src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_based_rule_returns_Not_Found_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_based_rule_returns_Notification_rule_details_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_based_rule_returns_Notification_rule_details_response.json create mode 100644 src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Not_Found_response.freeze rename src/test/resources/cassettes/features/v2/{Get_details_of_a_vulnerability_based_rule_returns_Not_Found_response.json => Get_details_of_a_vulnerability_notification_rule_returns_Not_Found_response.json} (100%) create mode 100644 src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response.json create mode 100644 src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response.json delete mode 100644 src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_rules_returns_The_list_of_notification_rules_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_rules_returns_The_list_of_notification_rules_response.json delete mode 100644 src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_based_rules_returns_The_list_of_notification_rules_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_based_rules_returns_The_list_of_notification_rules_response.json create mode 100644 src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response.json create mode 100644 src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Bad_Request_response.freeze rename src/test/resources/cassettes/features/v2/{Patch_a_signal_based_rule_returns_Bad_Request_response.json => Patch_a_signal_based_notification_rule_returns_Bad_Request_response.json} (61%) create mode 100644 src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Not_Found_response.freeze rename src/test/resources/cassettes/features/v2/{Patch_a_signal_based_rule_returns_Not_Found_response.json => Patch_a_signal_based_notification_rule_returns_Not_Found_response.json} (100%) create mode 100644 src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response.json delete mode 100644 src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Bad_Request_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Not_Found_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Notification_rule_successfully_patched_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Notification_rule_successfully_patched_response.json create mode 100644 src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response.freeze rename src/test/resources/cassettes/features/v2/{Patch_a_vulnerability_based_rule_returns_Bad_Request_response.json => Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response.json} (64%) create mode 100644 src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Not_Found_response.freeze rename src/test/resources/cassettes/features/v2/{Patch_a_vulnerability_based_rule_returns_Not_Found_response.json => Patch_a_vulnerability_based_notification_rule_returns_Not_Found_response.json} (100%) create mode 100644 src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_response.freeze rename src/test/resources/cassettes/features/v2/{Patch_a_vulnerability_based_rule_returns_Notification_rule_successfully_patched_response.json => Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_response.json} (51%) delete mode 100644 src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Bad_Request_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Not_Found_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Notification_rule_successfully_patched_response.freeze diff --git a/.apigentools-info b/.apigentools-info index f51741c2591..11a434b95e5 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-02-04 14:10:00.992806", - "spec_repo_commit": "4fb9047a" + "regenerated": "2025-02-06 14:57:02.629435", + "spec_repo_commit": "3c39fb0c" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-02-04 14:10:01.007762", - "spec_repo_commit": "4fb9047a" + "regenerated": "2025-02-06 14:57:02.644416", + "spec_repo_commit": "3c39fb0c" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 831530e2584..d5fbf684de4 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -23184,8 +23184,7 @@ components: x-enum-varnames: - RULE RuleTypes: - description: Security rule types used to filter signals and vulnerabilities - generating notifications. + description: Security rule types used as filters in security rules. example: - misconfiguration - attack_path @@ -23193,7 +23192,7 @@ components: $ref: '#/components/schemas/RuleTypesItems' type: array RuleTypesItems: - description: 'Security rule types which can be used in notification rules. + description: 'Security rule type which can be used in security rules. Signal-based notification rules can filter signals based on rule types application_security, log_detection, @@ -44078,7 +44077,7 @@ paths: appKeyAuth: [] - AuthZ: - security_monitoring_notification_profiles_read - summary: Get the list of signal-based rules + summary: Get the list of signal-based notification rules tags: - Security Monitoring x-permission: @@ -44120,7 +44119,7 @@ paths: appKeyAuth: [] - AuthZ: - security_monitoring_notification_profiles_write - summary: Create a new signal-based rule + summary: Create a new signal-based notification rule tags: - Security Monitoring x-codegen-request-body-name: body @@ -44153,7 +44152,7 @@ paths: appKeyAuth: [] - AuthZ: - security_monitoring_notification_profiles_write - summary: Delete a signal-based rule + summary: Delete a signal-based notification rule tags: - Security Monitoring x-permission: @@ -44190,7 +44189,7 @@ paths: appKeyAuth: [] - AuthZ: - security_monitoring_notification_profiles_read - summary: Get details of a signal-based rule + summary: Get details of a signal-based notification rule tags: - Security Monitoring x-permission: @@ -44236,7 +44235,7 @@ paths: appKeyAuth: [] - AuthZ: - security_monitoring_notification_profiles_write - summary: Patch a signal-based rule + summary: Patch a signal-based notification rule tags: - Security Monitoring x-codegen-request-body-name: body @@ -44636,7 +44635,7 @@ paths: appKeyAuth: [] - AuthZ: - security_monitoring_notification_profiles_read - summary: Get the list of vulnerability-based rules + summary: Get the list of vulnerability notification rules tags: - Security Monitoring x-permission: @@ -44678,7 +44677,7 @@ paths: appKeyAuth: [] - AuthZ: - security_monitoring_notification_profiles_write - summary: Create a new vulnerability-based rule + summary: Create a new vulnerability-based notification rule tags: - Security Monitoring x-codegen-request-body-name: body @@ -44711,7 +44710,7 @@ paths: appKeyAuth: [] - AuthZ: - security_monitoring_notification_profiles_write - summary: Delete a vulnerability-based rule + summary: Delete a vulnerability-based notification rule tags: - Security Monitoring x-permission: @@ -44748,7 +44747,7 @@ paths: appKeyAuth: [] - AuthZ: - security_monitoring_notification_profiles_read - summary: Get details of a vulnerability-based rule + summary: Get details of a vulnerability notification rule tags: - Security Monitoring x-permission: @@ -44794,7 +44793,7 @@ paths: appKeyAuth: [] - AuthZ: - security_monitoring_notification_profiles_write - summary: Patch a vulnerability-based rule + summary: Patch a vulnerability-based notification rule tags: - Security Monitoring x-codegen-request-body-name: body diff --git a/examples/v2/security-monitoring/CreateSignalNotificationRule.java b/examples/v2/security-monitoring/CreateSignalNotificationRule.java index 0f2fc5e8ea2..0815980a569 100644 --- a/examples/v2/security-monitoring/CreateSignalNotificationRule.java +++ b/examples/v2/security-monitoring/CreateSignalNotificationRule.java @@ -1,4 +1,5 @@ -// Create a new signal-based rule returns "Successfully created the notification rule." response +// Create a new signal-based notification rule returns "Successfully created the notification rule." +// response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/security-monitoring/CreateVulnerabilityNotificationRule.java b/examples/v2/security-monitoring/CreateVulnerabilityNotificationRule.java index e0b271b0159..ddde6b49461 100644 --- a/examples/v2/security-monitoring/CreateVulnerabilityNotificationRule.java +++ b/examples/v2/security-monitoring/CreateVulnerabilityNotificationRule.java @@ -1,5 +1,5 @@ -// Create a new vulnerability-based rule returns "Successfully created the notification rule." -// response +// Create a new vulnerability-based notification rule returns "Successfully created the notification +// rule." response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/security-monitoring/DeleteSignalNotificationRule.java b/examples/v2/security-monitoring/DeleteSignalNotificationRule.java index cbf66ad112a..4a49e7f05ee 100644 --- a/examples/v2/security-monitoring/DeleteSignalNotificationRule.java +++ b/examples/v2/security-monitoring/DeleteSignalNotificationRule.java @@ -1,4 +1,4 @@ -// Delete a signal-based rule returns "Rule successfully deleted." response +// Delete a signal-based notification rule returns "Rule successfully deleted." response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/security-monitoring/DeleteVulnerabilityNotificationRule.java b/examples/v2/security-monitoring/DeleteVulnerabilityNotificationRule.java index 019c47dba38..52ee2744103 100644 --- a/examples/v2/security-monitoring/DeleteVulnerabilityNotificationRule.java +++ b/examples/v2/security-monitoring/DeleteVulnerabilityNotificationRule.java @@ -1,4 +1,4 @@ -// Delete a vulnerability-based rule returns "Rule successfully deleted." response +// Delete a vulnerability-based notification rule returns "Rule successfully deleted." response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/security-monitoring/GetSignalNotificationRule.java b/examples/v2/security-monitoring/GetSignalNotificationRule.java index 996ec6333bd..435fcd5f722 100644 --- a/examples/v2/security-monitoring/GetSignalNotificationRule.java +++ b/examples/v2/security-monitoring/GetSignalNotificationRule.java @@ -1,4 +1,4 @@ -// Get details of a signal-based rule returns "Notification rule details." response +// Get details of a signal-based notification rule returns "Notification rule details." response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/security-monitoring/GetSignalNotificationRules.java b/examples/v2/security-monitoring/GetSignalNotificationRules.java index ce053752144..db47c8967f1 100644 --- a/examples/v2/security-monitoring/GetSignalNotificationRules.java +++ b/examples/v2/security-monitoring/GetSignalNotificationRules.java @@ -1,4 +1,5 @@ -// Get the list of signal-based rules returns "The list of notification rules." response +// Get the list of signal-based notification rules returns "The list of notification rules." +// response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/security-monitoring/GetVulnerabilityNotificationRule.java b/examples/v2/security-monitoring/GetVulnerabilityNotificationRule.java index c9d85c082f3..02f88fe87f4 100644 --- a/examples/v2/security-monitoring/GetVulnerabilityNotificationRule.java +++ b/examples/v2/security-monitoring/GetVulnerabilityNotificationRule.java @@ -1,4 +1,4 @@ -// Get details of a vulnerability-based rule returns "Notification rule details." response +// Get details of a vulnerability notification rule returns "Notification rule details." response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/security-monitoring/GetVulnerabilityNotificationRules.java b/examples/v2/security-monitoring/GetVulnerabilityNotificationRules.java index edfa968b43f..bb6b715806d 100644 --- a/examples/v2/security-monitoring/GetVulnerabilityNotificationRules.java +++ b/examples/v2/security-monitoring/GetVulnerabilityNotificationRules.java @@ -1,4 +1,5 @@ -// Get the list of vulnerability-based rules returns "The list of notification rules." response +// Get the list of vulnerability notification rules returns "The list of notification rules." +// response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/security-monitoring/PatchSignalNotificationRule.java b/examples/v2/security-monitoring/PatchSignalNotificationRule.java index f743f6dea25..740397707ce 100644 --- a/examples/v2/security-monitoring/PatchSignalNotificationRule.java +++ b/examples/v2/security-monitoring/PatchSignalNotificationRule.java @@ -1,4 +1,4 @@ -// Patch a signal-based rule returns "Notification rule successfully patched." response +// Patch a signal-based notification rule returns "Notification rule successfully patched." response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/security-monitoring/PatchVulnerabilityNotificationRule.java b/examples/v2/security-monitoring/PatchVulnerabilityNotificationRule.java index e612e055a6b..ed7773fb3f8 100644 --- a/examples/v2/security-monitoring/PatchVulnerabilityNotificationRule.java +++ b/examples/v2/security-monitoring/PatchVulnerabilityNotificationRule.java @@ -1,4 +1,5 @@ -// Patch a vulnerability-based rule returns "Notification rule successfully patched." response +// Patch a vulnerability-based notification rule returns "Notification rule successfully patched." +// response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java b/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java index 5fa2738fe28..f9bb931e684 100644 --- a/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java @@ -1106,7 +1106,7 @@ public SecurityMonitoringSuppressionResponse createSecurityMonitoringSuppression } /** - * Create a new signal-based rule. + * Create a new signal-based notification rule. * *

See {@link #createSignalNotificationRuleWithHttpInfo}. * @@ -1122,7 +1122,7 @@ public NotificationRuleResponse createSignalNotificationRule( } /** - * Create a new signal-based rule. + * Create a new signal-based notification rule. * *

See {@link #createSignalNotificationRuleWithHttpInfoAsync}. * @@ -1193,7 +1193,7 @@ public ApiResponse createSignalNotificationRuleWithHtt } /** - * Create a new signal-based rule. + * Create a new signal-based notification rule. * *

See {@link #createSignalNotificationRuleWithHttpInfo}. * @@ -1248,7 +1248,7 @@ public ApiResponse createSignalNotificationRuleWithHtt } /** - * Create a new vulnerability-based rule. + * Create a new vulnerability-based notification rule. * *

See {@link #createVulnerabilityNotificationRuleWithHttpInfo}. * @@ -1264,7 +1264,7 @@ public NotificationRuleResponse createVulnerabilityNotificationRule( } /** - * Create a new vulnerability-based rule. + * Create a new vulnerability-based notification rule. * *

See {@link #createVulnerabilityNotificationRuleWithHttpInfoAsync}. * @@ -1336,7 +1336,7 @@ public ApiResponse createVulnerabilityNotificationRule } /** - * Create a new vulnerability-based rule. + * Create a new vulnerability-based notification rule. * *

See {@link #createVulnerabilityNotificationRuleWithHttpInfo}. * @@ -1960,7 +1960,7 @@ public CompletableFuture> deleteSecurityMonitoringSuppressionW } /** - * Delete a signal-based rule. + * Delete a signal-based notification rule. * *

See {@link #deleteSignalNotificationRuleWithHttpInfo}. * @@ -1972,7 +1972,7 @@ public void deleteSignalNotificationRule(String id) throws ApiException { } /** - * Delete a signal-based rule. + * Delete a signal-based notification rule. * *

See {@link #deleteSignalNotificationRuleWithHttpInfoAsync}. * @@ -2039,7 +2039,7 @@ public ApiResponse deleteSignalNotificationRuleWithHttpInfo(String id) thr } /** - * Delete a signal-based rule. + * Delete a signal-based notification rule. * *

See {@link #deleteSignalNotificationRuleWithHttpInfo}. * @@ -2094,7 +2094,7 @@ public CompletableFuture> deleteSignalNotificationRuleWithHttp } /** - * Delete a vulnerability-based rule. + * Delete a vulnerability-based notification rule. * *

See {@link #deleteVulnerabilityNotificationRuleWithHttpInfo}. * @@ -2106,7 +2106,7 @@ public void deleteVulnerabilityNotificationRule(String id) throws ApiException { } /** - * Delete a vulnerability-based rule. + * Delete a vulnerability-based notification rule. * *

See {@link #deleteVulnerabilityNotificationRuleWithHttpInfoAsync}. * @@ -2175,7 +2175,7 @@ public ApiResponse deleteVulnerabilityNotificationRuleWithHttpInfo(String } /** - * Delete a vulnerability-based rule. + * Delete a vulnerability-based notification rule. * *

See {@link #deleteVulnerabilityNotificationRuleWithHttpInfo}. * @@ -3910,7 +3910,7 @@ public SecurityMonitoringSuppressionResponse getSecurityMonitoringSuppression( } /** - * Get details of a signal-based rule. + * Get details of a signal-based notification rule. * *

See {@link #getSignalNotificationRuleWithHttpInfo}. * @@ -3923,7 +3923,7 @@ public NotificationRuleResponse getSignalNotificationRule(String id) throws ApiE } /** - * Get details of a signal-based rule. + * Get details of a signal-based notification rule. * *

See {@link #getSignalNotificationRuleWithHttpInfoAsync}. * @@ -3992,7 +3992,7 @@ public ApiResponse getSignalNotificationRuleWithHttpIn } /** - * Get details of a signal-based rule. + * Get details of a signal-based notification rule. * *

See {@link #getSignalNotificationRuleWithHttpInfo}. * @@ -4046,7 +4046,7 @@ public ApiResponse getSignalNotificationRuleWithHttpIn } /** - * Get the list of signal-based rules. + * Get the list of signal-based notification rules. * *

See {@link #getSignalNotificationRulesWithHttpInfo}. * @@ -4058,7 +4058,7 @@ public Object getSignalNotificationRules() throws ApiException { } /** - * Get the list of signal-based rules. + * Get the list of signal-based notification rules. * *

See {@link #getSignalNotificationRulesWithHttpInfoAsync}. * @@ -4114,7 +4114,7 @@ public ApiResponse getSignalNotificationRulesWithHttpInfo() throws ApiEx } /** - * Get the list of signal-based rules. + * Get the list of signal-based notification rules. * *

See {@link #getSignalNotificationRulesWithHttpInfo}. * @@ -4155,7 +4155,7 @@ public CompletableFuture> getSignalNotificationRulesWithHttp } /** - * Get details of a vulnerability-based rule. + * Get details of a vulnerability notification rule. * *

See {@link #getVulnerabilityNotificationRuleWithHttpInfo}. * @@ -4168,7 +4168,7 @@ public NotificationRuleResponse getVulnerabilityNotificationRule(String id) thro } /** - * Get details of a vulnerability-based rule. + * Get details of a vulnerability notification rule. * *

See {@link #getVulnerabilityNotificationRuleWithHttpInfoAsync}. * @@ -4238,7 +4238,7 @@ public ApiResponse getVulnerabilityNotificationRuleWit } /** - * Get details of a vulnerability-based rule. + * Get details of a vulnerability notification rule. * *

See {@link #getVulnerabilityNotificationRuleWithHttpInfo}. * @@ -4293,7 +4293,7 @@ public ApiResponse getVulnerabilityNotificationRuleWit } /** - * Get the list of vulnerability-based rules. + * Get the list of vulnerability notification rules. * *

See {@link #getVulnerabilityNotificationRulesWithHttpInfo}. * @@ -4305,7 +4305,7 @@ public Object getVulnerabilityNotificationRules() throws ApiException { } /** - * Get the list of vulnerability-based rules. + * Get the list of vulnerability notification rules. * *

See {@link #getVulnerabilityNotificationRulesWithHttpInfoAsync}. * @@ -4361,7 +4361,7 @@ public ApiResponse getVulnerabilityNotificationRulesWithHttpInfo() throw } /** - * Get the list of vulnerability-based rules. + * Get the list of vulnerability notification rules. * *

See {@link #getVulnerabilityNotificationRulesWithHttpInfo}. * @@ -7562,7 +7562,7 @@ public CompletableFuture> muteFindingsWith } /** - * Patch a signal-based rule. + * Patch a signal-based notification rule. * *

See {@link #patchSignalNotificationRuleWithHttpInfo}. * @@ -7577,7 +7577,7 @@ public NotificationRuleResponse patchSignalNotificationRule( } /** - * Patch a signal-based rule. + * Patch a signal-based notification rule. * *

See {@link #patchSignalNotificationRuleWithHttpInfoAsync}. * @@ -7657,7 +7657,7 @@ public ApiResponse patchSignalNotificationRuleWithHttp } /** - * Patch a signal-based rule. + * Patch a signal-based notification rule. * *

See {@link #patchSignalNotificationRuleWithHttpInfo}. * @@ -7723,7 +7723,7 @@ public ApiResponse patchSignalNotificationRuleWithHttp } /** - * Patch a vulnerability-based rule. + * Patch a vulnerability-based notification rule. * *

See {@link #patchVulnerabilityNotificationRuleWithHttpInfo}. * @@ -7738,7 +7738,7 @@ public NotificationRuleResponse patchVulnerabilityNotificationRule( } /** - * Patch a vulnerability-based rule. + * Patch a vulnerability-based notification rule. * *

See {@link #patchVulnerabilityNotificationRuleWithHttpInfoAsync}. * @@ -7820,7 +7820,7 @@ public ApiResponse patchVulnerabilityNotificationRuleW } /** - * Patch a vulnerability-based rule. + * Patch a vulnerability-based notification rule. * *

See {@link #patchVulnerabilityNotificationRuleWithHttpInfo}. * diff --git a/src/main/java/com/datadog/api/client/v2/model/RuleTypesItems.java b/src/main/java/com/datadog/api/client/v2/model/RuleTypesItems.java index 48c4863f912..faf70170f75 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RuleTypesItems.java +++ b/src/main/java/com/datadog/api/client/v2/model/RuleTypesItems.java @@ -19,7 +19,7 @@ import java.util.Set; /** - * Security rule types which can be used in notification rules. Signal-based notification rules can + * Security rule type which can be used in security rules. Signal-based notification rules can * filter signals based on rule types application_security, log_detection, workload_security, * signal_correlation, cloud_configuration and infrastructure_configuration. Vulnerability-based * notification rules can filter vulnerabilities based on rule types application_code_vulnerability, diff --git a/src/main/java/com/datadog/api/client/v2/model/Selectors.java b/src/main/java/com/datadog/api/client/v2/model/Selectors.java index 682bf931ebc..f388bb9faa7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/Selectors.java +++ b/src/main/java/com/datadog/api/client/v2/model/Selectors.java @@ -93,7 +93,7 @@ public Selectors addRuleTypesItem(RuleTypesItems ruleTypesItem) { } /** - * Security rule types used to filter signals and vulnerabilities generating notifications. + * Security rule types used as filters in security rules. * * @return ruleTypes */ diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_signal_based_notification_rule_returns_Successfully_created_the_notification_rule_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_new_signal_based_notification_rule_returns_Successfully_created_the_notification_rule_response.freeze new file mode 100644 index 00000000000..594e432cb69 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_new_signal_based_notification_rule_returns_Successfully_created_the_notification_rule_response.freeze @@ -0,0 +1 @@ +2025-02-05T13:45:37.454Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_signal_based_rule_returns_Successfully_created_the_notification_rule_response.json b/src/test/resources/cassettes/features/v2/Create_a_new_signal_based_notification_rule_returns_Successfully_created_the_notification_rule_response.json similarity index 59% rename from src/test/resources/cassettes/features/v2/Create_a_new_signal_based_rule_returns_Successfully_created_the_notification_rule_response.json rename to src/test/resources/cassettes/features/v2/Create_a_new_signal_based_notification_rule_returns_Successfully_created_the_notification_rule_response.json index f92981340b9..e468ef74b48 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_new_signal_based_rule_returns_Successfully_created_the_notification_rule_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_new_signal_based_notification_rule_returns_Successfully_created_the_notification_rule_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"xen-2ux-w4q\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1737628559636,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1737628559636,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 1\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"hvb-for-lpm\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763137979,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763137979,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Rule 1\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "5bf44d5d-e1c1-c14f-2dba-99bb7cf73c44" + "id": "5bf44d5d-e1c1-c14f-2dba-99bb7cf73c43" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/signals/notification_rules/xen-2ux-w4q", + "path": "/api/v2/security/signals/notification_rules/hvb-for-lpm", "keepAlive": false, "secure": true }, @@ -48,6 +48,6 @@ "timeToLive": { "unlimited": true }, - "id": "2b083793-f145-8fc1-2f00-758c3940ecf0" + "id": "66bbdb1d-091e-adf0-b395-b128182abfcb" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_signal_based_rule_returns_Successfully_created_the_notification_rule_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_new_signal_based_rule_returns_Successfully_created_the_notification_rule_response.freeze deleted file mode 100644 index b0503404843..00000000000 --- a/src/test/resources/cassettes/features/v2/Create_a_new_signal_based_rule_returns_Successfully_created_the_notification_rule_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-01-23T10:35:59.157Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_notification_rule_returns_Successfully_created_the_notification_rule_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_notification_rule_returns_Successfully_created_the_notification_rule_response.freeze new file mode 100644 index 00000000000..e3138e7d626 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_notification_rule_returns_Successfully_created_the_notification_rule_response.freeze @@ -0,0 +1 @@ +2025-02-05T13:45:38.493Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_rule_returns_Successfully_created_the_notification_rule_response.json b/src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_notification_rule_returns_Successfully_created_the_notification_rule_response.json similarity index 62% rename from src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_rule_returns_Successfully_created_the_notification_rule_response.json rename to src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_notification_rule_returns_Successfully_created_the_notification_rule_response.json index c6675ae82e1..7e4e03068a5 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_rule_returns_Successfully_created_the_notification_rule_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_notification_rule_returns_Successfully_created_the_notification_rule_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"757-rvr-pnu\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1737628559864,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1737628559864,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 1\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"iwz-k3b-tpk\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763138982,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763138982,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Rule 1\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "a79fd497-19e9-0c50-3012-6159be5aefbc" + "id": "a79fd497-19e9-0c50-3012-6159be5aefbb" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/vulnerabilities/notification_rules/757-rvr-pnu", + "path": "/api/v2/security/vulnerabilities/notification_rules/iwz-k3b-tpk", "keepAlive": false, "secure": true }, @@ -48,6 +48,6 @@ "timeToLive": { "unlimited": true }, - "id": "4d2f748c-b44e-0efd-60b9-cfe55fe60cac" + "id": "4524692d-f5aa-aca4-3cd6-cb72f1ac31e9" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_rule_returns_Successfully_created_the_notification_rule_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_rule_returns_Successfully_created_the_notification_rule_response.freeze deleted file mode 100644 index 4df775f8484..00000000000 --- a/src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_rule_returns_Successfully_created_the_notification_rule_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-01-23T10:35:59.776Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..f0d2ec7144b --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2025-02-05T13:45:43.873Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_signal_based_rule_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Not_Found_response.json similarity index 100% rename from src/test/resources/cassettes/features/v2/Delete_a_signal_based_rule_returns_Not_Found_response.json rename to src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Not_Found_response.json diff --git a/src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response.freeze new file mode 100644 index 00000000000..f51e67baf31 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response.freeze @@ -0,0 +1 @@ +2025-02-05T13:45:44.348Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_signal_based_rule_returns_Rule_successfully_deleted_response.json b/src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response.json similarity index 52% rename from src/test/resources/cassettes/features/v2/Delete_a_signal_based_rule_returns_Rule_successfully_deleted_response.json rename to src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response.json index 0c2be6f660b..f6e97d2169d 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_signal_based_rule_returns_Rule_successfully_deleted_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Delete_a_signal_based_rule_returns_Rule_successfully_deleted_response-1737539405\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response-1738763144\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"ukc-0jn-maf\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1737539405540,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1737539405540,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Delete_a_signal_based_rule_returns_Rule_successfully_deleted_response-1737539405\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"x4n-qps-p3w\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763144838,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763144838,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response-1738763144\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "e385b163-cbd6-556f-39e7-16ae7bef03d3" + "id": "963f16c8-c856-c118-c75b-9f00fbeaefdf" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/signals/notification_rules/ukc-0jn-maf", + "path": "/api/v2/security/signals/notification_rules/x4n-qps-p3w", "keepAlive": false, "secure": true }, @@ -48,18 +48,18 @@ "timeToLive": { "unlimited": true }, - "id": "24bff9b1-26ff-eb98-5877-830324b017d5" + "id": "a1fe9a5e-0529-8805-31b3-7c7a2a597365" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/signals/notification_rules/ukc-0jn-maf", + "path": "/api/v2/security/signals/notification_rules/x4n-qps-p3w", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[\"not_found(Notification rule with id 'ukc-0jn-maf' not found)\"]}", + "body": "{\"errors\":[\"not_found(Notification rule with id 'x4n-qps-p3w' not found)\"]}", "headers": { "Content-Type": [ "application/json" @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "24bff9b1-26ff-eb98-5877-830324b017d6" + "id": "a1fe9a5e-0529-8805-31b3-7c7a2a597366" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_signal_based_rule_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_signal_based_rule_returns_Not_Found_response.freeze deleted file mode 100644 index 5ed3da99691..00000000000 --- a/src/test/resources/cassettes/features/v2/Delete_a_signal_based_rule_returns_Not_Found_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-01-22T09:50:04.605Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_signal_based_rule_returns_Rule_successfully_deleted_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_signal_based_rule_returns_Rule_successfully_deleted_response.freeze deleted file mode 100644 index 5b9cab2f5f9..00000000000 --- a/src/test/resources/cassettes/features/v2/Delete_a_signal_based_rule_returns_Rule_successfully_deleted_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-01-22T09:50:05.107Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..5d7f042ad36 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2025-02-05T13:45:46.942Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_rule_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Not_Found_response.json similarity index 100% rename from src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_rule_returns_Not_Found_response.json rename to src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Not_Found_response.json diff --git a/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response.freeze new file mode 100644 index 00000000000..c5f1ae22125 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response.freeze @@ -0,0 +1 @@ +2025-02-05T13:45:47.393Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_rule_returns_Rule_successfully_deleted_response.json b/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response.json similarity index 55% rename from src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_rule_returns_Rule_successfully_deleted_response.json rename to src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response.json index 80479b1f067..72f32c1bd91 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_rule_returns_Rule_successfully_deleted_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Delete_a_vulnerability_based_rule_returns_Rule_successfully_deleted_response-1737539408\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response-1738763147\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"qip-ygy-7ke\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1737539409090,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1737539409090,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Delete_a_vulnerability_based_rule_returns_Rule_successfully_deleted_response-1737539408\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"p3z-nij-ygf\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763147765,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763147765,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response-1738763147\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "50d0c430-b069-bea7-2cb7-e01f5606f2a0" + "id": "129b8c39-3aa9-048e-c386-32bb203b76c2" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/vulnerabilities/notification_rules/qip-ygy-7ke", + "path": "/api/v2/security/vulnerabilities/notification_rules/p3z-nij-ygf", "keepAlive": false, "secure": true }, @@ -48,18 +48,18 @@ "timeToLive": { "unlimited": true }, - "id": "96091228-30c8-41ff-1ec2-ab44f253f547" + "id": "26b0c93b-96d5-fa63-87fd-ed9fc446bca0" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/vulnerabilities/notification_rules/qip-ygy-7ke", + "path": "/api/v2/security/vulnerabilities/notification_rules/p3z-nij-ygf", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[\"not_found(Notification rule with id 'qip-ygy-7ke' not found)\"]}", + "body": "{\"errors\":[\"not_found(Notification rule with id 'p3z-nij-ygf' not found)\"]}", "headers": { "Content-Type": [ "application/json" @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "96091228-30c8-41ff-1ec2-ab44f253f548" + "id": "26b0c93b-96d5-fa63-87fd-ed9fc446bca1" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_rule_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_rule_returns_Not_Found_response.freeze deleted file mode 100644 index 31d1497fde4..00000000000 --- a/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_rule_returns_Not_Found_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-01-22T09:50:08.134Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_rule_returns_Rule_successfully_deleted_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_rule_returns_Rule_successfully_deleted_response.freeze deleted file mode 100644 index f80fa530897..00000000000 --- a/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_rule_returns_Rule_successfully_deleted_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-01-22T09:50:08.640Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..7a9e3b4bdfb --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2025-02-05T13:46:01.149Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_rule_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Not_Found_response.json similarity index 100% rename from src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_rule_returns_Not_Found_response.json rename to src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Not_Found_response.json diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response.freeze b/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response.freeze new file mode 100644 index 00000000000..51dd6f91753 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response.freeze @@ -0,0 +1 @@ +2025-02-05T13:46:01.602Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response.json b/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response.json new file mode 100644 index 00000000000..0d7e74001e9 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response.json @@ -0,0 +1,79 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response-1738763161\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/security/signals/notification_rules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"tcf-juk-5tr\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763162076,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763162076,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response-1738763161\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "6ad97986-8094-6062-47f2-b00755856f7f" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/security/signals/notification_rules/tcf-juk-5tr", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"tcf-juk-5tr\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763162076,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763162076,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response-1738763161\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "3ed460a3-2899-341e-9735-7a1ecf98a7db" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/security/signals/notification_rules/tcf-juk-5tr", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "d7669f70-d429-dfd5-acc5-df2270b7cec5" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_rule_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_rule_returns_Not_Found_response.freeze deleted file mode 100644 index 6d4de62a52a..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_rule_returns_Not_Found_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-01-22T09:50:23.414Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_rule_returns_Notification_rule_details_response.freeze b/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_rule_returns_Notification_rule_details_response.freeze deleted file mode 100644 index fe7b63784cc..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_rule_returns_Notification_rule_details_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-01-22T09:50:23.939Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_rule_returns_Notification_rule_details_response.json b/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_rule_returns_Notification_rule_details_response.json deleted file mode 100644 index fefdafabc35..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_rule_returns_Notification_rule_details_response.json +++ /dev/null @@ -1,79 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Get_details_of_a_signal_based_rule_returns_Notification_rule_details_response-1737539423\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/security/signals/notification_rules", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"t8x-amt-d52\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1737539424372,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1737539424372,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Get_details_of_a_signal_based_rule_returns_Notification_rule_details_response-1737539423\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "29368e79-b2ec-a95d-c369-41b91eb90923" - }, - { - "httpRequest": { - "headers": {}, - "method": "GET", - "path": "/api/v2/security/signals/notification_rules/t8x-amt-d52", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"t8x-amt-d52\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1737539424372,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1737539424372,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Get_details_of_a_signal_based_rule_returns_Notification_rule_details_response-1737539423\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "58e91536-7bbf-ff62-20dd-7ae23357e8b6" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/security/signals/notification_rules/t8x-amt-d52", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "4d28667f-8beb-eb45-0738-cc1bdc66886a" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_based_rule_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_based_rule_returns_Not_Found_response.freeze deleted file mode 100644 index d1e8767198e..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_based_rule_returns_Not_Found_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-01-22T09:50:25.480Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_based_rule_returns_Notification_rule_details_response.freeze b/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_based_rule_returns_Notification_rule_details_response.freeze deleted file mode 100644 index 1aed5057f55..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_based_rule_returns_Notification_rule_details_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-01-22T09:50:25.988Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_based_rule_returns_Notification_rule_details_response.json b/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_based_rule_returns_Notification_rule_details_response.json deleted file mode 100644 index 4f06ce267c7..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_based_rule_returns_Notification_rule_details_response.json +++ /dev/null @@ -1,79 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Get_details_of_a_vulnerability_based_rule_returns_Notification_rule_details_response-1737539425\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/security/vulnerabilities/notification_rules", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"aqq-x71-k2h\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1737539426417,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1737539426417,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Get_details_of_a_vulnerability_based_rule_returns_Notification_rule_details_response-1737539425\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "5778da1b-3c9c-64c2-b284-bc31178c06e9" - }, - { - "httpRequest": { - "headers": {}, - "method": "GET", - "path": "/api/v2/security/vulnerabilities/notification_rules/aqq-x71-k2h", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"aqq-x71-k2h\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1737539426417,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1737539426417,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Get_details_of_a_vulnerability_based_rule_returns_Notification_rule_details_response-1737539425\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "0da93ac2-0fb5-f863-d785-6665162a4ee5" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/security/vulnerabilities/notification_rules/aqq-x71-k2h", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "0d749378-1f41-b033-e698-800883f6ba6d" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..df4c4888e2f --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2025-02-05T13:46:02.886Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_based_rule_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Not_Found_response.json similarity index 100% rename from src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_based_rule_returns_Not_Found_response.json rename to src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Not_Found_response.json diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response.freeze b/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response.freeze new file mode 100644 index 00000000000..5c0ebad9720 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response.freeze @@ -0,0 +1 @@ +2025-02-05T13:46:03.335Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response.json b/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response.json new file mode 100644 index 00000000000..4aedaf960f5 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response.json @@ -0,0 +1,79 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response-1738763163\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/security/vulnerabilities/notification_rules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"ryn-rs2-tef\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763163705,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763163705,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response-1738763163\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "4d938234-091d-3c4a-8408-12f224528220" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/security/vulnerabilities/notification_rules/ryn-rs2-tef", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"ryn-rs2-tef\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763163705,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763163705,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response-1738763163\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "4a17758a-04f7-a529-7d4d-0f3498924a17" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/security/vulnerabilities/notification_rules/ryn-rs2-tef", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "78170c56-d05a-e13a-24e1-68c46568ab77" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response.freeze b/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response.freeze new file mode 100644 index 00000000000..2c353113bd4 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response.freeze @@ -0,0 +1 @@ +2025-02-05T13:46:04.585Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response.json b/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response.json new file mode 100644 index 00000000000..4ec4b70ccfb --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response.json @@ -0,0 +1,79 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response-1738763164\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/security/signals/notification_rules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"btd-udo-vn7\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763164939,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763164939,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response-1738763164\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "36450e02-5c21-6f92-98f6-f2bd9b210ca6" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/security/signals/notification_rules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":[{\"id\":\"btd-udo-vn7\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763164939,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763164939,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response-1738763164\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "f6b346e6-ddaf-c00f-81e2-42ae9307c4dc" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/security/signals/notification_rules/btd-udo-vn7", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "97135ae7-8827-0f4a-5ede-bfc41954206f" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_rules_returns_The_list_of_notification_rules_response.freeze b/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_rules_returns_The_list_of_notification_rules_response.freeze deleted file mode 100644 index 3f0d8fa0766..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_rules_returns_The_list_of_notification_rules_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-01-23T10:36:01.381Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_rules_returns_The_list_of_notification_rules_response.json b/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_rules_returns_The_list_of_notification_rules_response.json deleted file mode 100644 index 72eca9dcf2d..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_rules_returns_The_list_of_notification_rules_response.json +++ /dev/null @@ -1,79 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Get_the_list_of_signal_based_rules_returns_The_list_of_notification_rules_response-1737628561\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/security/signals/notification_rules", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"wt5-y8s-3fa\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1737628561456,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1737628561456,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Test-Get_the_list_of_signal_based_rules_returns_The_list_of_notification_rules_response-1737628561\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "2e67e518-9f52-6c20-ab0a-bdd1975b721a" - }, - { - "httpRequest": { - "headers": {}, - "method": "GET", - "path": "/api/v2/security/signals/notification_rules", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":[{\"id\":\"hwk-zqh-vg4\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699905830776,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-List_notification_profiles_returns_OK_response-1699905830\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"fsm-4am-ozw\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699905832107,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Update_a_notification_profile_returns_OK_response-1699905832\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"px4-xrb-b9v\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699905992485,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Create_a_notification_profile_returns_OK_response-1699905992\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"application_security\",\"log_detection\"],\"query\":\"(env:\\\"prod\\\" OR @env:\\\"prod\\\") AND (test:\\\"123\\\" OR @test:\\\"123\\\")\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@slack-test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"ukt-yim-ouw\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699905996937,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Get_notification_profile_by_ID_returns_OK_response-1699905996\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"tpj-yqn-fcw\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699905997240,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-List_notification_profiles_returns_OK_response-1699905997\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"tv9-9dw-fbd\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699905998529,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Update_a_notification_profile_returns_OK_response-1699905998\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"pdt-i8z-vcs\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699906082093,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Create_a_notification_profile_returns_OK_response-1699906081\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"application_security\",\"log_detection\"],\"query\":\"(env:\\\"prod\\\" OR @env:\\\"prod\\\") AND (test:\\\"123\\\" OR @test:\\\"123\\\")\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@slack-test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"tlb-cvk-wup\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699906087769,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Get_notification_profile_by_ID_returns_OK_response-1699906087\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"sqp-oih-tp8\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699906088050,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-List_notification_profiles_returns_OK_response-1699906087\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"zll-nff-pbx\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699906089134,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Update_a_notification_profile_returns_OK_response-1699906089\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"4u9-ooz-fwf\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699906572841,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Create_a_notification_profile_returns_OK_response-1699906572\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"application_security\",\"log_detection\"],\"query\":\"(env:\\\"prod\\\" OR @env:\\\"prod\\\") AND (test:\\\"123\\\" OR @test:\\\"123\\\")\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@slack-test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"lny-xec-2r7\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699906577427,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Get_notification_profile_by_ID_returns_OK_response-1699906577\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"qfa-6nt-wn2\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699906577706,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-List_notification_profiles_returns_OK_response-1699906577\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"zcr-tja-rut\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699906578815,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Update_a_notification_profile_returns_OK_response-1699906578\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test\"],\"time_aggregation\":0,\"version\":3}},{\"id\":\"rca-ogs-ckx\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699906789206,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Create_a_notification_profile_returns_OK_response-1699906789\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"application_security\",\"log_detection\"],\"query\":\"(env:\\\"prod\\\" OR @env:\\\"prod\\\") AND (test:\\\"123\\\" OR @test:\\\"123\\\")\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@slack-test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"dis-abp-grp\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699906793874,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Get_notification_profile_by_ID_returns_OK_response-1699906793\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"n5i-avj-8br\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699906794201,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-List_notification_profiles_returns_OK_response-1699906794\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"wct-cix-3ay\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699906795311,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":false,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Update_a_notification_profile_returns_OK_response-1699906795\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test2\"],\"time_aggregation\":0,\"version\":3}},{\"id\":\"pyf-t6u-dxp\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699907487559,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Create_a_notification_profile_returns_OK_response-1699907487\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"application_security\",\"log_detection\"],\"query\":\"(env:\\\"prod\\\" OR @env:\\\"prod\\\") AND (test:\\\"123\\\" OR @test:\\\"123\\\")\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@slack-test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"vwj-uew-mas\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699907492243,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Get_notification_profile_by_ID_returns_OK_response-1699907492\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"a1y-ysu-rvw\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699907492600,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-List_notification_profiles_returns_OK_response-1699907492\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"kq1-edx-tkt\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699907493778,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":false,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Update_a_notification_profile_returns_OK_response-1699907493\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test2\"],\"time_aggregation\":0,\"version\":3}},{\"id\":\"4i4-raj-t0a\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699908569876,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Create_a_notification_profile_returns_OK_response-1699908569\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"application_security\",\"log_detection\"],\"query\":\"(env:\\\"prod\\\" OR @env:\\\"prod\\\") AND (test:\\\"123\\\" OR @test:\\\"123\\\")\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@slack-test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"ncy-2zl-jge\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699908575238,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Get_notification_profile_by_ID_returns_OK_response-1699908575\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"(fim:\\\"true\\\" OR @fim:\\\"true\\\")\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"tiq-glx-quq\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699908575600,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-List_notification_profiles_returns_OK_response-1699908575\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"(fim:\\\"true\\\" OR @fim:\\\"true\\\")\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test\"],\"time_aggregation\":0,\"version\":2}},{\"id\":\"ue7-0sv-du1\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1699908576920,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":false,\"modified_at\":1725452072048,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Update_a_notification_profile_returns_OK_response-1699908576\",\"selectors\":{\"severities\":[\"high\"],\"rule_types\":[\"log_detection\",\"cloud_configuration\"],\"query\":\"(fim:\\\"true\\\" OR @fim:\\\"true\\\")\",\"trigger_source\":\"security_signals\"},\"targets\":[\"test2\"],\"time_aggregation\":0,\"version\":3}},{\"id\":\"wt5-y8s-3fa\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1737628561456,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1737628561456,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Test-Get_the_list_of_signal_based_rules_returns_The_list_of_notification_rules_response-1737628561\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}]}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "f6b346e6-ddaf-c00f-81e2-42ae9307c4dd" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/security/signals/notification_rules/wt5-y8s-3fa", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "363a95d5-ca7a-c338-7501-8aad3370081d" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_based_rules_returns_The_list_of_notification_rules_response.freeze b/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_based_rules_returns_The_list_of_notification_rules_response.freeze deleted file mode 100644 index 1c559ecb18a..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_based_rules_returns_The_list_of_notification_rules_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-01-23T10:36:01.893Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_based_rules_returns_The_list_of_notification_rules_response.json b/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_based_rules_returns_The_list_of_notification_rules_response.json deleted file mode 100644 index a86b37dfac1..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_based_rules_returns_The_list_of_notification_rules_response.json +++ /dev/null @@ -1,79 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Get_the_list_of_vulnerability_based_rules_returns_The_list_of_notification_rules_response-1737628561\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/security/vulnerabilities/notification_rules", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"hrp-9cl-j7q\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1737628561955,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1737628561955,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Test-Get_the_list_of_vulnerability_based_rules_returns_The_list_of_notification_rules_response-1737628561\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "148659fb-3cc3-aa77-a5cf-e39f93446843" - }, - { - "httpRequest": { - "headers": {}, - "method": "GET", - "path": "/api/v2/security/vulnerabilities/notification_rules", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":[{\"id\":\"hrp-9cl-j7q\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1737628561955,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1737628561955,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Test-Get_the_list_of_vulnerability_based_rules_returns_The_list_of_notification_rules_response-1737628561\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}]}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "caecc365-7099-2afc-7929-2f6d9e89c641" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/security/vulnerabilities/notification_rules/hrp-9cl-j7q", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "a979236a-d780-e944-781a-4b470c3db126" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response.freeze b/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response.freeze new file mode 100644 index 00000000000..a29f84ee456 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response.freeze @@ -0,0 +1 @@ +2025-02-05T13:46:05.871Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response.json b/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response.json new file mode 100644 index 00000000000..56768af629a --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response.json @@ -0,0 +1,79 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response-1738763165\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/security/vulnerabilities/notification_rules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"jl2-gq4-vr0\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763166229,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763166229,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response-1738763165\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "400e5d1e-9a00-0ef8-7577-172a172b0809" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/security/vulnerabilities/notification_rules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":[{\"id\":\"jl2-gq4-vr0\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763166229,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763166229,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response-1738763165\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "caecc365-7099-2afc-7929-2f6d9e89c640" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/security/vulnerabilities/notification_rules/jl2-gq4-vr0", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "39b0277a-8974-b6ee-4c81-da4408e84fe7" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..3ba9d1b93aa --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2025-02-05T13:46:11.165Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Bad_Request_response.json similarity index 61% rename from src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Bad_Request_response.json rename to src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Bad_Request_response.json index e9115871c39..acb8278aebe 100644 --- a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Bad_Request_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Patch_a_signal_based_rule_returns_Bad_Request_response-1737539435\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Patch_a_signal_based_notification_rule_returns_Bad_Request_response-1738763171\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"urx-vcd-58d\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1737539435658,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1737539435658,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Patch_a_signal_based_rule_returns_Bad_Request_response-1737539435\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"uwx-6n1-x2z\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763171531,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763171531,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Patch_a_signal_based_notification_rule_returns_Bad_Request_response-1738763171\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "a85afce0-0d29-afc4-bbb4-59317a7479c2" + "id": "5465fd63-1ad9-f036-d4de-86a2bee8be2f" }, { "httpRequest": { @@ -37,7 +37,7 @@ }, "headers": {}, "method": "PATCH", - "path": "/api/v2/security/signals/notification_rules/urx-vcd-58d", + "path": "/api/v2/security/signals/notification_rules/uwx-6n1-x2z", "keepAlive": false, "secure": true }, @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "b36f2974-fa13-04dd-b7f7-ea68d9475efd" + "id": "e7f62ae6-2be6-0274-cbac-7df3efec6433" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/signals/notification_rules/urx-vcd-58d", + "path": "/api/v2/security/signals/notification_rules/uwx-6n1-x2z", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "284d6f25-21c9-5253-0bab-9accac95b745" + "id": "4d804465-6bb1-f69d-2514-3f86f04ad696" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..ab16b00a3e4 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2025-02-05T13:46:12.411Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Not_Found_response.json similarity index 100% rename from src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Not_Found_response.json rename to src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Not_Found_response.json diff --git a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response.freeze b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response.freeze new file mode 100644 index 00000000000..4a319955473 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response.freeze @@ -0,0 +1 @@ +2025-02-05T13:46:12.789Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response.json b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response.json new file mode 100644 index 00000000000..138d3a8c1fc --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response.json @@ -0,0 +1,83 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response-1738763172\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/security/signals/notification_rules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"ob0-6ru-hc6\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763173259,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763173259,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response-1738763172\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "5452f6d4-b2ab-1d5b-0e77-d9ae12089200" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 1\",\"selectors\":{\"query\":\"(source:production_service OR env:prod)\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":1},\"id\":\"aaa-bbb-ccc\",\"type\":\"notification_rules\"}}" + }, + "headers": {}, + "method": "PATCH", + "path": "/api/v2/security/signals/notification_rules/ob0-6ru-hc6", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"ob0-6ru-hc6\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763173259,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763173722,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Rule 1\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":2}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "7618b672-3030-f111-96a6-471c6204bbd9" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/security/signals/notification_rules/ob0-6ru-hc6", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "10dd55b6-8f49-ba49-d052-f0b4795d7ac7" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Bad_Request_response.freeze deleted file mode 100644 index 50ebef7d381..00000000000 --- a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Bad_Request_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-01-22T09:50:35.238Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Not_Found_response.freeze deleted file mode 100644 index cbf78aceabd..00000000000 --- a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Not_Found_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-01-22T09:50:36.599Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Notification_rule_successfully_patched_response.freeze b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Notification_rule_successfully_patched_response.freeze deleted file mode 100644 index dbfecb7971f..00000000000 --- a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Notification_rule_successfully_patched_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-01-22T09:50:37.086Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Notification_rule_successfully_patched_response.json b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Notification_rule_successfully_patched_response.json deleted file mode 100644 index f6cc82b130f..00000000000 --- a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_rule_returns_Notification_rule_successfully_patched_response.json +++ /dev/null @@ -1,83 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Patch_a_signal_based_rule_returns_Notification_rule_successfully_patched_response-1737539437\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/security/signals/notification_rules", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"h6x-nyx-fkm\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1737539437401,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1737539437401,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Patch_a_signal_based_rule_returns_Notification_rule_successfully_patched_response-1737539437\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "3eb7e8c4-d487-ba87-c770-e7808401c4ec" - }, - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 1\",\"selectors\":{\"query\":\"(source:production_service OR env:prod)\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":1},\"id\":\"aaa-bbb-ccc\",\"type\":\"notification_rules\"}}" - }, - "headers": {}, - "method": "PATCH", - "path": "/api/v2/security/signals/notification_rules/h6x-nyx-fkm", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"h6x-nyx-fkm\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1737539437401,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1737539437810,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Rule 1\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":2}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "f4aa973f-45ec-fc59-24de-6ca7ad03345c" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/security/signals/notification_rules/h6x-nyx-fkm", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "8f4400e7-2104-8b85-1569-048ed64694c7" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..9c16ba59f02 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2025-02-05T13:46:14.056Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response.json similarity index 64% rename from src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Bad_Request_response.json rename to src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response.json index 30bdbf8cadc..dd1a8846f18 100644 --- a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Patch_a_vulnerability_based_rule_returns_Bad_Request_response-1737539438\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response-1738763174\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"ks5-ywq-grp\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1737539438831,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1737539438831,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Patch_a_vulnerability_based_rule_returns_Bad_Request_response-1737539438\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"flc-8up-dya\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763174531,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763174531,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response-1738763174\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "ad12b284-6671-5e3c-c12a-f909c401de8a" + "id": "b4ed034f-34bb-b680-779f-d39ff75a6fef" }, { "httpRequest": { @@ -37,7 +37,7 @@ }, "headers": {}, "method": "PATCH", - "path": "/api/v2/security/vulnerabilities/notification_rules/ks5-ywq-grp", + "path": "/api/v2/security/vulnerabilities/notification_rules/flc-8up-dya", "keepAlive": false, "secure": true }, @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "f361b399-f42d-b29f-de49-bfea9bbb7f8a" + "id": "4b065c79-f3fb-39fd-3eef-be9db71e0d81" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/vulnerabilities/notification_rules/ks5-ywq-grp", + "path": "/api/v2/security/vulnerabilities/notification_rules/flc-8up-dya", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "be665bec-3834-2cb9-f7b5-ac1e15cbe737" + "id": "7ef6c260-4141-1591-3460-5184f5d5048b" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..07ce0c96406 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2025-02-05T13:46:15.338Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Not_Found_response.json similarity index 100% rename from src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Not_Found_response.json rename to src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Not_Found_response.json diff --git a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_response.freeze b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_response.freeze new file mode 100644 index 00000000000..f3adcb384c9 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_response.freeze @@ -0,0 +1 @@ +2025-02-05T13:46:15.824Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Notification_rule_successfully_patched_response.json b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_response.json similarity index 51% rename from src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Notification_rule_successfully_patched_response.json rename to src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_response.json index dd4b87e7784..fc356df380f 100644 --- a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Notification_rule_successfully_patched_response.json +++ b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Patch_a_vulnerability_based_rule_returns_Notification_rule_successfully_patched_response-1737539440\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_respons-1738763175\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"a40-xl3-95h\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1737539440872,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1737539440872,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Patch_a_vulnerability_based_rule_returns_Notification_rule_successfully_patched_response-1737539440\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"tnd-jgq-yl5\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763176297,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763176297,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_respons-1738763175\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "d0871f78-ba58-2af0-a502-2b9d7ad22431" + "id": "2816c69c-2e82-9bfb-03d3-455a87ab322c" }, { "httpRequest": { @@ -37,12 +37,12 @@ }, "headers": {}, "method": "PATCH", - "path": "/api/v2/security/vulnerabilities/notification_rules/a40-xl3-95h", + "path": "/api/v2/security/vulnerabilities/notification_rules/tnd-jgq-yl5", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"a40-xl3-95h\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1737539440872,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1737539441254,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Rule 1\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":2}}}", + "body": "{\"data\":{\"id\":\"tnd-jgq-yl5\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763176297,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763176649,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Rule 1\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":2}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "5439d21b-dbb9-2801-8b21-4bf9b3c92e31" + "id": "18d1a012-6f5f-edd9-243f-d3a690f16b9f" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/vulnerabilities/notification_rules/a40-xl3-95h", + "path": "/api/v2/security/vulnerabilities/notification_rules/tnd-jgq-yl5", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "dbf58e9e-f2cd-8ce8-1a38-5fb5cae335ee" + "id": "69292c45-0ff0-c662-9612-fd7cbc52008f" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Bad_Request_response.freeze deleted file mode 100644 index fcdc31ed0f0..00000000000 --- a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Bad_Request_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-01-22T09:50:38.399Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Not_Found_response.freeze deleted file mode 100644 index f24abb9c921..00000000000 --- a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Not_Found_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-01-22T09:50:39.942Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Notification_rule_successfully_patched_response.freeze b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Notification_rule_successfully_patched_response.freeze deleted file mode 100644 index e2e97276a9e..00000000000 --- a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_rule_returns_Notification_rule_successfully_patched_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-01-22T09:50:40.442Z \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature index d7e7f9af72a..aaea07a9f8a 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature @@ -236,28 +236,28 @@ Feature: Security Monitoring And the response "isEnabled" is equal to true @generated @skip @team:DataDog/cloud-security-posture-management - Scenario: Create a new signal-based rule returns "Bad Request" response + Scenario: Create a new signal-based notification rule returns "Bad Request" response Given new "CreateSignalNotificationRule" request And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400}, "type": "notification_rules"}} When the request is sent Then the response status is 400 Bad Request @team:DataDog/cloud-security-posture-management - Scenario: Create a new signal-based rule returns "Successfully created the notification rule." response + Scenario: Create a new signal-based notification rule returns "Successfully created the notification rule." response Given new "CreateSignalNotificationRule" request And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400}, "type": "notification_rules"}} When the request is sent Then the response status is 201 Successfully created the notification rule. @generated @skip @team:DataDog/cloud-security-posture-management - Scenario: Create a new vulnerability-based rule returns "Bad Request" response + Scenario: Create a new vulnerability-based notification rule returns "Bad Request" response Given new "CreateVulnerabilityNotificationRule" request And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400}, "type": "notification_rules"}} When the request is sent Then the response status is 400 Bad Request @team:DataDog/cloud-security-posture-management - Scenario: Create a new vulnerability-based rule returns "Successfully created the notification rule." response + Scenario: Create a new vulnerability-based notification rule returns "Successfully created the notification rule." response Given new "CreateVulnerabilityNotificationRule" request And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400}, "type": "notification_rules"}} When the request is sent @@ -354,14 +354,14 @@ Feature: Security Monitoring Then the response status is 204 OK @team:DataDog/cloud-security-posture-management - Scenario: Delete a signal-based rule returns "Not Found" response + Scenario: Delete a signal-based notification rule returns "Not Found" response Given new "DeleteSignalNotificationRule" request And request contains "id" parameter with value "000-000-000" When the request is sent Then the response status is 404 Not Found @team:DataDog/cloud-security-posture-management - Scenario: Delete a signal-based rule returns "Rule successfully deleted." response + Scenario: Delete a signal-based notification rule returns "Rule successfully deleted." response Given there is a valid "valid_signal_notification_rule" in the system And new "DeleteSignalNotificationRule" request And request contains "id" parameter from "valid_signal_notification_rule.data.id" @@ -384,14 +384,14 @@ Feature: Security Monitoring Then the response status is 204 OK @team:DataDog/cloud-security-posture-management - Scenario: Delete a vulnerability-based rule returns "Not Found" response + Scenario: Delete a vulnerability-based notification rule returns "Not Found" response Given new "DeleteVulnerabilityNotificationRule" request And request contains "id" parameter with value "000-000-000" When the request is sent Then the response status is 404 Not Found @team:DataDog/cloud-security-posture-management - Scenario: Delete a vulnerability-based rule returns "Rule successfully deleted." response + Scenario: Delete a vulnerability-based notification rule returns "Rule successfully deleted." response Given there is a valid "valid_vulnerability_notification_rule" in the system And new "DeleteVulnerabilityNotificationRule" request And request contains "id" parameter from "valid_vulnerability_notification_rule.data.id" @@ -655,21 +655,21 @@ Feature: Security Monitoring Then the response status is 200 OK @generated @skip @team:DataDog/cloud-security-posture-management - Scenario: Get details of a signal-based rule returns "Bad Request" response + Scenario: Get details of a signal-based notification rule returns "Bad Request" response Given new "GetSignalNotificationRule" request And request contains "id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request @team:DataDog/cloud-security-posture-management - Scenario: Get details of a signal-based rule returns "Not Found" response + Scenario: Get details of a signal-based notification rule returns "Not Found" response Given new "GetSignalNotificationRule" request And request contains "id" parameter with value "000-000-000" When the request is sent Then the response status is 404 Not Found @team:DataDog/cloud-security-posture-management - Scenario: Get details of a signal-based rule returns "Notification rule details." response + Scenario: Get details of a signal-based notification rule returns "Notification rule details." response Given there is a valid "valid_signal_notification_rule" in the system And new "GetSignalNotificationRule" request And request contains "id" parameter from "valid_signal_notification_rule.data.id" @@ -677,21 +677,21 @@ Feature: Security Monitoring Then the response status is 200 Notification rule details. @generated @skip @team:DataDog/cloud-security-posture-management - Scenario: Get details of a vulnerability-based rule returns "Bad Request" response + Scenario: Get details of a vulnerability notification rule returns "Bad Request" response Given new "GetVulnerabilityNotificationRule" request And request contains "id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request @team:DataDog/cloud-security-posture-management - Scenario: Get details of a vulnerability-based rule returns "Not Found" response + Scenario: Get details of a vulnerability notification rule returns "Not Found" response Given new "GetVulnerabilityNotificationRule" request And request contains "id" parameter with value "000-000-000" When the request is sent Then the response status is 404 Not Found @team:DataDog/cloud-security-posture-management - Scenario: Get details of a vulnerability-based rule returns "Notification rule details." response + Scenario: Get details of a vulnerability notification rule returns "Notification rule details." response Given there is a valid "valid_vulnerability_notification_rule" in the system And new "GetVulnerabilityNotificationRule" request And request contains "id" parameter from "valid_vulnerability_notification_rule.data.id" @@ -699,14 +699,14 @@ Feature: Security Monitoring Then the response status is 200 Notification rule details. @team:DataDog/cloud-security-posture-management - Scenario: Get the list of signal-based rules returns "The list of notification rules." response + Scenario: Get the list of signal-based notification rules returns "The list of notification rules." response Given there is a valid "valid_signal_notification_rule" in the system And new "GetSignalNotificationRules" request When the request is sent Then the response status is 200 The list of notification rules. @team:DataDog/cloud-security-posture-management - Scenario: Get the list of vulnerability-based rules returns "The list of notification rules." response + Scenario: Get the list of vulnerability notification rules returns "The list of notification rules." response Given there is a valid "valid_vulnerability_notification_rule" in the system And new "GetVulnerabilityNotificationRules" request When the request is sent @@ -881,7 +881,7 @@ Feature: Security Monitoring Then the response status is 200 OK @team:DataDog/cloud-security-posture-management - Scenario: Patch a signal-based rule returns "Bad Request" response + Scenario: Patch a signal-based notification rule returns "Bad Request" response Given new "PatchSignalNotificationRule" request And there is a valid "valid_signal_notification_rule" in the system And request contains "id" parameter from "valid_signal_notification_rule.data.id" @@ -890,7 +890,7 @@ Feature: Security Monitoring Then the response status is 400 Bad Request @team:DataDog/cloud-security-posture-management - Scenario: Patch a signal-based rule returns "Not Found" response + Scenario: Patch a signal-based notification rule returns "Not Found" response Given new "PatchSignalNotificationRule" request And request contains "id" parameter with value "000-000-000" And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400, "version": 1}, "id": "aaa-bbb-ccc", "type": "notification_rules"}} @@ -898,7 +898,7 @@ Feature: Security Monitoring Then the response status is 404 Not Found @team:DataDog/cloud-security-posture-management - Scenario: Patch a signal-based rule returns "Notification rule successfully patched." response + Scenario: Patch a signal-based notification rule returns "Notification rule successfully patched." response Given new "PatchSignalNotificationRule" request And there is a valid "valid_signal_notification_rule" in the system And request contains "id" parameter from "valid_signal_notification_rule.data.id" @@ -907,7 +907,7 @@ Feature: Security Monitoring Then the response status is 200 Notification rule successfully patched. @generated @skip @team:DataDog/cloud-security-posture-management - Scenario: Patch a signal-based rule returns "The server cannot process the request because it contains invalid data." response + Scenario: Patch a signal-based notification rule returns "The server cannot process the request because it contains invalid data." response Given new "PatchSignalNotificationRule" request And request contains "id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400, "version": 1}, "id": "aaa-bbb-ccc", "type": "notification_rules"}} @@ -915,7 +915,7 @@ Feature: Security Monitoring Then the response status is 422 The server cannot process the request because it contains invalid data. @team:DataDog/cloud-security-posture-management - Scenario: Patch a vulnerability-based rule returns "Bad Request" response + Scenario: Patch a vulnerability-based notification rule returns "Bad Request" response Given new "PatchVulnerabilityNotificationRule" request And there is a valid "valid_vulnerability_notification_rule" in the system And request contains "id" parameter from "valid_vulnerability_notification_rule.data.id" @@ -924,7 +924,7 @@ Feature: Security Monitoring Then the response status is 400 Bad Request @team:DataDog/cloud-security-posture-management - Scenario: Patch a vulnerability-based rule returns "Not Found" response + Scenario: Patch a vulnerability-based notification rule returns "Not Found" response Given new "PatchVulnerabilityNotificationRule" request And request contains "id" parameter with value "000-000-000" And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400, "version": 1}, "id": "aaa-bbb-ccc", "type": "notification_rules"}} @@ -932,7 +932,7 @@ Feature: Security Monitoring Then the response status is 404 Not Found @team:DataDog/cloud-security-posture-management - Scenario: Patch a vulnerability-based rule returns "Notification rule successfully patched." response + Scenario: Patch a vulnerability-based notification rule returns "Notification rule successfully patched." response Given new "PatchVulnerabilityNotificationRule" request And there is a valid "valid_vulnerability_notification_rule" in the system And request contains "id" parameter from "valid_vulnerability_notification_rule.data.id" @@ -941,7 +941,7 @@ Feature: Security Monitoring Then the response status is 200 Notification rule successfully patched. @generated @skip @team:DataDog/cloud-security-posture-management - Scenario: Patch a vulnerability-based rule returns "The server cannot process the request because it contains invalid data." response + Scenario: Patch a vulnerability-based notification rule returns "The server cannot process the request because it contains invalid data." response Given new "PatchVulnerabilityNotificationRule" request And request contains "id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400, "version": 1}, "id": "aaa-bbb-ccc", "type": "notification_rules"}}