Skip to content

Commit 386a156

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 622be32 of spec repo (#3574)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent df8b4ad commit 386a156

11 files changed

Lines changed: 333 additions & 0 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19897,6 +19897,45 @@ components:
1989719897
x-enum-varnames:
1989819898
- "TRUE"
1989919899
- "FALSE"
19900+
CostTagMetadataMonth:
19901+
description: A month that has Cloud Cost Management tag metadata available for a given provider.
19902+
properties:
19903+
id:
19904+
description: The month, in `YYYY-MM` format.
19905+
example: "2026-04"
19906+
type: string
19907+
type:
19908+
$ref: "#/components/schemas/CostTagMetadataMonthType"
19909+
required:
19910+
- id
19911+
- type
19912+
type: object
19913+
CostTagMetadataMonthType:
19914+
default: cost_tag_metadata_month
19915+
description: Type of the Cloud Cost Management tag metadata month resource.
19916+
enum:
19917+
- cost_tag_metadata_month
19918+
example: cost_tag_metadata_month
19919+
type: string
19920+
x-enum-varnames:
19921+
- COST_TAG_METADATA_MONTH
19922+
CostTagMetadataMonthsResponse:
19923+
description: List of months that have Cloud Cost Management tag metadata for the requested provider, ordered most-recent first and capped at 36 months.
19924+
example:
19925+
data:
19926+
- id: "2026-04"
19927+
type: cost_tag_metadata_month
19928+
- id: "2026-03"
19929+
type: cost_tag_metadata_month
19930+
properties:
19931+
data:
19932+
description: List of months that have tag metadata available.
19933+
items:
19934+
$ref: "#/components/schemas/CostTagMetadataMonth"
19935+
type: array
19936+
required:
19937+
- data
19938+
type: object
1990019939
CostTagType:
1990119940
default: cost_tag
1990219941
description: Type of the Cloud Cost Management tag resource.
@@ -111135,6 +111174,68 @@ paths:
111135111174
x-unstable: |-
111136111175
**Note**: This endpoint is in preview and is subject to change.
111137111176
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
111177+
/api/v2/cost/tag_metadata/months:
111178+
get:
111179+
description: |-
111180+
List months that have Cloud Cost Management tag metadata for a given provider,
111181+
ordered most-recent first. The response is capped at 36 months.
111182+
operationId: ListCostTagMetadataMonths
111183+
parameters:
111184+
- description: |-
111185+
Provider to scope the query to. Use the value of the `providername` tag in CCM
111186+
(for example, `aws`, `azure`, `gcp`, `Oracle`, `Confluent Cloud`, `Snowflake`).
111187+
For costs uploaded through the Custom Costs API, use `custom`.
111188+
Values are case-sensitive.
111189+
example: aws
111190+
in: query
111191+
name: filter[provider]
111192+
required: true
111193+
schema:
111194+
type: string
111195+
responses:
111196+
"200":
111197+
content:
111198+
application/json:
111199+
examples:
111200+
default:
111201+
value:
111202+
data:
111203+
- id: "2026-04"
111204+
type: cost_tag_metadata_month
111205+
- id: "2026-03"
111206+
type: cost_tag_metadata_month
111207+
schema:
111208+
$ref: "#/components/schemas/CostTagMetadataMonthsResponse"
111209+
description: OK
111210+
"400":
111211+
content:
111212+
application/json:
111213+
schema:
111214+
$ref: "#/components/schemas/APIErrorResponse"
111215+
description: Bad Request
111216+
"403":
111217+
content:
111218+
application/json:
111219+
schema:
111220+
$ref: "#/components/schemas/APIErrorResponse"
111221+
description: Forbidden
111222+
"429":
111223+
$ref: "#/components/responses/TooManyRequestsResponse"
111224+
security:
111225+
- apiKeyAuth: []
111226+
appKeyAuth: []
111227+
- AuthZ:
111228+
- cloud_cost_management_read
111229+
summary: List Cloud Cost Management tag metadata months
111230+
tags:
111231+
- Cloud Cost Management
111232+
"x-permission":
111233+
operator: OR
111234+
permissions:
111235+
- cloud_cost_management_read
111236+
x-unstable: |-
111237+
**Note**: This endpoint is in preview and is subject to change.
111238+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
111138111239
/api/v2/cost/tag_metadata/orchestrators:
111139111240
get:
111140111241
description: List container orchestrators (for example, `kubernetes`, `ecs`) detected in Cloud Cost Management data for the requested period.

docs/datadog_api_client.v2.model.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7872,6 +7872,27 @@ datadog\_api\_client.v2.model.cost\_tag\_metadata\_daily\_filter module
78727872
:members:
78737873
:show-inheritance:
78747874

7875+
datadog\_api\_client.v2.model.cost\_tag\_metadata\_month module
7876+
---------------------------------------------------------------
7877+
7878+
.. automodule:: datadog_api_client.v2.model.cost_tag_metadata_month
7879+
:members:
7880+
:show-inheritance:
7881+
7882+
datadog\_api\_client.v2.model.cost\_tag\_metadata\_month\_type module
7883+
---------------------------------------------------------------------
7884+
7885+
.. automodule:: datadog_api_client.v2.model.cost_tag_metadata_month_type
7886+
:members:
7887+
:show-inheritance:
7888+
7889+
datadog\_api\_client.v2.model.cost\_tag\_metadata\_months\_response module
7890+
--------------------------------------------------------------------------
7891+
7892+
.. automodule:: datadog_api_client.v2.model.cost_tag_metadata_months_response
7893+
:members:
7894+
:show-inheritance:
7895+
78757896
datadog\_api\_client.v2.model.cost\_tag\_type module
78767897
----------------------------------------------------
78777898

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
List Cloud Cost Management tag metadata months 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_metadata_months"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = CloudCostManagementApi(api_client)
12+
response = api_instance.list_cost_tag_metadata_months(
13+
filter_provider="filter[provider]",
14+
)
15+
16+
print(response)

src/datadog_api_client/configuration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ def __init__(
445445
"v2.list_cost_tag_key_sources": False,
446446
"v2.list_cost_tag_metadata": False,
447447
"v2.list_cost_tag_metadata_metrics": False,
448+
"v2.list_cost_tag_metadata_months": False,
448449
"v2.list_cost_tag_metadata_orchestrators": False,
449450
"v2.search_cost_recommendations": False,
450451
"v2.create_dashboard_secure_embed": False,

src/datadog_api_client/v2/api/cloud_cost_management_api.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
from datadog_api_client.v2.model.cost_tag_metadata_daily_filter import CostTagMetadataDailyFilter
6666
from datadog_api_client.v2.model.cost_currency_response import CostCurrencyResponse
6767
from datadog_api_client.v2.model.cost_metrics_response import CostMetricsResponse
68+
from datadog_api_client.v2.model.cost_tag_metadata_months_response import CostTagMetadataMonthsResponse
6869
from datadog_api_client.v2.model.cost_orchestrators_response import CostOrchestratorsResponse
6970
from datadog_api_client.v2.model.cost_tag_key_sources_response import CostTagKeySourcesResponse
7071
from datadog_api_client.v2.model.cost_tags_response import CostTagsResponse
@@ -1282,6 +1283,29 @@ def __init__(self, api_client=None):
12821283
api_client=api_client,
12831284
)
12841285

1286+
self._list_cost_tag_metadata_months_endpoint = _Endpoint(
1287+
settings={
1288+
"response_type": (CostTagMetadataMonthsResponse,),
1289+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
1290+
"endpoint_path": "/api/v2/cost/tag_metadata/months",
1291+
"operation_id": "list_cost_tag_metadata_months",
1292+
"http_method": "GET",
1293+
"version": "v2",
1294+
},
1295+
params_map={
1296+
"filter_provider": {
1297+
"required": True,
1298+
"openapi_types": (str,),
1299+
"attribute": "filter[provider]",
1300+
"location": "query",
1301+
},
1302+
},
1303+
headers_map={
1304+
"accept": ["application/json"],
1305+
},
1306+
api_client=api_client,
1307+
)
1308+
12851309
self._list_cost_tag_metadata_orchestrators_endpoint = _Endpoint(
12861310
settings={
12871311
"response_type": (CostOrchestratorsResponse,),
@@ -2772,6 +2796,27 @@ def list_cost_tag_metadata_metrics(
27722796

27732797
return self._list_cost_tag_metadata_metrics_endpoint.call_with_http_info(**kwargs)
27742798

2799+
def list_cost_tag_metadata_months(
2800+
self,
2801+
filter_provider: str,
2802+
) -> CostTagMetadataMonthsResponse:
2803+
"""List Cloud Cost Management tag metadata months.
2804+
2805+
List months that have Cloud Cost Management tag metadata for a given provider,
2806+
ordered most-recent first. The response is capped at 36 months.
2807+
2808+
:param filter_provider: Provider to scope the query to. Use the value of the ``providername`` tag in CCM
2809+
(for example, ``aws`` , ``azure`` , ``gcp`` , ``Oracle`` , ``Confluent Cloud`` , ``Snowflake`` ).
2810+
For costs uploaded through the Custom Costs API, use ``custom``.
2811+
Values are case-sensitive.
2812+
:type filter_provider: str
2813+
:rtype: CostTagMetadataMonthsResponse
2814+
"""
2815+
kwargs: Dict[str, Any] = {}
2816+
kwargs["filter_provider"] = filter_provider
2817+
2818+
return self._list_cost_tag_metadata_months_endpoint.call_with_http_info(**kwargs)
2819+
27752820
def list_cost_tag_metadata_orchestrators(
27762821
self,
27772822
filter_month: str,
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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_metadata_month_type import CostTagMetadataMonthType
16+
17+
18+
class CostTagMetadataMonth(ModelNormal):
19+
@cached_property
20+
def openapi_types(_):
21+
from datadog_api_client.v2.model.cost_tag_metadata_month_type import CostTagMetadataMonthType
22+
23+
return {
24+
"id": (str,),
25+
"type": (CostTagMetadataMonthType,),
26+
}
27+
28+
attribute_map = {
29+
"id": "id",
30+
"type": "type",
31+
}
32+
33+
def __init__(self_, id: str, type: CostTagMetadataMonthType, **kwargs):
34+
"""
35+
A month that has Cloud Cost Management tag metadata available for a given provider.
36+
37+
:param id: The month, in ``YYYY-MM`` format.
38+
:type id: str
39+
40+
:param type: Type of the Cloud Cost Management tag metadata month resource.
41+
:type type: CostTagMetadataMonthType
42+
"""
43+
super().__init__(kwargs)
44+
45+
self_.id = id
46+
self_.type = type
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
7+
from datadog_api_client.model_utils import (
8+
ModelSimple,
9+
cached_property,
10+
)
11+
12+
from typing import ClassVar
13+
14+
15+
class CostTagMetadataMonthType(ModelSimple):
16+
"""
17+
Type of the Cloud Cost Management tag metadata month resource.
18+
19+
:param value: If omitted defaults to "cost_tag_metadata_month". Must be one of ["cost_tag_metadata_month"].
20+
:type value: str
21+
"""
22+
23+
allowed_values = {
24+
"cost_tag_metadata_month",
25+
}
26+
COST_TAG_METADATA_MONTH: ClassVar["CostTagMetadataMonthType"]
27+
28+
@cached_property
29+
def openapi_types(_):
30+
return {
31+
"value": (str,),
32+
}
33+
34+
35+
CostTagMetadataMonthType.COST_TAG_METADATA_MONTH = CostTagMetadataMonthType("cost_tag_metadata_month")
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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 List, 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_metadata_month import CostTagMetadataMonth
16+
17+
18+
class CostTagMetadataMonthsResponse(ModelNormal):
19+
@cached_property
20+
def openapi_types(_):
21+
from datadog_api_client.v2.model.cost_tag_metadata_month import CostTagMetadataMonth
22+
23+
return {
24+
"data": ([CostTagMetadataMonth],),
25+
}
26+
27+
attribute_map = {
28+
"data": "data",
29+
}
30+
31+
def __init__(self_, data: List[CostTagMetadataMonth], **kwargs):
32+
"""
33+
List of months that have Cloud Cost Management tag metadata for the requested provider, ordered most-recent first and capped at 36 months.
34+
35+
:param data: List of months that have tag metadata available.
36+
:type data: [CostTagMetadataMonth]
37+
"""
38+
super().__init__(kwargs)
39+
40+
self_.data = data

src/datadog_api_client/v2/models/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,6 +1434,9 @@
14341434
from datadog_api_client.v2.model.cost_tag_key_type import CostTagKeyType
14351435
from datadog_api_client.v2.model.cost_tag_keys_response import CostTagKeysResponse
14361436
from datadog_api_client.v2.model.cost_tag_metadata_daily_filter import CostTagMetadataDailyFilter
1437+
from datadog_api_client.v2.model.cost_tag_metadata_month import CostTagMetadataMonth
1438+
from datadog_api_client.v2.model.cost_tag_metadata_month_type import CostTagMetadataMonthType
1439+
from datadog_api_client.v2.model.cost_tag_metadata_months_response import CostTagMetadataMonthsResponse
14371440
from datadog_api_client.v2.model.cost_tag_type import CostTagType
14381441
from datadog_api_client.v2.model.cost_tags_response import CostTagsResponse
14391442
from datadog_api_client.v2.model.coverage_summary_attributes import CoverageSummaryAttributes
@@ -9539,6 +9542,9 @@
95399542
"CostTagKeyType",
95409543
"CostTagKeysResponse",
95419544
"CostTagMetadataDailyFilter",
9545+
"CostTagMetadataMonth",
9546+
"CostTagMetadataMonthType",
9547+
"CostTagMetadataMonthsResponse",
95429548
"CostTagType",
95439549
"CostTagsResponse",
95449550
"CoverageSummaryAttributes",

0 commit comments

Comments
 (0)