Skip to content

Commit d4925a6

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Fix Datadog-API-Spec due to newly exported attribute data_source (#622)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent e73980a commit d4925a6

6 files changed

+19
-19
lines changed

.apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-04-24 13:38:36.780020",
8-
"spec_repo_commit": "4295fd1a"
7+
"regenerated": "2025-04-24 15:56:54.501767",
8+
"spec_repo_commit": "d2685952"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-24 13:38:36.795313",
13-
"spec_repo_commit": "4295fd1a"
12+
"regenerated": "2025-04-24 15:56:54.517474",
13+
"spec_repo_commit": "d2685952"
1414
}
1515
}
1616
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-06-24T19:47:12.909Z
1+
2025-04-24T11:34:50.866Z

tests/scenarios/cassettes/v2/security_monitoring/Convert-a-rule-from-JSON-to-Terraform-returns-OK-response.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"request": {
55
"body": {
6-
"string": "{\"cases\":[{\"condition\":\"a > 0\",\"name\":\"\",\"notifications\":[],\"status\":\"info\"}],\"filters\":[],\"isEnabled\":true,\"message\":\"Test rule\",\"name\":\"Test-Convert_a_rule_from_JSON_to_Terraform_returns_OK_response-1719258432\",\"options\":{\"evaluationWindow\":900,\"keepAlive\":3600,\"maxSignalDuration\":86400},\"queries\":[{\"aggregation\":\"count\",\"distinctFields\":[],\"groupByFields\":[],\"metric\":\"\",\"query\":\"@test:true\"}],\"tags\":[],\"type\":\"log_detection\"}",
6+
"string": "{\"cases\":[{\"condition\":\"a > 0\",\"name\":\"\",\"notifications\":[],\"status\":\"info\"}],\"filters\":[],\"isEnabled\":true,\"message\":\"Test rule\",\"name\":\"Test-Convert_a_rule_from_JSON_to_Terraform_returns_OK_response-1745494490\",\"options\":{\"evaluationWindow\":900,\"keepAlive\":3600,\"maxSignalDuration\":86400},\"queries\":[{\"aggregation\":\"count\",\"distinctFields\":[],\"groupByFields\":[],\"metric\":\"\",\"query\":\"@test:true\"}],\"tags\":[],\"type\":\"log_detection\"}",
77
"encoding": null
88
},
99
"headers": {
@@ -19,7 +19,7 @@
1919
},
2020
"response": {
2121
"body": {
22-
"string": "{\"terraformContent\":\"resource \\\"datadog_security_monitoring_rule\\\" \\\"test-convert_a_rule_from_json_to_terraform_returns_ok_response-1719258432\\\" {\\n\\tname = \\\"Test-Convert_a_rule_from_JSON_to_Terraform_returns_OK_response-1719258432\\\"\\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",
22+
"string": "{\"terraformContent\":\"resource \\\"datadog_security_monitoring_rule\\\" \\\"test-convert_a_rule_from_json_to_terraform_returns_ok_response-1745494490\\\" {\\n\\tname = \\\"Test-Convert_a_rule_from_JSON_to_Terraform_returns_OK_response-1745494490\\\"\\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\\tdata_source = \\\"logs\\\"\\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\"}",
2323
"encoding": null
2424
},
2525
"headers": {
@@ -32,7 +32,7 @@
3232
"message": "OK"
3333
}
3434
},
35-
"recorded_at": "Mon, 24 Jun 2024 19:47:12 GMT"
35+
"recorded_at": "Thu, 24 Apr 2025 11:34:50 GMT"
3636
}
3737
],
3838
"recorded_with": "VCR 6.0.0"
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-06-24T19:55:06.421Z
1+
2025-04-24T11:34:51.208Z

