Skip to content

Commit 30175d8

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 4a11e68 of spec repo
1 parent 7b859dc commit 30175d8

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,76 @@ 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+
6237+
datadog\_api\_client.v2.model.cost\_tag\_key module
6238+
---------------------------------------------------
6239+
6240+
.. automodule:: datadog_api_client.v2.model.cost_tag_key
6241+
:members:
6242+
:show-inheritance:
6243+
6244+
datadog\_api\_client.v2.model.cost\_tag\_key\_attributes module
6245+
---------------------------------------------------------------
6246+
6247+
.. automodule:: datadog_api_client.v2.model.cost_tag_key_attributes
6248+
:members:
6249+
:show-inheritance:
6250+
6251+
datadog\_api\_client.v2.model.cost\_tag\_key\_details module
6252+
------------------------------------------------------------
6253+
6254+
.. automodule:: datadog_api_client.v2.model.cost_tag_key_details
6255+
:members:
6256+
:show-inheritance:
6257+
6258+
datadog\_api\_client.v2.model.cost\_tag\_key\_response module
6259+
-------------------------------------------------------------
6260+
6261+
.. automodule:: datadog_api_client.v2.model.cost_tag_key_response
6262+
:members:
6263+
:show-inheritance:
6264+
6265+
datadog\_api\_client.v2.model.cost\_tag\_key\_type module
6266+
---------------------------------------------------------
6267+
6268+
.. automodule:: datadog_api_client.v2.model.cost_tag_key_type
6269+
:members:
6270+
:show-inheritance:
6271+
6272+
datadog\_api\_client.v2.model.cost\_tag\_keys\_response module
6273+
--------------------------------------------------------------
6274+
6275+
.. automodule:: datadog_api_client.v2.model.cost_tag_keys_response
6276+
:members:
6277+
:show-inheritance:
6278+
6279+
datadog\_api\_client.v2.model.cost\_tag\_type module
6280+
----------------------------------------------------
6281+
6282+
.. automodule:: datadog_api_client.v2.model.cost_tag_type
6283+
:members:
6284+
:show-inheritance:
6285+
6286+
datadog\_api\_client.v2.model.cost\_tags\_response module
6287+
---------------------------------------------------------
6288+
6289+
.. automodule:: datadog_api_client.v2.model.cost_tags_response
6290+
:members:
6291+
:show-inheritance:
6292+
62236293
datadog\_api\_client.v2.model.coverage\_summary\_attributes module
62246294
------------------------------------------------------------------
62256295

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
@@ -40,6 +40,9 @@
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_keys_response import CostTagKeysResponse
44+
from datadog_api_client.v2.model.cost_tag_key_response import CostTagKeyResponse
45+
from datadog_api_client.v2.model.cost_tags_response import CostTagsResponse
4346
from datadog_api_client.v2.model.ruleset_resp_array import RulesetRespArray
4447
from datadog_api_client.v2.model.ruleset_resp import RulesetResp
4548
from datadog_api_client.v2.model.create_ruleset_request import CreateRulesetRequest
@@ -413,6 +416,42 @@ def __init__(self, api_client=None):
413416
api_client=api_client,
414417
)
415418

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

