Skip to content

Commit d09c12a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 0767ae6 of spec repo (#2884)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent c84f7b4 commit d09c12a

9 files changed

+31
-10
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43891,6 +43891,14 @@ components:
4389143891
for scheduled rules - in other words, when the `schedulingOptions` field
4389243892
is present in the rule payload.'
4389343893
type: string
43894+
indexes:
43895+
description: List of indexes to query when the `dataSource` is `logs`. Only
43896+
used for scheduled rules, such as when the `schedulingOptions` field is
43897+
present in the rule payload.
43898+
items:
43899+
description: Index.
43900+
type: string
43901+
type: array
4389443902
metric:
4389543903
deprecated: true
4389643904
description: '(Deprecated) The target field to aggregate over when using

examples/v2/security-monitoring/CreateSecurityMonitoringRule_868881438.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
aggregation=SecurityMonitoringRuleQueryAggregation.COUNT,
3333
group_by_fields=[],
3434
distinct_fields=[],
35-
index="main",
35+
indexes=[
36+
"main",
37+
],
3638
),
3739
],
3840
filters=[],

src/datadog_api_client/v2/model/security_monitoring_rule_query.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ def __init__(self, **kwargs):
3737
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.
3838
:type index: str, optional
3939
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+
4043
:param metric: (Deprecated) The target field to aggregate over when using the sum or max
4144
aggregations. `metrics` field should be used instead.
4245
:type metric: str, optional

src/datadog_api_client/v2/model/security_monitoring_standard_rule_query.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def openapi_types(_):
4040
"group_by_fields": ([str],),
4141
"has_optional_group_by_fields": (bool,),
4242
"index": (str,),
43+
"indexes": ([str],),
4344
"metric": (str,),
4445
"metrics": ([str],),
4546
"name": (str,),
@@ -54,6 +55,7 @@ def openapi_types(_):
5455
"group_by_fields": "groupByFields",
5556
"has_optional_group_by_fields": "hasOptionalGroupByFields",
5657
"index": "index",
58+
"indexes": "indexes",
5759
"metric": "metric",
5860
"metrics": "metrics",
5961
"name": "name",
@@ -69,6 +71,7 @@ def __init__(
6971
group_by_fields: Union[List[str], UnsetType] = unset,
7072
has_optional_group_by_fields: Union[bool, UnsetType] = unset,
7173
index: Union[str, UnsetType] = unset,
74+
indexes: Union[List[str], UnsetType] = unset,
7275
metric: Union[str, UnsetType] = unset,
7376
metrics: Union[List[str], UnsetType] = unset,
7477
name: Union[str, UnsetType] = unset,
@@ -100,6 +103,9 @@ def __init__(
100103
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.
101104
:type index: str, optional
102105
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+
103109
:param metric: (Deprecated) The target field to aggregate over when using the sum or max
104110
aggregations. ``metrics`` field should be used instead. **Deprecated**.
105111
:type metric: str, optional
@@ -127,6 +133,8 @@ def __init__(
127133
kwargs["has_optional_group_by_fields"] = has_optional_group_by_fields
128134
if index is not unset:
129135
kwargs["index"] = index
136+
if indexes is not unset:
137+
kwargs["indexes"] = indexes
130138
if metric is not unset:
131139
kwargs["metric"] = metric
132140
if metrics is not unset:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-07-31T07:48:27.113Z
1+
2025-10-13T21:11:45.641Z

tests/v2/cassettes/test_scenarios/test_create_a_scheduled_detection_rule_returns_ok_response.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
interactions:
22
- request:
33
body: '{"cases":[{"condition":"a > 0","name":"","notifications":[],"status":"info"}],"filters":[],"isEnabled":true,"message":"Test
4-
rule","name":"Test-Create_a_scheduled_detection_rule_returns_OK_response-1753948107","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"index":"main","query":"@test:true"}],"schedulingOptions":{"rrule":"FREQ=HOURLY;INTERVAL=2;","start":"2025-06-18T12:00:00","timezone":"Europe/Paris"},"tags":[],"type":"log_detection"}'
4+
rule","name":"Test-Create_a_scheduled_detection_rule_returns_OK_response-1760389905","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"indexes":["main"],"query":"@test:true"}],"schedulingOptions":{"rrule":"FREQ=HOURLY;INTERVAL=2;","start":"2025-06-18T12:00:00","timezone":"Europe/Paris"},"tags":[],"type":"log_detection"}'
55
headers:
66
accept:
77
- application/json
@@ -11,8 +11,8 @@ interactions:
1111
uri: https://api.datadoghq.com/api/v2/security_monitoring/rules
1212
response:
1313
body:
14-
string: '{"name":"Test-Create_a_scheduled_detection_rule_returns_OK_response-1753948107","createdAt":1753948107557,"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","index":"main"}],"options":{"evaluationWindow":900,"detectionMethod":"threshold","maxSignalDuration":86400,"keepAlive":3600},"cases":[{"name":"","status":"info","notifications":[],"condition":"a
15-
\u003e 0"}],"message":"Test rule","tags":[],"hasExtendedTitle":false,"type":"log_detection","filters":[],"version":1,"id":"8dd-els-oyn","blocking":false,"metadata":{"entities":null,"sources":null},"creationAuthorId":1445416,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"updater":{"handle":"","name":""},"schedulingOptions":{"rrule":"FREQ=HOURLY;INTERVAL=2;","start":"2025-06-18T12:00:00","timezone":"Europe/Paris"}}'
14+
string: '{"name":"Test-Create_a_scheduled_detection_rule_returns_OK_response-1760389905","createdAt":1760389906051,"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","index":"main","indexes":["main"]}],"options":{"evaluationWindow":900,"detectionMethod":"threshold","maxSignalDuration":86400,"keepAlive":3600},"cases":[{"name":"","status":"info","notifications":[],"condition":"a
15+
\u003e 0"}],"message":"Test rule","tags":[],"hasExtendedTitle":false,"type":"log_detection","filters":[],"version":1,"id":"vgs-rrg-orf","blocking":false,"metadata":{"entities":null,"sources":null},"creationAuthorId":1445416,"creator":{"handle":"frog@datadoghq.com","name":"frog"},"updater":{"handle":"","name":""},"schedulingOptions":{"rrule":"FREQ=HOURLY;INTERVAL=2;","start":"2025-06-18T12:00:00","timezone":"Europe/Paris"}}'
1616
headers:
1717
content-type:
1818
- application/json
@@ -25,7 +25,7 @@ interactions:
2525
accept:
2626
- '*/*'
2727
method: DELETE
28-
uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/8dd-els-oyn
28+
uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/vgs-rrg-orf
2929
response:
3030
body:
3131
string: ''
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-07-31T07:49:14.474Z
1+
2025-10-13T21:12:46.212Z

