Skip to content

Commit a33813a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit d8b2bce of spec repo
1 parent 754bfa5 commit a33813a

13 files changed

Lines changed: 510 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15600,6 +15600,98 @@ components:
1560015600
type: string
1560115601
x-enum-varnames:
1560215602
- COST_BY_ORG
15603+
CostTagDescription:
15604+
description: A Cloud Cost Management tag key description, either cross-cloud or scoped to a single cloud provider.
15605+
properties:
15606+
attributes:
15607+
$ref: "#/components/schemas/CostTagDescriptionAttributes"
15608+
id:
15609+
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.
15610+
example: account_id
15611+
type: string
15612+
type:
15613+
$ref: "#/components/schemas/CostTagDescriptionType"
15614+
required:
15615+
- attributes
15616+
- id
15617+
- type
15618+
type: object
15619+
CostTagDescriptionAttributes:
15620+
description: Human-readable description and metadata attached to a Cloud Cost Management tag key, optionally scoped to a single cloud provider.
15621+
properties:
15622+
cloud:
15623+
description: Cloud provider this description applies to (for example, `aws`). Empty when the description is the cross-cloud default for the tag key.
15624+
example: aws
15625+
type: string
15626+
created_at:
15627+
description: Timestamp when the description was created, in RFC 3339 format.
15628+
example: "2026-01-01T12:00:00Z"
15629+
type: string
15630+
description:
15631+
description: The human-readable description for the tag key.
15632+
example: AWS account that owns this cost.
15633+
type: string
15634+
source:
15635+
$ref: "#/components/schemas/CostTagDescriptionSource"
15636+
tag_key:
15637+
description: The tag key this description applies to.
15638+
example: account_id
15639+
type: string
15640+
updated_at:
15641+
description: Timestamp when the description was last updated, in RFC 3339 format.
15642+
example: "2026-01-01T12:00:00Z"
15643+
type: string
15644+
required:
15645+
- cloud
15646+
- created_at
15647+
- description
15648+
- source
15649+
- tag_key
15650+
- updated_at
15651+
type: object
15652+
CostTagDescriptionSource:
15653+
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.
15654+
enum:
15655+
- human
15656+
- ai_generated
15657+
- datadog
15658+
example: human
15659+
type: string
15660+
x-enum-varnames:
15661+
- HUMAN
15662+
- AI_GENERATED
15663+
- DATADOG
15664+
CostTagDescriptionType:
15665+
default: tag_description
15666+
description: Type of the Cloud Cost Management tag description resource.
15667+
enum:
15668+
- tag_description
15669+
example: tag_description
15670+
type: string
15671+
x-enum-varnames:
15672+
- TAG_DESCRIPTION
15673+
CostTagDescriptionsResponse:
15674+
description: List of Cloud Cost Management tag key descriptions for the organization, optionally filtered to a single cloud provider.
15675+
example:
15676+
data:
15677+
- attributes:
15678+
cloud: aws
15679+
created_at: "2026-01-01T12:00:00Z"
15680+
description: AWS account that owns this cost.
15681+
source: human
15682+
tag_key: account_id
15683+
updated_at: "2026-01-01T12:00:00Z"
15684+
id: account_id
15685+
type: tag_description
15686+
properties:
15687+
data:
15688+
description: List of tag key descriptions.
15689+
items:
15690+
$ref: "#/components/schemas/CostTagDescription"
15691+
type: array
15692+
required:
15693+
- data
15694+
type: object
1560315695
CoverageSummaryAttributes:
1560415696
description: Attributes object for code coverage summary response.
1560515697
properties:
@@ -96737,6 +96829,60 @@ paths:
9673796829
operator: OR
9673896830
permissions:
9673996831
- cloud_cost_management_read
96832+
/api/v2/cost/tag_descriptions:
96833+
get:
96834+
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.
96835+
operationId: ListCostTagDescriptions
96836+
parameters:
96837+
- description: Filter descriptions to a specific cloud provider (for example, `aws`). Omit to return descriptions across all clouds.
96838+
in: query
96839+
name: filter[cloud]
96840+
required: false
96841+
schema:
96842+
type: string
96843+
responses:
96844+
"200":
96845+
content:
96846+
application/json:
96847+
examples:
96848+
default:
96849+
value:
96850+
data:
96851+
- attributes:
96852+
cloud: aws
96853+
created_at: "2026-01-01T12:00:00Z"
96854+
description: AWS account that owns this cost.
96855+
source: human
96856+
tag_key: account_id
96857+
updated_at: "2026-01-01T12:00:00Z"
96858+
id: account_id
96859+
type: tag_description
96860+
schema:
96861+
$ref: "#/components/schemas/CostTagDescriptionsResponse"
96862+
description: OK
96863+
"403":
96864+
content:
96865+
application/json:
96866+
schema:
96867+
$ref: "#/components/schemas/APIErrorResponse"
96868+
description: Forbidden
96869+
"429":
96870+
$ref: "#/components/responses/TooManyRequestsResponse"
96871+
security:
96872+
- apiKeyAuth: []
96873+
appKeyAuth: []
96874+
- AuthZ:
96875+
- cloud_cost_management_read
96876+
summary: List Cloud Cost Management tag descriptions
96877+
tags:
96878+
- Cloud Cost Management
96879+
"x-permission":
96880+
operator: OR
96881+
permissions:
96882+
- cloud_cost_management_read
96883+
x-unstable: |-
96884+
**Note**: This endpoint is in preview and is subject to change.
96885+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
9674096886
/api/v2/cost_by_tag/active_billing_dimensions:
9674196887
get:
9674296888
description: |-

