Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws api adding extended and deprecating old resource collection field #1938

Merged
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-04-10 17:49:46.524601",
"spec_repo_commit": "bb0f8c92"
"regenerated": "2024-04-10 19:44:53.239946",
"spec_repo_commit": "3fb610b5"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-04-10 17:49:46.542355",
"spec_repo_commit": "bb0f8c92"
"regenerated": "2024-04-10 19:44:53.257718",
"spec_repo_commit": "3fb610b5"
}
}
}
11 changes: 9 additions & 2 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ components:
description: Regions to exclude.
type: string
type: array
extended_resource_collection_enabled:
default: false
description: Whether Datadog collects additional attributes and configuration
information about the resources in your AWS account. Required for `cspm_resource_collection`.
example: true
type: boolean
filter_tags:
description: 'The array of EC2 tags (in the form `key:value`) defines a
filter that Datadog uses when collecting metrics from EC2.
Expand Down Expand Up @@ -128,8 +134,9 @@ components:
type: boolean
resource_collection_enabled:
default: false
description: Whether Datadog collects a standard set of resources from your
AWS account.
deprecated: true
description: Deprecated in favor of 'extended_resource_collection_enabled'.
Whether Datadog collects a standard set of resources from your AWS account.
example: true
type: boolean
role_name:
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/aws-integration/CreateAWSAccount.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
"us-east-1",
"us-west-2",
],
extended_resource_collection_enabled=True,
filter_tags=[
"$KEY:$VALUE",
],
host_tags=[
"$KEY:$VALUE",
],
metrics_collection_enabled=False,
resource_collection_enabled=True,
role_name="DatadogAWSIntegrationRole",
)

Expand Down
1 change: 1 addition & 0 deletions examples/v1/aws-integration/CreateNewAWSExternalID.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"us-east-1",
"us-west-2",
],
extended_resource_collection_enabled=True,
filter_tags=[
"$KEY:$VALUE",
],
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/aws-integration/UpdateAWSAccount.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
"us-east-1",
"us-west-2",
],
extended_resource_collection_enabled=True,
filter_tags=[
"$KEY:$VALUE",
],
host_tags=[
"$KEY:$VALUE",
],
metrics_collection_enabled=True,
resource_collection_enabled=True,
role_name="DatadogAWSIntegrationRole",
)

