Skip to content

Commit b8e73b3

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit df351555 of spec repo
1 parent b14f36e commit b8e73b3

12 files changed

+103
-36
lines changed

.apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-12-02 14:34:48.145379",
8-
"spec_repo_commit": "48a734bf"
7+
"regenerated": "2024-12-02 15:32:36.735857",
8+
"spec_repo_commit": "df351555"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-12-02 14:34:48.165088",
13-
"spec_repo_commit": "48a734bf"
12+
"regenerated": "2024-12-02 15:32:36.755099",
13+
"spec_repo_commit": "df351555"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -22794,6 +22794,12 @@ components:
2279422794
as the search bar for detection rules.
2279522795
example: type:log_detection source:cloudtrail
2279622796
type: string
22797+
start_date:
22798+
description: A Unix millisecond timestamp giving the start date for the
22799+
suppression rule. After this date, it starts suppressing signals.
22800+
example: 1703187336000
22801+
format: int64
22802+
type: integer
2279722803
suppression_query:
2279822804
description: The suppression query of the suppression rule. If a signal
2279922805
matches this query, it is suppressed and not triggered. Same syntax as
@@ -22849,6 +22855,12 @@ components:
2284922855
as the search bar for detection rules.
2285022856
example: type:log_detection source:cloudtrail
2285122857
type: string
22858+
start_date:
22859+
description: A Unix millisecond timestamp giving the start date for the
22860+
suppression rule. After this date, it starts suppressing signals.
22861+
example: 1703187336000
22862+
format: int64
22863+
type: integer
2285222864
suppression_query:
2285322865
description: The suppression query of the suppression rule. If a signal
2285422866
matches this query, it is suppressed and is not triggered. It uses the
@@ -22935,6 +22947,15 @@ components:
2293522947
as the search bar for detection rules.
2293622948
example: type:log_detection source:cloudtrail
2293722949
type: string
22950+
start_date:
22951+
description: A Unix millisecond timestamp giving the start date for the
22952+
suppression rule. After this date, it starts suppressing signals. If unset,
22953+
the start date of the suppression rule is left untouched. If set to `null`,
22954+
the start date is removed.
22955+
example: 1703187336000
22956+
format: int64
22957+
nullable: true
22958+
type: integer
2293822959
suppression_query:
2293922960
description: The suppression query of the suppression rule. If a signal
2294022961
matches this query, it is suppressed and not triggered. Same syntax as

examples/v2_security-monitoring_CreateSecurityMonitoringSuppression.rs

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ async fn main() {
1919
"This rule suppresses low-severity signals in staging environments.".to_string(),
2020
)
2121
.expiration_date(1638443471000)
22+
.start_date(1637493071000)
2223
.suppression_query("env:staging status:low".to_string()),
2324
SecurityMonitoringSuppressionType::SUPPRESSIONS,
2425
),

examples/v2_security-monitoring_CreateSecurityMonitoringSuppression_3192265332.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ async fn main() {
1919
.description(
2020
"This rule suppresses low-severity signals in staging environments.".to_string(),
2121
)
22-
.expiration_date(1638443471000),
22+
.expiration_date(1638443471000)
23+
.start_date(1637493071000),
2324
SecurityMonitoringSuppressionType::SUPPRESSIONS,
2425
),
2526
);

src/datadogV2/model/model_security_monitoring_suppression_attributes.rs