tests/v2/cassettes/test_scenarios/test_create_a_scheduled_rule_without_rrule_returns_bad_request_response.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
interactions:
22
- request:
33
body: '{"cases":[{"condition":"a > 0","name":"","notifications":[],"status":"info"}],"filters":[],"isEnabled":true,"message":"Test
4-
rule","name":"Test-Create_a_scheduled_rule_without_rrule_returns_Bad_Request_response-1753948154","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"index":"main","query":"@test:true"}],"schedulingOptions":{"start":"2025-06-18T12:00:00","timezone":"Europe/Paris"},"tags":[],"type":"log_detection"}'
4+
rule","name":"Test-Create_a_scheduled_rule_without_rrule_returns_Bad_Request_response-1760389966","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"indexes":["main"],"query":"@test:true"}],"schedulingOptions":{"start":"2025-06-18T12:00:00","timezone":"Europe/Paris"},"tags":[],"type":"log_detection"}'
55
headers:
66
accept:
77
- application/json

tests/v2/features/security_monitoring.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ Feature: Security Monitoring
308308
@team:DataDog/k9-cloud-security-platform
309309
Scenario: Create a scheduled detection rule returns "OK" response
310310
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"}}
312312
When the request is sent
313313
Then the response status is 200 OK
314314
And the response "name" is equal to "{{ unique }}"
@@ -319,7 +319,7 @@ Feature: Security Monitoring
319319
@team:DataDog/k9-cloud-security-platform
320320
Scenario: Create a scheduled rule without rrule returns "Bad Request" response
321321
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"}}
323323
When the request is sent
324324
Then the response status is 400 Bad Request
325325

0 commit comments

Comments
 (0)