docs/datadog_api_client.v2.model.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6220,6 +6220,41 @@ datadog\_api\_client.v2.model.cost\_by\_org\_type module
62206220
:members:
62216221
:show-inheritance:
62226222

6223+
datadog\_api\_client.v2.model.cost\_tag\_description module
6224+
-----------------------------------------------------------
6225+
6226+
.. automodule:: datadog_api_client.v2.model.cost_tag_description
6227+
:members:
6228+
:show-inheritance:
6229+
6230+
datadog\_api\_client.v2.model.cost\_tag\_description\_attributes module
6231+
-----------------------------------------------------------------------
6232+
6233+
.. automodule:: datadog_api_client.v2.model.cost_tag_description_attributes
6234+
:members:
6235+
:show-inheritance:
6236+
6237+
datadog\_api\_client.v2.model.cost\_tag\_description\_source module
6238+
-------------------------------------------------------------------
6239+
6240+
.. automodule:: datadog_api_client.v2.model.cost_tag_description_source
6241+
:members:
6242+
:show-inheritance:
6243+
6244+
datadog\_api\_client.v2.model.cost\_tag\_description\_type module
6245+
-----------------------------------------------------------------
6246+
6247+
.. automodule:: datadog_api_client.v2.model.cost_tag_description_type
6248+
:members:
6249+
:show-inheritance:
6250+
6251+
datadog\_api\_client.v2.model.cost\_tag\_descriptions\_response module
6252+
----------------------------------------------------------------------
6253+
6254+
.. automodule:: datadog_api_client.v2.model.cost_tag_descriptions_response
6255+
:members:
6256+
:show-inheritance:
6257+
62236258
datadog\_api\_client.v2.model.coverage\_summary\_attributes module
62246259
------------------------------------------------------------------
62256260

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
List Cloud Cost Management tag descriptions returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.cloud_cost_management_api import CloudCostManagementApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["list_cost_tag_descriptions"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = CloudCostManagementApi(api_client)
12+
response = api_instance.list_cost_tag_descriptions()
13+
14+
print(response)

src/datadog_api_client/configuration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ def __init__(
350350
"v2.search_security_monitoring_histsignals": False,
351351
"v2.get_code_coverage_branch_summary": False,
352352
"v2.get_code_coverage_commit_summary": False,
353+
"v2.list_cost_tag_descriptions": False,
353354
"v2.create_dashboard_secure_embed": False,
354355
"v2.delete_dashboard_secure_embed": False,
355356
"v2.get_dashboard_secure_embed": False,

src/datadog_api_client/v2/api/cloud_cost_management_api.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
from datadog_api_client.v2.model.gcp_uc_config_response import GcpUcConfigResponse
4141
from datadog_api_client.v2.model.gcp_usage_cost_config_patch_request import GCPUsageCostConfigPatchRequest
4242
from datadog_api_client.v2.model.oci_configs_response import OCIConfigsResponse
43+
from datadog_api_client.v2.model.cost_tag_descriptions_response import CostTagDescriptionsResponse
4344
from datadog_api_client.v2.model.ruleset_resp_array import RulesetRespArray
4445
from datadog_api_client.v2.model.ruleset_resp import RulesetResp
4546
from datadog_api_client.v2.model.create_ruleset_request import CreateRulesetRequest
@@ -562,6 +563,28 @@ def __init__(self, api_client=None):
562563
api_client=api_client,
563564
)
564565

566+
self._list_cost_tag_descriptions_endpoint = _Endpoint(
567+
settings={
568+
"response_type": (CostTagDescriptionsResponse,),
569+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
570+
"endpoint_path": "/api/v2/cost/tag_descriptions",
571+
"operation_id": "list_cost_tag_descriptions",
572+
"http_method": "GET",
573+
"version": "v2",
574+
},
575+
params_map={
576+
"filter_cloud": {
577+
"openapi_types": (str,),
578+
"attribute": "filter[cloud]",
579+
"location": "query",
580+
},
581+
},
582+
headers_map={
583+
"accept": ["application/json"],
584+
},
585+
api_client=api_client,
586+
)
587+
565588
self._list_custom_allocation_rules_endpoint = _Endpoint(
566589
settings={
567590
"response_type": (ArbitraryRuleResponseArray,),
@@ -1333,6 +1356,25 @@ def list_cost_oci_configs(
13331356
kwargs: Dict[str, Any] = {}
13341357
return self._list_cost_oci_configs_endpoint.call_with_http_info(**kwargs)
13351358

1359+
def list_cost_tag_descriptions(
1360+
self,
1361+
*,
1362+
filter_cloud: Union[str, UnsetType] = unset,
1363+
) -> CostTagDescriptionsResponse:
1364+
"""List Cloud Cost Management tag descriptions.
1365+
1366+
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.
1367+
1368+
:param filter_cloud: Filter descriptions to a specific cloud provider (for example, ``aws`` ). Omit to return descriptions across all clouds.
1369+
:type filter_cloud: str, optional
1370+
:rtype: CostTagDescriptionsResponse
1371+
"""
1372+
kwargs: Dict[str, Any] = {}
1373+
if filter_cloud is not unset:
1374+
kwargs["filter_cloud"] = filter_cloud
1375+
1376+
return self._list_cost_tag_descriptions_endpoint.call_with_http_info(**kwargs)
1377+
13361378
def list_custom_allocation_rules(
13371379
self,
13381380
) -> ArbitraryRuleResponseArray:
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
)
12+
13+
14+
if TYPE_CHECKING:
15+
from datadog_api_client.v2.model.cost_tag_description_attributes import CostTagDescriptionAttributes
16+
from datadog_api_client.v2.model.cost_tag_description_type import CostTagDescriptionType
17+
18+
19+
class CostTagDescription(ModelNormal):
20+
@cached_property
21+
def openapi_types(_):
22+
from datadog_api_client.v2.model.cost_tag_description_attributes import CostTagDescriptionAttributes
23+
from datadog_api_client.v2.model.cost_tag_description_type import CostTagDescriptionType
24+
25+
return {
26+
"attributes": (CostTagDescriptionAttributes,),
27+
"id": (str,),
28+
"type": (CostTagDescriptionType,),
29+
}
30+
31+
attribute_map = {
32+
"attributes": "attributes",
33+
"id": "id",
34+
"type": "type",
35+
}
36+
37+
def __init__(self_, attributes: CostTagDescriptionAttributes, id: str, type: CostTagDescriptionType, **kwargs):
38+
"""
39+
A Cloud Cost Management tag key description, either cross-cloud or scoped to a single cloud provider.
40+
41+
:param attributes: Human-readable description and metadata attached to a Cloud Cost Management tag key, optionally scoped to a single cloud provider.
42+
:type attributes: CostTagDescriptionAttributes
43+
44+
: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.
45+
:type id: str
46+
47+
:param type: Type of the Cloud Cost Management tag description resource.
48+
:type type: CostTagDescriptionType
49+
"""
50+
super().__init__(kwargs)
51+
52+
self_.attributes = attributes
53+
self_.id = id
54+
self_.type = type

0 commit comments

Comments
 (0)