Skip to content

Commit 9dcd22a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add function and cloud_function fields to Azure and GCP scan options (#1842)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 3cf3f08 commit 9dcd22a

15 files changed

Lines changed: 113 additions & 18 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12638,6 +12638,7 @@ components:
1263812638
data:
1263912639
attributes:
1264012640
compliance_host: false
12641+
function: true
1264112642
vuln_containers_os: true
1264212643
vuln_host_os: true
1264312644
id: 12345678-90ab-cdef-1234-567890abcdef
@@ -12652,6 +12653,7 @@ components:
1265212653
data:
1265312654
- attributes:
1265412655
compliance_host: false
12656+
function: true
1265512657
vuln_containers_os: true
1265612658
vuln_host_os: true
1265712659
id: 12345678-90ab-cdef-1234-567890abcdef
@@ -12686,6 +12688,9 @@ components:
1268612688
compliance_host:
1268712689
description: Indicates whether host compliance scanning is enabled.
1268812690
type: boolean
12691+
function:
12692+
description: Indicates if scanning of Azure Functions is enabled.
12693+
type: boolean
1268912694
vuln_containers_os:
1269012695
description: Indicates if scanning for vulnerabilities in containers is enabled.
1269112696
type: boolean
@@ -12733,6 +12738,9 @@ components:
1273312738
compliance_host:
1273412739
description: Indicates whether host compliance scanning is enabled.
1273512740
type: boolean
12741+
function:
12742+
description: Indicates if scanning of Azure Functions is enabled.
12743+
type: boolean
1273612744
vuln_containers_os:
1273712745
description: Indicates if scanning for vulnerabilities in containers is enabled.
1273812746
type: boolean
@@ -40828,6 +40836,7 @@ components:
4082840836
example:
4082940837
data:
4083040838
attributes:
40839+
cloud_function: true
4083140840
compliance_host: false
4083240841
vuln_containers_os: true
4083340842
vuln_host_os: true
@@ -40842,6 +40851,7 @@ components:
4084240851
example:
4084340852
data:
4084440853
- attributes:
40854+
cloud_function: true
4084540855
compliance_host: false
4084640856
vuln_containers_os: true
4084740857
vuln_host_os: true
@@ -40874,6 +40884,9 @@ components:
4087440884
GcpScanOptionsDataAttributes:
4087540885
description: Attributes for GCP scan options configuration.
4087640886
properties:
40887+
cloud_function:
40888+
description: Indicates if scanning of Cloud Functions is enabled.
40889+
type: boolean
4087740890
compliance_host:
4087840891
description: Indicates whether host compliance scanning is enabled.
4087940892
type: boolean
@@ -40921,6 +40934,9 @@ components:
4092140934
GcpScanOptionsInputUpdateDataAttributes:
4092240935
description: Attributes for updating GCP scan options configuration.
4092340936
properties:
40937+
cloud_function:
40938+
description: Indicates if scanning of Cloud Functions is enabled.
40939+
type: boolean
4092440940
compliance_host:
4092540941
description: Indicates whether host compliance scanning is enabled.
4092640942
type: boolean

examples/v2_agentless-scanning_CreateAzureScanOptions.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ async fn main() {
1515
)
1616
.attributes(
1717
AzureScanOptionsDataAttributes::new()
18+
.function(true)
1819
.vuln_containers_os(true)
1920
.vuln_host_os(true),
2021
),

examples/v2_agentless-scanning_CreateGcpScanOptions.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ async fn main() {
1616
)
1717
.attributes(
1818
GcpScanOptionsDataAttributes::new()
19+
.cloud_function(true)
1920
.vuln_containers_os(true)
2021
.vuln_host_os(true),
2122
),

examples/v2_agentless-scanning_UpdateGcpScanOptions.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ async fn main() {
1313
"api-spec-test".to_string(),
1414
GcpScanOptionsInputUpdateDataType::GCP_SCAN_OPTIONS,
1515
)
16-
.attributes(GcpScanOptionsInputUpdateDataAttributes::new().vuln_containers_os(false)),
16+
.attributes(
17+
GcpScanOptionsInputUpdateDataAttributes::new()
18+
.cloud_function(true)
19+
.vuln_containers_os(false),
20+
),
1721
);
1822
let configuration = datadog::Configuration::new();
1923
let api = AgentlessScanningAPI::with_config(configuration);

