Skip to content

Commit 04de7cd

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 76213e2 of spec repo
1 parent 5e3a040 commit 04de7cd

5 files changed

Lines changed: 176 additions & 15 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 82 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32555,7 +32555,7 @@ components:
3255532555
x-enum-varnames:
3255632556
- ACTIVELY_QUERIED_CONFIGURATIONS
3255732557
MetricAllTags:
32558-
description: Object for a single metric's indexed tags.
32558+
description: Object for a single metric's indexed and ingested tags.
3255932559
properties:
3256032560
attributes:
3256132561
$ref: '#/components/schemas/MetricAllTagsAttributes'
@@ -32565,21 +32565,33 @@ components:
3256532565
$ref: '#/components/schemas/MetricType'
3256632566
type: object
3256732567
MetricAllTagsAttributes:
32568-
description: Object containing the definition of a metric's tags.
32568+
description: Object containing the definition of a metric's indexed and ingested
32569+
tags.
3256932570
properties:
32571+
ingested_tags:
32572+
description: List of ingested tags that are not indexed.
32573+
example:
32574+
- env:prod
32575+
- service:web
32576+
- version:1.0
32577+
items:
32578+
description: Ingested tags for the metric.
32579+
type: string
32580+
type: array
3257032581
tags:
32571-
description: List of indexed tag value pairs.
32582+
description: List of indexed tags.
3257232583
example:
3257332584
- sport:golf
3257432585
- sport:football
3257532586
- animal:dog
3257632587
items:
32577-
description: Tag key-value pairs.
32588+
description: Indexed tags for the metric.
3257832589
type: string
3257932590
type: array
3258032591
type: object
3258132592
MetricAllTagsResponse:
32582-
description: Response object that includes a single metric's indexed tags.
32593+
description: Response object that includes a single metric's indexed and ingested
32594+
tags.
3258332595
properties:
3258432596
data:
3258532597
$ref: '#/components/schemas/MetricAllTags'
@@ -76797,11 +76809,74 @@ paths:
7679776809
- metrics_read
7679876810
/api/v2/metrics/{metric_name}/all-tags:
7679976811
get:
76800-
description: View indexed tag key-value pairs for a given metric name over the
76801-
previous hour.
76812+
description: 'View indexed and ingested tags for a given metric name.
76813+
76814+
Results are filtered by the `window[seconds]` parameter, which defaults to
76815+
14400 (4 hours).'
7680276816
operationId: ListTagsByMetricName
7680376817
parameters:
7680476818
- $ref: '#/components/parameters/MetricName'
76819+
- description: 'The number of seconds of look back (from now) to query for tag
76820+
data.
76821+
76822+
Default value is 14400 (4 hours), minimum value is 14400 (4 hours).'
76823+
example: 14400
76824+
in: query
76825+
name: window[seconds]
76826+
required: false
76827+
schema:
76828+
format: int64
76829+
type: integer
76830+
- description: 'Filter results to tags from data points that have the specified
76831+
tags.
76832+
76833+
For example, `filter[tags]=env:staging,host:123` returns tags only from
76834+
data points with both `env:staging` and `host:123`.'
76835+
example: env:staging,host:123
76836+
in: query
76837+
name: filter[tags]
76838+
required: false
76839+
schema:
76840+
type: string
76841+
- description: 'Filter returned tags to those matching a substring.
76842+
76843+
For example, `filter[match]=env` returns tags like `env:prod`, `environment:staging`,
76844+
etc.'
76845+
example: env
76846+
in: query
76847+
name: filter[match]
76848+
required: false
76849+
schema:
76850+
type: string
76851+
- description: 'Whether to include tag values in the response.
76852+
76853+
Defaults to true.'
76854+
example: true
76855+
in: query
76856+
name: filter[include_tag_values]
76857+
required: false
76858+
schema:
76859+
type: boolean
76860+
- description: 'Whether to allow partial results.
76861+
76862+
Defaults to false.'
76863+
example: false
76864+
in: query
76865+
name: filter[allow_partial]
76866+
required: false
76867+
schema:
76868+
type: boolean
76869+
- description: Maximum number of results to return.
76870+
example: 1000
76871+
in: query
76872+
name: page[limit]
76873+
required: false
76874+
schema:
76875+
default: 1000000
76876+
format: int32
76877+
maximum: 1000000
76878+
minimum: 1
76879+
type: integer
7680576880
responses:
7680676881
'200':
7680776882
content:

src/datadog_api_client/v2/api/metrics_api.py

