You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api/datadogV2/model_security_monitoring_standard_rule_query.go
+36-1Lines changed: 36 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,8 @@ type SecurityMonitoringStandardRuleQuery struct {
25
25
// **This field is currently unstable and might be removed in a minor version upgrade.**
26
26
// The index to run the query on, if the `dataSource` is `logs`. Only used for scheduled rules - in other words, when the `schedulingOptions` field is present in the rule payload.
27
27
Index*string`json:"index,omitempty"`
28
+
// List of indexes to query when the `dataSource` is `logs`. Only used for scheduled rules, such as when the `schedulingOptions` field is present in the rule payload.
29
+
Indexes []string`json:"indexes,omitempty"`
28
30
// (Deprecated) The target field to aggregate over when using the sum or max
29
31
// aggregations. `metrics` field should be used instead.
30
32
// Deprecated
@@ -261,6 +263,34 @@ func (o *SecurityMonitoringStandardRuleQuery) SetIndex(v string) {
261
263
o.Index=&v
262
264
}
263
265
266
+
// GetIndexes returns the Indexes field value if set, zero value otherwise.
Copy file name to clipboardExpand all lines: tests/scenarios/cassettes/TestScenarios/v2/Feature_Security_Monitoring/Scenario_Create_a_scheduled_detection_rule_returns_OK_response.yaml
Copy file name to clipboardExpand all lines: tests/scenarios/cassettes/TestScenarios/v2/Feature_Security_Monitoring/Scenario_Create_a_scheduled_rule_without_rrule_returns_Bad_Request_response.yaml
Copy file name to clipboardExpand all lines: tests/scenarios/features/v2/security_monitoring.feature
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -308,7 +308,7 @@ Feature: Security Monitoring
308
308
@team:DataDog/k9-cloud-security-platform
309
309
Scenario: Create a scheduled detection rule returns "OK" response
310
310
Given new "CreateSecurityMonitoringRule" request
311
-
And body with value {"name":"{{ unique }}", "queries":[{"query":"@test:true","aggregation":"count","groupByFields":[],"distinctFields":[],"index":"main"}],"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", "schedulingOptions": {"rrule": "FREQ=HOURLY;INTERVAL=2;", "start": "2025-06-18T12:00:00", "timezone": "Europe/Paris"}}
311
+
And body with value {"name":"{{ unique }}", "queries":[{"query":"@test:true","aggregation":"count","groupByFields":[],"distinctFields":[],"indexes":["main"]}],"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", "schedulingOptions": {"rrule": "FREQ=HOURLY;INTERVAL=2;", "start": "2025-06-18T12:00:00", "timezone": "Europe/Paris"}}
312
312
When the request is sent
313
313
Then the response status is 200 OK
314
314
And the response "name" is equal to "{{ unique }}"
@@ -319,7 +319,7 @@ Feature: Security Monitoring
319
319
@team:DataDog/k9-cloud-security-platform
320
320
Scenario: Create a scheduled rule without rrule returns "Bad Request" response
321
321
Given new "CreateSecurityMonitoringRule" request
322
-
And body with value {"name":"{{ unique }}", "queries":[{"query":"@test:true","aggregation":"count","groupByFields":[],"distinctFields":[],"index":"main"}],"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", "schedulingOptions": {"start": "2025-06-18T12:00:00", "timezone": "Europe/Paris"}}
322
+
And body with value {"name":"{{ unique }}", "queries":[{"query":"@test:true","aggregation":"count","groupByFields":[],"distinctFields":[],"indexes":["main"]}],"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", "schedulingOptions": {"start": "2025-06-18T12:00:00", "timezone": "Europe/Paris"}}
0 commit comments