Skip to content

Commit b902870

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Deprecate ListAWSRelatedAccounts (#2062)
* Regenerate client from commit 17f1aa28 of spec repo * pre-commit fixes --------- Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 2ccffcd commit b902870

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
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-07-18 19:18:03.897221",
8-
"spec_repo_commit": "8f19ff48"
7+
"regenerated": "2024-07-18 19:52:50.738768",
8+
"spec_repo_commit": "17f1aa28"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-18 19:18:03.925200",
13-
"spec_repo_commit": "8f19ff48"
12+
"regenerated": "2024-07-18 19:52:50.755789",
13+
"spec_repo_commit": "17f1aa28"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26026,6 +26026,7 @@ paths:
2602626026
- Cloud Cost Management
2602726027
/api/v2/cost/aws_related_accounts:
2602826028
get:
26029+
deprecated: true
2602926030
description: List the AWS accounts in an organization by calling 'organizations:ListAccounts'
2603026031
from the specified management account.
2603126032
operationId: ListAWSRelatedAccounts

src/datadog_api_client/v2/api/cloud_cost_management_api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from __future__ import annotations
55

66
from typing import Any, Dict
7+
import warnings
78

89
from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
910
from datadog_api_client.configuration import Configuration
@@ -320,7 +321,7 @@ def list_aws_related_accounts(
320321
self,
321322
filter_management_account_id: str,
322323
) -> AWSRelatedAccountsResponse:
323-
"""List related AWS accounts.
324+
"""List related AWS accounts. **Deprecated**.
324325
325326
List the AWS accounts in an organization by calling 'organizations:ListAccounts' from the specified management account.
326327
@@ -331,6 +332,7 @@ def list_aws_related_accounts(
331332
kwargs: Dict[str, Any] = {}
332333
kwargs["filter_management_account_id"] = filter_management_account_id
333334

335+
warnings.warn("list_aws_related_accounts is deprecated", DeprecationWarning, stacklevel=2)
334336
return self._list_aws_related_accounts_endpoint.call_with_http_info(**kwargs)
335337

336338
def list_cost_awscur_configs(

0 commit comments

Comments
 (0)