Skip to content

Commit b415c4a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 8c7731a of spec repo
1 parent c4da40e commit b415c4a

16 files changed

+493
-8
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "35630f3",
3-
"generated": "2025-08-01 18:17:22.417"
2+
"spec_repo_commit": "8c7731a",
3+
"generated": "2025-08-04 14:55:16.532"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36257,6 +36257,12 @@ components:
3625736257
SecurityMonitoringRuleUpdatePayload:
3625836258
description: Update an existing rule.
3625936259
properties:
36260+
calculatedFields:
36261+
description: Calculated fields. Only allowed for scheduled rules - in other
36262+
words, when schedulingOptions is also defined.
36263+
items:
36264+
$ref: '#/components/schemas/CalculatedField'
36265+
type: array
3626036266
cases:
3626136267
description: Cases for generating signals.
3626236268
items:
@@ -36313,6 +36319,8 @@ components:
3631336319
items:
3631436320
$ref: '#/components/schemas/SecurityMonitoringReferenceTable'
3631536321
type: array
36322+
schedulingOptions:
36323+
$ref: '#/components/schemas/SecurityMonitoringSchedulingOptions'
3631636324
tags:
3631736325
description: Tags for generated signals.
3631836326
items:
@@ -36339,6 +36347,27 @@ components:
3633936347
- $ref: '#/components/schemas/SecurityMonitoringStandardRulePayload'
3634036348
- $ref: '#/components/schemas/SecurityMonitoringSignalRulePayload'
3634136349
- $ref: '#/components/schemas/CloudConfigurationRulePayload'
36350+
SecurityMonitoringSchedulingOptions:
36351+
description: Options for scheduled rules. When this field is present, the rule
36352+
runs based on the schedule. When absent, it runs real-time on ingested logs.
36353+
nullable: true
36354+
properties:
36355+
rrule:
36356+
description: Schedule for the rule queries, written in RRULE syntax. See
36357+
[RFC](https://icalendar.org/iCalendar-RFC-5545/3-8-5-3-recurrence-rule.html)
36358+
for syntax reference.
36359+
example: FREQ=HOURLY;INTERVAL=1;
36360+
type: string
36361+
start:
36362+
description: Start date for the schedule, in ISO 8601 format without timezone.
36363+
example: '2025-07-14T12:00:00'
36364+
type: string
36365+
timezone:
36366+
description: Time zone of the start date, in the [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
36367+
format.
36368+
example: America/New_York
36369+
type: string
36370+
type: object
3634236371
SecurityMonitoringSignal:
3634336372
description: Object description of a security signal.
3634436373
properties:
@@ -37017,6 +37046,12 @@ components:
3701737046
SecurityMonitoringStandardRuleCreatePayload:
3701837047
description: Create a new rule.
3701937048
properties:
37049+
calculatedFields:
37050+
description: Calculated fields. Only allowed for scheduled rules - in other
37051+
words, when schedulingOptions is also defined.
37052+
items:
37053+
$ref: '#/components/schemas/CalculatedField'
37054+
type: array
3702037055
cases:
3702137056
description: Cases for generating signals.
3702237057
example: []
@@ -37069,6 +37104,8 @@ components:
3706937104
items:
3707037105
$ref: '#/components/schemas/SecurityMonitoringReferenceTable'
3707137106
type: array
37107+
schedulingOptions:
37108+
$ref: '#/components/schemas/SecurityMonitoringSchedulingOptions'
3707237109
tags:
3707337110
description: Tags for generated signals.
3707437111
example:
@@ -37098,6 +37135,12 @@ components:
3709837135
SecurityMonitoringStandardRulePayload:
3709937136
description: The payload of a rule.
3710037137
properties:
37138+
calculatedFields:
37139+
description: Calculated fields. Only allowed for scheduled rules - in other
37140+
words, when schedulingOptions is also defined.
37141+
items:
37142+
$ref: '#/components/schemas/CalculatedField'
37143+
type: array
3710137144
cases:
3710237145
description: Cases for generating signals.
3710337146
example: []
@@ -37158,6 +37201,8 @@ components:
3715837201
items:
3715937202
$ref: '#/components/schemas/SecurityMonitoringReferenceTable'
3716037203
type: array
37204+
schedulingOptions:
37205+
$ref: '#/components/schemas/SecurityMonitoringSchedulingOptions'
3716137206
tags:
3716237207
description: Tags for generated signals.
3716337208
example:
@@ -37214,6 +37259,14 @@ components:
3721437259
example: false
3721537260
readOnly: true
3721637261
type: boolean
37262+
index:
37263+
description: '**This field is currently unstable and might be removed in
37264+
a minor version upgrade.**
37265+
37266+
The index to run the query on, if the `dataSource` is `logs`. Only used
37267+
for scheduled rules - in other words, when the `schedulingOptions` field
37268+
is present in the rule payload.'
37269+
type: string
3721737270
metric:
3721837271
deprecated: true
3721937272
description: '(Deprecated) The target field to aggregate over when using
@@ -37241,6 +37294,12 @@ components:
3724137294
SecurityMonitoringStandardRuleResponse:
3724237295
description: Rule.
3724337296
properties:
37297+
calculatedFields:
37298+
description: Calculated fields. Only allowed for scheduled rules - in other
37299+
words, when schedulingOptions is also defined.
37300+
items:
37301+
$ref: '#/components/schemas/CalculatedField'
37302+
type: array
3724437303
cases:
3724537304
description: Cases for generating signals.
3724637305
items:
@@ -37326,6 +37385,8 @@ components:
3732637385
items:
3732737386
$ref: '#/components/schemas/SecurityMonitoringReferenceTable'
3732837387
type: array
37388+
schedulingOptions:
37389+
$ref: '#/components/schemas/SecurityMonitoringSchedulingOptions'
3732937390
tags:
3733037391
description: Tags for generated signals.
3733137392
items:
@@ -37357,6 +37418,12 @@ components:
3735737418
SecurityMonitoringStandardRuleTestPayload:
3735837419
description: The payload of a rule to test
3735937420
properties:
37421+
calculatedFields:
37422+
description: Calculated fields. Only allowed for scheduled rules - in other
37423+
words, when schedulingOptions is also defined.
37424+
items:
37425+
$ref: '#/components/schemas/CalculatedField'
37426+
type: array
3736037427
cases:
3736137428
description: Cases for generating signals.
3736237429
example: []
@@ -37409,6 +37476,8 @@ components:
3740937476
items:
3741037477
$ref: '#/components/schemas/SecurityMonitoringReferenceTable'
3741137478
type: array
37479+
schedulingOptions:
37480+
$ref: '#/components/schemas/SecurityMonitoringSchedulingOptions'
3741237481
tags:
3741337482
description: Tags for generated signals.
3741437483
example:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-07-31T07:48:27.113Z

cassettes/features/v2/security_monitoring/Create-a-scheduled-detection-rule-returns-OK-response.yml

Lines changed: 42 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-07-31T07:49:14.474Z

cassettes/features/v2/security_monitoring/Create-a-scheduled-rule-without-rrule-returns-Bad-Request-response.yml

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Create a scheduled detection rule returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
5+
6+
body = DatadogAPIClient::V2::SecurityMonitoringStandardRuleCreatePayload.new({
7+
name: "Example-Security-Monitoring",
8+
queries: [
9+
DatadogAPIClient::V2::SecurityMonitoringStandardRuleQuery.new({
10+
query: "@test:true",
11+
aggregation: DatadogAPIClient::V2::SecurityMonitoringRuleQueryAggregation::COUNT,
12+
group_by_fields: [],
13+
distinct_fields: [],
14+
index: "main",
15+
}),
16+
],
17+
filters: [],
18+
cases: [
19+
DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate.new({
20+
name: "",
21+
status: DatadogAPIClient::V2::SecurityMonitoringRuleSeverity::INFO,
22+
condition: "a > 0",
23+
notifications: [],
24+
}),
25+
],
26+
options: DatadogAPIClient::V2::SecurityMonitoringRuleOptions.new({
27+
evaluation_window: DatadogAPIClient::V2::SecurityMonitoringRuleEvaluationWindow::FIFTEEN_MINUTES,
28+
keep_alive: DatadogAPIClient::V2::SecurityMonitoringRuleKeepAlive::ONE_HOUR,
29+
max_signal_duration: DatadogAPIClient::V2::SecurityMonitoringRuleMaxSignalDuration::ONE_DAY,
30+
}),
31+
message: "Test rule",
32+
tags: [],
33+
is_enabled: true,
34+
type: DatadogAPIClient::V2::SecurityMonitoringRuleTypeCreate::LOG_DETECTION,
35+
scheduling_options: DatadogAPIClient::V2::SecurityMonitoringSchedulingOptions.new({
36+
rrule: "FREQ=HOURLY;INTERVAL=2;",
37+
start: "2025-06-18T12:00:00",
38+
timezone: "Europe/Paris",
39+
}),
40+
})
41+
p api_instance.create_security_monitoring_rule(body)

features/v2/security_monitoring.feature

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,24 @@ Feature: Security Monitoring
295295
When the request is sent
296296
Then the response status is 201 Successfully created the notification rule.
297297

298+
@team:DataDog/k9-cloud-security-platform
299+
Scenario: Create a scheduled detection rule returns "OK" response
300+
Given new "CreateSecurityMonitoringRule" request
301+
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"}}
302+
When the request is sent
303+
Then the response status is 200 OK
304+
And the response "name" is equal to "{{ unique }}"
305+
And the response "type" is equal to "log_detection"
306+
And the response "message" is equal to "Test rule"
307+
And the response "schedulingOptions" is equal to {"rrule": "FREQ=HOURLY;INTERVAL=2;", "start": "2025-06-18T12:00:00", "timezone": "Europe/Paris"}
308+
309+
@team:DataDog/k9-cloud-security-platform
310+
Scenario: Create a scheduled rule without rrule returns "Bad Request" response
311+
Given new "CreateSecurityMonitoringRule" request
312+
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"}}
313+
When the request is sent
314+
Then the response status is 400 Bad Request
315+
298316
@generated @skip @team:DataDog/k9-cloud-security-platform
299317
Scenario: Create a security filter returns "Bad Request" response
300318
Given new "CreateSecurityFilter" request

lib/datadog_api_client/inflector.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3240,6 +3240,7 @@ def overrides
32403240
"v2.security_monitoring_rule_type_test" => "SecurityMonitoringRuleTypeTest",
32413241
"v2.security_monitoring_rule_update_payload" => "SecurityMonitoringRuleUpdatePayload",
32423242
"v2.security_monitoring_rule_validate_payload" => "SecurityMonitoringRuleValidatePayload",
3243+
"v2.security_monitoring_scheduling_options" => "SecurityMonitoringSchedulingOptions",
32433244
"v2.security_monitoring_signal" => "SecurityMonitoringSignal",
32443245
"v2.security_monitoring_signal_archive_reason" => "SecurityMonitoringSignalArchiveReason",
32453246
"v2.security_monitoring_signal_assignee_update_attributes" => "SecurityMonitoringSignalAssigneeUpdateAttributes",

0 commit comments

Comments
 (0)