From 04de7cd6e4155aad843a7bc706276c114a95a212 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 20 Jan 2026 21:03:00 +0000 Subject: [PATCH] Regenerate client from commit 76213e2 of spec repo --- .generator/schemas/v2/openapi.yaml | 89 +++++++++++++++++-- src/datadog_api_client/v2/api/metrics_api.py | 79 +++++++++++++++- .../v2/model/metric_all_tags.py | 4 +- .../v2/model/metric_all_tags_attributes.py | 15 +++- .../v2/model/metric_all_tags_response.py | 4 +- 5 files changed, 176 insertions(+), 15 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 66c2a10ceb..c3b236b725 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -32555,7 +32555,7 @@ components: x-enum-varnames: - ACTIVELY_QUERIED_CONFIGURATIONS MetricAllTags: - description: Object for a single metric's indexed tags. + description: Object for a single metric's indexed and ingested tags. properties: attributes: $ref: '#/components/schemas/MetricAllTagsAttributes' @@ -32565,21 +32565,33 @@ components: $ref: '#/components/schemas/MetricType' type: object MetricAllTagsAttributes: - description: Object containing the definition of a metric's tags. + description: Object containing the definition of a metric's indexed and ingested + tags. properties: + ingested_tags: + description: List of ingested tags that are not indexed. + example: + - env:prod + - service:web + - version:1.0 + items: + description: Ingested tags for the metric. + type: string + type: array tags: - description: List of indexed tag value pairs. + description: List of indexed tags. example: - sport:golf - sport:football - animal:dog items: - description: Tag key-value pairs. + description: Indexed tags for the metric. type: string type: array type: object MetricAllTagsResponse: - description: Response object that includes a single metric's indexed tags. + description: Response object that includes a single metric's indexed and ingested + tags. properties: data: $ref: '#/components/schemas/MetricAllTags' @@ -76797,11 +76809,74 @@ paths: - metrics_read /api/v2/metrics/{metric_name}/all-tags: get: - description: View indexed tag key-value pairs for a given metric name over the - previous hour. + description: 'View indexed and ingested tags for a given metric name. + + Results are filtered by the `window[seconds]` parameter, which defaults to + 14400 (4 hours).' operationId: ListTagsByMetricName parameters: - $ref: '#/components/parameters/MetricName' + - description: 'The number of seconds of look back (from now) to query for tag + data. + + Default value is 14400 (4 hours), minimum value is 14400 (4 hours).' + example: 14400 + in: query + name: window[seconds] + required: false + schema: + format: int64 + type: integer + - description: 'Filter results to tags from data points that have the specified + tags. + + For example, `filter[tags]=env:staging,host:123` returns tags only from + data points with both `env:staging` and `host:123`.' + example: env:staging,host:123 + in: query + name: filter[tags] + required: false + schema: + type: string + - description: 'Filter returned tags to those matching a substring. + + For example, `filter[match]=env` returns tags like `env:prod`, `environment:staging`, + etc.' + example: env + in: query + name: filter[match] + required: false + schema: + type: string + - description: 'Whether to include tag values in the response. + + Defaults to true.' + example: true + in: query + name: filter[include_tag_values] + required: false + schema: + type: boolean + - description: 'Whether to allow partial results. + + Defaults to false.' + example: false + in: query + name: filter[allow_partial] + required: false + schema: + type: boolean + - description: Maximum number of results to return. + example: 1000 + in: query + name: page[limit] + required: false + schema: + default: 1000000 + format: int32 + maximum: 1000000 + minimum: 1 + type: integer responses: '200': content: diff --git a/src/datadog_api_client/v2/api/metrics_api.py b/src/datadog_api_client/v2/api/metrics_api.py index 351d26368a..3d3ef930c2 100644 --- a/src/datadog_api_client/v2/api/metrics_api.py +++ b/src/datadog_api_client/v2/api/metrics_api.py @@ -399,6 +399,40 @@ def __init__(self, api_client=None): "attribute": "metric_name", "location": "path", }, + "window_seconds": { + "openapi_types": (int,), + "attribute": "window[seconds]", + "location": "query", + }, + "filter_tags": { + "openapi_types": (str,), + "attribute": "filter[tags]", + "location": "query", + }, + "filter_match": { + "openapi_types": (str,), + "attribute": "filter[match]", + "location": "query", + }, + "filter_include_tag_values": { + "openapi_types": (bool,), + "attribute": "filter[include_tag_values]", + "location": "query", + }, + "filter_allow_partial": { + "openapi_types": (bool,), + "attribute": "filter[allow_partial]", + "location": "query", + }, + "page_limit": { + "validation": { + "inclusive_maximum": 1000000, + "inclusive_minimum": 1, + }, + "openapi_types": (int,), + "attribute": "page[limit]", + "location": "query", + }, }, headers_map={ "accept": ["application/json"], @@ -903,18 +937,61 @@ def list_tag_configurations_with_pagination( def list_tags_by_metric_name( self, metric_name: str, + *, + window_seconds: Union[int, UnsetType] = unset, + filter_tags: Union[str, UnsetType] = unset, + filter_match: Union[str, UnsetType] = unset, + filter_include_tag_values: Union[bool, UnsetType] = unset, + filter_allow_partial: Union[bool, UnsetType] = unset, + page_limit: Union[int, UnsetType] = unset, ) -> MetricAllTagsResponse: """List tags by metric name. - View indexed tag key-value pairs for a given metric name over the previous hour. + View indexed and ingested tags for a given metric name. + Results are filtered by the ``window[seconds]`` parameter, which defaults to 14400 (4 hours). :param metric_name: The name of the metric. :type metric_name: str + :param window_seconds: The number of seconds of look back (from now) to query for tag data. + Default value is 14400 (4 hours), minimum value is 14400 (4 hours). + :type window_seconds: int, optional + :param filter_tags: Filter results to tags from data points that have the specified tags. + For example, ``filter[tags]=env:staging,host:123`` returns tags only from data points with both ``env:staging`` and ``host:123``. + :type filter_tags: str, optional + :param filter_match: Filter returned tags to those matching a substring. + For example, ``filter[match]=env`` returns tags like ``env:prod`` , ``environment:staging`` , etc. + :type filter_match: str, optional + :param filter_include_tag_values: Whether to include tag values in the response. + Defaults to true. + :type filter_include_tag_values: bool, optional + :param filter_allow_partial: Whether to allow partial results. + Defaults to false. + :type filter_allow_partial: bool, optional + :param page_limit: Maximum number of results to return. + :type page_limit: int, optional :rtype: MetricAllTagsResponse """ kwargs: Dict[str, Any] = {} kwargs["metric_name"] = metric_name + if window_seconds is not unset: + kwargs["window_seconds"] = window_seconds + + if filter_tags is not unset: + kwargs["filter_tags"] = filter_tags + + if filter_match is not unset: + kwargs["filter_match"] = filter_match + + if filter_include_tag_values is not unset: + kwargs["filter_include_tag_values"] = filter_include_tag_values + + if filter_allow_partial is not unset: + kwargs["filter_allow_partial"] = filter_allow_partial + + if page_limit is not unset: + kwargs["page_limit"] = page_limit + return self._list_tags_by_metric_name_endpoint.call_with_http_info(**kwargs) def list_volumes_by_metric_name( diff --git a/src/datadog_api_client/v2/model/metric_all_tags.py b/src/datadog_api_client/v2/model/metric_all_tags.py index 54c818e7ad..0db9e207c3 100644 --- a/src/datadog_api_client/v2/model/metric_all_tags.py +++ b/src/datadog_api_client/v2/model/metric_all_tags.py @@ -44,9 +44,9 @@ def __init__( **kwargs, ): """ - Object for a single metric's indexed tags. + Object for a single metric's indexed and ingested tags. - :param attributes: Object containing the definition of a metric's tags. + :param attributes: Object containing the definition of a metric's indexed and ingested tags. :type attributes: MetricAllTagsAttributes, optional :param id: The metric name for this resource. diff --git a/src/datadog_api_client/v2/model/metric_all_tags_attributes.py b/src/datadog_api_client/v2/model/metric_all_tags_attributes.py index 4be6a2b65c..374e98510c 100644 --- a/src/datadog_api_client/v2/model/metric_all_tags_attributes.py +++ b/src/datadog_api_client/v2/model/metric_all_tags_attributes.py @@ -17,20 +17,29 @@ class MetricAllTagsAttributes(ModelNormal): @cached_property def openapi_types(_): return { + "ingested_tags": ([str],), "tags": ([str],), } attribute_map = { + "ingested_tags": "ingested_tags", "tags": "tags", } - def __init__(self_, tags: Union[List[str], UnsetType] = unset, **kwargs): + def __init__( + self_, ingested_tags: Union[List[str], UnsetType] = unset, tags: Union[List[str], UnsetType] = unset, **kwargs + ): """ - Object containing the definition of a metric's tags. + Object containing the definition of a metric's indexed and ingested tags. - :param tags: List of indexed tag value pairs. + :param ingested_tags: List of ingested tags that are not indexed. + :type ingested_tags: [str], optional + + :param tags: List of indexed tags. :type tags: [str], optional """ + if ingested_tags is not unset: + kwargs["ingested_tags"] = ingested_tags if tags is not unset: kwargs["tags"] = tags super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/metric_all_tags_response.py b/src/datadog_api_client/v2/model/metric_all_tags_response.py index 1c8adc42b5..12f3f2a4e4 100644 --- a/src/datadog_api_client/v2/model/metric_all_tags_response.py +++ b/src/datadog_api_client/v2/model/metric_all_tags_response.py @@ -32,9 +32,9 @@ def openapi_types(_): def __init__(self_, data: Union[MetricAllTags, UnsetType] = unset, **kwargs): """ - Response object that includes a single metric's indexed tags. + Response object that includes a single metric's indexed and ingested tags. - :param data: Object for a single metric's indexed tags. + :param data: Object for a single metric's indexed and ingested tags. :type data: MetricAllTags, optional """ if data is not unset: