Skip to content

Commit a8d5db1

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 0ec9a04 of spec repo
1 parent 2ffd8d1 commit a8d5db1

11 files changed

Lines changed: 326 additions & 0 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18517,6 +18517,45 @@ components:
1851718517
x-enum-varnames:
1851818518
- "TRUE"
1851918519
- "FALSE"
18520+
CostTagMetadataMonth:
18521+
description: A month that has Cloud Cost Management tag metadata available for a given provider.
18522+
properties:
18523+
id:
18524+
description: The month, in `YYYY-MM` format.
18525+
example: "2026-04"
18526+
type: string
18527+
type:
18528+
$ref: "#/components/schemas/CostTagMetadataMonthType"
18529+
required:
18530+
- id
18531+
- type
18532+
type: object
18533+
CostTagMetadataMonthType:
18534+
default: cost_tag_metadata_month
18535+
description: Type of the Cloud Cost Management tag metadata month resource.
18536+
enum:
18537+
- cost_tag_metadata_month
18538+
example: cost_tag_metadata_month
18539+
type: string
18540+
x-enum-varnames:
18541+
- COST_TAG_METADATA_MONTH
18542+
CostTagMetadataMonthsResponse:
18543+
description: List of months that have Cloud Cost Management tag metadata for the requested provider, ordered most-recent first and capped at 36 months.
18544+
example:
18545+
data:
18546+
- id: "2026-04"
18547+
type: cost_tag_metadata_month
18548+
- id: "2026-03"
18549+
type: cost_tag_metadata_month
18550+
properties:
18551+
data:
18552+
description: List of months that have tag metadata available.
18553+
items:
18554+
$ref: "#/components/schemas/CostTagMetadataMonth"
18555+
type: array
18556+
required:
18557+
- data
18558+
type: object
1852018559
CostTagType:
1852118560
default: cost_tag
1852218561
description: Type of the Cloud Cost Management tag resource.
@@ -108781,6 +108820,64 @@ paths:
108781108820
x-unstable: |-
108782108821
**Note**: This endpoint is in preview and is subject to change.
108783108822
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
108823+
/api/v2/cost/tag_metadata/months:
108824+
get:
108825+
description: |-
108826+
List months that have Cloud Cost Management tag metadata for a given provider,
108827+
ordered most-recent first. The response is capped at 36 months.
108828+
operationId: ListCostTagMetadataMonths
108829+
parameters:
108830+
- description: Provider to scope the query to. Common cloud values are `aws`, `azure`, `gcp`, `Oracle` (OCI), and `custom`. SaaS billing integrations (for example, `Snowflake`, `MongoDB`, `Databricks`) are also accepted using their display-name string. Values are case-sensitive.
108831+
example: aws
108832+
in: query
108833+
name: filter[provider]
108834+
required: true
108835+
schema:
108836+
type: string
108837+
responses:
108838+
"200":
108839+
content:
108840+
application/json:
108841+
examples:
108842+
default:
108843+
value:
108844+
data:
108845+
- id: "2026-04"
108846+
type: cost_tag_metadata_month
108847+
- id: "2026-03"
108848+
type: cost_tag_metadata_month
108849+
schema:
108850+
$ref: "#/components/schemas/CostTagMetadataMonthsResponse"
108851+
description: OK
108852+
"400":
108853+
content:
108854+
application/json:
108855+
schema:
108856+
$ref: "#/components/schemas/APIErrorResponse"
108857+
description: Bad Request
108858+
"403":
108859+
content:
108860+
application/json:
108861+
schema:
108862+
$ref: "#/components/schemas/APIErrorResponse"
108863+
description: Forbidden
108864+
"429":
108865+
$ref: "#/components/responses/TooManyRequestsResponse"
108866+
security:
108867+
- apiKeyAuth: []
108868+
appKeyAuth: []
108869+
- AuthZ:
108870+
- cloud_cost_management_read
108871+
summary: List Cloud Cost Management tag metadata months
108872+
tags:
108873+
- Cloud Cost Management
108874+
"x-permission":
108875+
operator: OR
108876+
permissions:
108877+
- cloud_cost_management_read
108878+
x-unstable: |-
108879+
**Note**: This endpoint is in preview and is subject to change.
108880+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
108784108881
/api/v2/cost/tag_metadata/orchestrators:
108785108882
get:
108786108883
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: 42 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,24 @@ 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. Common cloud values are ``aws`` , ``azure`` , ``gcp`` , ``Oracle`` (OCI), and ``custom``. SaaS billing integrations (for example, ``Snowflake`` , ``MongoDB`` , ``Databricks`` ) are also accepted using their display-name string. Values are case-sensitive.
2809+
:type filter_provider: str
2810+
:rtype: CostTagMetadataMonthsResponse
2811+
"""
2812+
kwargs: Dict[str, Any] = {}
2813+
kwargs["filter_provider"] = filter_provider
2814+
2815+
return self._list_cost_tag_metadata_months_endpoint.call_with_http_info(**kwargs)
2816+
27752817
def list_cost_tag_metadata_orchestrators(
27762818
self,
27772819
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
@@ -9266,6 +9269,9 @@
92669269
"CostTagKeyType",
92679270
"CostTagKeysResponse",
92689271
"CostTagMetadataDailyFilter",
9272+
"CostTagMetadataMonth",
9273+
"CostTagMetadataMonthType",
9274+
"CostTagMetadataMonthsResponse",
92699275
"CostTagType",
92709276
"CostTagsResponse",
92719277
"CoverageSummaryAttributes",

tests/v2/features/cloud_cost_management.feature

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,22 @@ Feature: Cloud Cost Management
606606
When the request is sent
607607
Then the response status is 200 OK
608608

609+
@generated @skip @team:DataDog/cloud-cost-management
610+
Scenario: List Cloud Cost Management tag metadata months returns "Bad Request" response
611+
Given operation "ListCostTagMetadataMonths" enabled
612+
And new "ListCostTagMetadataMonths" request
613+
And request contains "filter[provider]" parameter from "REPLACE.ME"
614+
When the request is sent
615+
Then the response status is 400 Bad Request
616+
617+
@generated @skip @team:DataDog/cloud-cost-management
618+
Scenario: List Cloud Cost Management tag metadata months returns "OK" response
619+
Given operation "ListCostTagMetadataMonths" enabled
620+
And new "ListCostTagMetadataMonths" request
621+
And request contains "filter[provider]" parameter from "REPLACE.ME"
622+
When the request is sent
623+
Then the response status is 200 OK
624+
609625
@generated @skip @team:DataDog/cloud-cost-management
610626
Scenario: List Cloud Cost Management tag sources returns "Bad Request" response
611627
Given operation "ListCostTagKeySources" enabled

0 commit comments

Comments
 (0)