Skip to content

Commit 48af15a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
add changes for datadog partner program to estimated cost and billable usage APIs (#2018)
* Regenerate client from commit 06d5775d of spec repo * pre-commit fixes --------- Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent a4bafe6 commit 48af15a

File tree

7 files changed

+88
-4
lines changed

7 files changed

+88
-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-11 16:35:12.035901",
8-
"spec_repo_commit": "d83fe206"
7+
"regenerated": "2024-07-16 10:52:48.447088",
8+
"spec_repo_commit": "06d5775d"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-11 16:35:12.052518",
13-
"spec_repo_commit": "d83fe206"
12+
"regenerated": "2024-07-16 10:52:48.463831",
13+
"spec_repo_commit": "06d5775d"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17269,6 +17269,12 @@ components:
1726917269
UsageBillableSummaryHour:
1727017270
description: Response with monthly summary of data billed by Datadog.
1727117271
properties:
17272+
account_name:
17273+
description: The account name.
17274+
type: string
17275+
account_public_id:
17276+
description: The account public ID.
17277+
type: string
1727217278
billing_plan:
1727317279
description: The billing plan.
1727417280
type: string
@@ -31646,6 +31652,15 @@ paths:
3164631652
schema:
3164731653
format: date-time
3164831654
type: string
31655+
- description: 'Boolean to specify whether to include accounts connected to
31656+
the current account as partner customers in the Datadog partner network
31657+
program. Defaults to `false`. '
31658+
in: query
31659+
name: include_connected_accounts
31660+
required: false
31661+
schema:
31662+
default: false
31663+
type: boolean
3164931664
responses:
3165031665
'200':
3165131666
content:

.generator/schemas/v2/openapi.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5390,6 +5390,12 @@ components:
53905390
CostByOrgAttributes:
53915391
description: Cost attributes data.
53925392
properties:
5393+
account_name:
5394+
description: The account name.
5395+
type: string
5396+
account_public_id:
5397+
description: The account public ID.
5398+
type: string
53935399
charges:
53945400
description: List of charges data reported for the requested month.
53955401
items:
@@ -36185,6 +36191,15 @@ paths:
3618536191
schema:
3618636192
format: date-time
3618736193
type: string
36194+
- description: 'Boolean to specify whether to include accounts connected to
36195+
the current account as partner customers in the Datadog partner network
36196+
program. Defaults to `false`. '
36197+
in: query
36198+
name: include_connected_accounts
36199+
required: false
36200+
schema:
36201+
default: false
36202+
type: boolean
3618836203
responses:
3618936204
'200':
3619036205
content:

src/datadog_api_client/v1/api/usage_metering_api.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,11 @@ def __init__(self, api_client=None):
432432
"attribute": "month",
433433
"location": "query",
434434
},
435+
"include_connected_accounts": {
436+
"openapi_types": (bool,),
437+
"attribute": "include_connected_accounts",
438+
"location": "query",
439+
},
435440
},
436441
headers_map={
437442
"accept": ["application/json;datetime-format=rfc3339"],
@@ -1574,6 +1579,7 @@ def get_usage_billable_summary(
15741579
self,
15751580
*,
15761581
month: Union[datetime, UnsetType] = unset,
1582+
include_connected_accounts: Union[bool, UnsetType] = unset,
15771583
) -> UsageBillableSummaryResponse:
15781584
"""Get billable usage across your account.
15791585
@@ -1583,12 +1589,17 @@ def get_usage_billable_summary(
15831589
15841590
:param month: Datetime in ISO-8601 format, UTC, precise to month: ``[YYYY-MM]`` for usage starting this month.
15851591
:type month: datetime, optional
1592+
: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``.
1593+
:type include_connected_accounts: bool, optional
15861594
:rtype: UsageBillableSummaryResponse
15871595
"""
15881596
kwargs: Dict[str, Any] = {}
15891597
if month is not unset:
15901598
kwargs["month"] = month
15911599

1600+
if include_connected_accounts is not unset:
1601+
kwargs["include_connected_accounts"] = include_connected_accounts
1602+
15921603
return self._get_usage_billable_summary_endpoint.call_with_http_info(**kwargs)
15931604

15941605
def get_usage_ci_app(

src/datadog_api_client/v1/model/usage_billable_summary_hour.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.v1.model.usage_billable_summary_keys import UsageBillableSummaryKeys
2525

2626
return {
27+
"account_name": (str,),
28+
"account_public_id": (str,),
2729
"billing_plan": (str,),
2830
"end_date": (datetime,),
2931
"num_orgs": (int,),
@@ -36,6 +38,8 @@ def openapi_types(_):
3638
}
3739

3840
attribute_map = {
41+
"account_name": "account_name",
42+
"account_public_id": "account_public_id",
3943
"billing_plan": "billing_plan",
4044
"end_date": "end_date",
4145
"num_orgs": "num_orgs",
@@ -49,6 +53,8 @@ def openapi_types(_):
4953

5054
def __init__(
5155
self_,
56+
account_name: Union[str, UnsetType] = unset,
57+
account_public_id: Union[str, UnsetType] = unset,
5258
billing_plan: Union[str, UnsetType] = unset,
5359
end_date: Union[datetime, UnsetType] = unset,
5460
num_orgs: Union[int, UnsetType] = unset,
@@ -63,6 +69,12 @@ def __init__(
6369
"""
6470
Response with monthly summary of data billed by Datadog.
6571
72+
:param account_name: The account name.
73+
:type account_name: str, optional
74+
75+
:param account_public_id: The account public ID.
76+
:type account_public_id: str, optional
77+
6678
:param billing_plan: The billing plan.
6779
:type billing_plan: str, optional
6880
@@ -90,6 +102,10 @@ def __init__(
90102
:param usage: Response with aggregated usage types.
91103
:type usage: UsageBillableSummaryKeys, optional
92104
"""
105+
if account_name is not unset:
106+
kwargs["account_name"] = account_name
107+
if account_public_id is not unset:
108+
kwargs["account_public_id"] = account_public_id
93109
if billing_plan is not unset:
94110
kwargs["billing_plan"] = billing_plan
95111
if end_date is not unset:

src/datadog_api_client/v2/api/usage_metering_api.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ def __init__(self, api_client=None):
124124
"attribute": "end_date",
125125
"location": "query",
126126
},
127+
"include_connected_accounts": {
128+
"openapi_types": (bool,),
129+
"attribute": "include_connected_accounts",
130+
"location": "query",
131+
},
127132
},
128133
headers_map={
129134
"accept": ["application/json;datetime-format=rfc3339"],
@@ -444,6 +449,7 @@ def get_estimated_cost_by_org(
444449
end_month: Union[datetime, UnsetType] = unset,
445450
start_date: Union[datetime, UnsetType] = unset,
446451
end_date: Union[datetime, UnsetType] = unset,
452+
include_connected_accounts: Union[bool, UnsetType] = unset,
447453
) -> CostByOrgResponse:
448454
"""Get estimated cost across your account.
449455
@@ -464,6 +470,8 @@ def get_estimated_cost_by_org(
464470
:type start_date: datetime, optional
465471
:param end_date: Datetime in ISO-8601 format, UTC, precise to day: ``[YYYY-MM-DD]`` for cost ending this day.
466472
:type end_date: datetime, optional
473+
: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``.
474+
:type include_connected_accounts: bool, optional
467475
:rtype: CostByOrgResponse
468476
"""
469477
kwargs: Dict[str, Any] = {}
@@ -482,6 +490,9 @@ def get_estimated_cost_by_org(
482490
if end_date is not unset:
483491
kwargs["end_date"] = end_date
484492

493+
if include_connected_accounts is not unset:
494+
kwargs["include_connected_accounts"] = include_connected_accounts
495+
485496
return self._get_estimated_cost_by_org_endpoint.call_with_http_info(**kwargs)
486497

487498
def get_historical_cost_by_org(

src/datadog_api_client/v2/model/cost_by_org_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
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 total_cost: The total cost of products for the month.
7385
:type total_cost: float, 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)