Skip to content

Expose include_breakdown param for v2 hourly_usage #1424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.4",
"regenerated": "2023-04-20 17:24:58.057819",
"spec_repo_commit": "32e3b934"
"regenerated": "2023-04-20 22:10:33.390692",
"spec_repo_commit": "24cbf678"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-04-20 17:24:58.070578",
"spec_repo_commit": "32e3b934"
"regenerated": "2023-04-20 22:10:33.402695",
"spec_repo_commit": "24cbf678"
}
}
}
8 changes: 8 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23623,6 +23623,14 @@ paths:
schema:
default: false
type: boolean
- description: Include breakdown of usage by subcategories where applicable
(for product family logs only). Defaults to false.
in: query
name: filter[include_breakdown]
required: false
schema:
default: false
type: boolean
- description: 'Comma separated list of product family versions to use in the
format `product_family:version`. For example,

Expand Down
11 changes: 11 additions & 0 deletions src/datadog_api_client/v2/api/usage_metering_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ def __init__(self, api_client=None):
"attribute": "filter[include_descendants]",
"location": "query",
},
"filter_include_breakdown": {
"openapi_types": (bool,),
"attribute": "filter[include_breakdown]",
"location": "query",
},
"filter_versions": {
"openapi_types": (str,),
"attribute": "filter[versions]",
Expand Down Expand Up @@ -413,6 +418,7 @@ def get_hourly_usage(
*,
filter_timestamp_end: Union[datetime, UnsetType] = unset,
filter_include_descendants: Union[bool, UnsetType] = unset,
filter_include_breakdown: Union[bool, UnsetType] = unset,
filter_versions: Union[str, UnsetType] = unset,
page_limit: Union[int, UnsetType] = unset,
page_next_record_id: Union[str, UnsetType] = unset,
Expand All @@ -436,6 +442,8 @@ def get_hourly_usage(
:type filter_timestamp_end: datetime, optional
:param filter_include_descendants: Include child org usage in the response. Defaults to false.
:type filter_include_descendants: bool, optional
:param filter_include_breakdown: Include breakdown of usage by subcategories where applicable (for product family logs only). Defaults to false.
:type filter_include_breakdown: bool, optional
:param filter_versions: Comma separated list of product family versions to use in the format ``product_family:version``. For example,
``infra_hosts:1.0.0``. If this parameter is not used, the API will use the latest version of each requested
product family. Currently all families have one version ``1.0.0``.
Expand All @@ -457,6 +465,9 @@ def get_hourly_usage(
if filter_include_descendants is not unset:
kwargs["filter_include_descendants"] = filter_include_descendants

if filter_include_breakdown is not unset:
kwargs["filter_include_breakdown"] = filter_include_breakdown

if filter_versions is not unset:
kwargs["filter_versions"] = filter_versions

Expand Down