Lines changed: 78 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,40 @@ def __init__(self, api_client=None):
399399
"attribute": "metric_name",
400400
"location": "path",
401401
},
402+
"window_seconds": {
403+
"openapi_types": (int,),
404+
"attribute": "window[seconds]",
405+
"location": "query",
406+
},
407+
"filter_tags": {
408+
"openapi_types": (str,),
409+
"attribute": "filter[tags]",
410+
"location": "query",
411+
},
412+
"filter_match": {
413+
"openapi_types": (str,),
414+
"attribute": "filter[match]",
415+
"location": "query",
416+
},
417+
"filter_include_tag_values": {
418+
"openapi_types": (bool,),
419+
"attribute": "filter[include_tag_values]",
420+
"location": "query",
421+
},
422+
"filter_allow_partial": {
423+
"openapi_types": (bool,),
424+
"attribute": "filter[allow_partial]",
425+
"location": "query",
426+
},
427+
"page_limit": {
428+
"validation": {
429+
"inclusive_maximum": 1000000,
430+
"inclusive_minimum": 1,
431+
},
432+
"openapi_types": (int,),
433+
"attribute": "page[limit]",
434+
"location": "query",
435+
},
402436
},
403437
headers_map={
404438
"accept": ["application/json"],
@@ -903,18 +937,61 @@ def list_tag_configurations_with_pagination(
903937
def list_tags_by_metric_name(
904938
self,
905939
metric_name: str,
940+
*,
941+
window_seconds: Union[int, UnsetType] = unset,
942+
filter_tags: Union[str, UnsetType] = unset,
943+
filter_match: Union[str, UnsetType] = unset,
944+
filter_include_tag_values: Union[bool, UnsetType] = unset,
945+
filter_allow_partial: Union[bool, UnsetType] = unset,
946+
page_limit: Union[int, UnsetType] = unset,
906947
) -> MetricAllTagsResponse:
907948
"""List tags by metric name.
908949
909-
View indexed tag key-value pairs for a given metric name over the previous hour.
950+
View indexed and ingested tags for a given metric name.
951+
Results are filtered by the ``window[seconds]`` parameter, which defaults to 14400 (4 hours).
910952
911953
:param metric_name: The name of the metric.
912954
:type metric_name: str
955+
:param window_seconds: The number of seconds of look back (from now) to query for tag data.
956+
Default value is 14400 (4 hours), minimum value is 14400 (4 hours).
957+
:type window_seconds: int, optional
958+
:param filter_tags: Filter results to tags from data points that have the specified tags.
959+
For example, ``filter[tags]=env:staging,host:123`` returns tags only from data points with both ``env:staging`` and ``host:123``.
960+
:type filter_tags: str, optional
961+
:param filter_match: Filter returned tags to those matching a substring.
962+
For example, ``filter[match]=env`` returns tags like ``env:prod`` , ``environment:staging`` , etc.
963+
:type filter_match: str, optional
964+
:param filter_include_tag_values: Whether to include tag values in the response.
965+
Defaults to true.
966+
:type filter_include_tag_values: bool, optional
967+
:param filter_allow_partial: Whether to allow partial results.
968+
Defaults to false.
969+
:type filter_allow_partial: bool, optional
970+
:param page_limit: Maximum number of results to return.
971+
:type page_limit: int, optional
913972
:rtype: MetricAllTagsResponse
914973
"""
915974
kwargs: Dict[str, Any] = {}
916975
kwargs["metric_name"] = metric_name
917976

977+
if window_seconds is not unset:
978+
kwargs["window_seconds"] = window_seconds
979+
980+
if filter_tags is not unset:
981+
kwargs["filter_tags"] = filter_tags
982+
983+
if filter_match is not unset:
984+
kwargs["filter_match"] = filter_match
985+
986+
if filter_include_tag_values is not unset:
987+
kwargs["filter_include_tag_values"] = filter_include_tag_values
988+
989+
if filter_allow_partial is not unset:
990+
kwargs["filter_allow_partial"] = filter_allow_partial
991+
992+
if page_limit is not unset:
993+
kwargs["page_limit"] = page_limit
994+
918995
return self._list_tags_by_metric_name_endpoint.call_with_http_info(**kwargs)
919996

920997
def list_volumes_by_metric_name(

src/datadog_api_client/v2/model/metric_all_tags.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ def __init__(
4444
**kwargs,
4545
):
4646
"""
47-
Object for a single metric's indexed tags.
47+
Object for a single metric's indexed and ingested tags.
4848
49-
:param attributes: Object containing the definition of a metric's tags.
49+
:param attributes: Object containing the definition of a metric's indexed and ingested tags.
5050
:type attributes: MetricAllTagsAttributes, optional
5151
5252
:param id: The metric name for this resource.

src/datadog_api_client/v2/model/metric_all_tags_attributes.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,29 @@ class MetricAllTagsAttributes(ModelNormal):
1717
@cached_property
1818
def openapi_types(_):
1919
return {
20+
"ingested_tags": ([str],),
2021
"tags": ([str],),
2122
}
2223

2324
attribute_map = {
25+
"ingested_tags": "ingested_tags",
2426
"tags": "tags",
2527
}
2628

27-
def __init__(self_, tags: Union[List[str], UnsetType] = unset, **kwargs):
29+
def __init__(
30+
self_, ingested_tags: Union[List[str], UnsetType] = unset, tags: Union[List[str], UnsetType] = unset, **kwargs
31+
):
2832
"""
29-
Object containing the definition of a metric's tags.
33+
Object containing the definition of a metric's indexed and ingested tags.
3034
31-
:param tags: List of indexed tag value pairs.
35+
:param ingested_tags: List of ingested tags that are not indexed.
36+
:type ingested_tags: [str], optional
37+
38+
:param tags: List of indexed tags.
3239
:type tags: [str], optional
3340
"""
41+
if ingested_tags is not unset:
42+
kwargs["ingested_tags"] = ingested_tags
3443
if tags is not unset:
3544
kwargs["tags"] = tags
3645
super().__init__(kwargs)

src/datadog_api_client/v2/model/metric_all_tags_response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ def openapi_types(_):
3232

3333
def __init__(self_, data: Union[MetricAllTags, UnsetType] = unset, **kwargs):
3434
"""
35-
Response object that includes a single metric's indexed tags.
35+
Response object that includes a single metric's indexed and ingested tags.
3636
37-
:param data: Object for a single metric's indexed tags.
37+
:param data: Object for a single metric's indexed and ingested tags.
3838
:type data: MetricAllTags, optional
3939
"""
4040
if data is not unset:

0 commit comments

Comments
 (0)