Skip to content

Commit b1a5bfc

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 2a2b481 of spec repo
1 parent e9550ec commit b1a5bfc

13 files changed

+453
-4
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": "df31e44",
3-
"generated": "2025-07-28 19:59:31.744"
2+
"spec_repo_commit": "2a2b481",
3+
"generated": "2025-07-31 08:56:16.921"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34920,6 +34920,27 @@ components:
3492034920
- $ref: '#/components/schemas/SecurityMonitoringStandardRulePayload'
3492134921
- $ref: '#/components/schemas/SecurityMonitoringSignalRulePayload'
3492234922
- $ref: '#/components/schemas/CloudConfigurationRulePayload'
34923+
SecurityMonitoringSchedulingOptions:
34924+
description: Options for scheduled rules. When this field is present, the rule
34925+
runs based on the schedule. When absent, it runs real-time on ingested logs.
34926+
nullable: true
34927+
properties:
34928+
rrule:
34929+
description: Schedule for the rule queries, written in RRULE syntax. See
34930+
[RFC](https://icalendar.org/iCalendar-RFC-5545/3-8-5-3-recurrence-rule.html)
34931+
for syntax reference.
34932+
example: FREQ=HOURLY;INTERVAL=1;
34933+
type: string
34934+
start:
34935+
description: Start date for the schedule, in ISO 8601 format without timezone.
34936+
example: '2025-07-14T12:00:00'
34937+
type: string
34938+
timezone:
34939+
description: Time zone of the start date, in the [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
34940+
format.
34941+
example: America/New_York
34942+
type: string
34943+
type: object
3492334944
SecurityMonitoringSignal:
3492434945
description: Object description of a security signal.
3492534946
properties:
@@ -35598,6 +35619,12 @@ components:
3559835619
SecurityMonitoringStandardRuleCreatePayload:
3559935620
description: Create a new rule.
3560035621
properties:
35622+
calculatedFields:
35623+
description: Calculated fields. Only allowed for scheduled rules, i.e. when
35624+
schedulingOptions is also defined.
35625+
items:
35626+
$ref: '#/components/schemas/CalculatedField'
35627+
type: array
3560135628
cases:
3560235629
description: Cases for generating signals.
3560335630
example: []
@@ -35650,6 +35677,8 @@ components:
3565035677
items:
3565135678
$ref: '#/components/schemas/SecurityMonitoringReferenceTable'
3565235679
type: array
35680+
schedulingOptions:
35681+
$ref: '#/components/schemas/SecurityMonitoringSchedulingOptions'
3565335682
tags:
3565435683
description: Tags for generated signals.
3565535684
example:
@@ -35795,6 +35824,14 @@ components:
3579535824
example: false
3579635825
readOnly: true
3579735826
type: boolean
35827+
index:
35828+
description: '**This field is currently unstable and might be removed in
35829+
a minor version upgrade.**
35830+
35831+
The index to run the query on, if the `dataSource` is `logs`. Only used
35832+
for scheduled rules, i.e. when the `schedulingOptions` field is present
35833+
in the rule payload.'
35834+
type: string
3579835835
metric:
3579935836
deprecated: true
3580035837
description: '(Deprecated) The target field to aggregate over when using

LICENSE-3rdparty.csv

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ android-tzdata,https://github.com/RumovZ/android-tzdata,MIT OR Apache-2.0,RumovZ
55
android_system_properties,https://github.com/nical/android_system_properties,MIT OR Apache-2.0,Nicolas Silva <[email protected]>
66
anyhow,https://github.com/dtolnay/anyhow,MIT OR Apache-2.0,David Tolnay <[email protected]>
77
async-stream,https://github.com/tokio-rs/async-stream,MIT,Carl Lerche <[email protected]>
8+
async-stream-impl,https://github.com/tokio-rs/async-stream,MIT,Carl Lerche <[email protected]>
89
async-trait,https://github.com/dtolnay/async-trait,MIT OR Apache-2.0,David Tolnay <[email protected]>
910
backtrace,https://github.com/rust-lang/backtrace-rs,MIT OR Apache-2.0,The Rust Project Developers
1011
base64,https://github.com/marshallpierce/rust-base64,MIT OR Apache-2.0,"Alice Maz <[email protected]>, Marshall Pierce <[email protected]>"
@@ -15,8 +16,11 @@ bytes,https://github.com/tokio-rs/bytes,MIT,"Carl Lerche <[email protected]>, Se
1516
cfg-if,https://github.com/rust-lang/cfg-if,MIT OR Apache-2.0,Alex Crichton <[email protected]>
1617
chrono,https://github.com/chronotope/chrono,MIT OR Apache-2.0,The chrono Authors
1718
core-foundation,https://github.com/servo/core-foundation-rs,MIT OR Apache-2.0,The Servo Project Developers
19+
core-foundation-sys,https://github.com/servo/core-foundation-rs,MIT OR Apache-2.0,The Servo Project Developers
1820
crc32fast,https://github.com/srijs/rust-crc32fast,MIT OR Apache-2.0,"Sam Rijs <[email protected]>, Alex Crichton <[email protected]>"
1921
darling,https://github.com/TedDriggs/darling,MIT,Ted Driggs <[email protected]>
22+
darling_core,https://github.com/TedDriggs/darling,MIT,Ted Driggs <[email protected]>
23+
darling_macro,https://github.com/TedDriggs/darling,MIT,Ted Driggs <[email protected]>
2024
deranged,https://github.com/jhpratt/deranged,MIT OR Apache-2.0,Jacob Pratt <[email protected]>
2125
displaydoc,https://github.com/yaahc/displaydoc,MIT OR Apache-2.0,Jane Lusby <[email protected]>
2226
dyn-clone,https://github.com/dtolnay/dyn-clone,MIT OR Apache-2.0,David Tolnay <[email protected]>
@@ -27,7 +31,9 @@ fastrand,https://github.com/smol-rs/fastrand,Apache-2.0 OR MIT,Stjepan Glavina <
2731
flate2,https://github.com/rust-lang/flate2-rs,MIT OR Apache-2.0,"Alex Crichton <[email protected]>, Josh Triplett <[email protected]>"
2832
fnv,https://github.com/servo/rust-fnv,Apache-2.0 OR MIT,Alex Crichton <[email protected]>
2933
foreign-types,https://github.com/sfackler/foreign-types,MIT OR Apache-2.0,Steven Fackler <[email protected]>
34+
foreign-types-shared,https://github.com/sfackler/foreign-types,MIT OR Apache-2.0,Steven Fackler <[email protected]>
3035
form-data-builder,https://github.com/iliana/form-data-builder,MIT-0,The form-data-builder Authors
36+
form_urlencoded,https://github.com/servo/rust-url,MIT OR Apache-2.0,The rust-url developers
3137
futures,https://github.com/rust-lang/futures-rs,MIT OR Apache-2.0,The futures Authors
3238
futures-channel,https://github.com/rust-lang/futures-rs,MIT OR Apache-2.0,The futures-channel Authors
3339
futures-core,https://github.com/rust-lang/futures-rs,MIT OR Apache-2.0,The futures-core Authors
@@ -58,6 +64,7 @@ icu_properties,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Projec
5864
icu_properties_data,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers
5965
icu_provider,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers
6066
ident_case,https://github.com/TedDriggs/ident_case,MIT OR Apache-2.0,Ted Driggs <[email protected]>
67+
idna,https://github.com/servo/rust-url,MIT OR Apache-2.0,The rust-url developers
6168
idna_adapter,https://github.com/hsivonen/idna_adapter,Apache-2.0 OR MIT,The rust-url developers
6269
indexmap,https://github.com/bluss/indexmap,Apache-2.0 OR MIT,The indexmap Authors
6370
indexmap,https://github.com/indexmap-rs/indexmap,Apache-2.0 OR MIT,The indexmap Authors
@@ -87,6 +94,8 @@ openssl-macros,https://github.com/sfackler/rust-openssl,MIT OR Apache-2.0,The op
8794
openssl-probe,https://github.com/alexcrichton/openssl-probe,MIT OR Apache-2.0,Alex Crichton <[email protected]>
8895
openssl-sys,https://github.com/sfackler/rust-openssl,MIT,"Alex Crichton <[email protected]>, Steven Fackler <[email protected]>"
8996
parking_lot,https://github.com/Amanieu/parking_lot,Apache-2.0 OR MIT,Amanieu d'Antras <[email protected]>
97+
parking_lot_core,https://github.com/Amanieu/parking_lot,Apache-2.0 OR MIT,Amanieu d'Antras <[email protected]>
98+
percent-encoding,https://github.com/servo/rust-url,MIT OR Apache-2.0,The rust-url developers
9099
pin-project-lite,https://github.com/taiki-e/pin-project-lite,Apache-2.0 OR MIT,The pin-project-lite Authors
91100
pin-utils,https://github.com/rust-lang-nursery/pin-utils,MIT OR Apache-2.0,Josef Brandl <[email protected]>
92101
potential_utf,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers
@@ -97,10 +106,13 @@ quote,https://github.com/dtolnay/quote,MIT OR Apache-2.0,David Tolnay <dtolnay@g
97106
r-efi,https://github.com/r-efi/r-efi,MIT OR Apache-2.0 OR LGPL-2.1-or-later,The r-efi Authors
98107
rand,https://github.com/rust-random/rand,MIT OR Apache-2.0,"The Rand Project Developers, The Rust Project Developers"
99108
rand_chacha,https://github.com/rust-random/rand,MIT OR Apache-2.0,"The Rand Project Developers, The Rust Project Developers, The CryptoCorrosion Contributors"
109+
rand_core,https://github.com/rust-random/rand,MIT OR Apache-2.0,"The Rand Project Developers, The Rust Project Developers"
100110
redox_syscall,https://gitlab.redox-os.org/redox-os/syscall,MIT,Jeremy Soller <[email protected]>
101111
ref-cast,https://github.com/dtolnay/ref-cast,MIT OR Apache-2.0,David Tolnay <[email protected]>
112+
ref-cast-impl,https://github.com/dtolnay/ref-cast,MIT OR Apache-2.0,David Tolnay <[email protected]>
102113
reqwest,https://github.com/seanmonstar/reqwest,MIT OR Apache-2.0,Sean McArthur <[email protected]>
103114
reqwest-middleware,https://github.com/TrueLayer/reqwest-middleware,MIT OR Apache-2.0,Rodrigo Gryzinski <[email protected]>
115+
reqwest-retry,https://github.com/TrueLayer/reqwest-middleware,MIT OR Apache-2.0,Rodrigo Gryzinski <[email protected]>
104116
retry-policies,https://github.com/TrueLayer/retry-policies,MIT OR Apache-2.0,Luca Palmieri <[email protected]>
105117
rustc-demangle,https://github.com/rust-lang/rustc-demangle,MIT OR Apache-2.0,Alex Crichton <[email protected]>
106118
rustix,https://github.com/bytecodealliance/rustix,Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT,"Dan Gohman <[email protected]>, Jakub Konka <[email protected]>"
@@ -111,7 +123,9 @@ schannel,https://github.com/steffengy/schannel-rs,MIT,"Steven Fackler <sfackler@
111123
schemars,https://github.com/GREsau/schemars,MIT,Graham Esau <[email protected]>
112124
scopeguard,https://github.com/bluss/scopeguard,MIT OR Apache-2.0,bluss
113125
security-framework,https://github.com/kornelski/rust-security-framework,MIT OR Apache-2.0,"Steven Fackler <[email protected]>, Kornel <[email protected]>"
126+
security-framework-sys,https://github.com/kornelski/rust-security-framework,MIT OR Apache-2.0,"Steven Fackler <[email protected]>, Kornel <[email protected]>"
114127
serde,https://github.com/serde-rs/serde,MIT OR Apache-2.0,"Erick Tryzelaar <[email protected]>, David Tolnay <[email protected]>"
128+
serde_derive,https://github.com/serde-rs/serde,MIT OR Apache-2.0,"Erick Tryzelaar <[email protected]>, David Tolnay <[email protected]>"
115129
serde_json,https://github.com/serde-rs/json,MIT OR Apache-2.0,"Erick Tryzelaar <[email protected]>, David Tolnay <[email protected]>"
116130
serde_urlencoded,https://github.com/nox/serde_urlencoded,MIT OR Apache-2.0,Anthony Ramine <[email protected]>
117131
serde_with,https://github.com/jonasbb/serde_with,MIT OR Apache-2.0,"Jonas Bushart, Marcin Kaźmierczak"
@@ -125,13 +139,19 @@ syn,https://github.com/dtolnay/syn,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail
125139
sync_wrapper,https://github.com/Actyx/sync_wrapper,Apache-2.0,Actyx AG <[email protected]>
126140
synstructure,https://github.com/mystor/synstructure,MIT,Nika Layzell <[email protected]>
127141
system-configuration,https://github.com/mullvad/system-configuration-rs,MIT OR Apache-2.0,Mullvad VPN
142+
system-configuration-sys,https://github.com/mullvad/system-configuration-rs,MIT OR Apache-2.0,Mullvad VPN
128143
task-local-extensions,https://github.com/TrueLayer/task-local-extensions,MIT OR Apache-2.0,"Conrad Ludgate <[email protected]>, Rodrigo Gryzinski <[email protected]>"
129144
tempfile,https://github.com/Stebalien/tempfile,MIT OR Apache-2.0,"Steven Allen <[email protected]>, The Rust Project Developers, Ashley Mannix <[email protected]>, Jason White <[email protected]>"
130145
thiserror,https://github.com/dtolnay/thiserror,MIT OR Apache-2.0,David Tolnay <[email protected]>
146+
thiserror-impl,https://github.com/dtolnay/thiserror,MIT OR Apache-2.0,David Tolnay <[email protected]>
131147
time,https://github.com/time-rs/time,MIT OR Apache-2.0,"Jacob Pratt <[email protected]>, Time contributors"
148+
time-core,https://github.com/time-rs/time,MIT OR Apache-2.0,"Jacob Pratt <[email protected]>, Time contributors"
149+
time-macros,https://github.com/time-rs/time,MIT OR Apache-2.0,"Jacob Pratt <[email protected]>, Time contributors"
132150
tinystr,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers
133151
tokio,https://github.com/tokio-rs/tokio,MIT,Tokio Contributors <[email protected]>
152+
tokio-macros,https://github.com/tokio-rs/tokio,MIT,Tokio Contributors <[email protected]>
134153
tokio-native-tls,https://github.com/tokio-rs/tls,MIT,Tokio Contributors <[email protected]>
154+
tokio-util,https://github.com/tokio-rs/tokio,MIT,Tokio Contributors <[email protected]>
135155
tower-service,https://github.com/tower-rs/tower,MIT,Tower Maintainers <[email protected]>
136156
tracing,https://github.com/tokio-rs/tracing,MIT,"Eliza Weisman <[email protected]>, Tokio Contributors <[email protected]>"
137157
tracing-attributes,https://github.com/tokio-rs/tracing,MIT,"Tokio Contributors <[email protected]>, Eliza Weisman <[email protected]>, David Barsky <[email protected]>"
@@ -155,6 +175,8 @@ wasm-bindgen-shared,https://github.com/rustwasm/wasm-bindgen/tree/master/crates/
155175
wasm-timer,https://github.com/tomaka/wasm-timer,MIT,Pierre Krieger <[email protected]>
156176
web-sys,https://github.com/rustwasm/wasm-bindgen/tree/master/crates/web-sys,MIT OR Apache-2.0,The wasm-bindgen Developers
157177
winapi,https://github.com/retep998/winapi-rs,MIT OR Apache-2.0,Peter Atashian <[email protected]>
178+
winapi-i686-pc-windows-gnu,https://github.com/retep998/winapi-rs,MIT OR Apache-2.0,Peter Atashian <[email protected]>
179+
winapi-x86_64-pc-windows-gnu,https://github.com/retep998/winapi-rs,MIT OR Apache-2.0,Peter Atashian <[email protected]>
158180
windows-core,https://github.com/microsoft/windows-rs,MIT OR Apache-2.0,Microsoft
159181
windows-implement,https://github.com/microsoft/windows-rs,MIT OR Apache-2.0,Microsoft
160182
windows-interface,https://github.com/microsoft/windows-rs,MIT OR Apache-2.0,Microsoft
@@ -177,6 +199,7 @@ writeable,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Dev
177199
yoke,https://github.com/unicode-org/icu4x,Unicode-3.0,Manish Goregaokar <[email protected]>
178200
yoke-derive,https://github.com/unicode-org/icu4x,Unicode-3.0,Manish Goregaokar <[email protected]>
179201
zerocopy,https://github.com/google/zerocopy,BSD-2-Clause OR Apache-2.0 OR MIT,"Joshua Liebow-Feeser <[email protected]>, Jack Wrenn <[email protected]>"
202+
zerocopy-derive,https://github.com/google/zerocopy,BSD-2-Clause OR Apache-2.0 OR MIT,"Joshua Liebow-Feeser <[email protected]>, Jack Wrenn <[email protected]>"
180203
zerofrom,https://github.com/unicode-org/icu4x,Unicode-3.0,Manish Goregaokar <[email protected]>
181204
zerofrom-derive,https://github.com/unicode-org/icu4x,Unicode-3.0,Manish Goregaokar <[email protected]>
182205
zerotrie,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// Create a scheduled detection rule returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAPI;
4+
use datadog_api_client::datadogV2::model::SecurityMonitoringRuleCaseCreate;
5+
use datadog_api_client::datadogV2::model::SecurityMonitoringRuleCreatePayload;
6+
use datadog_api_client::datadogV2::model::SecurityMonitoringRuleEvaluationWindow;
7+
use datadog_api_client::datadogV2::model::SecurityMonitoringRuleKeepAlive;
8+
use datadog_api_client::datadogV2::model::SecurityMonitoringRuleMaxSignalDuration;
9+
use datadog_api_client::datadogV2::model::SecurityMonitoringRuleOptions;
10+
use datadog_api_client::datadogV2::model::SecurityMonitoringRuleQueryAggregation;
11+
use datadog_api_client::datadogV2::model::SecurityMonitoringRuleSeverity;
12+
use datadog_api_client::datadogV2::model::SecurityMonitoringRuleTypeCreate;
13+
use datadog_api_client::datadogV2::model::SecurityMonitoringSchedulingOptions;
14+
use datadog_api_client::datadogV2::model::SecurityMonitoringStandardRuleCreatePayload;
15+
use datadog_api_client::datadogV2::model::SecurityMonitoringStandardRuleQuery;
16+
17+
#[tokio::main]
18+
async fn main() {
19+
let body =
20+
SecurityMonitoringRuleCreatePayload::SecurityMonitoringStandardRuleCreatePayload(Box::new(
21+
SecurityMonitoringStandardRuleCreatePayload::new(
22+
vec![
23+
SecurityMonitoringRuleCaseCreate::new(SecurityMonitoringRuleSeverity::INFO)
24+
.condition("a > 0".to_string())
25+
.name("".to_string())
26+
.notifications(vec![]),
27+
],
28+
true,
29+
"Test rule".to_string(),
30+
"Example-Security-Monitoring".to_string(),
31+
SecurityMonitoringRuleOptions::new()
32+
.evaluation_window(SecurityMonitoringRuleEvaluationWindow::FIFTEEN_MINUTES)
33+
.keep_alive(SecurityMonitoringRuleKeepAlive::ONE_HOUR)
34+
.max_signal_duration(SecurityMonitoringRuleMaxSignalDuration::ONE_DAY),
35+
vec![SecurityMonitoringStandardRuleQuery::new()
36+
.aggregation(SecurityMonitoringRuleQueryAggregation::COUNT)
37+
.distinct_fields(vec![])
38+
.group_by_fields(vec![])
39+
.index("main".to_string())
40+
.query("@test:true".to_string())],
41+
)
42+
.filters(vec![])
43+
.scheduling_options(Some(
44+
SecurityMonitoringSchedulingOptions::new()
45+
.rrule("FREQ=HOURLY;INTERVAL=2;".to_string())
46+
.start("2025-06-18T12:00:00".to_string())
47+
.timezone("Europe/Paris".to_string()),
48+
))
49+
.tags(vec![])
50+
.type_(SecurityMonitoringRuleTypeCreate::LOG_DETECTION),
51+
));
52+
let configuration = datadog::Configuration::new();
53+
let api = SecurityMonitoringAPI::with_config(configuration);
54+
let resp = api.create_security_monitoring_rule(body).await;
55+
if let Ok(value) = resp {
56+
println!("{:#?}", value);
57+
} else {
58+
println!("{:#?}", resp.unwrap_err());
59+
}
60+
}

src/datadogV2/model/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4358,8 +4358,12 @@ pub mod model_security_monitoring_rule_response;
43584358
pub use self::model_security_monitoring_rule_response::SecurityMonitoringRuleResponse;
43594359
pub mod model_security_monitoring_standard_rule_create_payload;
43604360
pub use self::model_security_monitoring_standard_rule_create_payload::SecurityMonitoringStandardRuleCreatePayload;
4361+
pub mod model_calculated_field;
4362+
pub use self::model_calculated_field::CalculatedField;
43614363
pub mod model_security_monitoring_rule_case_create;
43624364
pub use self::model_security_monitoring_rule_case_create::SecurityMonitoringRuleCaseCreate;
4365+
pub mod model_security_monitoring_scheduling_options;
4366+
pub use self::model_security_monitoring_scheduling_options::SecurityMonitoringSchedulingOptions;
43634367
pub mod model_security_monitoring_third_party_rule_case_create;
43644368
pub use self::model_security_monitoring_third_party_rule_case_create::SecurityMonitoringThirdPartyRuleCaseCreate;
43654369
pub mod model_security_monitoring_rule_type_create;
@@ -4768,8 +4772,6 @@ pub mod model_historical_job_response_attributes;
47684772
pub use self::model_historical_job_response_attributes::HistoricalJobResponseAttributes;
47694773
pub mod model_job_definition;
47704774
pub use self::model_job_definition::JobDefinition;
4771-
pub mod model_calculated_field;
4772-
pub use self::model_calculated_field::CalculatedField;
47734775
pub mod model_historical_job_options;
47744776
pub use self::model_historical_job_options::HistoricalJobOptions;
47754777
pub mod model_historical_job_query;

0 commit comments

Comments
 (0)