Skip to content

Commit fd58c5a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 8c9b068 of spec repo (#3521)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent ff17b87 commit fd58c5a

2 files changed

Lines changed: 25 additions & 2 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116514,12 +116514,22 @@ paths:
116514116514
/api/v2/metrics/{metric_name}/volumes:
116515116515
get:
116516116516
description: |-
116517-
View distinct metrics volumes for the given metric name.
116517+
View hourly average metric volumes for the given metric name over the look back period.
116518116518

116519116519
Custom metrics generated in-app from other products will return `null` for ingested volumes.
116520116520
operationId: ListVolumesByMetricName
116521116521
parameters:
116522116522
- $ref: "#/components/parameters/MetricName"
116523+
- description: |-
116524+
The number of seconds of look back (from now).
116525+
Default value is 3,600 (1 hour), maximum value is 2,592,000 (1 month).
116526+
example: 7200
116527+
in: query
116528+
name: window[seconds]
116529+
required: false
116530+
schema:
116531+
format: int64
116532+
type: integer
116523116533
responses:
116524116534
"200":
116525116535
content:

src/datadog_api_client/v2/api/metrics_api.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,11 @@ def __init__(self, api_client=None):
469469
"attribute": "metric_name",
470470
"location": "path",
471471
},
472+
"window_seconds": {
473+
"openapi_types": (int,),
474+
"attribute": "window[seconds]",
475+
"location": "query",
476+
},
472477
},
473478
headers_map={
474479
"accept": ["application/json"],
@@ -1012,20 +1017,28 @@ def list_tags_by_metric_name(
10121017
def list_volumes_by_metric_name(
10131018
self,
10141019
metric_name: str,
1020+
*,
1021+
window_seconds: Union[int, UnsetType] = unset,
10151022
) -> MetricVolumesResponse:
10161023
"""List distinct metric volumes by metric name.
10171024
1018-
View distinct metrics volumes for the given metric name.
1025+
View hourly average metric volumes for the given metric name over the look back period.
10191026
10201027
Custom metrics generated in-app from other products will return ``null`` for ingested volumes.
10211028
10221029
:param metric_name: The name of the metric.
10231030
:type metric_name: str
1031+
:param window_seconds: The number of seconds of look back (from now).
1032+
Default value is 3,600 (1 hour), maximum value is 2,592,000 (1 month).
1033+
:type window_seconds: int, optional
10241034
:rtype: MetricVolumesResponse
10251035
"""
10261036
kwargs: Dict[str, Any] = {}
10271037
kwargs["metric_name"] = metric_name
10281038

1039+
if window_seconds is not unset:
1040+
kwargs["window_seconds"] = window_seconds
1041+
10291042
return self._list_volumes_by_metric_name_endpoint.call_with_http_info(**kwargs)
10301043

10311044
def query_scalar_data(

0 commit comments

Comments
 (0)