Skip to content

Commit 2ccffcd

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
update hourly usage API docs for partner program (#2054)
* Regenerate client from commit 8f19ff48 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 7e90240 commit 2ccffcd

File tree

4 files changed

+46
-4
lines changed

4 files changed

+46
-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-18 17:22:30.657414",
8-
"spec_repo_commit": "9ab8be35"
7+
"regenerated": "2024-07-18 19:18:03.897221",
8+
"spec_repo_commit": "8f19ff48"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-18 17:22:30.683138",
13-
"spec_repo_commit": "9ab8be35"
12+
"regenerated": "2024-07-18 19:18:03.925200",
13+
"spec_repo_commit": "8f19ff48"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8741,6 +8741,12 @@ components:
87418741
description: Attributes of hourly usage for a product family for an org for
87428742
a time period.
87438743
properties:
8744+
account_name:
8745+
description: The account name.
8746+
type: string
8747+
account_public_id:
8748+
description: The account public ID.
8749+
type: string
87448750
measurements:
87458751
description: List of the measured usage values for the product family for
87468752
the org for the time period.
@@ -36772,6 +36778,15 @@ paths:
3677236778
schema:
3677336779
default: false
3677436780
type: boolean
36781+
- description: Boolean to specify whether to include accounts connected to the
36782+
current account as partner customers in the Datadog partner network program.
36783+
Defaults to false.
36784+
in: query
36785+
name: filter[include_connected_accounts]
36786+
required: false
36787+
schema:
36788+
default: false
36789+
type: boolean
3677536790
- description: Include breakdown of usage by subcategories where applicable
3677636791
(for product family logs only). Defaults to false.
3677736792
in: query

src/datadog_api_client/v2/api/usage_metering_api.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,11 @@ def __init__(self, api_client=None):
201201
"attribute": "filter[include_descendants]",
202202
"location": "query",
203203
},
204+
"filter_include_connected_accounts": {
205+
"openapi_types": (bool,),
206+
"attribute": "filter[include_connected_accounts]",
207+
"location": "query",
208+
},
204209
"filter_include_breakdown": {
205210
"openapi_types": (bool,),
206211
"attribute": "filter[include_breakdown]",
@@ -535,6 +540,7 @@ def get_hourly_usage(
535540
*,
536541
filter_timestamp_end: Union[datetime, UnsetType] = unset,
537542
filter_include_descendants: Union[bool, UnsetType] = unset,
543+
filter_include_connected_accounts: Union[bool, UnsetType] = unset,
538544
filter_include_breakdown: Union[bool, UnsetType] = unset,
539545
filter_versions: Union[str, UnsetType] = unset,
540546
page_limit: Union[int, UnsetType] = unset,
@@ -559,6 +565,8 @@ def get_hourly_usage(
559565
:type filter_timestamp_end: datetime, optional
560566
:param filter_include_descendants: Include child org usage in the response. Defaults to false.
561567
:type filter_include_descendants: bool, optional
568+
:param filter_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.
569+
:type filter_include_connected_accounts: bool, optional
562570
:param filter_include_breakdown: Include breakdown of usage by subcategories where applicable (for product family logs only). Defaults to false.
563571
:type filter_include_breakdown: bool, optional
564572
:param filter_versions: Comma separated list of product family versions to use in the format ``product_family:version``. For example,
@@ -582,6 +590,9 @@ def get_hourly_usage(
582590
if filter_include_descendants is not unset:
583591
kwargs["filter_include_descendants"] = filter_include_descendants
584592

593+
if filter_include_connected_accounts is not unset:
594+
kwargs["filter_include_connected_accounts"] = filter_include_connected_accounts
595+
585596
if filter_include_breakdown is not unset:
586597
kwargs["filter_include_breakdown"] = filter_include_breakdown
587598

src/datadog_api_client/v2/model/hourly_usage_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.hourly_usage_measurement import HourlyUsageMeasurement
2525

2626
return {
27+
"account_name": (str,),
28+
"account_public_id": (str,),
2729
"measurements": ([HourlyUsageMeasurement],),
2830
"org_name": (str,),
2931
"product_family": (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
"measurements": "measurements",
3741
"org_name": "org_name",
3842
"product_family": "product_family",
@@ -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
measurements: Union[List[HourlyUsageMeasurement], UnsetType] = unset,
4753
org_name: Union[str, UnsetType] = unset,
4854
product_family: Union[str, UnsetType] = unset,
@@ -54,6 +60,12 @@ def __init__(
5460
"""
5561
Attributes of hourly usage for a product family for an org for a time period.
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 measurements: List of the measured usage values for the product family for the org for the time period.
5870
:type measurements: [HourlyUsageMeasurement], optional
5971
@@ -72,6 +84,10 @@ def __init__(
7284
:param timestamp: Datetime in ISO-8601 format, UTC. The hour for the usage.
7385
:type timestamp: datetime, 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 measurements is not unset:
7692
kwargs["measurements"] = measurements
7793
if org_name is not unset:

0 commit comments

Comments
 (0)