Skip to content

Commit 77552fc

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 88697ae of spec repo
1 parent 2c1c409 commit 77552fc

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
@@ -18525,6 +18525,45 @@ components:
1852518525
x-enum-varnames:
1852618526
- "TRUE"
1852718527
- "FALSE"
18528+
CostTagMetadataMonth:
18529+
description: A month that has Cloud Cost Management tag metadata available for a given provider.
18530+
properties:
18531+
id:
18532+
description: The month, in `YYYY-MM` format.
18533+
example: "2026-04"
18534+
type: string
18535+
type:
18536+
$ref: "#/components/schemas/CostTagMetadataMonthType"
18537+
required:
18538+
- id
18539+
- type
18540+
type: object
18541+
CostTagMetadataMonthType:
18542+
default: cost_tag_metadata_month
18543+
description: Type of the Cloud Cost Management tag metadata month resource.
18544+
enum:
18545+
- cost_tag_metadata_month
18546+
example: cost_tag_metadata_month
18547+
type: string
18548+
x-enum-varnames:
18549+
- COST_TAG_METADATA_MONTH
18550+
CostTagMetadataMonthsResponse:
18551+
description: List of months that have Cloud Cost Management tag metadata for the requested provider, ordered most-recent first and capped at 36 months.
18552+
example:
18553+
data:
18554+
- id: "2026-04"
18555+
type: cost_tag_metadata_month
18556+
- id: "2026-03"
18557+
type: cost_tag_metadata_month
18558+
properties:
18559+
data:
18560+
description: List of months that have tag metadata available.
18561+
items:
18562+
$ref: "#/components/schemas/CostTagMetadataMonth"
18563+
type: array
18564+
required:
18565+
- data
18566+
type: object
1852818567
CostTagType:
1852918568
default: cost_tag
1853018569
description: Type of the Cloud Cost Management tag resource.
@@ -108886,6 +108925,68 @@ paths:
108886108925
x-unstable: |-
108887108926
**Note**: This endpoint is in preview and is subject to change.
108888108927
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
108928+
/api/v2/cost/tag_metadata/months:
108929+
get:
108930+
description: |-
108931+
List months that have Cloud Cost Management tag metadata for a given provider,
108932+
ordered most-recent first. The response is capped at 36 months.
108933+
operationId: ListCostTagMetadataMonths
108934+
parameters:
108935+
- description: |-
108936+
Provider to scope the query to. Use the value of the `providername` tag in CCM
108937+
(for example, `aws`, `azure`, `gcp`, `Oracle`, `Confluent Cloud`, `Snowflake`).
108938+
For costs uploaded through the Custom Costs API, use `custom`.
108939+
Values are case-sensitive.
108940+
example: aws
108941+
in: query
108942+
name: filter[provider]
108943+
required: true
108944+
schema:
108945+
type: string
108946+
responses:
108947+
"200":
108948+
content:
108949+
application/json:
108950+
examples:
108951+
default:
108952+
value:
108953+
data:
108954+
- id: "2026-04"
108955+
type: cost_tag_metadata_month
108956+
- id: "2026-03"
108957+
type: cost_tag_metadata_month
108958+
schema:
108959+
$ref: "#/components/schemas/CostTagMetadataMonthsResponse"
108960+
description: OK
108961+
"400":
108962+
content:
108963+
application/json:
108964+
schema:
108965+
$ref: "#/components/schemas/APIErrorResponse"
108966+
description: Bad Request
108967+
"403":
108968+
content:
108969+
application/json:
108970+
schema:
108971+
$ref: "#/components/schemas/APIErrorResponse"
108972+
description: Forbidden
108973+
"429":
108974+
$ref: "#/components/responses/TooManyRequestsResponse"
108975+
security:
108976+
- apiKeyAuth: []
108977+
appKeyAuth: []
108978+
- AuthZ:
108979+
- cloud_cost_management_read
108980+
summary: List Cloud Cost Management tag metadata months
108981+
tags:
108982+
- Cloud Cost Management
108983+
"x-permission":
108984+
operator: OR
108985+
permissions:
108986+
- cloud_cost_management_read
108987+
x-unstable: |-
108988+
**Note**: This endpoint is in preview and is subject to change.
108989+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
108889108990
/api/v2/cost/tag_metadata/orchestrators:
108890108991
get:
108891108992
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
@@ -7389,6 +7389,27 @@ datadog\_api\_client.v2.model.cost\_tag\_metadata\_daily\_filter module
73897389
:members:
73907390
:show-inheritance:
73917391

7392+
datadog\_api\_client.v2.model.cost\_tag\_metadata\_month module
7393+
---------------------------------------------------------------
7394+
7395+
.. automodule:: datadog_api_client.v2.model.cost_tag_metadata_month
7396+
:members:
7397+
:show-inheritance:
7398+
7399+
datadog\_api\_client.v2.model.cost\_tag\_metadata\_month\_type module
7400+
---------------------------------------------------------------------
7401+
7402+
.. automodule:: datadog_api_client.v2.model.cost_tag_metadata_month_type
7403+
:members:
7404+
:show-inheritance:
7405+
7406+
datadog\_api\_client.v2.model.cost\_tag\_metadata\_months\_response module
7407+
--------------------------------------------------------------------------
7408+
7409+
.. automodule:: datadog_api_client.v2.model.cost_tag_metadata_months_response
7410+
:members:
7411+
:show-inheritance:
7412+
73927413
datadog\_api\_client.v2.model.cost\_tag\_type module
73937414
----------------------------------------------------
73947415

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
@@ -426,6 +426,7 @@ def __init__(
426426
"v2.list_cost_tag_key_sources": False,
427427
"v2.list_cost_tag_metadata": False,
428428
"v2.list_cost_tag_metadata_metrics": False,
429+
"v2.list_cost_tag_metadata_months": False,
429430
"v2.list_cost_tag_metadata_orchestrators": False,
430431
"v2.search_cost_recommendations": False,
431432
"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
@@ -1349,6 +1349,9 @@
13491349
from datadog_api_client.v2.model.cost_tag_key_type import CostTagKeyType
13501350
from datadog_api_client.v2.model.cost_tag_keys_response import CostTagKeysResponse
13511351
from datadog_api_client.v2.model.cost_tag_metadata_daily_filter import CostTagMetadataDailyFilter
1352+
from datadog_api_client.v2.model.cost_tag_metadata_month import CostTagMetadataMonth
1353+
from datadog_api_client.v2.model.cost_tag_metadata_month_type import CostTagMetadataMonthType
1354+
from datadog_api_client.v2.model.cost_tag_metadata_months_response import CostTagMetadataMonthsResponse
13521355
from datadog_api_client.v2.model.cost_tag_type import CostTagType
13531356
from datadog_api_client.v2.model.cost_tags_response import CostTagsResponse
13541357
from datadog_api_client.v2.model.coverage_summary_attributes import CoverageSummaryAttributes
@@ -9277,6 +9280,9 @@
92779280
"CostTagKeyType",
92789281
"CostTagKeysResponse",
92799282
"CostTagMetadataDailyFilter",
9283+
"CostTagMetadataMonth",
9284+
"CostTagMetadataMonthType",
9285+
"CostTagMetadataMonthsResponse",
92809286
"CostTagType",
92819287
"CostTagsResponse",
92829288
"CoverageSummaryAttributes",

0 commit comments

Comments
 (0)