Skip to content

Commit 985d7ce

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
update historical_cost and projected_cost for partner program (#2056)
* Regenerate client from commit 9e027051 of spec repo * pre-commit fixes --------- Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent d212351 commit 985d7ce

File tree

4 files changed

+66
-4
lines changed

4 files changed

+66
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-07-23 17:39:46.554429",
8-
"spec_repo_commit": "ad82c0e5"
7+
"regenerated": "2024-07-23 18:14:11.854690",
8+
"spec_repo_commit": "9e027051"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-23 17:39:46.571472",
13-
"spec_repo_commit": "ad82c0e5"
12+
"regenerated": "2024-07-23 18:14:11.871946",
13+
"spec_repo_commit": "9e027051"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15172,6 +15172,12 @@ components:
1517215172
ProjectedCostAttributes:
1517315173
description: Projected Cost attributes data.
1517415174
properties:
15175+
account_name:
15176+
description: The account name.
15177+
type: string
15178+
account_public_id:
15179+
description: The account public ID.
15180+
type: string
1517515181
charges:
1517615182
description: List of charges data reported for the requested month.
1517715183
items:
@@ -36703,6 +36709,15 @@ paths:
3670336709
schema:
3670436710
format: date-time
3670536711
type: string
36712+
- description: 'Boolean to specify whether to include accounts connected to
36713+
the current account as partner customers in the Datadog partner network
36714+
program. Defaults to `false`. '
36715+
in: query
36716+
name: include_connected_accounts
36717+
required: false
36718+
schema:
36719+
default: false
36720+
type: boolean
3670636721
responses:
3670736722
'200':
3670836723
content:
@@ -37009,6 +37024,15 @@ paths:
3700937024
required: false
3701037025
schema:
3701137026
type: string
37027+
- description: 'Boolean to specify whether to include accounts connected to
37028+
the current account as partner customers in the Datadog partner network
37029+
program. Defaults to `false`. '
37030+
in: query
37031+
name: include_connected_accounts
37032+
required: false
37033+
schema:
37034+
default: false
37035+
type: boolean
3701237036
responses:
3701337037
'200':
3701437038
content:

src/datadog_api_client/v2/api/usage_metering_api.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ def __init__(self, api_client=None):
162162
"attribute": "end_month",
163163
"location": "query",
164164
},
165+
"include_connected_accounts": {
166+
"openapi_types": (bool,),
167+
"attribute": "include_connected_accounts",
168+
"location": "query",
169+
},
165170
},
166171
headers_map={
167172
"accept": ["application/json;datetime-format=rfc3339"],
@@ -312,6 +317,11 @@ def __init__(self, api_client=None):
312317
"attribute": "view",
313318
"location": "query",
314319
},
320+
"include_connected_accounts": {
321+
"openapi_types": (bool,),
322+
"attribute": "include_connected_accounts",
323+
"location": "query",
324+
},
315325
},
316326
headers_map={
317327
"accept": ["application/json;datetime-format=rfc3339"],
@@ -506,6 +516,7 @@ def get_historical_cost_by_org(
506516
*,
507517
view: Union[str, UnsetType] = unset,
508518
end_month: Union[datetime, UnsetType] = unset,
519+
include_connected_accounts: Union[bool, UnsetType] = unset,
509520
) -> CostByOrgResponse:
510521
"""Get historical cost across your account.
511522
@@ -520,6 +531,8 @@ def get_historical_cost_by_org(
520531
:type view: str, optional
521532
:param end_month: Datetime in ISO-8601 format, UTC, precise to month: ``[YYYY-MM]`` for cost ending this month.
522533
:type end_month: datetime, optional
534+
:param include_connected_accounts: Boolean to specify whether to include accounts connected to the current account as partner customers in the Datadog partner network program. Defaults to ``false``.
535+
:type include_connected_accounts: bool, optional
523536
:rtype: CostByOrgResponse
524537
"""
525538
kwargs: Dict[str, Any] = {}
@@ -531,6 +544,9 @@ def get_historical_cost_by_org(
531544
if end_month is not unset:
532545
kwargs["end_month"] = end_month
533546

547+
if include_connected_accounts is not unset:
548+
kwargs["include_connected_accounts"] = include_connected_accounts
549+
534550
return self._get_historical_cost_by_org_endpoint.call_with_http_info(**kwargs)
535551

536552
def get_hourly_usage(
@@ -690,6 +706,7 @@ def get_projected_cost(
690706
self,
691707
*,
692708
view: Union[str, UnsetType] = unset,
709+
include_connected_accounts: Union[bool, UnsetType] = unset,
693710
) -> ProjectedCostResponse:
694711
"""Get projected cost across your account.
695712
@@ -700,12 +717,17 @@ def get_projected_cost(
700717
701718
:param view: String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are ``summary`` and ``sub-org``. Defaults to ``summary``.
702719
:type view: str, optional
720+
:param include_connected_accounts: Boolean to specify whether to include accounts connected to the current account as partner customers in the Datadog partner network program. Defaults to ``false``.
721+
:type include_connected_accounts: bool, optional
703722
:rtype: ProjectedCostResponse
704723
"""
705724
kwargs: Dict[str, Any] = {}
706725
if view is not unset:
707726
kwargs["view"] = view
708727

728+
if include_connected_accounts is not unset:
729+
kwargs["include_connected_accounts"] = include_connected_accounts
730+
709731
return self._get_projected_cost_endpoint.call_with_http_info(**kwargs)
710732

711733
def get_usage_application_security_monitoring(

src/datadog_api_client/v2/model/projected_cost_attributes.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ def openapi_types(_):
2424
from datadog_api_client.v2.model.chargeback_breakdown import ChargebackBreakdown
2525

2626
return {
27+
"account_name": (str,),
28+
"account_public_id": (str,),
2729
"charges": ([ChargebackBreakdown],),
2830
"date": (datetime,),
2931
"org_name": (str,),
@@ -33,6 +35,8 @@ def openapi_types(_):
3335
}
3436

3537
attribute_map = {
38+
"account_name": "account_name",
39+
"account_public_id": "account_public_id",
3640
"charges": "charges",
3741
"date": "date",
3842
"org_name": "org_name",
@@ -43,6 +47,8 @@ def openapi_types(_):
4347

4448
def __init__(
4549
self_,
50+
account_name: Union[str, UnsetType] = unset,
51+
account_public_id: Union[str, UnsetType] = unset,
4652
charges: Union[List[ChargebackBreakdown], UnsetType] = unset,
4753
date: Union[datetime, UnsetType] = unset,
4854
org_name: Union[str, UnsetType] = unset,
@@ -54,6 +60,12 @@ def __init__(
5460
"""
5561
Projected Cost attributes data.
5662
63+
:param account_name: The account name.
64+
:type account_name: str, optional
65+
66+
:param account_public_id: The account public ID.
67+
:type account_public_id: str, optional
68+
5769
:param charges: List of charges data reported for the requested month.
5870
:type charges: [ChargebackBreakdown], optional
5971
@@ -72,6 +84,10 @@ def __init__(
7284
:param region: The region of the Datadog instance that the organization belongs to.
7385
:type region: str, optional
7486
"""
87+
if account_name is not unset:
88+
kwargs["account_name"] = account_name
89+
if account_public_id is not unset:
90+
kwargs["account_public_id"] = account_public_id
7591
if charges is not unset:
7692
kwargs["charges"] = charges
7793
if date is not unset:

0 commit comments

Comments
 (0)