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: src/datadog_api_client/v2/model/security_monitoring_rule_query.py
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,9 @@ def __init__(self, **kwargs):
37
37
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.
38
38
:type index: str, optional
39
39
40
+
:param indexes: 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.
41
+
:type indexes: [str], optional
42
+
40
43
:param metric: (Deprecated) The target field to aggregate over when using the sum or max
41
44
aggregations. `metrics` field should be used instead.
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.
101
104
:type index: str, optional
102
105
106
+
:param indexes: 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.
107
+
:type indexes: [str], optional
108
+
103
109
:param metric: (Deprecated) The target field to aggregate over when using the sum or max
104
110
aggregations. ``metrics`` field should be used instead. **Deprecated**.
Copy file name to clipboardExpand all lines: tests/v2/cassettes/test_scenarios/test_create_a_scheduled_rule_without_rrule_returns_bad_request_response.yaml
Copy file name to clipboardExpand all lines: tests/v2/features/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