From 07070193e793a2ecc9cd498c4deb49e04f5fbbe4 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 13:21:47 +0000 Subject: [PATCH] Add clarification on metrics parameter filter[hours_ago] (#1874) Co-authored-by: ci.datadog-api-spec Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> --- .apigentools-info | 8 ++++---- .generator/schemas/v2/openapi.yaml | 4 +++- src/datadog_api_client/v2/api/metrics_api.py | 3 ++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index 52e642bd30..2e0c8835a5 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-02-20 19:02:25.507403", - "spec_repo_commit": "5ef419de" + "regenerated": "2024-02-21 12:50:36.140864", + "spec_repo_commit": "1ec2d96a" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-02-20 19:02:25.522187", - "spec_repo_commit": "5ef419de" + "regenerated": "2024-02-21 12:50:36.176011", + "spec_repo_commit": "1ec2d96a" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index f58f161362..35cf1d7425 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -28095,7 +28095,8 @@ paths: schema: type: string - description: The number of hours of look back (from now) to estimate cardinality - with. + with. Estimates are based on historical data, and unspecified fields default + to the minimum 49 hours. example: 49 in: query name: filter[hours_ago] @@ -28103,6 +28104,7 @@ paths: schema: format: int32 maximum: 2147483647 + minimum: 49 type: integer - description: The number of aggregations that a `count`, `rate`, or `gauge` metric is configured to use. Max number of aggregation combos is 9. diff --git a/src/datadog_api_client/v2/api/metrics_api.py b/src/datadog_api_client/v2/api/metrics_api.py index 444981f050..d5cdef5c54 100644 --- a/src/datadog_api_client/v2/api/metrics_api.py +++ b/src/datadog_api_client/v2/api/metrics_api.py @@ -171,6 +171,7 @@ def __init__(self, api_client=None): "filter_hours_ago": { "validation": { "inclusive_maximum": 2147483647, + "inclusive_minimum": 49, }, "openapi_types": (int,), "attribute": "filter[hours_ago]", @@ -546,7 +547,7 @@ def estimate_metrics_output_series( :type metric_name: str :param filter_groups: Filtered tag keys that the metric is configured to query with. :type filter_groups: str, optional - :param filter_hours_ago: The number of hours of look back (from now) to estimate cardinality with. + :param filter_hours_ago: The number of hours of look back (from now) to estimate cardinality with. Estimates are based on historical data, and unspecified fields default to the minimum 49 hours. :type filter_hours_ago: int, optional :param filter_num_aggregations: The number of aggregations that a ``count`` , ``rate`` , or ``gauge`` metric is configured to use. Max number of aggregation combos is 9. :type filter_num_aggregations: int, optional