Skip to content

Commit ff17b87

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 3d6d3ae of spec repo (#3507)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 1225fcc commit ff17b87

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
@@ -6290,6 +6290,20 @@ datadog\_api\_client.v2.model.cost\_by\_org\_type module
62906290
:members:
62916291
:show-inheritance:
62926292

6293+
datadog\_api\_client.v2.model.cost\_tag module
6294+
----------------------------------------------
6295+
6296+
.. automodule:: datadog_api_client.v2.model.cost_tag
6297+
:members:
6298+
:show-inheritance:
6299+
6300+
datadog\_api\_client.v2.model.cost\_tag\_attributes module
6301+
----------------------------------------------------------
6302+
6303+
.. automodule:: datadog_api_client.v2.model.cost_tag_attributes
6304+
:members:
6305+
:show-inheritance:
6306+
62936307
datadog\_api\_client.v2.model.cost\_tag\_description module
62946308
-----------------------------------------------------------
62956309

@@ -6325,6 +6339,62 @@ datadog\_api\_client.v2.model.cost\_tag\_descriptions\_response module
63256339
:members:
63266340
:show-inheritance:
63276341

6342+
datadog\_api\_client.v2.model.cost\_tag\_key module
6343+
---------------------------------------------------
6344+
6345+
.. automodule:: datadog_api_client.v2.model.cost_tag_key
6346+
:members:
6347+
:show-inheritance:
6348+
6349+
datadog\_api\_client.v2.model.cost\_tag\_key\_attributes module
6350+
---------------------------------------------------------------
6351+
6352+
.. automodule:: datadog_api_client.v2.model.cost_tag_key_attributes
6353+
:members:
6354+
:show-inheritance:
6355+
6356+
datadog\_api\_client.v2.model.cost\_tag\_key\_details module
6357+
------------------------------------------------------------
6358+
6359+
.. automodule:: datadog_api_client.v2.model.cost_tag_key_details
6360+
:members:
6361+
:show-inheritance:
6362+
6363+
datadog\_api\_client.v2.model.cost\_tag\_key\_response module
6364+
-------------------------------------------------------------
6365+
6366+
.. automodule:: datadog_api_client.v2.model.cost_tag_key_response
6367+
:members:
6368+
:show-inheritance:
6369+
6370+
datadog\_api\_client.v2.model.cost\_tag\_key\_type module
6371+
---------------------------------------------------------
6372+
6373+
.. automodule:: datadog_api_client.v2.model.cost_tag_key_type
6374+
:members:
6375+
:show-inheritance:
6376+
6377+
datadog\_api\_client.v2.model.cost\_tag\_keys\_response module
6378+
--------------------------------------------------------------
6379+
6380+
.. automodule:: datadog_api_client.v2.model.cost_tag_keys_response
6381+
:members:
6382+
:show-inheritance:
6383+
6384+
datadog\_api\_client.v2.model.cost\_tag\_type module
6385+
----------------------------------------------------
6386+
6387+
.. automodule:: datadog_api_client.v2.model.cost_tag_type
6388+
:members:
6389+
:show-inheritance:
6390+
6391+
datadog\_api\_client.v2.model.cost\_tags\_response module
6392+
---------------------------------------------------------
6393+
6394+
.. automodule:: datadog_api_client.v2.model.cost_tags_response
6395+
:members:
6396+
:show-inheritance:
6397+
63286398
datadog\_api\_client.v2.model.coverage\_summary\_attributes module
63296399
------------------------------------------------------------------
63306400

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
@@ -43,6 +43,9 @@
4343
from datadog_api_client.v2.model.gcp_usage_cost_config_patch_request import GCPUsageCostConfigPatchRequest
4444
from datadog_api_client.v2.model.oci_configs_response import OCIConfigsResponse
4545
from datadog_api_client.v2.model.cost_tag_descriptions_response import CostTagDescriptionsResponse
46+
from datadog_api_client.v2.model.cost_tag_keys_response import CostTagKeysResponse
47+
from datadog_api_client.v2.model.cost_tag_key_response import CostTagKeyResponse
48+
from datadog_api_client.v2.model.cost_tags_response import CostTagsResponse
4649
from datadog_api_client.v2.model.ruleset_resp_array import RulesetRespArray
4750
from datadog_api_client.v2.model.ruleset_resp import RulesetResp
4851
from datadog_api_client.v2.model.create_ruleset_request import CreateRulesetRequest
@@ -439,6 +442,42 @@ def __init__(self, api_client=None):
439442
api_client=api_client,
440443
)
441444