+17
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ pub struct SecurityMonitoringSuppressionAttributes {
3838
/// The rule query of the suppression rule, with the same syntax as the search bar for detection rules.
3939
#[serde(rename = "rule_query")]
4040
pub rule_query: Option<String>,
41+
/// A Unix millisecond timestamp giving the start date for the suppression rule. After this date, it starts suppressing signals.
42+
#[serde(rename = "start_date")]
43+
pub start_date: Option<i64>,
4144
/// The suppression query of the suppression rule. If a signal matches this query, it is suppressed and not triggered. Same syntax as the queries to search signals in the signal explorer.
4245
#[serde(rename = "suppression_query")]
4346
pub suppression_query: Option<String>,
@@ -69,6 +72,7 @@ impl SecurityMonitoringSuppressionAttributes {
6972
expiration_date: None,
7073
name: None,
7174
rule_query: None,
75+
start_date: None,
7276
suppression_query: None,
7377
update_date: None,
7478
updater: None,
@@ -123,6 +127,11 @@ impl SecurityMonitoringSuppressionAttributes {
123127
self
124128
}
125129

130+
pub fn start_date(mut self, value: i64) -> Self {
131+
self.start_date = Some(value);
132+
self
133+
}
134+
126135
pub fn suppression_query(mut self, value: String) -> Self {
127136
self.suppression_query = Some(value);
128137
self
@@ -184,6 +193,7 @@ impl<'de> Deserialize<'de> for SecurityMonitoringSuppressionAttributes {
184193
let mut expiration_date: Option<i64> = None;
185194
let mut name: Option<String> = None;
186195
let mut rule_query: Option<String> = None;
196+
let mut start_date: Option<i64> = None;
187197
let mut suppression_query: Option<String> = None;
188198
let mut update_date: Option<i64> = None;
189199
let mut updater: Option<crate::datadogV2::model::SecurityMonitoringUser> = None;
@@ -254,6 +264,12 @@ impl<'de> Deserialize<'de> for SecurityMonitoringSuppressionAttributes {
254264
}
255265
rule_query = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
256266
}
267+
"start_date" => {
268+
if v.is_null() {
269+
continue;
270+
}
271+
start_date = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
272+
}
257273
"suppression_query" => {
258274
if v.is_null() {
259275
continue;
@@ -298,6 +314,7 @@ impl<'de> Deserialize<'de> for SecurityMonitoringSuppressionAttributes {
298314
expiration_date,
299315
name,
300316
rule_query,
317+
start_date,
301318
suppression_query,
302319
update_date,
303320
updater,

src/datadogV2/model/model_security_monitoring_suppression_create_attributes.rs

+17
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ pub struct SecurityMonitoringSuppressionCreateAttributes {
2929
/// The rule query of the suppression rule, with the same syntax as the search bar for detection rules.
3030
#[serde(rename = "rule_query")]
3131
pub rule_query: String,
32+
/// A Unix millisecond timestamp giving the start date for the suppression rule. After this date, it starts suppressing signals.
33+
#[serde(rename = "start_date")]
34+
pub start_date: Option<i64>,
3235
/// The suppression query of the suppression rule. If a signal matches this query, it is suppressed and is not triggered. It uses the same syntax as the queries to search signals in the Signals Explorer.
3336
#[serde(rename = "suppression_query")]
3437
pub suppression_query: Option<String>,
@@ -52,6 +55,7 @@ impl SecurityMonitoringSuppressionCreateAttributes {
5255
expiration_date: None,
5356
name,
5457
rule_query,
58+
start_date: None,
5559
suppression_query: None,
5660
additional_properties: std::collections::BTreeMap::new(),
5761
_unparsed: false,
@@ -73,6 +77,11 @@ impl SecurityMonitoringSuppressionCreateAttributes {
7377
self
7478
}
7579

80+
pub fn start_date(mut self, value: i64) -> Self {
81+
self.start_date = Some(value);
82+
self
83+
}
84+
7685
pub fn suppression_query(mut self, value: String) -> Self {
7786
self.suppression_query = Some(value);
7887
self
@@ -110,6 +119,7 @@ impl<'de> Deserialize<'de> for SecurityMonitoringSuppressionCreateAttributes {
110119
let mut expiration_date: Option<i64> = None;
111120
let mut name: Option<String> = None;
112121
let mut rule_query: Option<String> = None;
122+
let mut start_date: Option<i64> = None;
113123
let mut suppression_query: Option<String> = None;
114124
let mut additional_properties: std::collections::BTreeMap<
115125
String,
@@ -149,6 +159,12 @@ impl<'de> Deserialize<'de> for SecurityMonitoringSuppressionCreateAttributes {
149159
"rule_query" => {
150160
rule_query = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
151161
}
162+
"start_date" => {
163+
if v.is_null() {
164+
continue;
165+
}
166+
start_date = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
167+
}
152168
"suppression_query" => {
153169
if v.is_null() {
154170
continue;
@@ -174,6 +190,7 @@ impl<'de> Deserialize<'de> for SecurityMonitoringSuppressionCreateAttributes {
174190
expiration_date,
175191
name,
176192
rule_query,
193+
start_date,
177194
suppression_query,
178195
additional_properties,
179196
_unparsed,

src/datadogV2/model/model_security_monitoring_suppression_update_attributes.rs

+18
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ pub struct SecurityMonitoringSuppressionUpdateAttributes {
3333
/// The rule query of the suppression rule, with the same syntax as the search bar for detection rules.
3434
#[serde(rename = "rule_query")]
3535
pub rule_query: Option<String>,
36+
/// A Unix millisecond timestamp giving the start date for the suppression rule. After this date, it starts suppressing signals. If unset, the start date of the suppression rule is left untouched. If set to `null`, the start date is removed.
37+
#[serde(
38+
rename = "start_date",
39+
default,
40+
with = "::serde_with::rust::double_option"
41+
)]
42+
pub start_date: Option<Option<i64>>,
3643
/// The suppression query of the suppression rule. If a signal matches this query, it is suppressed and not triggered. Same syntax as the queries to search signals in the signal explorer.
3744
#[serde(rename = "suppression_query")]
3845
pub suppression_query: Option<String>,
@@ -55,6 +62,7 @@ impl SecurityMonitoringSuppressionUpdateAttributes {
5562
expiration_date: None,
5663
name: None,
5764
rule_query: None,
65+
start_date: None,
5866
suppression_query: None,
5967
version: None,
6068
additional_properties: std::collections::BTreeMap::new(),
@@ -92,6 +100,11 @@ impl SecurityMonitoringSuppressionUpdateAttributes {
92100
self
93101
}
94102

103+
pub fn start_date(mut self, value: Option<i64>) -> Self {
104+
self.start_date = Some(value);
105+
self
106+
}
107+
95108
pub fn suppression_query(mut self, value: String) -> Self {
96109
self.suppression_query = Some(value);
97110
self
@@ -140,6 +153,7 @@ impl<'de> Deserialize<'de> for SecurityMonitoringSuppressionUpdateAttributes {
140153
let mut expiration_date: Option<Option<i64>> = None;
141154
let mut name: Option<String> = None;
142155
let mut rule_query: Option<String> = None;
156+
let mut start_date: Option<Option<i64>> = None;
143157
let mut suppression_query: Option<String> = None;
144158
let mut version: Option<i32> = None;
145159
let mut additional_properties: std::collections::BTreeMap<
@@ -186,6 +200,9 @@ impl<'de> Deserialize<'de> for SecurityMonitoringSuppressionUpdateAttributes {
186200
}
187201
rule_query = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
188202
}
203+
"start_date" => {
204+
start_date = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
205+
}
189206
"suppression_query" => {
190207
if v.is_null() {
191208
continue;
@@ -214,6 +231,7 @@ impl<'de> Deserialize<'de> for SecurityMonitoringSuppressionUpdateAttributes {
214231
expiration_date,
215232
name,
216233
rule_query,
234+
start_date,
217235
suppression_query,
218236
version,
219237
additional_properties,
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-05-20T17:07:03.155Z
1+
2024-11-27T15:22:34.711Z

tests/scenarios/cassettes/v2/security_monitoring/Create-a-suppression-rule-returns-OK-response.json

+7-11
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"request": {
55
"body": {
6-
"string": "{\"data\":{\"attributes\":{\"description\":\"This rule suppresses low-severity signals in staging environments.\",\"enabled\":true,\"expiration_date\":1718039223000,\"name\":\"Test-Create_a_suppression_rule_returns_OK_response-1716224823\",\"rule_query\":\"type:log_detection source:cloudtrail\",\"suppression_query\":\"env:staging status:low\"},\"type\":\"suppressions\"}}",
6+
"string": "{\"data\":{\"attributes\":{\"description\":\"This rule suppresses low-severity signals in staging environments.\",\"enabled\":true,\"expiration_date\":1734535354000,\"name\":\"Test-Create_a_suppression_rule_returns_OK_response-1732720954\",\"rule_query\":\"type:log_detection source:cloudtrail\",\"start_date\":1733584954000,\"suppression_query\":\"env:staging status:low\"},\"type\":\"suppressions\"}}",
77
"encoding": null
88
},
99
"headers": {
@@ -19,20 +19,20 @@
1919
},
2020
"response": {
2121
"body": {
22-
"string": "{\"data\":{\"id\":\"8qj-mmz-zym\",\"attributes\":{\"name\":\"Test-Create_a_suppression_rule_returns_OK_response-1716224823\",\"enabled\":true,\"description\":\"This rule suppresses low-severity signals in staging environments.\",\"rule_query\":\"type:log_detection source:cloudtrail\",\"suppression_query\":\"env:staging status:low\",\"data_exclusion_query\":\"\",\"expiration_date\":1718039223000,\"version\":1,\"creation_date\":1716224823374,\"update_date\":1716224823374,\"creator\":{\"name\":null,\"handle\":\"[email protected]\"},\"updater\":{\"name\":null,\"handle\":\"[email protected]\"}},\"type\":\"suppressions\"}}\n",
22+
"string": "{\"data\":{\"id\":\"ejv-ksi-r4j\",\"type\":\"suppressions\",\"attributes\":{\"creation_date\":1732720954868,\"creator\":{\"handle\":\"[email protected]\",\"name\":\"\"},\"data_exclusion_query\":\"\",\"description\":\"This rule suppresses low-severity signals in staging environments.\",\"editable\":true,\"enabled\":true,\"expiration_date\":1734535354000,\"name\":\"Test-Create_a_suppression_rule_returns_OK_response-1732720954\",\"rule_query\":\"type:log_detection source:cloudtrail\",\"start_date\":1733584954000,\"suppression_query\":\"env:staging status:low\",\"update_date\":1732720954868,\"updater\":{\"handle\":\"[email protected]\",\"name\":\"\"},\"version\":1}}}",
2323
"encoding": null
2424
},
2525
"headers": {
2626
"Content-Type": [
27-
"application/json"
27+
"application/vnd.api+json"
2828
]
2929
},
3030
"status": {
3131
"code": 200,
3232
"message": "OK"
3333
}
3434
},
35-
"recorded_at": "Mon, 20 May 2024 17:07:03 GMT"
35+
"recorded_at": "Wed, 27 Nov 2024 15:22:34 GMT"
3636
},
3737
{
3838
"request": {
@@ -43,24 +43,20 @@
4343
]
4444
},
4545
"method": "delete",
46-
"uri": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/8qj-mmz-zym"
46+
"uri": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/ejv-ksi-r4j"
4747
},
4848
"response": {
4949
"body": {
5050
"string": "",
5151
"encoding": null
5252
},
53-
"headers": {
54-
"Content-Type": [
55-
"text/html; charset=utf-8"
56-
]
57-
},
53+
"headers": {},
5854
"status": {
5955
"code": 204,
6056
"message": "No Content"
6157
}
6258
},
63-
"recorded_at": "Mon, 20 May 2024 17:07:03 GMT"
59+
"recorded_at": "Wed, 27 Nov 2024 15:22:34 GMT"
6460
}
6561
],
6662
"recorded_with": "VCR 6.0.0"
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-05-20T17:07:12.131Z
1+
2024-11-27T15:24:35.169Z

tests/scenarios/cassettes/v2/security_monitoring/Create-a-suppression-rule-with-an-exclusion-query-returns-OK-response.json

+7-11
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"request": {
55
"body": {
6-
"string": "{\"data\":{\"attributes\":{\"data_exclusion_query\":\"account_id:12345\",\"description\":\"This rule suppresses low-severity signals in staging environments.\",\"enabled\":true,\"expiration_date\":1718039232000,\"name\":\"Test-Create_a_suppression_rule_with_an_exclusion_query_returns_OK_response-1716224832\",\"rule_query\":\"type:log_detection source:cloudtrail\"},\"type\":\"suppressions\"}}",
6+
"string": "{\"data\":{\"attributes\":{\"data_exclusion_query\":\"account_id:12345\",\"description\":\"This rule suppresses low-severity signals in staging environments.\",\"enabled\":true,\"expiration_date\":1734535475000,\"name\":\"Test-Create_a_suppression_rule_with_an_exclusion_query_returns_OK_response-1732721075\",\"rule_query\":\"type:log_detection source:cloudtrail\",\"start_date\":1733585075000},\"type\":\"suppressions\"}}",
77
"encoding": null
88
},
99
"headers": {
@@ -19,20 +19,20 @@
1919
},
2020
"response": {
2121
"body": {
22-
"string": "{\"data\":{\"id\":\"i9m-nqb-ets\",\"attributes\":{\"name\":\"Test-Create_a_suppression_rule_with_an_exclusion_query_returns_OK_response-1716224832\",\"enabled\":true,\"description\":\"This rule suppresses low-severity signals in staging environments.\",\"rule_query\":\"type:log_detection source:cloudtrail\",\"suppression_query\":\"\",\"data_exclusion_query\":\"account_id:12345\",\"expiration_date\":1718039232000,\"version\":1,\"creation_date\":1716224832354,\"update_date\":1716224832355,\"creator\":{\"name\":null,\"handle\":\"[email protected]\"},\"updater\":{\"name\":null,\"handle\":\"[email protected]\"}},\"type\":\"suppressions\"}}\n",
22+
"string": "{\"data\":{\"id\":\"rv5-3sh-tvp\",\"type\":\"suppressions\",\"attributes\":{\"creation_date\":1732721075298,\"creator\":{\"handle\":\"[email protected]\",\"name\":\"\"},\"data_exclusion_query\":\"account_id:12345\",\"description\":\"This rule suppresses low-severity signals in staging environments.\",\"editable\":true,\"enabled\":true,\"expiration_date\":1734535475000,\"name\":\"Test-Create_a_suppression_rule_with_an_exclusion_query_returns_OK_response-1732721075\",\"rule_query\":\"type:log_detection source:cloudtrail\",\"start_date\":1733585075000,\"suppression_query\":\"\",\"update_date\":1732721075298,\"updater\":{\"handle\":\"[email protected]\",\"name\":\"\"},\"version\":1}}}",
2323
"encoding": null
2424
},
2525
"headers": {
2626
"Content-Type": [
27-
"application/json"
27+
"application/vnd.api+json"
2828
]
2929
},
3030
"status": {
3131
"code": 200,
3232
"message": "OK"
3333
}
3434
},
35-
"recorded_at": "Mon, 20 May 2024 17:07:12 GMT"
35+
"recorded_at": "Wed, 27 Nov 2024 15:24:35 GMT"
3636
},
3737
{
3838
"request": {
@@ -43,24 +43,20 @@
4343
]
4444
},
4545
"method": "delete",
46-
"uri": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/i9m-nqb-ets"
46+
"uri": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/rv5-3sh-tvp"
4747
},
4848
"response": {
4949
"body": {
5050
"string": "",
5151
"encoding": null
5252
},
53-
"headers": {
54-
"Content-Type": [
55-
"text/html; charset=utf-8"
56-
]
57-
},
53+
"headers": {},
5854
"status": {
5955
"code": 204,
6056
"message": "No Content"
6157
}
6258
},
63-
"recorded_at": "Mon, 20 May 2024 17:07:12 GMT"
59+
"recorded_at": "Wed, 27 Nov 2024 15:24:35 GMT"
6460
}
6561
],
6662
"recorded_with": "VCR 6.0.0"

0 commit comments

Comments
 (0)