Skip to content

Commit bb5764c

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 7af9ca2 of spec repo
1 parent e3f4f02 commit bb5764c

19 files changed

Lines changed: 1257 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 418 additions & 0 deletions
Large diffs are not rendered by default.

docs/datadog_api_client.v2.model.rst

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

6223+
datadog\_api\_client.v2.model.cost\_tag module
6224+
----------------------------------------------
6225+
6226+
.. automodule:: datadog_api_client.v2.model.cost_tag
6227+
:members:
6228+
:show-inheritance:
6229+
6230+
datadog\_api\_client.v2.model.cost\_tag\_attributes module
6231+
----------------------------------------------------------
6232+
6233+
.. automodule:: datadog_api_client.v2.model.cost_tag_attributes
6234+
:members:
6235+
:show-inheritance:
6236+
62236237
datadog\_api\_client.v2.model.cost\_tag\_description module
62246238
-----------------------------------------------------------
62256239

@@ -6255,6 +6269,62 @@ datadog\_api\_client.v2.model.cost\_tag\_descriptions\_response module
62556269
:members:
62566270
:show-inheritance:
62576271

6272+
datadog\_api\_client.v2.model.cost\_tag\_key module
6273+
---------------------------------------------------
6274+
6275+
.. automodule:: datadog_api_client.v2.model.cost_tag_key
6276+
:members:
6277+
:show-inheritance:
6278+
6279+
datadog\_api\_client.v2.model.cost\_tag\_key\_attributes module
6280+
---------------------------------------------------------------
6281+
6282+
.. automodule:: datadog_api_client.v2.model.cost_tag_key_attributes
6283+
:members:
6284+
:show-inheritance:
6285+
6286+
datadog\_api\_client.v2.model.cost\_tag\_key\_details module
6287+
------------------------------------------------------------
6288+
6289+
.. automodule:: datadog_api_client.v2.model.cost_tag_key_details
6290+
:members:
6291+
:show-inheritance:
6292+
6293+
datadog\_api\_client.v2.model.cost\_tag\_key\_response module
6294+
-------------------------------------------------------------
6295+
6296+
.. automodule:: datadog_api_client.v2.model.cost_tag_key_response
6297+
:members:
6298+
:show-inheritance:
6299+
6300+
datadog\_api\_client.v2.model.cost\_tag\_key\_type module
6301+
---------------------------------------------------------
6302+
6303+
.. automodule:: datadog_api_client.v2.model.cost_tag_key_type
6304+
:members:
6305+
:show-inheritance:
6306+
6307+
datadog\_api\_client.v2.model.cost\_tag\_keys\_response module
6308+
--------------------------------------------------------------
6309+
6310+
.. automodule:: datadog_api_client.v2.model.cost_tag_keys_response
6311+
:members:
6312+
:show-inheritance:
6313+
6314+
datadog\_api\_client.v2.model.cost\_tag\_type module
6315+
----------------------------------------------------
6316+
6317+
.. automodule:: datadog_api_client.v2.model.cost_tag_type
6318+
:members:
6319+
:show-inheritance:
6320+
6321+
datadog\_api\_client.v2.model.cost\_tags\_response module
6322+
---------------------------------------------------------
6323+
6324+
.. automodule:: datadog_api_client.v2.model.cost_tags_response
6325+
:members:
6326+
:show-inheritance:
6327+
62586328
datadog\_api\_client.v2.model.coverage\_summary\_attributes module
62596329
------------------------------------------------------------------
62606330

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
Get a Cloud Cost Management tag key 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+
with ApiClient(configuration) as api_client:
10+
api_instance = CloudCostManagementApi(api_client)
11+
response = api_instance.get_cost_tag_key(
12+
tag_key="tag_key",
13+
)
14+
15+
print(response)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
List Cloud Cost Management tag keys 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+
with ApiClient(configuration) as api_client:
10+
api_instance = CloudCostManagementApi(api_client)
11+
response = api_instance.list_cost_tag_keys()
12+
13+
print(response)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
List Cloud Cost Management tags 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+
with ApiClient(configuration) as api_client:
10+
api_instance = CloudCostManagementApi(api_client)
11+
response = api_instance.list_cost_tags()
12+
13+
print(response)

src/datadog_api_client/v2/api/cloud_cost_management_api.py

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
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
4343
from datadog_api_client.v2.model.cost_tag_descriptions_response import CostTagDescriptionsResponse
44+
from datadog_api_client.v2.model.cost_tag_keys_response import CostTagKeysResponse
45+
from datadog_api_client.v2.model.cost_tag_key_response import CostTagKeyResponse
46+
from datadog_api_client.v2.model.cost_tags_response import CostTagsResponse
4447
from datadog_api_client.v2.model.ruleset_resp_array import RulesetRespArray
4548
from datadog_api_client.v2.model.ruleset_resp import RulesetResp
4649
from datadog_api_client.v2.model.create_ruleset_request import CreateRulesetRequest
@@ -414,6 +417,42 @@ def __init__(self, api_client=None):
414417
api_client=api_client,
415418
)
416419