604+
self._list_cost_tag_keys_endpoint = _Endpoint(
605+
settings={
606+
"response_type": (CostTagKeysResponse,),
607+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
608+
"endpoint_path": "/api/v2/cost/tag_keys",
609+
"operation_id": "list_cost_tag_keys",
610+
"http_method": "GET",
611+
"version": "v2",
612+
},
613+
params_map={
614+
"filter_metric": {
615+
"openapi_types": (str,),
616+
"attribute": "filter[metric]",
617+
"location": "query",
618+
},
619+
"filter_tags": {
620+
"openapi_types": ([str],),
621+
"attribute": "filter[tags]",
622+
"location": "query",
623+
"collection_format": "multi",
624+
},
625+
},
626+
headers_map={
627+
"accept": ["application/json"],
628+
},
629+
api_client=api_client,
630+
)
631+
632+
self._list_cost_tags_endpoint = _Endpoint(
633+
settings={
634+
"response_type": (CostTagsResponse,),
635+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
636+
"endpoint_path": "/api/v2/cost/tags",
637+
"operation_id": "list_cost_tags",
638+
"http_method": "GET",
639+
"version": "v2",
640+
},
641+
params_map={
642+
"filter_metric": {
643+
"openapi_types": (str,),
644+
"attribute": "filter[metric]",
645+
"location": "query",
646+
},
647+
"filter_match": {
648+
"openapi_types": (str,),
649+
"attribute": "filter[match]",
650+
"location": "query",
651+
},
652+
"filter_tags": {
653+
"openapi_types": ([str],),
654+
"attribute": "filter[tags]",
655+
"location": "query",
656+
"collection_format": "multi",
657+
},
658+
"filter_tag_keys": {
659+
"openapi_types": ([str],),
660+
"attribute": "filter[tag_keys]",
661+
"location": "query",
662+
"collection_format": "multi",
663+
},
664+
"page_size": {
665+
"validation": {
666+
"inclusive_maximum": 10000,
667+
},
668+
"openapi_types": (int,),
669+
"attribute": "page[size]",
670+
"location": "query",
671+
},
672+
},
673+
headers_map={
674+
"accept": ["application/json"],
675+
},
676+
api_client=api_client,
677+
)
678+
565679
self._list_custom_allocation_rules_endpoint = _Endpoint(
566680
settings={
567681
"response_type": (ArbitraryRuleResponseArray,),
@@ -1222,6 +1336,36 @@ def get_cost_gcp_usage_cost_config(
12221336

12231337
return self._get_cost_gcp_usage_cost_config_endpoint.call_with_http_info(**kwargs)
12241338

1339+
def get_cost_tag_key(
1340+
self,
1341+
tag_key: str,
1342+
*,
1343+
filter_metric: Union[str, UnsetType] = unset,
1344+
page_size: Union[int, UnsetType] = unset,
1345+
) -> CostTagKeyResponse:
1346+
"""Get a Cloud Cost Management tag key.
1347+
1348+
Get details for a specific Cloud Cost Management tag key, including example tag values and description.
1349+
1350+
:param tag_key: The Cloud Cost Management tag key. Tag keys can contain forward slashes (for example, ``kubernetes/instance`` ).
1351+
:type tag_key: str
1352+
:param filter_metric: The Cloud Cost Management metric to scope the tag key details to. When omitted, returns details across all metrics.
1353+
:type filter_metric: str, optional
1354+
: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.
1355+
:type page_size: int, optional
1356+
:rtype: CostTagKeyResponse
1357+
"""
1358+
kwargs: Dict[str, Any] = {}
1359+
kwargs["tag_key"] = tag_key
1360+
1361+
if filter_metric is not unset:
1362+
kwargs["filter_metric"] = filter_metric
1363+
1364+
if page_size is not unset:
1365+
kwargs["page_size"] = page_size
1366+
1367+
return self._get_cost_tag_key_endpoint.call_with_http_info(**kwargs)
1368+
12251369
def get_custom_allocation_rule(
12261370
self,
12271371
rule_id: int,
@@ -1333,6 +1477,74 @@ def list_cost_oci_configs(
13331477
kwargs: Dict[str, Any] = {}
13341478
return self._list_cost_oci_configs_endpoint.call_with_http_info(**kwargs)
13351479

1480+
def list_cost_tag_keys(
1481+
self,
1482+
*,
1483+
filter_metric: Union[str, UnsetType] = unset,
1484+
filter_tags: Union[List[str], UnsetType] = unset,
1485+
) -> CostTagKeysResponse:
1486+
"""List Cloud Cost Management tag keys.
1487+
1488+
List Cloud Cost Management tag keys.
1489+
1490+
:param filter_metric: The Cloud Cost Management metric to scope the tag keys to. When omitted, returns tag keys across all metrics.
1491+
:type filter_metric: str, optional
1492+
: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``.
1493+
:type filter_tags: [str], optional
1494+
:rtype: CostTagKeysResponse
1495+
"""
1496+
kwargs: Dict[str, Any] = {}
1497+
if filter_metric is not unset:
1498+
kwargs["filter_metric"] = filter_metric
1499+
1500+
if filter_tags is not unset:
1501+
kwargs["filter_tags"] = filter_tags
1502+
1503+
return self._list_cost_tag_keys_endpoint.call_with_http_info(**kwargs)
1504+
1505+
def list_cost_tags(
1506+
self,
1507+
*,
1508+
filter_metric: Union[str, UnsetType] = unset,
1509+
filter_match: Union[str, UnsetType] = unset,
1510+
filter_tags: Union[List[str], UnsetType] = unset,
1511+
filter_tag_keys: Union[List[str], UnsetType] = unset,
1512+
page_size: Union[int, UnsetType] = unset,
1513+
) -> CostTagsResponse:
1514+
"""List Cloud Cost Management tags.
1515+
1516+
List Cloud Cost Management tags for a given metric.
1517+
1518+
:param filter_metric: The Cloud Cost Management metric to scope the tags to. When omitted, returns tags across all metrics.
1519+
:type filter_metric: str, optional
1520+
:param filter_match: A substring used to filter the returned tags by name.
1521+
:type filter_match: str, optional
1522+
: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``.
1523+
:type filter_tags: [str], optional
1524+
:param filter_tag_keys: Restrict the returned tags to those whose key matches one of the given tag keys.
1525+
:type filter_tag_keys: [str], optional
1526+
: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.
1527+
:type page_size: int, optional
1528+
:rtype: CostTagsResponse
1529+
"""
1530+
kwargs: Dict[str, Any] = {}
1531+
if filter_metric is not unset:
1532+
kwargs["filter_metric"] = filter_metric
1533+
1534+
if filter_match is not unset:
1535+
kwargs["filter_match"] = filter_match
1536+
1537+
if filter_tags is not unset:
1538+
kwargs["filter_tags"] = filter_tags
1539+
1540+
if filter_tag_keys is not unset:
1541+
kwargs["filter_tag_keys"] = filter_tag_keys
1542+
1543+
if page_size is not unset:
1544+
kwargs["page_size"] = page_size
1545+
1546+
return self._list_cost_tags_endpoint.call_with_http_info(**kwargs)
1547+
13361548
def list_custom_allocation_rules(
13371549
self,
13381550
) -> ArbitraryRuleResponseArray:

0 commit comments

Comments
 (0)