Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46991,6 +46991,14 @@ components:
the queries to search signals in the signal explorer.
example: env:staging status:low
type: string
tags:
description: List of tags associated with the suppression rule.
example:
- technique:T1110-brute-force
- source:cloudtrail
items:
type: string
type: array
update_date:
description: A Unix millisecond timestamp given the update date of the suppression
rule.
Expand Down Expand Up @@ -47052,6 +47060,14 @@ components:
same syntax as the queries to search signals in the Signals Explorer.
example: env:staging status:low
type: string
tags:
description: List of tags associated with the suppression rule.
example:
- technique:T1110-brute-force
- source:cloudtrail
items:
type: string
type: array
required:
- name
- enabled
Expand Down Expand Up @@ -47147,6 +47163,14 @@ components:
the queries to search signals in the signal explorer.
example: env:staging status:low
type: string
tags:
description: List of tags associated with the suppression rule.
example:
- technique:T1110-brute-force
- source:cloudtrail
items:
type: string
type: array
version:
description: The current version of the suppression. This is optional, but
it can help prevent concurrent modifications.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ async fn main() {
)
.expiration_date(1638443471000)
.start_date(1637493071000)
.suppression_query("env:staging status:low".to_string()),
.suppression_query("env:staging status:low".to_string())
.tags(vec![
"technique:T1110-brute-force".to_string(),
"source:cloudtrail".to_string(),
]),
SecurityMonitoringSuppressionType::SUPPRESSIONS,
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ pub struct SecurityMonitoringSuppressionAttributes {
/// 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.
#[serde(rename = "suppression_query")]
pub suppression_query: Option<String>,
/// List of tags associated with the suppression rule.
#[serde(rename = "tags")]
pub tags: Option<Vec<String>>,
/// A Unix millisecond timestamp given the update date of the suppression rule.
#[serde(rename = "update_date")]
pub update_date: Option<i64>,
Expand Down Expand Up @@ -74,6 +77,7 @@ impl SecurityMonitoringSuppressionAttributes {
rule_query: None,
start_date: None,
suppression_query: None,
tags: None,
update_date: None,
updater: None,
version: None,
Expand Down Expand Up @@ -137,6 +141,11 @@ impl SecurityMonitoringSuppressionAttributes {
self
}

pub fn tags(mut self, value: Vec<String>) -> Self {
self.tags = Some(value);
self
}

pub fn update_date(mut self, value: i64) -> Self {
self.update_date = Some(value);
self
Expand Down Expand Up @@ -195,6 +204,7 @@ impl<'de> Deserialize<'de> for SecurityMonitoringSuppressionAttributes {
let mut rule_query: Option<String> = None;
let mut start_date: Option<i64> = None;
let mut suppression_query: Option<String> = None;
let mut tags: Option<Vec<String>> = None;
let mut update_date: Option<i64> = None;
let mut updater: Option<crate::datadogV2::model::SecurityMonitoringUser> = None;
let mut version: Option<i32> = None;
Expand Down Expand Up @@ -277,6 +287,12 @@ impl<'de> Deserialize<'de> for SecurityMonitoringSuppressionAttributes {
suppression_query =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"tags" => {
if v.is_null() {
continue;
}
tags = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"update_date" => {
if v.is_null() {
continue;
Expand Down Expand Up @@ -316,6 +332,7 @@ impl<'de> Deserialize<'de> for SecurityMonitoringSuppressionAttributes {
rule_query,
start_date,
suppression_query,
tags,
update_date,
updater,
version,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ pub struct SecurityMonitoringSuppressionCreateAttributes {
/// 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.
#[serde(rename = "suppression_query")]
pub suppression_query: Option<String>,
/// List of tags associated with the suppression rule.
#[serde(rename = "tags")]
pub tags: Option<Vec<String>>,
#[serde(flatten)]
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
#[serde(skip)]
Expand All @@ -57,6 +60,7 @@ impl SecurityMonitoringSuppressionCreateAttributes {
rule_query,
start_date: None,
suppression_query: None,
tags: None,
additional_properties: std::collections::BTreeMap::new(),
_unparsed: false,
}
Expand Down Expand Up @@ -87,6 +91,11 @@ impl SecurityMonitoringSuppressionCreateAttributes {
self
}

pub fn tags(mut self, value: Vec<String>) -> Self {
self.tags = Some(value);
self
}

pub fn additional_properties(
mut self,
value: std::collections::BTreeMap<String, serde_json::Value>,
Expand Down Expand Up @@ -121,6 +130,7 @@ impl<'de> Deserialize<'de> for SecurityMonitoringSuppressionCreateAttributes {
let mut rule_query: Option<String> = None;
let mut start_date: Option<i64> = None;
let mut suppression_query: Option<String> = None;
let mut tags: Option<Vec<String>> = None;
let mut additional_properties: std::collections::BTreeMap<
String,
serde_json::Value,
Expand Down Expand Up @@ -172,6 +182,12 @@ impl<'de> Deserialize<'de> for SecurityMonitoringSuppressionCreateAttributes {
suppression_query =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"tags" => {
if v.is_null() {
continue;
}
tags = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
&_ => {
if let Ok(value) = serde_json::from_value(v.clone()) {
additional_properties.insert(k, value);
Expand All @@ -192,6 +208,7 @@ impl<'de> Deserialize<'de> for SecurityMonitoringSuppressionCreateAttributes {
rule_query,
start_date,
suppression_query,
tags,
additional_properties,
_unparsed,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ pub struct SecurityMonitoringSuppressionUpdateAttributes {
/// 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.
#[serde(rename = "suppression_query")]
pub suppression_query: Option<String>,
/// List of tags associated with the suppression rule.
#[serde(rename = "tags")]
pub tags: Option<Vec<String>>,
/// The current version of the suppression. This is optional, but it can help prevent concurrent modifications.
#[serde(rename = "version")]
pub version: Option<i32>,
Expand All @@ -64,6 +67,7 @@ impl SecurityMonitoringSuppressionUpdateAttributes {
rule_query: None,
start_date: None,
suppression_query: None,
tags: None,
version: None,
additional_properties: std::collections::BTreeMap::new(),
_unparsed: false,
Expand Down Expand Up @@ -110,6 +114,11 @@ impl SecurityMonitoringSuppressionUpdateAttributes {
self
}

pub fn tags(mut self, value: Vec<String>) -> Self {
self.tags = Some(value);
self
}

pub fn version(mut self, value: i32) -> Self {
self.version = Some(value);
self
Expand Down Expand Up @@ -155,6 +164,7 @@ impl<'de> Deserialize<'de> for SecurityMonitoringSuppressionUpdateAttributes {
let mut rule_query: Option<String> = None;
let mut start_date: Option<Option<i64>> = None;
let mut suppression_query: Option<String> = None;
let mut tags: Option<Vec<String>> = None;
let mut version: Option<i32> = None;
let mut additional_properties: std::collections::BTreeMap<
String,
Expand Down Expand Up @@ -210,6 +220,12 @@ impl<'de> Deserialize<'de> for SecurityMonitoringSuppressionUpdateAttributes {
suppression_query =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"tags" => {
if v.is_null() {
continue;
}
tags = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"version" => {
if v.is_null() {
continue;
Expand All @@ -233,6 +249,7 @@ impl<'de> Deserialize<'de> for SecurityMonitoringSuppressionUpdateAttributes {
rule_query,
start_date,
suppression_query,
tags,
version,
additional_properties,
_unparsed,
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-11-27T15:22:34.711Z
2025-11-07T12:27:25.514Z
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"request": {
"body": {
"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\"}}",
"string": "{\"data\":{\"attributes\":{\"description\":\"This rule suppresses low-severity signals in staging environments.\",\"enabled\":true,\"expiration_date\":1764332845000,\"name\":\"Test-Create_a_suppression_rule_returns_OK_response-1762518445\",\"rule_query\":\"type:log_detection source:cloudtrail\",\"start_date\":1763382445000,\"suppression_query\":\"env:staging status:low\",\"tags\":[\"technique:T1110-brute-force\",\"source:cloudtrail\"]},\"type\":\"suppressions\"}}",
"encoding": null
},
"headers": {
Expand All @@ -19,7 +19,7 @@
},
"response": {
"body": {
"string": "{\"data\":{\"id\":\"ejv-ksi-r4j\",\"type\":\"suppressions\",\"attributes\":{\"creation_date\":1732720954868,\"creator\":{\"handle\":\"frog@datadoghq.com\",\"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\":\"frog@datadoghq.com\",\"name\":\"\"},\"version\":1}}}",
"string": "{\"data\":{\"id\":\"oxk-jlo-pc8\",\"type\":\"suppressions\",\"attributes\":{\"creation_date\":1762518446390,\"creator\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"data_exclusion_query\":\"\",\"description\":\"This rule suppresses low-severity signals in staging environments.\",\"editable\":true,\"enabled\":true,\"expiration_date\":1764332845000,\"name\":\"Test-Create_a_suppression_rule_returns_OK_response-1762518445\",\"rule_query\":\"type:log_detection source:cloudtrail\",\"start_date\":1763382445000,\"suppression_query\":\"env:staging status:low\",\"tags\":[\"source:cloudtrail\",\"technique:T1110-brute-force\"],\"update_date\":1762518446390,\"updater\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"version\":1}}}",
"encoding": null
},
"headers": {
Expand All @@ -32,7 +32,7 @@
"message": "OK"
}
},
"recorded_at": "Wed, 27 Nov 2024 15:22:34 GMT"
"recorded_at": "Fri, 07 Nov 2025 12:27:25 GMT"
},
{
"request": {
Expand All @@ -43,7 +43,7 @@
]
},
"method": "delete",
"uri": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/ejv-ksi-r4j"
"uri": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/oxk-jlo-pc8"
},
"response": {
"body": {
Expand All @@ -56,7 +56,7 @@
"message": "No Content"
}
},
"recorded_at": "Wed, 27 Nov 2024 15:22:34 GMT"
"recorded_at": "Fri, 07 Nov 2025 12:27:25 GMT"
}
],
"recorded_with": "VCR 6.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-05-10T16:34:39.853Z
2025-11-07T12:27:26.759Z
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"request": {
"body": {
"string": "{\"data\":{\"attributes\":{\"description\":\"Test-Delete_a_suppression_rule_returns_OK_response-1715358879\",\"enabled\":true,\"name\":\"Test-Delete_a_suppression_rule_returns_OK_response-1715358879\",\"rule_query\":\"source:cloudtrail\",\"suppression_query\":\"env:test\"},\"type\":\"suppressions\"}}",
"string": "{\"data\":{\"attributes\":{\"description\":\"Test-Delete_a_suppression_rule_returns_OK_response-1762518446\",\"enabled\":true,\"name\":\"Test-Delete_a_suppression_rule_returns_OK_response-1762518446\",\"rule_query\":\"source:cloudtrail\",\"suppression_query\":\"env:test\",\"tags\":[\"technique:T1110-brute-force\",\"source:cloudtrail\"]},\"type\":\"suppressions\"}}",
"encoding": null
},
"headers": {
Expand All @@ -19,20 +19,20 @@
},
"response": {
"body": {
"string": "{\"data\":{\"id\":\"csf-zrg-af0\",\"attributes\":{\"name\":\"Test-Delete_a_suppression_rule_returns_OK_response-1715358879\",\"enabled\":true,\"description\":\"Test-Delete_a_suppression_rule_returns_OK_response-1715358879\",\"rule_query\":\"source:cloudtrail\",\"suppression_query\":\"env:test\",\"data_exclusion_query\":\"\",\"version\":1,\"creation_date\":1715358880145,\"update_date\":1715358880145,\"creator\":{\"name\":null,\"handle\":\"frog@datadoghq.com\"},\"updater\":{\"name\":null,\"handle\":\"frog@datadoghq.com\"}},\"type\":\"suppressions\"}}\n",
"string": "{\"data\":{\"id\":\"uea-lab-big\",\"type\":\"suppressions\",\"attributes\":{\"creation_date\":1762518447002,\"creator\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"data_exclusion_query\":\"\",\"description\":\"Test-Delete_a_suppression_rule_returns_OK_response-1762518446\",\"editable\":true,\"enabled\":true,\"name\":\"Test-Delete_a_suppression_rule_returns_OK_response-1762518446\",\"rule_query\":\"source:cloudtrail\",\"suppression_query\":\"env:test\",\"tags\":[\"source:cloudtrail\",\"technique:T1110-brute-force\"],\"update_date\":1762518447002,\"updater\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"version\":1}}}",
"encoding": null
},
"headers": {
"Content-Type": [
"application/json"
"application/vnd.api+json"
]
},
"status": {
"code": 200,
"message": "OK"
}
},
"recorded_at": "Fri, 10 May 2024 16:34:39 GMT"
"recorded_at": "Fri, 07 Nov 2025 12:27:26 GMT"
},
{
"request": {
Expand All @@ -43,24 +43,20 @@
]
},
"method": "delete",
"uri": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/csf-zrg-af0"
"uri": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/uea-lab-big"
},
"response": {
"body": {
"string": "",
"encoding": null
},
"headers": {
"Content-Type": [
"text/html; charset=utf-8"
]
},
"headers": {},
"status": {
"code": 204,
"message": "No Content"
}
},
"recorded_at": "Fri, 10 May 2024 16:34:39 GMT"
"recorded_at": "Fri, 07 Nov 2025 12:27:26 GMT"
},
{
"request": {
Expand All @@ -71,11 +67,11 @@
]
},
"method": "delete",
"uri": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/csf-zrg-af0"
"uri": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/uea-lab-big"
},
"response": {
"body": {
"string": "{\"errors\":[\"not_found(Suppression with ID csf-zrg-af0 not found)\"]}\n",
"string": "{\"errors\":[\"not_found(Suppression with ID uea-lab-big not found)\"]}",
"encoding": null
},
"headers": {
Expand All @@ -88,7 +84,7 @@
"message": "Not Found"
}
},
"recorded_at": "Fri, 10 May 2024 16:34:39 GMT"
"recorded_at": "Fri, 07 Nov 2025 12:27:26 GMT"
}
],
"recorded_with": "VCR 6.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-05-10T16:34:46.398Z
2025-11-07T12:27:27.654Z
Loading