Skip to content

Commit ab4253e

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
aws api adding extended and deprecating old resource collection field (#1938)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 95a31f0 commit ab4253e

14 files changed

+50
-34
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
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:46.524601",
8-
"spec_repo_commit": "bb0f8c92"
7+
"regenerated": "2024-04-10 19:44:53.239946",
8+
"spec_repo_commit": "3fb610b5"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-04-10 17:49:46.542355",
13-
"spec_repo_commit": "bb0f8c92"
12+
"regenerated": "2024-04-10 19:44:53.257718",
13+
"spec_repo_commit": "3fb610b5"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 9 additions & 2 deletions
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/CreateAWSAccount.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
"us-east-1",
1717
"us-west-2",
1818
],
19+
extended_resource_collection_enabled=True,
1920
filter_tags=[
2021
"$KEY:$VALUE",
2122
],
2223
host_tags=[
2324
"$KEY:$VALUE",
2425
],
2526
metrics_collection_enabled=False,
26-
resource_collection_enabled=True,
2727
role_name="DatadogAWSIntegrationRole",
2828
)
2929

examples/v1/aws-integration/CreateNewAWSExternalID.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"us-east-1",
1818
"us-west-2",
1919
],
20+
extended_resource_collection_enabled=True,
2021
filter_tags=[
2122
"$KEY:$VALUE",
2223
],

examples/v1/aws-integration/UpdateAWSAccount.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
"us-east-1",
1717
"us-west-2",
1818
],
19+
extended_resource_collection_enabled=True,
1920
filter_tags=[
2021
"$KEY:$VALUE",
2122
],
2223
host_tags=[
2324
"$KEY:$VALUE",
2425
],
2526
metrics_collection_enabled=True,
26-
resource_collection_enabled=True,
2727
role_name="DatadogAWSIntegrationRole",
2828
)
2929

