Skip to content

Commit a347460

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 310d812 of spec repo
1 parent e187ccb commit a347460

27 files changed

+466
-261
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52069,6 +52069,8 @@ components:
5206952069
maximum: 5
5207052070
minimum: 1
5207152071
type: integer
52072+
suppressions:
52073+
$ref: '#/components/schemas/SensitiveDataScannerSuppressions'
5207252074
tags:
5207352075
description: List of tags.
5207452076
items:
@@ -52290,6 +52292,41 @@ components:
5229052292
type:
5229152293
$ref: '#/components/schemas/SensitiveDataScannerStandardPatternType'
5229252294
type: object
52295+
SensitiveDataScannerSuppressions:
52296+
description: 'Object describing the suppressions for a rule. There are three
52297+
types of suppressions, `starts_with`, `ends_with`, and `exact_match`.
52298+
52299+
Suppressed matches are not obfuscated, counted in metrics, or displayed in
52300+
the Findings page.'
52301+
properties:
52302+
ends_with:
52303+
description: List of strings to use for suppression of matches ending with
52304+
these strings.
52305+
example:
52306+
- '@example.com'
52307+
- example.com
52308+
items:
52309+
type: string
52310+
type: array
52311+
exact_match:
52312+
description: List of strings to use for suppression of matches exactly matching
52313+
these strings.
52314+
example:
52315+
- admin@example.com
52316+
- user@example.com
52317+
items:
52318+
type: string
52319+
type: array
52320+
starts_with:
52321+
description: List of strings to use for suppression of matches starting
52322+
with these strings.
52323+
example:
52324+
- admin
52325+
- user
52326+
items:
52327+
type: string
52328+
type: array
52329+
type: object
5229352330
SensitiveDataScannerTextReplacement:
5229452331
description: Object describing how the scanned event will be replaced.
5229552332
properties:

src/datadogV2/model/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6434,6 +6434,8 @@ pub mod model_sensitive_data_scanner_rule_attributes;
64346434
pub use self::model_sensitive_data_scanner_rule_attributes::SensitiveDataScannerRuleAttributes;
64356435
pub mod model_sensitive_data_scanner_included_keyword_configuration;
64366436
pub use self::model_sensitive_data_scanner_included_keyword_configuration::SensitiveDataScannerIncludedKeywordConfiguration;
6437+
pub mod model_sensitive_data_scanner_suppressions;
6438+
pub use self::model_sensitive_data_scanner_suppressions::SensitiveDataScannerSuppressions;
64376439
pub mod model_sensitive_data_scanner_text_replacement;
64386440
pub use self::model_sensitive_data_scanner_text_replacement::SensitiveDataScannerTextReplacement;
64396441
pub mod model_sensitive_data_scanner_text_replacement_type;

