Skip to content

Commit 5a6b47a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Expose include_breakdown param for v2 hourly_usage (#1424)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent a35ee3e commit 5a6b47a

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-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.4",
7-
"regenerated": "2023-04-20 17:24:58.057819",
8-
"spec_repo_commit": "32e3b934"
7+
"regenerated": "2023-04-20 22:10:33.390692",
8+
"spec_repo_commit": "24cbf678"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-04-20 17:24:58.070578",
13-
"spec_repo_commit": "32e3b934"
12+
"regenerated": "2023-04-20 22:10:33.402695",
13+
"spec_repo_commit": "24cbf678"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23623,6 +23623,14 @@ paths:
2362323623
schema:
2362423624
default: false
2362523625
type: boolean
23626+
- description: Include breakdown of usage by subcategories where applicable
23627+
(for product family logs only). Defaults to false.
23628+
in: query
23629+
name: filter[include_breakdown]
23630+
required: false
23631+
schema:
23632+
default: false
23633+
type: boolean
2362623634
- description: 'Comma separated list of product family versions to use in the
2362723635
format `product_family:version`. For example,
2362823636

src/datadog_api_client/v2/api/usage_metering_api.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ def __init__(self, api_client=None):
183183
"attribute": "filter[include_descendants]",
184184
"location": "query",
185185
},
186+
"filter_include_breakdown": {
187+
"openapi_types": (bool,),
188+
"attribute": "filter[include_breakdown]",
189+
"location": "query",
190+
},
186191
"filter_versions": {
187192
"openapi_types": (str,),
188193
"attribute": "filter[versions]",
@@ -413,6 +418,7 @@ def get_hourly_usage(
413418
*,
414419
filter_timestamp_end: Union[datetime, UnsetType] = unset,
415420
filter_include_descendants: Union[bool, UnsetType] = unset,
421+
filter_include_breakdown: Union[bool, UnsetType] = unset,
416422
filter_versions: Union[str, UnsetType] = unset,
417423
page_limit: Union[int, UnsetType] = unset,
418424
page_next_record_id: Union[str, UnsetType] = unset,
@@ -436,6 +442,8 @@ def get_hourly_usage(
436442
:type filter_timestamp_end: datetime, optional
437443
:param filter_include_descendants: Include child org usage in the response. Defaults to false.
438444
:type filter_include_descendants: bool, optional
445+
:param filter_include_breakdown: Include breakdown of usage by subcategories where applicable (for product family logs only). Defaults to false.
446+
:type filter_include_breakdown: bool, optional
439447
:param filter_versions: Comma separated list of product family versions to use in the format ``product_family:version``. For example,
440448
``infra_hosts:1.0.0``. If this parameter is not used, the API will use the latest version of each requested
441449
product family. Currently all families have one version ``1.0.0``.
@@ -457,6 +465,9 @@ def get_hourly_usage(
457465
if filter_include_descendants is not unset:
458466
kwargs["filter_include_descendants"] = filter_include_descendants
459467

468+
if filter_include_breakdown is not unset:
469+
kwargs["filter_include_breakdown"] = filter_include_breakdown
470+
460471
if filter_versions is not unset:
461472
kwargs["filter_versions"] = filter_versions
462473

0 commit comments

Comments
 (0)