Expand Down
10 changes: 9 additions & 1 deletion src/datadog_api_client/v1/model/aws_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def openapi_types(_):
"account_specific_namespace_rules": ({str: (bool,)},),
"cspm_resource_collection_enabled": (bool,),
"excluded_regions": ([str],),
"extended_resource_collection_enabled": (bool,),
"filter_tags": ([str],),
"host_tags": ([str],),
"metrics_collection_enabled": (bool,),
Expand All @@ -36,6 +37,7 @@ def openapi_types(_):
"account_specific_namespace_rules": "account_specific_namespace_rules",
"cspm_resource_collection_enabled": "cspm_resource_collection_enabled",
"excluded_regions": "excluded_regions",
"extended_resource_collection_enabled": "extended_resource_collection_enabled",
"filter_tags": "filter_tags",
"host_tags": "host_tags",
"metrics_collection_enabled": "metrics_collection_enabled",
Expand All @@ -51,6 +53,7 @@ def __init__(
account_specific_namespace_rules: Union[Dict[str, bool], UnsetType] = unset,
cspm_resource_collection_enabled: Union[bool, UnsetType] = unset,
excluded_regions: Union[List[str], UnsetType] = unset,
extended_resource_collection_enabled: Union[bool, UnsetType] = unset,
filter_tags: Union[List[str], UnsetType] = unset,
host_tags: Union[List[str], UnsetType] = unset,
metrics_collection_enabled: Union[bool, UnsetType] = unset,
Expand Down Expand Up @@ -80,6 +83,9 @@ def __init__(
to exclude from metrics collection.
:type excluded_regions: [str], optional
: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``.
:type extended_resource_collection_enabled: bool, optional
:param filter_tags: The array of EC2 tags (in the form ``key:value`` ) defines a filter that Datadog uses when collecting metrics from EC2.
Wildcards, such as ``?`` (for single characters) and ``*`` (for multiple characters) can also be used.
Only hosts that match one of the defined tags
Expand All @@ -95,7 +101,7 @@ def __init__(
:param metrics_collection_enabled: Whether Datadog collects metrics for this AWS account.
:type metrics_collection_enabled: bool, optional
:param resource_collection_enabled: Whether Datadog collects a standard set of resources from your AWS account.
: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**.
:type resource_collection_enabled: bool, optional
:param role_name: Your Datadog role delegation name.
Expand All @@ -114,6 +120,8 @@ def __init__(
kwargs["cspm_resource_collection_enabled"] = cspm_resource_collection_enabled
if excluded_regions is not unset:
kwargs["excluded_regions"] = excluded_regions
if extended_resource_collection_enabled is not unset:
kwargs["extended_resource_collection_enabled"] = extended_resource_collection_enabled
if filter_tags is not unset:
kwargs["filter_tags"] = filter_tags
if host_tags is not unset:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-11-13T14:17:01.291Z
2024-04-05T18:30:30.891Z
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
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"}'
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"}'
headers:
accept:
- application/json
Expand All @@ -10,7 +10,7 @@ interactions:
uri: https://api.datadoghq.com/api/v1/integration/aws
response:
body:
string: '{"external_id":"9668e281c0ef4cc8be01710ef7a0ae4c"}
string: '{"external_id":"acb8f6b8a844443dbb726d07dcb1a870"}
'
headers:
Expand All @@ -20,7 +20,7 @@ interactions:
code: 200
message: OK
- request:
body: '{"account_id":"169988502100","role_name":"DatadogAWSIntegrationRole"}'
body: '{"account_id":"171234183000","role_name":"DatadogAWSIntegrationRole"}'
headers:
accept:
- application/json
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-11-21T19:25:15.118Z
2024-04-05T18:30:32.594Z
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
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"}'
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"}'
headers:
accept:
- application/json
Expand All @@ -10,7 +10,7 @@ interactions:
uri: https://api.datadoghq.com/api/v1/integration/aws
response:
body:
string: '{"external_id":"77c77ead62584b0fa1bb6a9fe7d2fa28"}
string: '{"external_id":"6aa1bf95e5dc4c9985593e94169bd2f6"}
'
headers:
Expand All @@ -20,7 +20,7 @@ interactions:
code: 200
message: OK
- request:
body: '{"account_id":"170059471500","role_name":"DatadogAWSIntegrationRole"}'
body: '{"account_id":"171234183200","role_name":"DatadogAWSIntegrationRole"}'
headers:
accept:
- application/json
Expand All @@ -40,7 +40,7 @@ interactions:
code: 200
message: OK
- request:
body: '{"account_id":"170059471500","role_name":"DatadogAWSIntegrationRole"}'
body: '{"account_id":"171234183200","role_name":"DatadogAWSIntegrationRole"}'
headers:
accept:
- application/json
Expand All @@ -50,7 +50,7 @@ interactions:
uri: https://api.datadoghq.com/api/v1/integration/aws
response:
body:
string: '{"errors":["AWS account 170059471500 does not exist in integration"]}'
string: '{"errors":["AWS account 171234183200 does not exist in integration"]}'
headers:
content-type:
- application/json
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-11-23T18:16:16.323Z
2024-04-05T18:30:34.377Z
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
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"}'
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"}'
headers:
accept:
- application/json
Expand All @@ -10,7 +10,7 @@ interactions:
uri: https://api.datadoghq.com/api/v1/integration/aws
response:
body:
string: '{"external_id":"c7298c166e774bf1bd1bc0419e68f1a0"}
string: '{"external_id":"c8ceedec95fc472fb6156f3104d425c9"}
'
headers:
Expand All @@ -20,14 +20,14 @@ interactions:
code: 200
message: OK
- request:
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"}'
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"}'
headers:
accept:
- application/json
content-type:
- application/json
method: PUT
uri: https://api.datadoghq.com/api/v1/integration/aws?account_id=170076337600&role_name=DatadogAWSIntegrationRole
uri: https://api.datadoghq.com/api/v1/integration/aws?account_id=171234183400&role_name=DatadogAWSIntegrationRole
response:
body:
string: '{}
Expand All @@ -40,7 +40,7 @@ interactions:
code: 200
message: OK
- request:
body: '{"account_id":"170076337600","role_name":"DatadogAWSIntegrationRole"}'
body: '{"account_id":"171234183400","role_name":"DatadogAWSIntegrationRole"}'
headers:
accept:
- application/json
Expand Down
Loading
Loading