Skip to content

Commit 242af28

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a50c4df8 of spec repo
1 parent 4886682 commit 242af28

14 files changed

+83
-42
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-04-10 17:49:39.704122",
8-
"spec_repo_commit": "bb0f8c92"
7+
"regenerated": "2024-04-10 19:05:41.073209",
8+
"spec_repo_commit": "a50c4df8"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-04-10 17:49:39.721568",
13-
"spec_repo_commit": "bb0f8c92"
12+
"regenerated": "2024-04-10 19:05:41.090966",
13+
"spec_repo_commit": "a50c4df8"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

+9-2
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ components:
9090
description: Regions to exclude.
9191
type: string
9292
type: array
93+
extended_resource_collection_enabled:
94+
default: false
95+
description: Whether Datadog collects additional attributes and configuration
96+
information about the resources in your AWS account. Required for `cspm_resource_collection`.
97+
example: true
98+
type: boolean
9399
filter_tags:
94100
description: 'The array of EC2 tags (in the form `key:value`) defines a
95101
filter that Datadog uses when collecting metrics from EC2.
@@ -128,8 +134,9 @@ components:
128134
type: boolean
129135
resource_collection_enabled:
130136
default: false
131-
description: Whether Datadog collects a standard set of resources from your
132-
AWS account.
137+
deprecated: true
138+
description: Deprecated in favor of 'extended_resource_collection_enabled'.
139+
Whether Datadog collects a standard set of resources from your AWS account.
133140
example: true
134141
type: boolean
135142
role_name:

examples/v1_aws-integration_create_aws_account.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ async fn main() {
1111
.account_specific_namespace_rules(BTreeMap::from([("auto_scaling".to_string(), false)]))
1212
.cspm_resource_collection_enabled(true)
1313
.excluded_regions(vec!["us-east-1".to_string(), "us-west-2".to_string()])
14+
.extended_resource_collection_enabled(true)
1415
.filter_tags(vec!["$KEY:$VALUE".to_string()])
1516
.host_tags(vec!["$KEY:$VALUE".to_string()])
1617
.metrics_collection_enabled(false)
17-
.resource_collection_enabled(true)
1818
.role_name("DatadogAWSIntegrationRole".to_string());
1919
let configuration = datadog::Configuration::new();
2020
let api = AWSIntegrationAPI::with_config(configuration);

examples/v1_aws-integration_create_new_aws_external_id.rs

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ async fn main() {
1414
]))
1515
.cspm_resource_collection_enabled(true)
1616
.excluded_regions(vec!["us-east-1".to_string(), "us-west-2".to_string()])
17+
.extended_resource_collection_enabled(true)
1718
.filter_tags(vec!["$KEY:$VALUE".to_string()])
1819
.host_tags(vec!["$KEY:$VALUE".to_string()])
1920
.metrics_collection_enabled(false)