445+
self._get_cost_tag_key_endpoint = _Endpoint(
446+
settings={
447+
"response_type": (CostTagKeyResponse,),
448+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
449+
"endpoint_path": "/api/v2/cost/tag_keys/{tag_key}",
450+
"operation_id": "get_cost_tag_key",
451+
"http_method": "GET",
452+
"version": "v2",
453+
},
454+
params_map={
455+
"tag_key": {
456+
"required": True,
457+
"openapi_types": (str,),
458+
"attribute": "tag_key",
459+
"location": "path",
460+
},
461+
"filter_metric": {
462+
"openapi_types": (str,),
463+
"attribute": "filter[metric]",
464+
"location": "query",
465+
},
466+
"page_size": {
467+
"validation": {
468+
"inclusive_maximum": 10000,
469+
},
470+
"openapi_types": (int,),
471+
"attribute": "page[size]",
472+
"location": "query",
473+
},
474+
},
475+
headers_map={
476+
"accept": ["application/json"],
477+
},
478+
api_client=api_client,
479+
)
480+
442481
self._get_custom_allocation_rule_endpoint = _Endpoint(
443482
settings={
444483
"response_type": (ArbitraryRuleResponse,),
@@ -683,6 +722,81 @@ def __init__(self, api_client=None):
683722
api_client=api_client,
684723
)
685724

725+
self._list_cost_tag_keys_endpoint = _Endpoint(
726+
settings={
727+
"response_type": (CostTagKeysResponse,),
728+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
729+
"endpoint_path": "/api/v2/cost/tag_keys",
730+
"operation_id": "list_cost_tag_keys",
731+
"http_method": "GET",
732+
"version": "v2",
733+
},
734+
params_map={
735+
"filter_metric": {
736+
"openapi_types": (str,),
737+
"attribute": "filter[metric]",
738+
"location": "query",
739+
},
740+
"filter_tags": {
741+
"openapi_types": ([str],),
742+
"attribute": "filter[tags]",
743+
"location": "query",
744+
"collection_format": "multi",
745+
},
746+
},
747+
headers_map={
748+
"accept": ["application/json"],
749+
},
750+
api_client=api_client,
751+
)
752+
753+
self._list_cost_tags_endpoint = _Endpoint(
754+
settings={
755+
"response_type": (CostTagsResponse,),
756+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
757+
"endpoint_path": "/api/v2/cost/tags",
758+
"operation_id": "list_cost_tags",
759+
"http_method": "GET",
760+
"version": "v2",
761+
},
762+
params_map={
763+
"filter_metric": {
764+
"openapi_types": (str,),
765+
"attribute": "filter[metric]",
766+
"location": "query",
767+
},
768+
"filter_match": {
769+
"openapi_types": (str,),
770+
"attribute": "filter[match]",
771+
"location": "query",
772+
},
773+
"filter_tags": {
774+
"openapi_types": ([str],),
775+
"attribute": "filter[tags]",
776+
"location": "query",
777+
"collection_format": "multi",
778+
},
779+
"filter_tag_keys": {
780+
"openapi_types": ([str],),
781+
"attribute": "filter[tag_keys]",
782+
"location": "query",
783+
"collection_format": "multi",
784+
},
785+
"page_size": {
786+
"validation": {
787+
"inclusive_maximum": 10000,
788+
},
789+
"openapi_types": (int,),
790+
"attribute": "page[size]",
791+
"location": "query",
792+
},
793+
},
794+
headers_map={
795+
"accept": ["application/json"],
796+
},
797+
api_client=api_client,
798+
)
799+
686800
self._list_custom_allocation_rules_endpoint = _Endpoint(
687801
settings={
688802
"response_type": (ArbitraryRuleResponseArray,),
@@ -1360,6 +1474,36 @@ def get_cost_gcp_usage_cost_config(
13601474

13611475
return self._get_cost_gcp_usage_cost_config_endpoint.call_with_http_info(**kwargs)
13621476

1477+
def get_cost_tag_key(
1478+
self,
1479+
tag_key: str,
1480+
*,
1481+
filter_metric: Union[str, UnsetType] = unset,
1482+
page_size: Union[int, UnsetType] = unset,
1483+
) -> CostTagKeyResponse:
1484+
"""Get a Cloud Cost Management tag key.
1485+
1486+
Get details for a specific Cloud Cost Management tag key, including example tag values and description.
1487+
1488+
:param tag_key: The Cloud Cost Management tag key. Tag keys can contain forward slashes (for example, ``kubernetes/instance`` ).
1489+
:type tag_key: str
1490+
:param filter_metric: The Cloud Cost Management metric to scope the tag key details to. When omitted, returns details across all metrics.
1491+
:type filter_metric: str, optional
1492+
: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.
1493+
:type page_size: int, optional
1494+
:rtype: CostTagKeyResponse
1495+
"""
1496+
kwargs: Dict[str, Any] = {}
1497+
kwargs["tag_key"] = tag_key
1498+
1499+
if filter_metric is not unset:
1500+
kwargs["filter_metric"] = filter_metric
1501+
1502+
if page_size is not unset:
1503+
kwargs["page_size"] = page_size
1504+
1505+
return self._get_cost_tag_key_endpoint.call_with_http_info(**kwargs)
1506+
13631507
def get_custom_allocation_rule(
13641508
self,
13651509
rule_id: int,
@@ -1569,6 +1713,74 @@ def list_cost_tag_descriptions(
15691713

15701714
return self._list_cost_tag_descriptions_endpoint.call_with_http_info(**kwargs)
15711715

1716+
def list_cost_tag_keys(
1717+
self,
1718+
*,
1719+
filter_metric: Union[str, UnsetType] = unset,
1720+
filter_tags: Union[List[str], UnsetType] = unset,
1721+
) -> CostTagKeysResponse:
1722+
"""List Cloud Cost Management tag keys.
1723+
1724+
List Cloud Cost Management tag keys.
1725+
1726+
:param filter_metric: The Cloud Cost Management metric to scope the tag keys to. When omitted, returns tag keys across all metrics.
1727+
:type filter_metric: str, optional
1728+
: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``.
1729+
:type filter_tags: [str], optional
1730+
:rtype: CostTagKeysResponse
1731+
"""
1732+
kwargs: Dict[str, Any] = {}
1733+
if filter_metric is not unset:
1734+
kwargs["filter_metric"] = filter_metric
1735+
1736+
if filter_tags is not unset:
1737+
kwargs["filter_tags"] = filter_tags
1738+
1739+
return self._list_cost_tag_keys_endpoint.call_with_http_info(**kwargs)
1740+
1741+
def list_cost_tags(
1742+
self,
1743+
*,
1744+
filter_metric: Union[str, UnsetType] = unset,
1745+
filter_match: Union[str, UnsetType] = unset,
1746+
filter_tags: Union[List[str], UnsetType] = unset,
1747+
filter_tag_keys: Union[List[str], UnsetType] = unset,
1748+
page_size: Union[int, UnsetType] = unset,
1749+
) -> CostTagsResponse:
1750+
"""List Cloud Cost Management tags.
1751+
1752+
List Cloud Cost Management tags for a given metric.
1753+
1754+
:param filter_metric: The Cloud Cost Management metric to scope the tags to. When omitted, returns tags across all metrics.
1755+
:type filter_metric: str, optional
1756+
:param filter_match: A substring used to filter the returned tags by name.
1757+
:type filter_match: str, optional
1758+
: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``.
1759+
:type filter_tags: [str], optional
1760+
:param filter_tag_keys: Restrict the returned tags to those whose key matches one of the given tag keys.
1761+
:type filter_tag_keys: [str], optional
1762+
: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.
1763+
:type page_size: int, optional
1764+
:rtype: CostTagsResponse
1765+
"""
1766+
kwargs: Dict[str, Any] = {}
1767+
if filter_metric is not unset:
1768+
kwargs["filter_metric"] = filter_metric
1769+
1770+
if filter_match is not unset:
1771+
kwargs["filter_match"] = filter_match
1772+
1773+
if filter_tags is not unset:
1774+
kwargs["filter_tags"] = filter_tags
1775+
1776+
if filter_tag_keys is not unset:
1777+
kwargs["filter_tag_keys"] = filter_tag_keys
1778+
1779+
if page_size is not unset:
1780+
kwargs["page_size"] = page_size
1781+
1782+
return self._list_cost_tags_endpoint.call_with_http_info(**kwargs)
1783+
15721784
def list_custom_allocation_rules(
15731785
self,
15741786
) -> ArbitraryRuleResponseArray:

0 commit comments

Comments
 (0)