420+
self._get_cost_tag_key_endpoint = _Endpoint(
421+
settings={
422+
"response_type": (CostTagKeyResponse,),
423+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
424+
"endpoint_path": "/api/v2/cost/tag_keys/{tag_key}",
425+
"operation_id": "get_cost_tag_key",
426+
"http_method": "GET",
427+
"version": "v2",
428+
},
429+
params_map={
430+
"tag_key": {
431+
"required": True,
432+
"openapi_types": (str,),
433+
"attribute": "tag_key",
434+
"location": "path",
435+
},
436+
"filter_metric": {
437+
"openapi_types": (str,),
438+
"attribute": "filter[metric]",
439+
"location": "query",
440+
},
441+
"page_size": {
442+
"validation": {
443+
"inclusive_maximum": 10000,
444+
},
445+
"openapi_types": (int,),
446+
"attribute": "page[size]",
447+
"location": "query",
448+
},
449+
},
450+
headers_map={
451+
"accept": ["application/json"],
452+
},
453+
api_client=api_client,
454+
)
455+
417456
self._get_custom_allocation_rule_endpoint = _Endpoint(
418457
settings={
419458
"response_type": (ArbitraryRuleResponse,),
@@ -585,6 +624,81 @@ def __init__(self, api_client=None):
585624
api_client=api_client,
586625
)
587626

627+
self._list_cost_tag_keys_endpoint = _Endpoint(
628+
settings={
629+
"response_type": (CostTagKeysResponse,),
630+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
631+
"endpoint_path": "/api/v2/cost/tag_keys",
632+
"operation_id": "list_cost_tag_keys",
633+
"http_method": "GET",
634+
"version": "v2",
635+
},
636+
params_map={
637+
"filter_metric": {
638+
"openapi_types": (str,),
639+
"attribute": "filter[metric]",
640+
"location": "query",
641+
},
642+
"filter_tags": {
643+
"openapi_types": ([str],),
644+
"attribute": "filter[tags]",
645+
"location": "query",
646+
"collection_format": "multi",
647+
},
648+
},
649+
headers_map={
650+
"accept": ["application/json"],
651+
},
652+
api_client=api_client,
653+
)
654+
655+
self._list_cost_tags_endpoint = _Endpoint(
656+
settings={
657+
"response_type": (CostTagsResponse,),
658+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
659+
"endpoint_path": "/api/v2/cost/tags",
660+
"operation_id": "list_cost_tags",
661+
"http_method": "GET",
662+
"version": "v2",
663+
},
664+
params_map={
665+
"filter_metric": {
666+
"openapi_types": (str,),
667+
"attribute": "filter[metric]",
668+
"location": "query",
669+
},
670+
"filter_match": {
671+
"openapi_types": (str,),
672+
"attribute": "filter[match]",
673+
"location": "query",
674+
},
675+
"filter_tags": {
676+
"openapi_types": ([str],),
677+
"attribute": "filter[tags]",
678+
"location": "query",
679+
"collection_format": "multi",
680+
},
681+
"filter_tag_keys": {
682+
"openapi_types": ([str],),
683+
"attribute": "filter[tag_keys]",
684+
"location": "query",
685+
"collection_format": "multi",
686+
},
687+
"page_size": {
688+
"validation": {
689+
"inclusive_maximum": 10000,
690+
},
691+
"openapi_types": (int,),
692+
"attribute": "page[size]",
693+
"location": "query",
694+
},
695+
},
696+
headers_map={
697+
"accept": ["application/json"],
698+
},
699+
api_client=api_client,
700+
)
701+
588702
self._list_custom_allocation_rules_endpoint = _Endpoint(
589703
settings={
590704
"response_type": (ArbitraryRuleResponseArray,),
@@ -1245,6 +1359,36 @@ def get_cost_gcp_usage_cost_config(
12451359

12461360
return self._get_cost_gcp_usage_cost_config_endpoint.call_with_http_info(**kwargs)
12471361

1362+
def get_cost_tag_key(
1363+
self,
1364+
tag_key: str,
1365+
*,
1366+
filter_metric: Union[str, UnsetType] = unset,
1367+
page_size: Union[int, UnsetType] = unset,
1368+
) -> CostTagKeyResponse:
1369+
"""Get a Cloud Cost Management tag key.
1370+
1371+
Get details for a specific Cloud Cost Management tag key, including example tag values and description.
1372+
1373+
:param tag_key: The Cloud Cost Management tag key. Tag keys can contain forward slashes (for example, ``kubernetes/instance`` ).
1374+
:type tag_key: str
1375+
:param filter_metric: The Cloud Cost Management metric to scope the tag key details to. When omitted, returns details across all metrics.
1376+
:type filter_metric: str, optional
1377+
:param page_size: Controls the size of the internal tag value search scope. This does **not** restrict the number of example tag values returned in the response. Defaults to 50, maximum 10000.
1378+
:type page_size: int, optional
1379+
:rtype: CostTagKeyResponse
1380+
"""
1381+
kwargs: Dict[str, Any] = {}
1382+
kwargs["tag_key"] = tag_key
1383+
1384+
if filter_metric is not unset:
1385+
kwargs["filter_metric"] = filter_metric
1386+
1387+
if page_size is not unset:
1388+
kwargs["page_size"] = page_size
1389+
1390+
return self._get_cost_tag_key_endpoint.call_with_http_info(**kwargs)
1391+
12481392
def get_custom_allocation_rule(
12491393
self,
12501394
rule_id: int,
@@ -1375,6 +1519,74 @@ def list_cost_tag_descriptions(
13751519

13761520
return self._list_cost_tag_descriptions_endpoint.call_with_http_info(**kwargs)
13771521

1522+
def list_cost_tag_keys(
1523+
self,
1524+
*,
1525+
filter_metric: Union[str, UnsetType] = unset,
1526+
filter_tags: Union[List[str], UnsetType] = unset,
1527+
) -> CostTagKeysResponse:
1528+
"""List Cloud Cost Management tag keys.
1529+
1530+
List Cloud Cost Management tag keys.
1531+
1532+
:param filter_metric: The Cloud Cost Management metric to scope the tag keys to. When omitted, returns tag keys across all metrics.
1533+
:type filter_metric: str, optional
1534+
:param filter_tags: Filter to return only tag keys that appear with the given ``key:value`` tag values. For example, ``filter[tags]=providername:aws`` returns tag keys found on the same cost data, such as ``is_aws_ec2_compute`` and ``aws_instance_type``.
1535+
:type filter_tags: [str], optional
1536+
:rtype: CostTagKeysResponse
1537+
"""
1538+
kwargs: Dict[str, Any] = {}
1539+
if filter_metric is not unset:
1540+
kwargs["filter_metric"] = filter_metric
1541+
1542+
if filter_tags is not unset:
1543+
kwargs["filter_tags"] = filter_tags
1544+
1545+
return self._list_cost_tag_keys_endpoint.call_with_http_info(**kwargs)
1546+
1547+
def list_cost_tags(
1548+
self,
1549+
*,
1550+
filter_metric: Union[str, UnsetType] = unset,
1551+
filter_match: Union[str, UnsetType] = unset,
1552+
filter_tags: Union[List[str], UnsetType] = unset,
1553+
filter_tag_keys: Union[List[str], UnsetType] = unset,
1554+
page_size: Union[int, UnsetType] = unset,
1555+
) -> CostTagsResponse:
1556+
"""List Cloud Cost Management tags.
1557+
1558+
List Cloud Cost Management tags for a given metric.
1559+
1560+
:param filter_metric: The Cloud Cost Management metric to scope the tags to. When omitted, returns tags across all metrics.
1561+
:type filter_metric: str, optional
1562+
:param filter_match: A substring used to filter the returned tags by name.
1563+
:type filter_match: str, optional
1564+
:param filter_tags: Filter to return only tags that appear with the given ``key:value`` tag values. For example, ``filter[tags]=providername:aws`` returns tags found on the same cost data, such as ``aws_instance_type:t3.micro`` and ``aws_instance_type:m5.large``.
1565+
:type filter_tags: [str], optional
1566+
:param filter_tag_keys: Restrict the returned tags to those whose key matches one of the given tag keys.
1567+
:type filter_tag_keys: [str], optional
1568+
:param page_size: Controls the size of the internal tag search scope. This does **not** restrict the number of tags returned in the response. Defaults to 50, maximum 10000.
1569+
:type page_size: int, optional
1570+
:rtype: CostTagsResponse
1571+
"""
1572+
kwargs: Dict[str, Any] = {}
1573+
if filter_metric is not unset:
1574+
kwargs["filter_metric"] = filter_metric
1575+
1576+
if filter_match is not unset:
1577+
kwargs["filter_match"] = filter_match
1578+
1579+
if filter_tags is not unset:
1580+
kwargs["filter_tags"] = filter_tags
1581+
1582+
if filter_tag_keys is not unset:
1583+
kwargs["filter_tag_keys"] = filter_tag_keys
1584+
1585+
if page_size is not unset:
1586+
kwargs["page_size"] = page_size
1587+
1588+
return self._list_cost_tags_endpoint.call_with_http_info(**kwargs)
1589+
13781590
def list_custom_allocation_rules(
13791591
self,
13801592
) -> ArbitraryRuleResponseArray:

0 commit comments

Comments
 (0)