examples/v1_aws-integration_update_aws_account.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ async fn main() {
1212
.account_specific_namespace_rules(BTreeMap::from([("auto_scaling".to_string(), false)]))
1313
.cspm_resource_collection_enabled(false)
1414
.excluded_regions(vec!["us-east-1".to_string(), "us-west-2".to_string()])
15+
.extended_resource_collection_enabled(true)
1516
.filter_tags(vec!["$KEY:$VALUE".to_string()])
1617
.host_tags(vec!["$KEY:$VALUE".to_string()])
1718
.metrics_collection_enabled(true)
18-
.resource_collection_enabled(true)
1919
.role_name("DatadogAWSIntegrationRole".to_string());
2020
let configuration = datadog::Configuration::new();
2121
let api = AWSIntegrationAPI::with_config(configuration);

src/datadogV1/model/model_aws_account.rs

+34-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ pub struct AWSAccount {
2929
/// to exclude from metrics collection.
3030
#[serde(rename = "excluded_regions")]
3131
pub excluded_regions: Option<Vec<String>>,
32+
/// Whether Datadog collects additional attributes and configuration information about the resources in your AWS account. Required for `cspm_resource_collection`.
33+
#[serde(rename = "extended_resource_collection_enabled")]
34+
pub extended_resource_collection_enabled: Option<bool>,
3235
/// The array of EC2 tags (in the form `key:value`) defines a filter that Datadog uses when collecting metrics from EC2.
3336
/// Wildcards, such as `?` (for single characters) and `*` (for multiple characters) can also be used.
3437
/// Only hosts that match one of the defined tags
@@ -44,7 +47,8 @@ pub struct AWSAccount {
4447
/// Whether Datadog collects metrics for this AWS account.
4548
#[serde(rename = "metrics_collection_enabled")]
4649
pub metrics_collection_enabled: Option<bool>,
47-
/// Whether Datadog collects a standard set of resources from your AWS account.
50+
/// Deprecated in favor of 'extended_resource_collection_enabled'. Whether Datadog collects a standard set of resources from your AWS account.
51+
#[deprecated]
4852
#[serde(rename = "resource_collection_enabled")]
4953
pub resource_collection_enabled: Option<bool>,
5054
/// Your Datadog role delegation name.
@@ -60,12 +64,14 @@ pub struct AWSAccount {
6064

6165
impl AWSAccount {
6266
pub fn new() -> AWSAccount {
67+
#[allow(deprecated)]
6368
AWSAccount {
6469
access_key_id: None,
6570
account_id: None,
6671
account_specific_namespace_rules: None,
6772
cspm_resource_collection_enabled: None,
6873
excluded_regions: None,
74+
extended_resource_collection_enabled: None,
6975
filter_tags: None,
7076
host_tags: None,
7177
metrics_collection_enabled: None,
@@ -76,16 +82,19 @@ impl AWSAccount {
7682
}
7783
}
7884

85+
#[allow(deprecated)]
7986
pub fn access_key_id(mut self, value: String) -> Self {
8087
self.access_key_id = Some(value);
8188
self
8289
}
8390

91+
#[allow(deprecated)]
8492
pub fn account_id(mut self, value: String) -> Self {
8593
self.account_id = Some(value);
8694
self
8795
}
8896

97+
#[allow(deprecated)]
8998
pub fn account_specific_namespace_rules(
9099
mut self,
91100
value: std::collections::BTreeMap<String, bool>,
@@ -94,41 +103,55 @@ impl AWSAccount {
94103
self
95104
}
96105

106+
#[allow(deprecated)]
97107
pub fn cspm_resource_collection_enabled(mut self, value: bool) -> Self {
98108
self.cspm_resource_collection_enabled = Some(value);
99109
self
100110
}
101111

112+
#[allow(deprecated)]
102113
pub fn excluded_regions(mut self, value: Vec<String>) -> Self {
103114
self.excluded_regions = Some(value);
104115
self
105116
}
106117

118+
#[allow(deprecated)]
119+
pub fn extended_resource_collection_enabled(mut self, value: bool) -> Self {
120+
self.extended_resource_collection_enabled = Some(value);
121+
self
122+
}
123+
124+
#[allow(deprecated)]
107125
pub fn filter_tags(mut self, value: Vec<String>) -> Self {
108126
self.filter_tags = Some(value);
109127
self
110128
}
111129

130+
#[allow(deprecated)]
112131
pub fn host_tags(mut self, value: Vec<String>) -> Self {
113132
self.host_tags = Some(value);
114133
self
115134
}
116135

136+
#[allow(deprecated)]
117137
pub fn metrics_collection_enabled(mut self, value: bool) -> Self {
118138
self.metrics_collection_enabled = Some(value);
119139
self
120140
}
121141

142+
#[allow(deprecated)]
122143
pub fn resource_collection_enabled(mut self, value: bool) -> Self {
123144
self.resource_collection_enabled = Some(value);
124145
self
125146
}
126147

148+
#[allow(deprecated)]
127149
pub fn role_name(mut self, value: String) -> Self {
128150
self.role_name = Some(value);
129151
self
130152
}
131153

154+
#[allow(deprecated)]
132155
pub fn secret_access_key(mut self, value: String) -> Self {
133156
self.secret_access_key = Some(value);
134157
self
@@ -165,6 +188,7 @@ impl<'de> Deserialize<'de> for AWSAccount {
165188
> = None;
166189
let mut cspm_resource_collection_enabled: Option<bool> = None;
167190
let mut excluded_regions: Option<Vec<String>> = None;
191+
let mut extended_resource_collection_enabled: Option<bool> = None;
168192
let mut filter_tags: Option<Vec<String>> = None;
169193
let mut host_tags: Option<Vec<String>> = None;
170194
let mut metrics_collection_enabled: Option<bool> = None;
@@ -209,6 +233,13 @@ impl<'de> Deserialize<'de> for AWSAccount {
209233
excluded_regions =
210234
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
211235
}
236+
"extended_resource_collection_enabled" => {
237+
if v.is_null() {
238+
continue;
239+
}
240+
extended_resource_collection_enabled =
241+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
242+
}
212243
"filter_tags" => {
213244
if v.is_null() {
214245
continue;
@@ -253,12 +284,14 @@ impl<'de> Deserialize<'de> for AWSAccount {
253284
}
254285
}
255286

287+
#[allow(deprecated)]
256288
let content = AWSAccount {
257289
access_key_id,
258290
account_id,
259291
account_specific_namespace_rules,
260292
cspm_resource_collection_enabled,
261293
excluded_regions,
294+
extended_resource_collection_enabled,
262295
filter_tags,
263296
host_tags,
264297
metrics_collection_enabled,
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023-11-13T14:17:01.291Z
1+
2024-04-05T18:30:30.891Z

tests/scenarios/cassettes/v1/aws_integration/Create-an-AWS-integration-returns-OK-response.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"request": {
55
"body": {
6-
"string": "{\"account_id\":\"169988502100\",\"account_specific_namespace_rules\":{\"auto_scaling\":false},\"cspm_resource_collection_enabled\":true,\"excluded_regions\":[\"us-east-1\",\"us-west-2\"],\"filter_tags\":[\"$KEY:$VALUE\"],\"host_tags\":[\"$KEY:$VALUE\"],\"metrics_collection_enabled\":false,\"resource_collection_enabled\":true,\"role_name\":\"DatadogAWSIntegrationRole\"}",
6+
"string": "{\"account_id\":\"171234183000\",\"account_specific_namespace_rules\":{\"auto_scaling\":false},\"cspm_resource_collection_enabled\":true,\"excluded_regions\":[\"us-east-1\",\"us-west-2\"],\"extended_resource_collection_enabled\":true,\"filter_tags\":[\"$KEY:$VALUE\"],\"host_tags\":[\"$KEY:$VALUE\"],\"metrics_collection_enabled\":false,\"role_name\":\"DatadogAWSIntegrationRole\"}",
77
"encoding": null
88
},
99
"headers": {
@@ -19,7 +19,7 @@
1919
},
2020
"response": {
2121
"body": {
22-
"string": "{\"external_id\":\"9668e281c0ef4cc8be01710ef7a0ae4c\"}\n",
22+
"string": "{\"external_id\":\"acb8f6b8a844443dbb726d07dcb1a870\"}\n",
2323
"encoding": null
2424
},
2525
"headers": {
@@ -32,12 +32,12 @@
3232
"message": "OK"
3333
}
3434
},
35-
"recorded_at": "Mon, 13 Nov 2023 14:17:01 GMT"
35+
"recorded_at": "Fri, 05 Apr 2024 18:30:30 GMT"
3636
},
3737
{
3838
"request": {
3939
"body": {
40-
"string": "{\"account_id\":\"169988502100\",\"role_name\":\"DatadogAWSIntegrationRole\"}",
40+
"string": "{\"account_id\":\"171234183000\",\"role_name\":\"DatadogAWSIntegrationRole\"}",
4141
"encoding": null
4242
},
4343
"headers": {
@@ -66,7 +66,7 @@
6666
"message": "OK"
6767
}
6868
},
69-
"recorded_at": "Mon, 13 Nov 2023 14:17:01 GMT"
69+
"recorded_at": "Fri, 05 Apr 2024 18:30:30 GMT"
7070
}
7171
],
7272
"recorded_with": "VCR 6.0.0"
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023-11-21T19:25:15.118Z
1+
2024-04-05T18:30:32.594Z

tests/scenarios/cassettes/v1/aws_integration/Delete-an-AWS-integration-returns-OK-response.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"request": {
55
"body": {
6-
"string": "{\"account_id\":\"170059471500\",\"account_specific_namespace_rules\":{\"auto_scaling\":false},\"cspm_resource_collection_enabled\":true,\"excluded_regions\":[\"us-east-1\",\"us-west-2\"],\"filter_tags\":[\"$KEY:$VALUE\"],\"host_tags\":[\"$KEY:$VALUE\"],\"metrics_collection_enabled\":false,\"resource_collection_enabled\":true,\"role_name\":\"DatadogAWSIntegrationRole\"}",
6+
"string": "{\"account_id\":\"171234183200\",\"account_specific_namespace_rules\":{\"auto_scaling\":false},\"cspm_resource_collection_enabled\":true,\"excluded_regions\":[\"us-east-1\",\"us-west-2\"],\"extended_resource_collection_enabled\":true,\"filter_tags\":[\"$KEY:$VALUE\"],\"host_tags\":[\"$KEY:$VALUE\"],\"metrics_collection_enabled\":false,\"role_name\":\"DatadogAWSIntegrationRole\"}",
77
"encoding": null
88
},
99
"headers": {
@@ -19,7 +19,7 @@
1919
},
2020
"response": {
2121
"body": {
22-
"string": "{\"external_id\":\"77c77ead62584b0fa1bb6a9fe7d2fa28\"}\n",
22+
"string": "{\"external_id\":\"6aa1bf95e5dc4c9985593e94169bd2f6\"}\n",
2323
"encoding": null
2424
},
2525
"headers": {
@@ -32,12 +32,12 @@
3232
"message": "OK"
3333
}
3434
},
35-
"recorded_at": "Tue, 21 Nov 2023 19:25:15 GMT"
35+
"recorded_at": "Fri, 05 Apr 2024 18:30:32 GMT"
3636
},
3737
{
3838
"request": {
3939
"body": {
40-
"string": "{\"account_id\":\"170059471500\",\"role_name\":\"DatadogAWSIntegrationRole\"}",
40+
"string": "{\"account_id\":\"171234183200\",\"role_name\":\"DatadogAWSIntegrationRole\"}",
4141
"encoding": null
4242
},
4343
"headers": {
@@ -66,12 +66,12 @@
6666
"message": "OK"
6767
}
6868
},
69-
"recorded_at": "Tue, 21 Nov 2023 19:25:15 GMT"
69+
"recorded_at": "Fri, 05 Apr 2024 18:30:32 GMT"
7070
},
7171
{
7272
"request": {
7373
"body": {
74-
"string": "{\"account_id\":\"170059471500\",\"role_name\":\"DatadogAWSIntegrationRole\"}",
74+
"string": "{\"account_id\":\"171234183200\",\"role_name\":\"DatadogAWSIntegrationRole\"}",
7575
"encoding": null
7676
},
7777
"headers": {
@@ -87,7 +87,7 @@
8787
},
8888
"response": {
8989
"body": {
90-
"string": "{\"errors\":[\"AWS account 170059471500 does not exist in integration\"]}",
90+
"string": "{\"errors\":[\"AWS account 171234183200 does not exist in integration\"]}",
9191
"encoding": null
9292
},
9393
"headers": {
@@ -100,7 +100,7 @@
100100
"message": "Bad Request"
101101
}
102102
},
103-
"recorded_at": "Tue, 21 Nov 2023 19:25:15 GMT"
103+
"recorded_at": "Fri, 05 Apr 2024 18:30:32 GMT"
104104
}
105105
],
106106
"recorded_with": "VCR 6.0.0"
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023-11-23T18:16:16.323Z
1+
2024-04-05T18:30:34.377Z

0 commit comments

Comments
 (0)