src/datadogV2/model/model_azure_scan_options_data_attributes.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ pub struct AzureScanOptionsDataAttributes {
1414
/// Indicates whether host compliance scanning is enabled.
1515
#[serde(rename = "compliance_host")]
1616
pub compliance_host: Option<bool>,
17+
/// Indicates if scanning of Azure Functions is enabled.
18+
#[serde(rename = "function")]
19+
pub function: Option<bool>,
1720
/// Indicates if scanning for vulnerabilities in containers is enabled.
1821
#[serde(rename = "vuln_containers_os")]
1922
pub vuln_containers_os: Option<bool>,
@@ -31,6 +34,7 @@ impl AzureScanOptionsDataAttributes {
3134
pub fn new() -> AzureScanOptionsDataAttributes {
3235
AzureScanOptionsDataAttributes {
3336
compliance_host: None,
37+
function: None,
3438
vuln_containers_os: None,
3539
vuln_host_os: None,
3640
additional_properties: std::collections::BTreeMap::new(),
@@ -43,6 +47,11 @@ impl AzureScanOptionsDataAttributes {
4347
self
4448
}
4549

50+
pub fn function(mut self, value: bool) -> Self {
51+
self.function = Some(value);
52+
self
53+
}
54+
4655
pub fn vuln_containers_os(mut self, value: bool) -> Self {
4756
self.vuln_containers_os = Some(value);
4857
self
@@ -86,6 +95,7 @@ impl<'de> Deserialize<'de> for AzureScanOptionsDataAttributes {
8695
M: MapAccess<'a>,
8796
{
8897
let mut compliance_host: Option<bool> = None;
98+
let mut function: Option<bool> = None;
8999
let mut vuln_containers_os: Option<bool> = None;
90100
let mut vuln_host_os: Option<bool> = None;
91101
let mut additional_properties: std::collections::BTreeMap<
@@ -103,6 +113,12 @@ impl<'de> Deserialize<'de> for AzureScanOptionsDataAttributes {
103113
compliance_host =
104114
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
105115
}
116+
"function" => {
117+
if v.is_null() {
118+
continue;
119+
}
120+
function = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
121+
}
106122
"vuln_containers_os" => {
107123
if v.is_null() {
108124
continue;
@@ -127,6 +143,7 @@ impl<'de> Deserialize<'de> for AzureScanOptionsDataAttributes {
127143

128144
let content = AzureScanOptionsDataAttributes {
129145
compliance_host,
146+
function,
130147
vuln_containers_os,
131148
vuln_host_os,
132149
additional_properties,

src/datadogV2/model/model_azure_scan_options_input_update_data_attributes.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ pub struct AzureScanOptionsInputUpdateDataAttributes {
1414
/// Indicates whether host compliance scanning is enabled.
1515
#[serde(rename = "compliance_host")]
1616
pub compliance_host: Option<bool>,
17+
/// Indicates if scanning of Azure Functions is enabled.
18+
#[serde(rename = "function")]
19+
pub function: Option<bool>,
1720
/// Indicates if scanning for vulnerabilities in containers is enabled.
1821
#[serde(rename = "vuln_containers_os")]
1922
pub vuln_containers_os: Option<bool>,
@@ -31,6 +34,7 @@ impl AzureScanOptionsInputUpdateDataAttributes {
3134
pub fn new() -> AzureScanOptionsInputUpdateDataAttributes {
3235
AzureScanOptionsInputUpdateDataAttributes {
3336
compliance_host: None,
37+
function: None,
3438
vuln_containers_os: None,
3539
vuln_host_os: None,
3640
additional_properties: std::collections::BTreeMap::new(),
@@ -43,6 +47,11 @@ impl AzureScanOptionsInputUpdateDataAttributes {
4347
self
4448
}
4549

50+
pub fn function(mut self, value: bool) -> Self {
51+
self.function = Some(value);
52+
self
53+
}
54+
4655
pub fn vuln_containers_os(mut self, value: bool) -> Self {
4756
self.vuln_containers_os = Some(value);
4857
self
@@ -86,6 +95,7 @@ impl<'de> Deserialize<'de> for AzureScanOptionsInputUpdateDataAttributes {
8695
M: MapAccess<'a>,
8796
{
8897
let mut compliance_host: Option<bool> = None;
98+
let mut function: Option<bool> = None;
8999
let mut vuln_containers_os: Option<bool> = None;
90100
let mut vuln_host_os: Option<bool> = None;
91101
let mut additional_properties: std::collections::BTreeMap<
@@ -103,6 +113,12 @@ impl<'de> Deserialize<'de> for AzureScanOptionsInputUpdateDataAttributes {
103113
compliance_host =
104114
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
105115
}
116+
"function" => {
117+
if v.is_null() {
118+
continue;
119+
}
120+
function = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
121+
}
106122
"vuln_containers_os" => {
107123
if v.is_null() {
108124
continue;
@@ -127,6 +143,7 @@ impl<'de> Deserialize<'de> for AzureScanOptionsInputUpdateDataAttributes {
127143

128144
let content = AzureScanOptionsInputUpdateDataAttributes {
129145
compliance_host,
146+
function,
130147
vuln_containers_os,
131148
vuln_host_os,
132149
additional_properties,

src/datadogV2/model/model_gcp_scan_options_data_attributes.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ use std::fmt::{self, Formatter};
1111
#[skip_serializing_none]
1212
#[derive(Clone, Debug, PartialEq, Serialize)]
1313
pub struct GcpScanOptionsDataAttributes {
14+
/// Indicates if scanning of Cloud Functions is enabled.
15+
#[serde(rename = "cloud_function")]
16+
pub cloud_function: Option<bool>,
1417
/// Indicates whether host compliance scanning is enabled.
1518
#[serde(rename = "compliance_host")]
1619
pub compliance_host: Option<bool>,
@@ -30,6 +33,7 @@ pub struct GcpScanOptionsDataAttributes {
3033
impl GcpScanOptionsDataAttributes {
3134
pub fn new() -> GcpScanOptionsDataAttributes {
3235
GcpScanOptionsDataAttributes {
36+
cloud_function: None,
3337
compliance_host: None,
3438
vuln_containers_os: None,
3539
vuln_host_os: None,
@@ -38,6 +42,11 @@ impl GcpScanOptionsDataAttributes {
3842
}
3943
}
4044

45+
pub fn cloud_function(mut self, value: bool) -> Self {
46+
self.cloud_function = Some(value);
47+
self
48+
}
49+
4150
pub fn compliance_host(mut self, value: bool) -> Self {
4251
self.compliance_host = Some(value);
4352
self
@@ -85,6 +94,7 @@ impl<'de> Deserialize<'de> for GcpScanOptionsDataAttributes {
8594
where
8695
M: MapAccess<'a>,
8796
{
97+
let mut cloud_function: Option<bool> = None;
8898
let mut compliance_host: Option<bool> = None;
8999
let mut vuln_containers_os: Option<bool> = None;
90100
let mut vuln_host_os: Option<bool> = None;
@@ -96,6 +106,13 @@ impl<'de> Deserialize<'de> for GcpScanOptionsDataAttributes {
96106

97107
while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
98108
match k.as_str() {
109+
"cloud_function" => {
110+
if v.is_null() {
111+
continue;
112+
}
113+
cloud_function =
114+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
115+
}
99116
"compliance_host" => {
100117
if v.is_null() {
101118
continue;
@@ -126,6 +143,7 @@ impl<'de> Deserialize<'de> for GcpScanOptionsDataAttributes {
126143
}
127144

128145
let content = GcpScanOptionsDataAttributes {
146+
cloud_function,
129147
compliance_host,
130148
vuln_containers_os,
131149
vuln_host_os,

src/datadogV2/model/model_gcp_scan_options_input_update_data_attributes.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ use std::fmt::{self, Formatter};
1111
#[skip_serializing_none]
1212
#[derive(Clone, Debug, PartialEq, Serialize)]
1313
pub struct GcpScanOptionsInputUpdateDataAttributes {
14+
/// Indicates if scanning of Cloud Functions is enabled.
15+
#[serde(rename = "cloud_function")]
16+
pub cloud_function: Option<bool>,
1417
/// Indicates whether host compliance scanning is enabled.
1518
#[serde(rename = "compliance_host")]
1619
pub compliance_host: Option<bool>,
@@ -30,6 +33,7 @@ pub struct GcpScanOptionsInputUpdateDataAttributes {
3033
impl GcpScanOptionsInputUpdateDataAttributes {
3134
pub fn new() -> GcpScanOptionsInputUpdateDataAttributes {
3235
GcpScanOptionsInputUpdateDataAttributes {
36+
cloud_function: None,
3337
compliance_host: None,
3438
vuln_containers_os: None,
3539
vuln_host_os: None,
@@ -38,6 +42,11 @@ impl GcpScanOptionsInputUpdateDataAttributes {
3842
}
3943
}
4044

45+
pub fn cloud_function(mut self, value: bool) -> Self {
46+
self.cloud_function = Some(value);
47+
self
48+
}
49+
4150
pub fn compliance_host(mut self, value: bool) -> Self {
4251
self.compliance_host = Some(value);
4352
self
@@ -85,6 +94,7 @@ impl<'de> Deserialize<'de> for GcpScanOptionsInputUpdateDataAttributes {
8594
where
8695
M: MapAccess<'a>,
8796
{
97+
let mut cloud_function: Option<bool> = None;
8898
let mut compliance_host: Option<bool> = None;
8999
let mut vuln_containers_os: Option<bool> = None;
90100
let mut vuln_host_os: Option<bool> = None;
@@ -96,6 +106,13 @@ impl<'de> Deserialize<'de> for GcpScanOptionsInputUpdateDataAttributes {
96106

97107
while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
98108
match k.as_str() {
109+
"cloud_function" => {
110+
if v.is_null() {
111+
continue;
112+
}
113+
cloud_function =
114+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
115+
}
99116
"compliance_host" => {
100117
if v.is_null() {
101118
continue;
@@ -126,6 +143,7 @@ impl<'de> Deserialize<'de> for GcpScanOptionsInputUpdateDataAttributes {
126143
}
127144

128145
let content = GcpScanOptionsInputUpdateDataAttributes {
146+
cloud_function,
129147
compliance_host,
130148
vuln_containers_os,
131149
vuln_host_os,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-10-23T22:21:55.015Z
1+
2026-07-17T06:38:46.211Z

tests/scenarios/cassettes/v2/agentless_scanning/Create-Azure-scan-options-returns-Created-response.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"request": {
55
"body": {
6-
"string": "{\"data\":{\"attributes\":{\"vuln_containers_os\":true,\"vuln_host_os\":true},\"id\":\"12345678-90ab-cdef-1234-567890abcdef\",\"type\":\"azure_scan_options\"}}",
6+
"string": "{\"data\":{\"attributes\":{\"function\":true,\"vuln_containers_os\":true,\"vuln_host_os\":true},\"id\":\"12345678-90ab-cdef-1234-567890abcdef\",\"type\":\"azure_scan_options\"}}",
77
"encoding": null
88
},
99
"headers": {
@@ -19,7 +19,7 @@
1919
},
2020
"response": {
2121
"body": {
22-
"string": "{\"data\":{\"id\":\"12345678-90ab-cdef-1234-567890abcdef\",\"type\":\"azure_scan_options\",\"attributes\":{\"vuln_containers_os\":true,\"vuln_host_os\":true}}}",
22+
"string": "{\"data\":{\"id\":\"12345678-90ab-cdef-1234-567890abcdef\",\"type\":\"azure_scan_options\",\"attributes\":{\"compliance_host\":false,\"function\":true,\"vuln_containers_os\":true,\"vuln_host_os\":true}}}",
2323
"encoding": null
2424
},
2525
"headers": {
@@ -32,7 +32,7 @@
3232
"message": "Created"
3333
}
3434
},
35-
"recorded_at": "Thu, 23 Oct 2025 22:21:55 GMT"
35+
"recorded_at": "Fri, 17 Jul 2026 06:38:46 GMT"
3636
},
3737
{
3838
"request": {
@@ -60,7 +60,7 @@
6060
"message": "OK"
6161
}
6262
},
63-
"recorded_at": "Thu, 23 Oct 2025 22:21:55 GMT"
63+
"recorded_at": "Fri, 17 Jul 2026 06:38:46 GMT"
6464
}
6565
],
6666
"recorded_with": "VCR 6.0.0"

0 commit comments

Comments
 (0)