src/datadog_api_client/v1/model/aws_account.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def openapi_types(_):
2222
"account_specific_namespace_rules": ({str: (bool,)},),
2323
"cspm_resource_collection_enabled": (bool,),
2424
"excluded_regions": ([str],),
25+
"extended_resource_collection_enabled": (bool,),
2526
"filter_tags": ([str],),
2627
"host_tags": ([str],),
2728
"metrics_collection_enabled": (bool,),
@@ -36,6 +37,7 @@ def openapi_types(_):
3637
"account_specific_namespace_rules": "account_specific_namespace_rules",
3738
"cspm_resource_collection_enabled": "cspm_resource_collection_enabled",
3839
"excluded_regions": "excluded_regions",
40+
"extended_resource_collection_enabled": "extended_resource_collection_enabled",
3941
"filter_tags": "filter_tags",
4042
"host_tags": "host_tags",
4143
"metrics_collection_enabled": "metrics_collection_enabled",
@@ -51,6 +53,7 @@ def __init__(
5153
account_specific_namespace_rules: Union[Dict[str, bool], UnsetType] = unset,
5254
cspm_resource_collection_enabled: Union[bool, UnsetType] = unset,
5355
excluded_regions: Union[List[str], UnsetType] = unset,
56+
extended_resource_collection_enabled: Union[bool, UnsetType] = unset,
5457
filter_tags: Union[List[str], UnsetType] = unset,
5558
host_tags: Union[List[str], UnsetType] = unset,
5659
metrics_collection_enabled: Union[bool, UnsetType] = unset,
@@ -80,6 +83,9 @@ def __init__(
8083
to exclude from metrics collection.
8184
:type excluded_regions: [str], optional
8285
86+
:param extended_resource_collection_enabled: Whether Datadog collects additional attributes and configuration information about the resources in your AWS account. Required for ``cspm_resource_collection``.
87+
:type extended_resource_collection_enabled: bool, optional
88+
8389
:param filter_tags: The array of EC2 tags (in the form ``key:value`` ) defines a filter that Datadog uses when collecting metrics from EC2.
8490
Wildcards, such as ``?`` (for single characters) and ``*`` (for multiple characters) can also be used.
8591
Only hosts that match one of the defined tags
@@ -95,7 +101,7 @@ def __init__(
95101
:param metrics_collection_enabled: Whether Datadog collects metrics for this AWS account.
96102
:type metrics_collection_enabled: bool, optional
97103
98-
:param resource_collection_enabled: Whether Datadog collects a standard set of resources from your AWS account.
104+
:param resource_collection_enabled: Deprecated in favor of 'extended_resource_collection_enabled'. Whether Datadog collects a standard set of resources from your AWS account. **Deprecated**.
99105
:type resource_collection_enabled: bool, optional
100106
101107
:param role_name: Your Datadog role delegation name.
@@ -114,6 +120,8 @@ def __init__(
114120
kwargs["cspm_resource_collection_enabled"] = cspm_resource_collection_enabled
115121
if excluded_regions is not unset:
116122
kwargs["excluded_regions"] = excluded_regions
123+
if extended_resource_collection_enabled is not unset:
124+
kwargs["extended_resource_collection_enabled"] = extended_resource_collection_enabled
117125
if filter_tags is not unset:
118126
kwargs["filter_tags"] = filter_tags
119127
if host_tags is not unset:
Lines changed: 1 addition & 1 deletion
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/v1/cassettes/test_scenarios/test_create_an_aws_integration_returns_ok_response.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"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"}'
3+
body: '{"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"}'
44
headers:
55
accept:
66
- application/json
@@ -10,7 +10,7 @@ interactions:
1010
uri: https://api.datadoghq.com/api/v1/integration/aws
1111
response:
1212
body:
13-
string: '{"external_id":"9668e281c0ef4cc8be01710ef7a0ae4c"}
13+
string: '{"external_id":"acb8f6b8a844443dbb726d07dcb1a870"}
1414
1515
'
1616
headers:
@@ -20,7 +20,7 @@ interactions:
2020
code: 200
2121
message: OK
2222
- request:
23-
body: '{"account_id":"169988502100","role_name":"DatadogAWSIntegrationRole"}'
23+
body: '{"account_id":"171234183000","role_name":"DatadogAWSIntegrationRole"}'
2424
headers:
2525
accept:
2626
- application/json
Lines changed: 1 addition & 1 deletion
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/v1/cassettes/test_scenarios/test_delete_an_aws_integration_returns_ok_response.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"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"}'
3+
body: '{"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"}'
44
headers:
55
accept:
66
- application/json
@@ -10,7 +10,7 @@ interactions:
1010
uri: https://api.datadoghq.com/api/v1/integration/aws
1111
response:
1212
body:
13-
string: '{"external_id":"77c77ead62584b0fa1bb6a9fe7d2fa28"}
13+
string: '{"external_id":"6aa1bf95e5dc4c9985593e94169bd2f6"}
1414
1515
'
1616
headers:
@@ -20,7 +20,7 @@ interactions:
2020
code: 200
2121
message: OK
2222
- request:
23-
body: '{"account_id":"170059471500","role_name":"DatadogAWSIntegrationRole"}'
23+
body: '{"account_id":"171234183200","role_name":"DatadogAWSIntegrationRole"}'
2424
headers:
2525
accept:
2626
- application/json
@@ -40,7 +40,7 @@ interactions:
4040
code: 200
4141
message: OK
4242
- request:
43-
body: '{"account_id":"170059471500","role_name":"DatadogAWSIntegrationRole"}'
43+
body: '{"account_id":"171234183200","role_name":"DatadogAWSIntegrationRole"}'
4444
headers:
4545
accept:
4646
- application/json
@@ -50,7 +50,7 @@ interactions:
5050
uri: https://api.datadoghq.com/api/v1/integration/aws
5151
response:
5252
body:
53-
string: '{"errors":["AWS account 170059471500 does not exist in integration"]}'
53+
string: '{"errors":["AWS account 171234183200 does not exist in integration"]}'
5454
headers:
5555
content-type:
5656
- application/json
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023-11-23T18:16:16.323Z
1+
2024-04-05T18:30:34.377Z

tests/v1/cassettes/test_scenarios/test_update_an_aws_integration_returns_ok_response.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"account_id":"170076337600","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"}'
3+
body: '{"account_id":"171234183400","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"}'
44
headers:
55
accept:
66
- application/json
@@ -10,7 +10,7 @@ interactions:
1010
uri: https://api.datadoghq.com/api/v1/integration/aws
1111
response:
1212
body:
13-
string: '{"external_id":"c7298c166e774bf1bd1bc0419e68f1a0"}
13+
string: '{"external_id":"c8ceedec95fc472fb6156f3104d425c9"}
1414
1515
'
1616
headers:
@@ -20,14 +20,14 @@ interactions:
2020
code: 200
2121
message: OK
2222
- request:
23-
body: '{"account_id":"170076337600","account_specific_namespace_rules":{"auto_scaling":false},"cspm_resource_collection_enabled":false,"excluded_regions":["us-east-1","us-west-2"],"filter_tags":["$KEY:$VALUE"],"host_tags":["$KEY:$VALUE"],"metrics_collection_enabled":true,"resource_collection_enabled":true,"role_name":"DatadogAWSIntegrationRole"}'
23+
body: '{"account_id":"171234183400","account_specific_namespace_rules":{"auto_scaling":false},"cspm_resource_collection_enabled":false,"excluded_regions":["us-east-1","us-west-2"],"extended_resource_collection_enabled":true,"filter_tags":["$KEY:$VALUE"],"host_tags":["$KEY:$VALUE"],"metrics_collection_enabled":true,"role_name":"DatadogAWSIntegrationRole"}'
2424
headers:
2525
accept:
2626
- application/json
2727
content-type:
2828
- application/json
2929
method: PUT
30-
uri: https://api.datadoghq.com/api/v1/integration/aws?account_id=170076337600&role_name=DatadogAWSIntegrationRole
30+
uri: https://api.datadoghq.com/api/v1/integration/aws?account_id=171234183400&role_name=DatadogAWSIntegrationRole
3131
response:
3232
body:
3333
string: '{}
@@ -40,7 +40,7 @@ interactions:
4040
code: 200
4141
message: OK
4242
- request:
43-
body: '{"account_id":"170076337600","role_name":"DatadogAWSIntegrationRole"}'
43+
body: '{"account_id":"171234183400","role_name":"DatadogAWSIntegrationRole"}'
4444
headers:
4545
accept:
4646
- application/json

0 commit comments

Comments
 (0)