diff --git a/.apigentools-info b/.apigentools-info index cd982ee372d..c864ede99da 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-02-25 17:19:43.088144", - "spec_repo_commit": "7b09d7dd" + "regenerated": "2025-02-26 17:41:41.300831", + "spec_repo_commit": "e04872fb" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-02-25 17:19:43.105244", - "spec_repo_commit": "7b09d7dd" + "regenerated": "2025-02-26 17:41:41.315813", + "spec_repo_commit": "e04872fb" } } } \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Convert_an_existing_rule_from_JSON_to_Terraform_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Convert_an_existing_rule_from_JSON_to_Terraform_returns_OK_response.freeze index 17c43a44b24..a03d9ac3605 100644 --- a/src/test/resources/cassettes/features/v2/Convert_an_existing_rule_from_JSON_to_Terraform_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Convert_an_existing_rule_from_JSON_to_Terraform_returns_OK_response.freeze @@ -1 +1 @@ -2024-06-24T19:55:06.421Z \ No newline at end of file +2025-02-26T17:28:43.473Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Convert_an_existing_rule_from_JSON_to_Terraform_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Convert_an_existing_rule_from_JSON_to_Terraform_returns_OK_response.json index 5f351d5a453..02e5f01619c 100644 --- a/src/test/resources/cassettes/features/v2/Convert_an_existing_rule_from_JSON_to_Terraform_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Convert_an_existing_rule_from_JSON_to_Terraform_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"cases\":[{\"condition\":\"a > 0\",\"name\":\"\",\"notifications\":[],\"status\":\"info\"}],\"filters\":[],\"isEnabled\":true,\"message\":\"Test rule\",\"name\":\"Test-Convert_an_existing_rule_from_JSON_to_Terraform_returns_OK_response-1719258906\",\"options\":{\"evaluationWindow\":900,\"keepAlive\":3600,\"maxSignalDuration\":86400},\"queries\":[{\"aggregation\":\"count\",\"distinctFields\":[],\"groupByFields\":[],\"metrics\":[],\"query\":\"@test:true\"}],\"tags\":[],\"type\":\"log_detection\"}" + "json": "{\"cases\":[{\"condition\":\"a > 0\",\"name\":\"\",\"notifications\":[],\"status\":\"info\"}],\"filters\":[],\"isEnabled\":true,\"message\":\"Test rule\",\"name\":\"Test-Convert_an_existing_rule_from_JSON_to_Terraform_returns_OK_response-1740590923\",\"options\":{\"evaluationWindow\":900,\"keepAlive\":3600,\"maxSignalDuration\":86400},\"queries\":[{\"aggregation\":\"count\",\"distinctFields\":[],\"groupByFields\":[],\"metrics\":[],\"query\":\"@test:true\"}],\"tags\":[],\"type\":\"log_detection\"}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"id\":\"eu8-b0k-wzc\",\"version\":1,\"name\":\"Test-Convert_an_existing_rule_from_JSON_to_Terraform_returns_OK_response-1719258906\",\"createdAt\":1719258906588,\"creationAuthorId\":1445416,\"isDefault\":false,\"isPartner\":false,\"isEnabled\":true,\"isDeleted\":false,\"isDeprecated\":false,\"queries\":[{\"query\":\"@test:true\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\"}],\"options\":{\"keepAlive\":3600,\"maxSignalDuration\":86400,\"detectionMethod\":\"threshold\",\"evaluationWindow\":900},\"cases\":[{\"name\":\"\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a > 0\"}],\"message\":\"Test rule\",\"tags\":[],\"hasExtendedTitle\":false,\"type\":\"log_detection\",\"filters\":[]}\n", + "body": "{\"name\":\"Test-Convert_an_existing_rule_from_JSON_to_Terraform_returns_OK_response-1740590923\",\"createdAt\":1740590923738,\"isDefault\":false,\"isPartner\":false,\"isEnabled\":true,\"isBeta\":false,\"isDeleted\":false,\"isDeprecated\":false,\"queries\":[{\"query\":\"@test:true\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\",\"dataSource\":\"logs\"}],\"options\":{\"evaluationWindow\":900,\"detectionMethod\":\"threshold\",\"maxSignalDuration\":86400,\"keepAlive\":3600},\"cases\":[{\"name\":\"\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a \\u003e 0\"}],\"message\":\"Test rule\",\"tags\":[],\"hasExtendedTitle\":false,\"type\":\"log_detection\",\"filters\":[],\"version\":1,\"id\":\"wva-gkr-uze\",\"blocking\":false,\"metadata\":{\"entities\":null,\"sources\":null},\"creationAuthorId\":1445416,\"creator\":{\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"},\"updater\":{\"handle\":\"\",\"name\":\"\"}}", "headers": { "Content-Type": [ "application/json" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "c96ac2df-4104-44c5-d951-9c5799ae5647" + "id": "72663ea6-3571-567c-b637-5b0e9976810d" }, { "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/security_monitoring/rules/eu8-b0k-wzc/convert", + "path": "/api/v2/security_monitoring/rules/wva-gkr-uze/convert", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"terraformContent\":\"resource \\\"datadog_security_monitoring_rule\\\" \\\"test-convert_an_existing_rule_from_json_to_terraform_returns_ok_response-1719258906\\\" {\\n\\tname = \\\"Test-Convert_an_existing_rule_from_JSON_to_Terraform_returns_OK_response-1719258906\\\"\\n\\tenabled = true\\n\\tquery {\\n\\t\\tquery = \\\"@test:true\\\"\\n\\t\\tgroup_by_fields = []\\n\\t\\tdistinct_fields = []\\n\\t\\taggregation = \\\"count\\\"\\n\\t\\tname = \\\"\\\"\\n\\t}\\n\\toptions {\\n\\t\\tkeep_alive = 3600\\n\\t\\tmax_signal_duration = 86400\\n\\t\\tdetection_method = \\\"threshold\\\"\\n\\t\\tevaluation_window = 900\\n\\t}\\n\\tcase {\\n\\t\\tname = \\\"\\\"\\n\\t\\tstatus = \\\"info\\\"\\n\\t\\tnotifications = []\\n\\t\\tcondition = \\\"a > 0\\\"\\n\\t}\\n\\tmessage = \\\"Test rule\\\"\\n\\ttags = []\\n\\thas_extended_title = false\\n\\ttype = \\\"log_detection\\\"\\n}\\n\"}\n", + "body": "{\"terraformContent\":\"resource \\\"datadog_security_monitoring_rule\\\" \\\"test-convert_an_existing_rule_from_json_to_terraform_returns_ok_response-1740590923\\\" {\\n\\tname = \\\"Test-Convert_an_existing_rule_from_JSON_to_Terraform_returns_OK_response-1740590923\\\"\\n\\tenabled = true\\n\\tquery {\\n\\t\\tquery = \\\"@test:true\\\"\\n\\t\\tgroup_by_fields = []\\n\\t\\tdistinct_fields = []\\n\\t\\taggregation = \\\"count\\\"\\n\\t\\tname = \\\"\\\"\\n\\t}\\n\\toptions {\\n\\t\\tkeep_alive = 3600\\n\\t\\tmax_signal_duration = 86400\\n\\t\\tdetection_method = \\\"threshold\\\"\\n\\t\\tevaluation_window = 900\\n\\t}\\n\\tcase {\\n\\t\\tname = \\\"\\\"\\n\\t\\tstatus = \\\"info\\\"\\n\\t\\tnotifications = []\\n\\t\\tcondition = \\\"a \\u003e 0\\\"\\n\\t}\\n\\tmessage = \\\"Test rule\\\"\\n\\ttags = []\\n\\thas_extended_title = false\\n\\ttype = \\\"log_detection\\\"\\n}\\n\"}", "headers": { "Content-Type": [ "application/json" @@ -53,13 +53,13 @@ "timeToLive": { "unlimited": true }, - "id": "a275424e-b01a-9e22-4f09-21502c0ab3e2" + "id": "7d4443b5-5c4d-4db4-6e20-d6a30b18e49f" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security_monitoring/rules/eu8-b0k-wzc", + "path": "/api/v2/security_monitoring/rules/wva-gkr-uze", "keepAlive": false, "secure": true }, @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "8a82e9fa-9f0c-3c4b-4023-08121880806a" + "id": "980aa90e-faf4-4e95-9631-5b96b74a11e3" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_detection_rule_with_detection_method_third_party_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_detection_rule_with_detection_method_third_party_returns_OK_response.freeze index 8c0df213d26..95f9c372f58 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_detection_rule_with_detection_method_third_party_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Create_a_detection_rule_with_detection_method_third_party_returns_OK_response.freeze @@ -1 +1 @@ -2024-09-04T13:32:10.858Z \ No newline at end of file +2025-02-26T17:28:46.568Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_detection_rule_with_detection_method_third_party_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_a_detection_rule_with_detection_method_third_party_returns_OK_response.json index a6a1c5367f5..24b97c1504e 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_detection_rule_with_detection_method_third_party_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_detection_rule_with_detection_method_third_party_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"cases\":[],\"isEnabled\":true,\"message\":\"This is a third party rule\",\"name\":\"Test-Create_a_detection_rule_with_detection_method_third_party_returns_OK_response-1725456730\",\"options\":{\"detectionMethod\":\"third_party\",\"keepAlive\":0,\"maxSignalDuration\":600,\"thirdPartyRuleOptions\":{\"defaultStatus\":\"info\",\"rootQueries\":[{\"groupByFields\":[\"instance-id\"],\"query\":\"source:guardduty @details.alertType:*EC2*\"},{\"groupByFields\":[],\"query\":\"source:guardduty\"}]}},\"queries\":[],\"thirdPartyCases\":[{\"name\":\"high\",\"query\":\"status:error\",\"status\":\"high\"},{\"name\":\"low\",\"query\":\"status:info\",\"status\":\"low\"}],\"type\":\"log_detection\"}" + "json": "{\"cases\":[],\"isEnabled\":true,\"message\":\"This is a third party rule\",\"name\":\"Test-Create_a_detection_rule_with_detection_method_third_party_returns_OK_response-1740590926\",\"options\":{\"detectionMethod\":\"third_party\",\"keepAlive\":0,\"maxSignalDuration\":600,\"thirdPartyRuleOptions\":{\"defaultStatus\":\"info\",\"rootQueries\":[{\"groupByFields\":[\"instance-id\"],\"query\":\"source:guardduty @details.alertType:*EC2*\"},{\"groupByFields\":[],\"query\":\"source:guardduty\"}]}},\"queries\":[],\"thirdPartyCases\":[{\"name\":\"high\",\"query\":\"status:error\",\"status\":\"high\"},{\"name\":\"low\",\"query\":\"status:info\",\"status\":\"low\"}],\"type\":\"log_detection\"}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"id\":\"rvf-kfc-pxh\",\"version\":1,\"name\":\"Test-Create_a_detection_rule_with_detection_method_third_party_returns_OK_response-1725456730\",\"createdAt\":1725456731210,\"creationAuthorId\":1445416,\"isDefault\":false,\"isEnabled\":true,\"isDeleted\":false,\"queries\":[{\"query\":\"status:error\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"none\",\"name\":\"\"},{\"query\":\"status:info\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"none\",\"name\":\"\"}],\"options\":{\"keepAlive\":0,\"maxSignalDuration\":600,\"detectionMethod\":\"third_party\",\"evaluationWindow\":0,\"thirdPartyRuleOptions\":{\"defaultStatus\":\"info\",\"defaultNotifications\":[],\"rootQueries\":[{\"query\":\"source:guardduty @details.alertType:*EC2*\",\"groupByFields\":[\"instance-id\"]},{\"query\":\"source:guardduty\",\"groupByFields\":[]}]}},\"cases\":[{\"name\":\"high\",\"status\":\"high\",\"notifications\":[]},{\"name\":\"low\",\"status\":\"low\",\"notifications\":[]}],\"message\":\"This is a third party rule\",\"tags\":[],\"hasExtendedTitle\":false,\"type\":\"log_detection\",\"filters\":[],\"thirdPartyCases\":[{\"name\":\"high\",\"status\":\"high\",\"notifications\":[],\"query\":\"status:error\"},{\"name\":\"low\",\"status\":\"low\",\"notifications\":[],\"query\":\"status:info\"}]}\n", + "body": "{\"name\":\"Test-Create_a_detection_rule_with_detection_method_third_party_returns_OK_response-1740590926\",\"createdAt\":1740590926922,\"isDefault\":false,\"isPartner\":false,\"isEnabled\":true,\"isBeta\":false,\"isDeleted\":false,\"isDeprecated\":false,\"queries\":[{\"query\":\"status:error\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"none\",\"name\":\"\",\"dataSource\":\"logs\"},{\"query\":\"status:info\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"none\",\"name\":\"\",\"dataSource\":\"logs\"}],\"options\":{\"evaluationWindow\":0,\"detectionMethod\":\"third_party\",\"maxSignalDuration\":600,\"keepAlive\":0,\"thirdPartyRuleOptions\":{\"defaultStatus\":\"info\",\"rootQueries\":[{\"query\":\"source:guardduty @details.alertType:*EC2*\",\"groupByFields\":[\"instance-id\"]},{\"query\":\"source:guardduty\",\"groupByFields\":[]}],\"defaultNotifications\":[]}},\"cases\":[{\"name\":\"high\",\"status\":\"high\",\"notifications\":[]},{\"name\":\"low\",\"status\":\"low\",\"notifications\":[]}],\"message\":\"This is a third party rule\",\"tags\":[],\"hasExtendedTitle\":false,\"type\":\"log_detection\",\"filters\":[],\"version\":1,\"id\":\"h74-lse-wq3\",\"blocking\":false,\"metadata\":{\"entities\":null,\"sources\":null},\"thirdPartyCases\":[{\"name\":\"high\",\"status\":\"high\",\"notifications\":[],\"query\":\"status:error\"},{\"name\":\"low\",\"status\":\"low\",\"notifications\":[],\"query\":\"status:info\"}],\"creationAuthorId\":1445416,\"creator\":{\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"},\"updater\":{\"handle\":\"\",\"name\":\"\"}}", "headers": { "Content-Type": [ "application/json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "57ee410b-8aa6-81f4-f537-8b874f1d8305" + "id": "962b18f6-5149-4760-076a-658720ac6837" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security_monitoring/rules/rvf-kfc-pxh", + "path": "/api/v2/security_monitoring/rules/h74-lse-wq3", "keepAlive": false, "secure": true }, @@ -48,6 +48,6 @@ "timeToLive": { "unlimited": true }, - "id": "418be8cd-9b52-a555-a25a-bcee39ab414e" + "id": "042b3a3d-441e-c969-d58f-2587bd5505fd" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.freeze index 34c6fa06848..26fef8c2016 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.freeze @@ -1 +1 @@ -2024-12-18T17:02:38.823Z \ No newline at end of file +2025-02-26T17:29:04.516Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.json index c909d675988..8664c53e2ca 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_a_job_s_details_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"fa90e7ac-998d-4bf4-9d32-2e831a1e9479\",\"type\":\"historicalDetectionsJob\"}}", + "body": "{\"data\":{\"id\":\"1b7a2a3e-487a-4732-aab6-58eba621a138\",\"type\":\"historicalDetectionsJob\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -33,12 +33,12 @@ "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/siem-historical-detections/jobs/fa90e7ac-998d-4bf4-9d32-2e831a1e9479", + "path": "/api/v2/siem-historical-detections/jobs/1b7a2a3e-487a-4732-aab6-58eba621a138", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"fa90e7ac-998d-4bf4-9d32-2e831a1e9479\",\"type\":\"historicalDetectionsJob\",\"attributes\":{\"createdAt\":\"2024-12-18 17:02:39.551791+00\",\"createdByHandle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"createdByName\":\"CI Account\",\"jobDefinition\":{\"from\":1730387522611,\"to\":1730387532611,\"index\":\"main\",\"name\":\"Excessive number of failed attempts.\",\"cases\":[{\"name\":\"Condition 1\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a \\u003e 1\"}],\"queries\":[{\"query\":\"source:non_existing_src_weekend\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\"}],\"options\":{\"evaluationWindow\":900,\"detectionMethod\":\"threshold\",\"maxSignalDuration\":86400,\"keepAlive\":3600},\"message\":\"A large number of failed login attempts.\",\"tags\":[],\"type\":\"log_detection\"},\"jobName\":\"Excessive number of failed attempts.\",\"jobStatus\":\"pending\",\"modifiedAt\":\"2024-12-18 17:02:39.551791+00\"}}}", + "body": "{\"data\":{\"id\":\"1b7a2a3e-487a-4732-aab6-58eba621a138\",\"type\":\"historicalDetectionsJob\",\"attributes\":{\"createdAt\":\"2025-02-26 17:29:04.769285+00\",\"createdByHandle\":\"frog@datadoghq.com\",\"createdByName\":\"frog\",\"jobDefinition\":{\"from\":1730387522611,\"to\":1730387532611,\"index\":\"main\",\"name\":\"Excessive number of failed attempts.\",\"cases\":[{\"name\":\"Condition 1\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a \\u003e 1\"}],\"queries\":[{\"query\":\"source:non_existing_src_weekend\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\",\"dataSource\":\"logs\"}],\"options\":{\"evaluationWindow\":900,\"detectionMethod\":\"threshold\",\"maxSignalDuration\":86400,\"keepAlive\":3600},\"message\":\"A large number of failed login attempts.\",\"tags\":[],\"type\":\"log_detection\"},\"jobName\":\"Excessive number of failed attempts.\",\"jobStatus\":\"pending\",\"modifiedAt\":\"2025-02-26 17:29:04.769285+00\"}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "7b01960b-436d-6727-69de-5d7f5dd093c1" + "id": "777c08ac-c266-3df6-ea6a-c0ca33e425e9" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_rule_version_history_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_rule_version_history_returns_OK_response.freeze index 0ac7f76bc9b..43077c8fec9 100644 --- a/src/test/resources/cassettes/features/v2/Get_rule_version_history_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_rule_version_history_returns_OK_response.freeze @@ -1 +1 @@ -2025-02-04T22:39:17.325Z \ No newline at end of file +2025-02-26T17:29:12.067Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_rule_version_history_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_rule_version_history_returns_OK_response.json index dc62ca15dc5..f3671e75a51 100644 --- a/src/test/resources/cassettes/features/v2/Get_rule_version_history_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_rule_version_history_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"cases\":[{\"condition\":\"a > 0\",\"name\":\"\",\"notifications\":[],\"status\":\"info\"}],\"filters\":[],\"isEnabled\":true,\"message\":\"Test rule\",\"name\":\"Test-Get_rule_version_history_returns_OK_response-1738708757\",\"options\":{\"evaluationWindow\":900,\"keepAlive\":3600,\"maxSignalDuration\":86400},\"queries\":[{\"aggregation\":\"count\",\"distinctFields\":[],\"groupByFields\":[],\"metrics\":[],\"query\":\"@test:true\"}],\"tags\":[],\"type\":\"log_detection\"}" + "json": "{\"cases\":[{\"condition\":\"a > 0\",\"name\":\"\",\"notifications\":[],\"status\":\"info\"}],\"filters\":[],\"isEnabled\":true,\"message\":\"Test rule\",\"name\":\"Test-Get_rule_version_history_returns_OK_response-1740590952\",\"options\":{\"evaluationWindow\":900,\"keepAlive\":3600,\"maxSignalDuration\":86400},\"queries\":[{\"aggregation\":\"count\",\"distinctFields\":[],\"groupByFields\":[],\"metrics\":[],\"query\":\"@test:true\"}],\"tags\":[],\"type\":\"log_detection\"}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"name\":\"Test-Get_rule_version_history_returns_OK_response-1738708757\",\"createdAt\":1738708757817,\"isDefault\":false,\"isPartner\":false,\"isEnabled\":true,\"isBeta\":false,\"isDeleted\":false,\"isDeprecated\":false,\"queries\":[{\"query\":\"@test:true\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\"}],\"options\":{\"evaluationWindow\":900,\"detectionMethod\":\"threshold\",\"maxSignalDuration\":86400,\"keepAlive\":3600},\"cases\":[{\"name\":\"\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a \\u003e 0\"}],\"message\":\"Test rule\",\"tags\":[],\"hasExtendedTitle\":false,\"type\":\"log_detection\",\"filters\":[],\"version\":1,\"id\":\"gvq-qqd-jc7\"}", + "body": "{\"name\":\"Test-Get_rule_version_history_returns_OK_response-1740590952\",\"createdAt\":1740590952333,\"isDefault\":false,\"isPartner\":false,\"isEnabled\":true,\"isBeta\":false,\"isDeleted\":false,\"isDeprecated\":false,\"queries\":[{\"query\":\"@test:true\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\",\"dataSource\":\"logs\"}],\"options\":{\"evaluationWindow\":900,\"detectionMethod\":\"threshold\",\"maxSignalDuration\":86400,\"keepAlive\":3600},\"cases\":[{\"name\":\"\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a \\u003e 0\"}],\"message\":\"Test rule\",\"tags\":[],\"hasExtendedTitle\":false,\"type\":\"log_detection\",\"filters\":[],\"version\":1,\"id\":\"s3a-zh4-3yj\",\"blocking\":false,\"metadata\":{\"entities\":null,\"sources\":null},\"creationAuthorId\":1445416,\"creator\":{\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"},\"updater\":{\"handle\":\"\",\"name\":\"\"}}", "headers": { "Content-Type": [ "application/json" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "828d57e6-57b4-424f-e84a-86d7f1db705f" + "id": "6453287b-70ba-240c-72a3-089271f73bf9" }, { "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/security_monitoring/rules/gvq-qqd-jc7/version_history", + "path": "/api/v2/security_monitoring/rules/s3a-zh4-3yj/version_history", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"gvq-qqd-jc7\",\"type\":\"GetRuleVersionHistoryResponse\",\"attributes\":{\"count\":1,\"data\":{\"1\":{\"rule\":{\"name\":\"Test-Get_rule_version_history_returns_OK_response-1738708757\",\"createdAt\":1738708757817,\"isDefault\":false,\"isEnabled\":true,\"isDeleted\":false,\"queries\":[{\"query\":\"@test:true\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\"}],\"options\":{\"evaluationWindow\":900,\"detectionMethod\":\"threshold\",\"maxSignalDuration\":86400,\"keepAlive\":3600},\"cases\":[{\"name\":\"\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a \\u003e 0\"}],\"message\":\"Test rule\",\"tags\":[],\"hasExtendedTitle\":false,\"type\":\"log_detection\",\"filters\":[],\"version\":1,\"id\":\"gvq-qqd-jc7\",\"metadata\":{\"entities\":null,\"sources\":null},\"creator\":{\"handle\":\"\",\"name\":\"\"},\"updater\":{\"handle\":\"\",\"name\":\"\"}},\"changes\":[]}}}}}", + "body": "{\"data\":{\"id\":\"s3a-zh4-3yj\",\"type\":\"GetRuleVersionHistoryResponse\",\"attributes\":{\"count\":1,\"data\":{\"1\":{\"rule\":{\"name\":\"Test-Get_rule_version_history_returns_OK_response-1740590952\",\"createdAt\":1740590952333,\"isDefault\":false,\"isPartner\":false,\"isEnabled\":true,\"isBeta\":false,\"isDeleted\":false,\"isDeprecated\":false,\"queries\":[{\"query\":\"@test:true\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\",\"dataSource\":\"logs\"}],\"options\":{\"evaluationWindow\":900,\"detectionMethod\":\"threshold\",\"maxSignalDuration\":86400,\"keepAlive\":3600},\"cases\":[{\"name\":\"\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a \\u003e 0\"}],\"message\":\"Test rule\",\"tags\":[],\"hasExtendedTitle\":false,\"type\":\"log_detection\",\"filters\":[],\"version\":1,\"id\":\"s3a-zh4-3yj\",\"blocking\":false,\"metadata\":{\"entities\":null,\"sources\":null},\"creationAuthorId\":1445416,\"creator\":{\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"},\"updater\":{\"handle\":\"\",\"name\":\"\"}},\"changes\":[]}}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,13 +53,13 @@ "timeToLive": { "unlimited": true }, - "id": "09be8bb5-92c9-1241-1f3b-4e3a4e3fb2d2" + "id": "c1c6d7f4-cbdf-9636-ef7a-534f4db6593f" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security_monitoring/rules/gvq-qqd-jc7", + "path": "/api/v2/security_monitoring/rules/s3a-zh4-3yj", "keepAlive": false, "secure": true }, @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "cd1c7942-8cc1-a501-d7a7-dd3c38ee275f" + "id": "e8e6630e-5f08-1004-45fc-a24f1be4ebd2" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_historical_jobs_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_historical_jobs_returns_OK_response.freeze index b139681f648..673cc1143e7 100644 --- a/src/test/resources/cassettes/features/v2/List_historical_jobs_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/List_historical_jobs_returns_OK_response.freeze @@ -1 +1 @@ -2024-12-18T17:02:39.880Z \ No newline at end of file +2025-02-26T17:29:15.346Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_historical_jobs_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_historical_jobs_returns_OK_response.json index 96432bc9c52..a534523d9ab 100644 --- a/src/test/resources/cassettes/features/v2/List_historical_jobs_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_historical_jobs_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"7b16f110-0ce9-46cd-9dad-b658ced2ac50\",\"type\":\"historicalDetectionsJob\"}}", + "body": "{\"data\":{\"id\":\"d5a3122e-a8f0-46fb-ac8b-e0d04e6f87df\",\"type\":\"historicalDetectionsJob\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -36,14 +36,14 @@ "path": "/api/v2/siem-historical-detections/jobs", "queryStringParameters": { "filter[query]": [ - "id:7b16f110-0ce9-46cd-9dad-b658ced2ac50" + "id:d5a3122e-a8f0-46fb-ac8b-e0d04e6f87df" ] }, "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":[{\"id\":\"7b16f110-0ce9-46cd-9dad-b658ced2ac50\",\"type\":\"historicalDetectionsJob\",\"attributes\":{\"createdAt\":\"2024-12-18 17:02:40.144396+00\",\"createdByHandle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"createdByName\":\"CI Account\",\"jobDefinition\":{\"from\":1730387522611,\"to\":1730387532611,\"index\":\"main\",\"name\":\"Excessive number of failed attempts.\",\"cases\":[{\"name\":\"Condition 1\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a \\u003e 1\"}],\"queries\":[{\"query\":\"source:non_existing_src_weekend\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\"}],\"options\":{\"evaluationWindow\":900,\"detectionMethod\":\"threshold\",\"maxSignalDuration\":86400,\"keepAlive\":3600},\"message\":\"A large number of failed login attempts.\",\"tags\":[],\"type\":\"log_detection\"},\"jobName\":\"Excessive number of failed attempts.\",\"jobStatus\":\"pending\",\"modifiedAt\":\"2024-12-18 17:02:40.144396+00\"}}],\"meta\":{\"totalCount\":1}}", + "body": "{\"data\":[{\"id\":\"d5a3122e-a8f0-46fb-ac8b-e0d04e6f87df\",\"type\":\"historicalDetectionsJob\",\"attributes\":{\"createdAt\":\"2025-02-26 17:29:15.677173+00\",\"createdByHandle\":\"frog@datadoghq.com\",\"createdByName\":\"frog\",\"jobDefinition\":{\"from\":1730387522611,\"to\":1730387532611,\"index\":\"main\",\"name\":\"Excessive number of failed attempts.\",\"cases\":[{\"name\":\"Condition 1\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a \\u003e 1\"}],\"queries\":[{\"query\":\"source:non_existing_src_weekend\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\",\"dataSource\":\"logs\"}],\"options\":{\"evaluationWindow\":900,\"detectionMethod\":\"threshold\",\"maxSignalDuration\":86400,\"keepAlive\":3600},\"message\":\"A large number of failed login attempts.\",\"tags\":[],\"type\":\"log_detection\"},\"jobName\":\"Excessive number of failed attempts.\",\"jobStatus\":\"pending\",\"modifiedAt\":\"2025-02-26 17:29:15.677173+00\"}}],\"meta\":{\"totalCount\":1}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -58,6 +58,6 @@ "timeToLive": { "unlimited": true }, - "id": "0728d69c-abf4-9695-6f86-d405f93de5cf" + "id": "de99953f-e578-dded-1c1d-7baf369d63f4" } ] \ No newline at end of file