From b61c123046663533dc72dee93575f74b61972f09 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 12 May 2026 16:09:12 +0000 Subject: [PATCH] Regenerate client from commit b142429 of spec repo --- .generator/schemas/v2/openapi.yaml | 143 ++++++++++++++++++ docs/datadog_api_client.v2.model.rst | 35 +++++ .../ListCostTagDescriptions.py | 13 ++ .../v2/api/cloud_cost_management_api.py | 42 +++++ .../v2/model/cost_tag_description.py | 54 +++++++ .../model/cost_tag_description_attributes.py | 79 ++++++++++ .../v2/model/cost_tag_description_source.py | 41 +++++ .../v2/model/cost_tag_description_type.py | 35 +++++ .../model/cost_tag_descriptions_response.py | 40 +++++ src/datadog_api_client/v2/models/__init__.py | 10 ++ .../v2/features/cloud_cost_management.feature | 6 + tests/v2/features/undo.json | 6 + 12 files changed, 504 insertions(+) create mode 100644 examples/v2/cloud-cost-management/ListCostTagDescriptions.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_description.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_description_attributes.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_description_source.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_description_type.py create mode 100644 src/datadog_api_client/v2/model/cost_tag_descriptions_response.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index a04387a688..07a00c9a7f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -15600,6 +15600,98 @@ components: type: string x-enum-varnames: - COST_BY_ORG + CostTagDescription: + description: A Cloud Cost Management tag key description, either cross-cloud or scoped to a single cloud provider. + properties: + attributes: + $ref: "#/components/schemas/CostTagDescriptionAttributes" + id: + description: Stable identifier of the tag description. Equals the tag key when the description is the cross-cloud default; encodes both the cloud and the tag key when the description is cloud-specific. + example: account_id + type: string + type: + $ref: "#/components/schemas/CostTagDescriptionType" + required: + - attributes + - id + - type + type: object + CostTagDescriptionAttributes: + description: Human-readable description and metadata attached to a Cloud Cost Management tag key, optionally scoped to a single cloud provider. + properties: + cloud: + description: Cloud provider this description applies to (for example, `aws`). Empty when the description is the cross-cloud default for the tag key. + example: aws + type: string + created_at: + description: Timestamp when the description was created, in RFC 3339 format. + example: "2026-01-01T12:00:00Z" + type: string + description: + description: The human-readable description for the tag key. + example: AWS account that owns this cost. + type: string + source: + $ref: "#/components/schemas/CostTagDescriptionSource" + tag_key: + description: The tag key this description applies to. + example: account_id + type: string + updated_at: + description: Timestamp when the description was last updated, in RFC 3339 format. + example: "2026-01-01T12:00:00Z" + type: string + required: + - cloud + - created_at + - description + - source + - tag_key + - updated_at + type: object + CostTagDescriptionSource: + description: Origin of the description. `human` indicates the description was written by a user, `ai_generated` was produced by AI, and `datadog` is a default supplied by Datadog. + enum: + - human + - ai_generated + - datadog + example: human + type: string + x-enum-varnames: + - HUMAN + - AI_GENERATED + - DATADOG + CostTagDescriptionType: + default: cost_tag_description + description: Type of the Cloud Cost Management tag description resource. + enum: + - cost_tag_description + example: cost_tag_description + type: string + x-enum-varnames: + - COST_TAG_DESCRIPTION + CostTagDescriptionsResponse: + description: List of Cloud Cost Management tag key descriptions for the organization, optionally filtered to a single cloud provider. + example: + data: + - attributes: + cloud: aws + created_at: "2026-01-01T12:00:00Z" + description: AWS account that owns this cost. + source: human + tag_key: account_id + updated_at: "2026-01-01T12:00:00Z" + id: account_id + type: cost_tag_description + properties: + data: + description: List of tag key descriptions. + items: + $ref: "#/components/schemas/CostTagDescription" + type: array + required: + - data + type: object CoverageSummaryAttributes: description: Attributes object for code coverage summary response. properties: @@ -96749,6 +96841,57 @@ paths: operator: OR permissions: - cloud_cost_management_read + /api/v2/cost/tag_descriptions: + get: + description: List Cloud Cost Management tag key descriptions for the organization. Use `filter[cloud]` to scope the result to a single cloud provider; when omitted, both cross-cloud defaults and cloud-specific descriptions are returned. + operationId: ListCostTagDescriptions + parameters: + - description: Filter descriptions to a specific cloud provider (for example, `aws`). Omit to return descriptions across all clouds. + in: query + name: filter[cloud] + required: false + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + cloud: aws + created_at: "2026-01-01T12:00:00Z" + description: AWS account that owns this cost. + source: human + tag_key: account_id + updated_at: "2026-01-01T12:00:00Z" + id: account_id + type: cost_tag_description + schema: + $ref: "#/components/schemas/CostTagDescriptionsResponse" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List Cloud Cost Management tag descriptions + tags: + - Cloud Cost Management + "x-permission": + operator: OR + permissions: + - cloud_cost_management_read /api/v2/cost_by_tag/active_billing_dimensions: get: description: |- diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 437bc71be0..18c6f936a0 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -6220,6 +6220,41 @@ datadog\_api\_client.v2.model.cost\_by\_org\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.cost\_tag\_description module +----------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_description + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_tag\_description\_attributes module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_description_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_tag\_description\_source module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_description_source + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_tag\_description\_type module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_description_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.cost\_tag\_descriptions\_response module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.cost_tag_descriptions_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.coverage\_summary\_attributes module ------------------------------------------------------------------ diff --git a/examples/v2/cloud-cost-management/ListCostTagDescriptions.py b/examples/v2/cloud-cost-management/ListCostTagDescriptions.py new file mode 100644 index 0000000000..4008a7a646 --- /dev/null +++ b/examples/v2/cloud-cost-management/ListCostTagDescriptions.py @@ -0,0 +1,13 @@ +""" +List Cloud Cost Management tag descriptions returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.cloud_cost_management_api import CloudCostManagementApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = CloudCostManagementApi(api_client) + response = api_instance.list_cost_tag_descriptions() + + print(response) diff --git a/src/datadog_api_client/v2/api/cloud_cost_management_api.py b/src/datadog_api_client/v2/api/cloud_cost_management_api.py index 964c0919c4..1c66232eae 100644 --- a/src/datadog_api_client/v2/api/cloud_cost_management_api.py +++ b/src/datadog_api_client/v2/api/cloud_cost_management_api.py @@ -40,6 +40,7 @@ from datadog_api_client.v2.model.gcp_uc_config_response import GcpUcConfigResponse from datadog_api_client.v2.model.gcp_usage_cost_config_patch_request import GCPUsageCostConfigPatchRequest from datadog_api_client.v2.model.oci_configs_response import OCIConfigsResponse +from datadog_api_client.v2.model.cost_tag_descriptions_response import CostTagDescriptionsResponse from datadog_api_client.v2.model.ruleset_resp_array import RulesetRespArray from datadog_api_client.v2.model.ruleset_resp import RulesetResp from datadog_api_client.v2.model.create_ruleset_request import CreateRulesetRequest @@ -562,6 +563,28 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._list_cost_tag_descriptions_endpoint = _Endpoint( + settings={ + "response_type": (CostTagDescriptionsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/cost/tag_descriptions", + "operation_id": "list_cost_tag_descriptions", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "filter_cloud": { + "openapi_types": (str,), + "attribute": "filter[cloud]", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._list_custom_allocation_rules_endpoint = _Endpoint( settings={ "response_type": (ArbitraryRuleResponseArray,), @@ -1333,6 +1356,25 @@ def list_cost_oci_configs( kwargs: Dict[str, Any] = {} return self._list_cost_oci_configs_endpoint.call_with_http_info(**kwargs) + def list_cost_tag_descriptions( + self, + *, + filter_cloud: Union[str, UnsetType] = unset, + ) -> CostTagDescriptionsResponse: + """List Cloud Cost Management tag descriptions. + + List Cloud Cost Management tag key descriptions for the organization. Use ``filter[cloud]`` to scope the result to a single cloud provider; when omitted, both cross-cloud defaults and cloud-specific descriptions are returned. + + :param filter_cloud: Filter descriptions to a specific cloud provider (for example, ``aws`` ). Omit to return descriptions across all clouds. + :type filter_cloud: str, optional + :rtype: CostTagDescriptionsResponse + """ + kwargs: Dict[str, Any] = {} + if filter_cloud is not unset: + kwargs["filter_cloud"] = filter_cloud + + return self._list_cost_tag_descriptions_endpoint.call_with_http_info(**kwargs) + def list_custom_allocation_rules( self, ) -> ArbitraryRuleResponseArray: diff --git a/src/datadog_api_client/v2/model/cost_tag_description.py b/src/datadog_api_client/v2/model/cost_tag_description.py new file mode 100644 index 0000000000..73e7a18d7d --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_description.py @@ -0,0 +1,54 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.cost_tag_description_attributes import CostTagDescriptionAttributes + from datadog_api_client.v2.model.cost_tag_description_type import CostTagDescriptionType + + +class CostTagDescription(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.cost_tag_description_attributes import CostTagDescriptionAttributes + from datadog_api_client.v2.model.cost_tag_description_type import CostTagDescriptionType + + return { + "attributes": (CostTagDescriptionAttributes,), + "id": (str,), + "type": (CostTagDescriptionType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: CostTagDescriptionAttributes, id: str, type: CostTagDescriptionType, **kwargs): + """ + A Cloud Cost Management tag key description, either cross-cloud or scoped to a single cloud provider. + + :param attributes: Human-readable description and metadata attached to a Cloud Cost Management tag key, optionally scoped to a single cloud provider. + :type attributes: CostTagDescriptionAttributes + + :param id: Stable identifier of the tag description. Equals the tag key when the description is the cross-cloud default; encodes both the cloud and the tag key when the description is cloud-specific. + :type id: str + + :param type: Type of the Cloud Cost Management tag description resource. + :type type: CostTagDescriptionType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/cost_tag_description_attributes.py b/src/datadog_api_client/v2/model/cost_tag_description_attributes.py new file mode 100644 index 0000000000..b70fd56248 --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_description_attributes.py @@ -0,0 +1,79 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.cost_tag_description_source import CostTagDescriptionSource + + +class CostTagDescriptionAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.cost_tag_description_source import CostTagDescriptionSource + + return { + "cloud": (str,), + "created_at": (str,), + "description": (str,), + "source": (CostTagDescriptionSource,), + "tag_key": (str,), + "updated_at": (str,), + } + + attribute_map = { + "cloud": "cloud", + "created_at": "created_at", + "description": "description", + "source": "source", + "tag_key": "tag_key", + "updated_at": "updated_at", + } + + def __init__( + self_, + cloud: str, + created_at: str, + description: str, + source: CostTagDescriptionSource, + tag_key: str, + updated_at: str, + **kwargs, + ): + """ + Human-readable description and metadata attached to a Cloud Cost Management tag key, optionally scoped to a single cloud provider. + + :param cloud: Cloud provider this description applies to (for example, ``aws`` ). Empty when the description is the cross-cloud default for the tag key. + :type cloud: str + + :param created_at: Timestamp when the description was created, in RFC 3339 format. + :type created_at: str + + :param description: The human-readable description for the tag key. + :type description: str + + :param source: Origin of the description. ``human`` indicates the description was written by a user, ``ai_generated`` was produced by AI, and ``datadog`` is a default supplied by Datadog. + :type source: CostTagDescriptionSource + + :param tag_key: The tag key this description applies to. + :type tag_key: str + + :param updated_at: Timestamp when the description was last updated, in RFC 3339 format. + :type updated_at: str + """ + super().__init__(kwargs) + + self_.cloud = cloud + self_.created_at = created_at + self_.description = description + self_.source = source + self_.tag_key = tag_key + self_.updated_at = updated_at diff --git a/src/datadog_api_client/v2/model/cost_tag_description_source.py b/src/datadog_api_client/v2/model/cost_tag_description_source.py new file mode 100644 index 0000000000..43fd56ea9b --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_description_source.py @@ -0,0 +1,41 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class CostTagDescriptionSource(ModelSimple): + """ + Origin of the description. `human` indicates the description was written by a user, `ai_generated` was produced by AI, and `datadog` is a default supplied by Datadog. + + :param value: Must be one of ["human", "ai_generated", "datadog"]. + :type value: str + """ + + allowed_values = { + "human", + "ai_generated", + "datadog", + } + HUMAN: ClassVar["CostTagDescriptionSource"] + AI_GENERATED: ClassVar["CostTagDescriptionSource"] + DATADOG: ClassVar["CostTagDescriptionSource"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CostTagDescriptionSource.HUMAN = CostTagDescriptionSource("human") +CostTagDescriptionSource.AI_GENERATED = CostTagDescriptionSource("ai_generated") +CostTagDescriptionSource.DATADOG = CostTagDescriptionSource("datadog") diff --git a/src/datadog_api_client/v2/model/cost_tag_description_type.py b/src/datadog_api_client/v2/model/cost_tag_description_type.py new file mode 100644 index 0000000000..ffe357a3a5 --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_description_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class CostTagDescriptionType(ModelSimple): + """ + Type of the Cloud Cost Management tag description resource. + + :param value: If omitted defaults to "cost_tag_description". Must be one of ["cost_tag_description"]. + :type value: str + """ + + allowed_values = { + "cost_tag_description", + } + COST_TAG_DESCRIPTION: ClassVar["CostTagDescriptionType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CostTagDescriptionType.COST_TAG_DESCRIPTION = CostTagDescriptionType("cost_tag_description") diff --git a/src/datadog_api_client/v2/model/cost_tag_descriptions_response.py b/src/datadog_api_client/v2/model/cost_tag_descriptions_response.py new file mode 100644 index 0000000000..a7f1b1d3d5 --- /dev/null +++ b/src/datadog_api_client/v2/model/cost_tag_descriptions_response.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.cost_tag_description import CostTagDescription + + +class CostTagDescriptionsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.cost_tag_description import CostTagDescription + + return { + "data": ([CostTagDescription],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[CostTagDescription], **kwargs): + """ + List of Cloud Cost Management tag key descriptions for the organization, optionally filtered to a single cloud provider. + + :param data: List of tag key descriptions. + :type data: [CostTagDescription] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index aa5e453486..b9f03d887d 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -1171,6 +1171,11 @@ from datadog_api_client.v2.model.cost_by_org_attributes import CostByOrgAttributes from datadog_api_client.v2.model.cost_by_org_response import CostByOrgResponse from datadog_api_client.v2.model.cost_by_org_type import CostByOrgType +from datadog_api_client.v2.model.cost_tag_description import CostTagDescription +from datadog_api_client.v2.model.cost_tag_description_attributes import CostTagDescriptionAttributes +from datadog_api_client.v2.model.cost_tag_description_source import CostTagDescriptionSource +from datadog_api_client.v2.model.cost_tag_description_type import CostTagDescriptionType +from datadog_api_client.v2.model.cost_tag_descriptions_response import CostTagDescriptionsResponse from datadog_api_client.v2.model.coverage_summary_attributes import CoverageSummaryAttributes from datadog_api_client.v2.model.coverage_summary_codeowner_stats import CoverageSummaryCodeownerStats from datadog_api_client.v2.model.coverage_summary_data import CoverageSummaryData @@ -8422,6 +8427,11 @@ "CostByOrgAttributes", "CostByOrgResponse", "CostByOrgType", + "CostTagDescription", + "CostTagDescriptionAttributes", + "CostTagDescriptionSource", + "CostTagDescriptionType", + "CostTagDescriptionsResponse", "CoverageSummaryAttributes", "CoverageSummaryCodeownerStats", "CoverageSummaryData", diff --git a/tests/v2/features/cloud_cost_management.feature b/tests/v2/features/cloud_cost_management.feature index 1e9f5de20c..bf9f695d40 100644 --- a/tests/v2/features/cloud_cost_management.feature +++ b/tests/v2/features/cloud_cost_management.feature @@ -319,6 +319,12 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-cost-management + Scenario: List Cloud Cost Management tag descriptions returns "OK" response + Given new "ListCostTagDescriptions" request + When the request is sent + Then the response status is 200 OK + @replay-only @team:DataDog/cloud-cost-management Scenario: List Custom Costs Files returns "OK" response Given new "ListCustomCostsFiles" request diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index aaeb20e65b..049acf0531 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -1470,6 +1470,12 @@ "type": "safe" } }, + "ListCostTagDescriptions": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "GetActiveBillingDimensions": { "tag": "Usage Metering", "undo": {