tests/scenarios/cassettes/v2/security_monitoring/Convert-an-existing-rule-from-JSON-to-Terraform-returns-OK-response.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"request": {
55
"body": {
6-
"string": "{\"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\"}",
6+
"string": "{\"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-1745494491\",\"options\":{\"evaluationWindow\":900,\"keepAlive\":3600,\"maxSignalDuration\":86400},\"queries\":[{\"aggregation\":\"count\",\"distinctFields\":[],\"groupByFields\":[],\"metrics\":[],\"query\":\"@test:true\"}],\"tags\":[],\"type\":\"log_detection\"}",
77
"encoding": null
88
},
99
"headers": {
@@ -19,7 +19,7 @@
1919
},
2020
"response": {
2121
"body": {
22-
"string": "{\"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",
22+
"string": "{\"name\":\"Test-Convert_an_existing_rule_from_JSON_to_Terraform_returns_OK_response-1745494491\",\"createdAt\":1745494491502,\"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\":\"e60-iv6-d7e\",\"blocking\":false,\"metadata\":{\"entities\":null,\"sources\":null},\"creationAuthorId\":1445416,\"creator\":{\"handle\":\"[email protected]\",\"name\":\"frog\"},\"updater\":{\"handle\":\"\",\"name\":\"\"}}",
2323
"encoding": null
2424
},
2525
"headers": {
@@ -32,7 +32,7 @@
3232
"message": "OK"
3333
}
3434
},
35-
"recorded_at": "Mon, 24 Jun 2024 19:55:06 GMT"
35+
"recorded_at": "Thu, 24 Apr 2025 11:34:51 GMT"
3636
},
3737
{
3838
"request": {
@@ -43,11 +43,11 @@
4343
]
4444
},
4545
"method": "get",
46-
"uri": "https://api.datadoghq.com/api/v2/security_monitoring/rules/eu8-b0k-wzc/convert"
46+
"uri": "https://api.datadoghq.com/api/v2/security_monitoring/rules/e60-iv6-d7e/convert"
4747
},
4848
"response": {
4949
"body": {
50-
"string": "{\"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",
50+
"string": "{\"terraformContent\":\"resource \\\"datadog_security_monitoring_rule\\\" \\\"test-convert_an_existing_rule_from_json_to_terraform_returns_ok_response-1745494491\\\" {\\n\\tname = \\\"Test-Convert_an_existing_rule_from_JSON_to_Terraform_returns_OK_response-1745494491\\\"\\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\\tdata_source = \\\"logs\\\"\\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\"}",
5151
"encoding": null
5252
},
5353
"headers": {
@@ -60,7 +60,7 @@
6060
"message": "OK"
6161
}
6262
},
63-
"recorded_at": "Mon, 24 Jun 2024 19:55:06 GMT"
63+
"recorded_at": "Thu, 24 Apr 2025 11:34:51 GMT"
6464
},
6565
{
6666
"request": {
@@ -71,7 +71,7 @@
7171
]
7272
},
7373
"method": "delete",
74-
"uri": "https://api.datadoghq.com/api/v2/security_monitoring/rules/eu8-b0k-wzc"
74+
"uri": "https://api.datadoghq.com/api/v2/security_monitoring/rules/e60-iv6-d7e"
7575
},
7676
"response": {
7777
"body": {
@@ -84,7 +84,7 @@
8484
"message": "No Content"
8585
}
8686
},
87-
"recorded_at": "Mon, 24 Jun 2024 19:55:06 GMT"
87+
"recorded_at": "Thu, 24 Apr 2025 11:34:51 GMT"
8888
}
8989
],
9090
"recorded_with": "VCR 6.0.0"

tests/scenarios/features/v2/security_monitoring.feature

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ Feature: Security Monitoring
135135
And body with value {"name":"{{ unique }}", "queries":[{"query":"@test:true","aggregation":"count","groupByFields":[],"distinctFields":[],"metric":""}],"filters":[],"cases":[{"name":"","status":"info","condition":"a > 0","notifications":[]}],"options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"message":"Test rule","tags":[],"isEnabled":true, "type":"log_detection"}
136136
When the request is sent
137137
Then the response status is 200 OK
138-
And the response "terraformContent" is equal to "resource \"datadog_security_monitoring_rule\" \"{{ unique_lower }}\" {\n\tname = \"{{ unique }}\"\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"
138+
And the response "terraformContent" is equal to "resource \"datadog_security_monitoring_rule\" \"{{ unique_lower }}\" {\n\tname = \"{{ unique }}\"\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\tdata_source = \"logs\"\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"
139139

140140
@skip @team:DataDog/k9-cloud-security-platform
141141
Scenario: Convert an existing rule from JSON to Terraform returns "Bad Request" response
@@ -158,7 +158,7 @@ Feature: Security Monitoring
158158
And request contains "rule_id" parameter from "security_rule.id"
159159
When the request is sent
160160
Then the response status is 200 OK
161-
And the response "terraformContent" is equal to "resource \"datadog_security_monitoring_rule\" \"{{ unique_lower }}\" {\n\tname = \"{{ unique }}\"\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"
161+
And the response "terraformContent" is equal to "resource \"datadog_security_monitoring_rule\" \"{{ unique_lower }}\" {\n\tname = \"{{ unique }}\"\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\tdata_source = \"logs\"\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"
162162

163163
@skip-validation @team:DataDog/k9-cloud-security-platform
164164
Scenario: Create a cloud_configuration rule returns "OK" response

0 commit comments

Comments
 (0)