src/datadogV2/model/model_sensitive_data_scanner_rule_attributes.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ pub struct SensitiveDataScannerRuleAttributes {
4040
/// Integer from 1 (high) to 5 (low) indicating rule issue severity.
4141
#[serde(rename = "priority")]
4242
pub priority: Option<i64>,
43+
/// Object describing the suppressions for a rule. There are three types of suppressions, `starts_with`, `ends_with`, and `exact_match`.
44+
/// Suppressed matches are not obfuscated, counted in metrics, or displayed in the Findings page.
45+
#[serde(rename = "suppressions")]
46+
pub suppressions: Option<crate::datadogV2::model::SensitiveDataScannerSuppressions>,
4347
/// List of tags.
4448
#[serde(rename = "tags")]
4549
pub tags: Option<Vec<String>>,
@@ -64,6 +68,7 @@ impl SensitiveDataScannerRuleAttributes {
6468
namespaces: None,
6569
pattern: None,
6670
priority: None,
71+
suppressions: None,
6772
tags: None,
6873
text_replacement: None,
6974
additional_properties: std::collections::BTreeMap::new(),
@@ -114,6 +119,14 @@ impl SensitiveDataScannerRuleAttributes {
114119
self
115120
}
116121

122+
pub fn suppressions(
123+
mut self,
124+
value: crate::datadogV2::model::SensitiveDataScannerSuppressions,
125+
) -> Self {
126+
self.suppressions = Some(value);
127+
self
128+
}
129+
117130
pub fn tags(mut self, value: Vec<String>) -> Self {
118131
self.tags = Some(value);
119132
self
@@ -169,6 +182,9 @@ impl<'de> Deserialize<'de> for SensitiveDataScannerRuleAttributes {
169182
let mut namespaces: Option<Vec<String>> = None;
170183
let mut pattern: Option<String> = None;
171184
let mut priority: Option<i64> = None;
185+
let mut suppressions: Option<
186+
crate::datadogV2::model::SensitiveDataScannerSuppressions,
187+
> = None;
172188
let mut tags: Option<Vec<String>> = None;
173189
let mut text_replacement: Option<
174190
crate::datadogV2::model::SensitiveDataScannerTextReplacement,
@@ -232,6 +248,13 @@ impl<'de> Deserialize<'de> for SensitiveDataScannerRuleAttributes {
232248
}
233249
priority = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
234250
}
251+
"suppressions" => {
252+
if v.is_null() {
253+
continue;
254+
}
255+
suppressions =
256+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
257+
}
235258
"tags" => {
236259
if v.is_null() {
237260
continue;
@@ -262,6 +285,7 @@ impl<'de> Deserialize<'de> for SensitiveDataScannerRuleAttributes {
262285
namespaces,
263286
pattern,
264287
priority,
288+
suppressions,
265289
tags,
266290
text_replacement,
267291
additional_properties,
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
// This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
// Copyright 2019-Present Datadog, Inc.
4+
use serde::de::{Error, MapAccess, Visitor};
5+
use serde::{Deserialize, Deserializer, Serialize};
6+
use serde_with::skip_serializing_none;
7+
use std::fmt::{self, Formatter};
8+
9+
/// Object describing the suppressions for a rule. There are three types of suppressions, `starts_with`, `ends_with`, and `exact_match`.
10+
/// Suppressed matches are not obfuscated, counted in metrics, or displayed in the Findings page.
11+
#[non_exhaustive]
12+
#[skip_serializing_none]
13+
#[derive(Clone, Debug, PartialEq, Serialize)]
14+
pub struct SensitiveDataScannerSuppressions {
15+
/// List of strings to use for suppression of matches ending with these strings.
16+
#[serde(rename = "ends_with")]
17+
pub ends_with: Option<Vec<String>>,
18+
/// List of strings to use for suppression of matches exactly matching these strings.
19+
#[serde(rename = "exact_match")]
20+
pub exact_match: Option<Vec<String>>,
21+
/// List of strings to use for suppression of matches starting with these strings.
22+
#[serde(rename = "starts_with")]
23+
pub starts_with: Option<Vec<String>>,
24+
#[serde(flatten)]
25+
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
26+
#[serde(skip)]
27+
#[serde(default)]
28+
pub(crate) _unparsed: bool,
29+
}
30+
31+
impl SensitiveDataScannerSuppressions {
32+
pub fn new() -> SensitiveDataScannerSuppressions {
33+
SensitiveDataScannerSuppressions {
34+
ends_with: None,
35+
exact_match: None,
36+
starts_with: None,
37+
additional_properties: std::collections::BTreeMap::new(),
38+
_unparsed: false,
39+
}
40+
}
41+
42+
pub fn ends_with(mut self, value: Vec<String>) -> Self {
43+
self.ends_with = Some(value);
44+
self
45+
}
46+
47+
pub fn exact_match(mut self, value: Vec<String>) -> Self {
48+
self.exact_match = Some(value);
49+
self
50+
}
51+
52+
pub fn starts_with(mut self, value: Vec<String>) -> Self {
53+
self.starts_with = Some(value);
54+
self
55+
}
56+
57+
pub fn additional_properties(
58+
mut self,
59+
value: std::collections::BTreeMap<String, serde_json::Value>,
60+
) -> Self {
61+
self.additional_properties = value;
62+
self
63+
}
64+
}
65+
66+
impl Default for SensitiveDataScannerSuppressions {
67+
fn default() -> Self {
68+
Self::new()
69+
}
70+
}
71+
72+
impl<'de> Deserialize<'de> for SensitiveDataScannerSuppressions {
73+
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
74+
where
75+
D: Deserializer<'de>,
76+
{
77+
struct SensitiveDataScannerSuppressionsVisitor;
78+
impl<'a> Visitor<'a> for SensitiveDataScannerSuppressionsVisitor {
79+
type Value = SensitiveDataScannerSuppressions;
80+
81+
fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result {
82+
f.write_str("a mapping")
83+
}
84+
85+
fn visit_map<M>(self, mut map: M) -> Result<Self::Value, M::Error>
86+
where
87+
M: MapAccess<'a>,
88+
{
89+
let mut ends_with: Option<Vec<String>> = None;
90+
let mut exact_match: Option<Vec<String>> = None;
91+
let mut starts_with: Option<Vec<String>> = None;
92+
let mut additional_properties: std::collections::BTreeMap<
93+
String,
94+
serde_json::Value,
95+
> = std::collections::BTreeMap::new();
96+
let mut _unparsed = false;
97+
98+
while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
99+
match k.as_str() {
100+
"ends_with" => {
101+
if v.is_null() {
102+
continue;
103+
}
104+
ends_with = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
105+
}
106+
"exact_match" => {
107+
if v.is_null() {
108+
continue;
109+
}
110+
exact_match =
111+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
112+
}
113+
"starts_with" => {
114+
if v.is_null() {
115+
continue;
116+
}
117+
starts_with =
118+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
119+
}
120+
&_ => {
121+
if let Ok(value) = serde_json::from_value(v.clone()) {
122+
additional_properties.insert(k, value);
123+
}
124+
}
125+
}
126+
}
127+
128+
let content = SensitiveDataScannerSuppressions {
129+
ends_with,
130+
exact_match,
131+
starts_with,
132+
additional_properties,
133+
_unparsed,
134+
};
135+
136+
Ok(content)
137+
}
138+
}
139+
140+
deserializer.deserialize_any(SensitiveDataScannerSuppressionsVisitor)
141+
}
142+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2022-12-09T09:52:45.850Z
1+
2026-01-15T19:26:36.689Z

tests/scenarios/cassettes/v2/sensitive_data_scanner/Create-Scanning-Group-returns-OK-response.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,29 @@
99
]
1010
},
1111
"method": "get",
12-
"uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config"
12+
"uri": "https://frog.datadoghq.com/api/v2/sensitive-data-scanner/config"
1313
},
1414
"response": {
1515
"body": {
16-
"string": "{\"meta\":{\"count_limit\":100,\"version\":1189,\"group_count_limit\":20,\"is_pci_compliant\":false,\"has_highlight_enabled\":true},\"data\":{\"relationships\":{\"groups\":{\"data\":[]}},\"attributes\":{},\"type\":\"sensitive_data_scanner_configuration\",\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\"}}\n",
16+
"string": "{\"data\":{\"attributes\":{},\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"relationships\":{\"groups\":{\"data\":[{\"id\":\"d2665de8-b577-4d71-b1b8-4355b1aaf2c6\",\"type\":\"sensitive_data_scanner_group\"},{\"id\":\"ec9a039b-523c-4b48-af30-62bb2838610f\",\"type\":\"sensitive_data_scanner_group\"},{\"id\":\"83b2d015-c3e1-47bb-aef0-15763bc7ae1f\",\"type\":\"sensitive_data_scanner_group\"},{\"id\":\"d9ff2a5f-698a-4743-a80a-e669fd23a3a9\",\"type\":\"sensitive_data_scanner_group\"},{\"id\":\"b6088534-c2a8-4ae1-8bdb-b3923199caf3\",\"type\":\"sensitive_data_scanner_group\"}]}},\"type\":\"sensitive_data_scanner_configuration\"},\"included\":[{\"attributes\":{\"description\":\"\",\"filter\":{\"query\":\"*\"},\"is_enabled\":false,\"name\":\"Test-Typescript-Create_Scanning_Group_returns_OK_response-1766488603\",\"product_list\":[\"logs\"],\"samplings\":[]},\"id\":\"d2665de8-b577-4d71-b1b8-4355b1aaf2c6\",\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}},\"type\":\"sensitive_data_scanner_group\"},{\"attributes\":{\"description\":\"\",\"filter\":{\"query\":\"*\"},\"is_enabled\":false,\"name\":\"my-test-group\",\"product_list\":[\"logs\"],\"samplings\":[{\"product\":\"logs\",\"rate\":100}]},\"id\":\"ec9a039b-523c-4b48-af30-62bb2838610f\",\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}},\"type\":\"sensitive_data_scanner_group\"},{\"attributes\":{\"description\":\"\",\"filter\":{\"query\":\"*\"},\"is_enabled\":false,\"name\":\"my-test-group\",\"product_list\":[\"logs\"],\"samplings\":[{\"product\":\"logs\",\"rate\":100}]},\"id\":\"83b2d015-c3e1-47bb-aef0-15763bc7ae1f\",\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}},\"type\":\"sensitive_data_scanner_group\"},{\"attributes\":{\"description\":\"\",\"filter\":{\"query\":\"*\"},\"is_enabled\":false,\"name\":\"my-test-group\",\"product_list\":[\"logs\"],\"samplings\":[{\"product\":\"logs\",\"rate\":100}]},\"id\":\"d9ff2a5f-698a-4743-a80a-e669fd23a3a9\",\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}},\"type\":\"sensitive_data_scanner_group\"},{\"attributes\":{\"description\":\"\",\"filter\":{\"query\":\"*\"},\"is_enabled\":false,\"name\":\"my-test-group\",\"product_list\":[\"logs\"],\"samplings\":[{\"product\":\"logs\",\"rate\":100}]},\"id\":\"b6088534-c2a8-4ae1-8bdb-b3923199caf3\",\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}},\"type\":\"sensitive_data_scanner_group\"}],\"meta\":{\"count_limit\":500,\"group_count_limit\":20,\"has_cascading_enabled\":false,\"has_highlight_enabled\":true,\"has_multi_pass_enabled\":true,\"is_configuration_superseded\":false,\"is_float_sampling_rate_enabled\":false,\"is_pci_compliant\":false,\"min_sampling_rate\":10,\"version\":275775}}",
1717
"encoding": null
1818
},
1919
"headers": {
2020
"Content-Type": [
21-
"application/json"
21+
"application/vnd.api+json"
2222
]
2323
},
2424
"status": {
2525
"code": 200,
2626
"message": "OK"
2727
}
2828
},
29-
"recorded_at": "Fri, 09 Dec 2022 09:52:45 GMT"
29+
"recorded_at": "Thu, 15 Jan 2026 19:26:36 GMT"
3030
},
3131
{
3232
"request": {
3333
"body": {
34-
"string": "{\"data\":{\"attributes\":{\"filter\":{\"query\":\"*\"},\"is_enabled\":false,\"name\":\"Test-Create_Scanning_Group_returns_OK_response-1670579565\",\"product_list\":[\"logs\"]},\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}},\"type\":\"sensitive_data_scanner_group\"},\"meta\":{}}",
34+
"string": "{\"data\":{\"attributes\":{\"filter\":{\"query\":\"*\"},\"is_enabled\":false,\"name\":\"Test-Create_Scanning_Group_returns_OK_response-1768505196\",\"product_list\":[\"logs\"]},\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}},\"type\":\"sensitive_data_scanner_group\"},\"meta\":{}}",
3535
"encoding": null
3636
},
3737
"headers": {
@@ -43,24 +43,24 @@
4343
]
4444
},
4545
"method": "post",
46-
"uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/groups"
46+
"uri": "https://frog.datadoghq.com/api/v2/sensitive-data-scanner/config/groups"
4747
},
4848
"response": {
4949
"body": {
50-
"string": "{\"meta\":{\"version\":1190},\"data\":{\"relationships\":{\"rules\":{\"data\":[]},\"configuration\":{\"data\":{\"type\":\"sensitive_data_scanner_configuration\",\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\"}}},\"attributes\":{\"is_enabled\":false,\"filter\":{\"query\":\"*\"},\"product_list\":[\"logs\"],\"name\":\"Test-Create_Scanning_Group_returns_OK_response-1670579565\"},\"type\":\"sensitive_data_scanner_group\",\"id\":\"RJDd4r3FQ2CpbYFQIL1KIA\"}}\n",
50+
"string": "{\"data\":{\"id\":\"e6722da9-8d8d-4646-adff-f6a6795e5091\",\"type\":\"sensitive_data_scanner_group\",\"attributes\":{\"description\":\"\",\"filter\":{\"query\":\"*\"},\"is_enabled\":false,\"name\":\"Test-Create_Scanning_Group_returns_OK_response-1768505196\",\"product_list\":[\"logs\"],\"samplings\":[]},\"relationships\":{\"configuration\":{\"data\":{\"id\":\"7957915c634d4dcb581fa154157f5ad9c2947f50be632fb5599862069f4d2d87\",\"type\":\"sensitive_data_scanner_configuration\"}},\"rules\":{\"data\":[]}}},\"meta\":{\"version\":275776}}",
5151
"encoding": null
5252
},
5353
"headers": {
5454
"Content-Type": [
55-
"application/json"
55+
"application/vnd.api+json"
5656
]
5757
},
5858
"status": {
59-
"code": 200,
60-
"message": "OK"
59+
"code": 201,
60+
"message": "Created"
6161
}
6262
},
63-
"recorded_at": "Fri, 09 Dec 2022 09:52:45 GMT"
63+
"recorded_at": "Thu, 15 Jan 2026 19:26:36 GMT"
6464
},
6565
{
6666
"request": {
@@ -77,24 +77,24 @@
7777
]
7878
},
7979
"method": "delete",
80-
"uri": "https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/groups/RJDd4r3FQ2CpbYFQIL1KIA"
80+
"uri": "https://frog.datadoghq.com/api/v2/sensitive-data-scanner/config/groups/e6722da9-8d8d-4646-adff-f6a6795e5091"
8181
},
8282
"response": {
8383
"body": {
84-
"string": "{\"meta\":{\"version\":1191}}\n",
84+
"string": "{\"meta\":{\"version\":275777}}",
8585
"encoding": null
8686
},
8787
"headers": {
8888
"Content-Type": [
89-
"application/json"
89+
"application/vnd.api+json"
9090
]
9191
},
9292
"status": {
9393
"code": 200,
9494
"message": "OK"
9595
}
9696
},
97-
"recorded_at": "Fri, 09 Dec 2022 09:52:45 GMT"
97+
"recorded_at": "Thu, 15 Jan 2026 19:26:36 GMT"
9898
}
9999
],
100100
"recorded_with": "VCR 6.0.0"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-05-30T17:17:05.785Z
1+
2026-01-15T19:26:38.008Z

tests/scenarios/cassettes/v2/sensitive_data_scanner/Create-Scanning-Rule-returns-Bad-Request-response.json

Lines changed: 19 additions & 19 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-05-30T17:17:07.743Z
1+
2026-01-15T19:26:39.695Z

tests/scenarios/cassettes/v2/sensitive_data_scanner/Create-Scanning-Rule-returns-OK-response.json

Lines changed: 25 additions & 25 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)