Skip to content

Commit f49083c

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e6ffc68 of spec repo
1 parent 58dc88d commit f49083c

12 files changed

+410
-2
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38508,6 +38508,8 @@ components:
3850838508
properties:
3850938509
id:
3851038510
$ref: '#/components/schemas/MetricName'
38511+
relationships:
38512+
$ref: '#/components/schemas/MetricRelationships'
3851138513
type:
3851238514
$ref: '#/components/schemas/MetricType'
3851338515
type: object
@@ -39283,6 +39285,12 @@ components:
3928339285
format: double
3928439286
type: number
3928539287
type: object
39288+
MetricRelationships:
39289+
description: Relationships to related metric objects.
39290+
properties:
39291+
metric_volumes:
39292+
$ref: '#/components/schemas/MetricVolumesRelationship'
39293+
type: object
3928639294
MetricResource:
3928739295
description: Metric resource.
3928839296
example:
@@ -39726,13 +39734,55 @@ components:
3972639734
oneOf:
3972739735
- $ref: '#/components/schemas/MetricDistinctVolume'
3972839736
- $ref: '#/components/schemas/MetricIngestedIndexedVolume'
39737+
MetricVolumesInclude:
39738+
description: Relationship data to include in the response.
39739+
enum:
39740+
- metric_volumes
39741+
type: string
39742+
x-enum-varnames:
39743+
- METRIC_VOLUMES
39744+
MetricVolumesRelationship:
39745+
description: Relationship to a metric's ingested and indexed volumes.
39746+
properties:
39747+
data:
39748+
$ref: '#/components/schemas/MetricVolumesRelationshipData'
39749+
type: object
39750+
MetricVolumesRelationshipData:
39751+
description: Relationship data for a metric's ingested and indexed volumes.
39752+
properties:
39753+
id:
39754+
$ref: '#/components/schemas/MetricName'
39755+
type:
39756+
$ref: '#/components/schemas/MetricIngestedIndexedVolumeType'
39757+
required:
39758+
- type
39759+
- id
39760+
type: object
3972939761
MetricVolumesResponse:
3973039762
description: Response object which includes a single metric's volume.
3973139763
properties:
3973239764
data:
3973339765
$ref: '#/components/schemas/MetricVolumes'
3973439766
readOnly: true
3973539767
type: object
39768+
MetricVolumesSort:
39769+
description: 'Sort metrics by ingested or indexed volume. Use `-` for descending
39770+
order.
39771+
39772+
Supported values: `metric_volumes.indexed_volume`, `-metric_volumes.indexed_volume`,
39773+
39774+
`metric_volumes.ingested_volume`, `-metric_volumes.ingested_volume`.'
39775+
enum:
39776+
- metric_volumes.indexed_volume
39777+
- -metric_volumes.indexed_volume
39778+
- metric_volumes.ingested_volume
39779+
- -metric_volumes.ingested_volume
39780+
type: string
39781+
x-enum-varnames:
39782+
- METRIC_VOLUMES_INDEXED_VOLUME
39783+
- NOT_METRIC_VOLUMES_INDEXED_VOLUME
39784+
- METRIC_VOLUMES_INGESTED_VOLUME
39785+
- NOT_METRIC_VOLUMES_INGESTED_VOLUME
3973639786
MetricsAggregator:
3973739787
default: avg
3973839788
description: The type of aggregation that can be performed on metrics-based
@@ -39772,6 +39822,12 @@ components:
3977239822
items:
3977339823
$ref: '#/components/schemas/MetricsAndMetricTagConfigurations'
3977439824
type: array
39825+
included:
39826+
description: Array of included metric volume objects. Only present when
39827+
`include=metric_volumes` is requested.
39828+
items:
39829+
$ref: '#/components/schemas/MetricIngestedIndexedVolume'
39830+
type: array
3977539831
links:
3977639832
$ref: '#/components/schemas/MetricsListResponseLinks'
3977739833
meta:
@@ -91435,7 +91491,10 @@ paths:
9143591491
`next_cursor` value from the response as the new `page[cursor]` value.
9143691492

9143791493
Once the `meta.pagination.next_cursor` value is null, all pages have been
91438-
retrieved.'
91494+
retrieved.
91495+
91496+
Use `include=metric_volumes` to fetch indexed and ingested volume data for
91497+
each metric, and `sort` to order results by volume.'
9143991498
operationId: ListTagConfigurations
9144091499
parameters:
9144191500
- description: Filter custom metrics that have configured tags.
@@ -91517,6 +91576,28 @@ paths:
9151791576
required: false
9151891577
schema:
9151991578
type: boolean
91579+
- description: Relationship data to include in the response. Use `metric_volumes`
91580+
to include indexed and ingested volumes.
91581+
example: metric_volumes
91582+
in: query
91583+
name: include
91584+
required: false
91585+
schema:
91586+
$ref: '#/components/schemas/MetricVolumesInclude'
91587+
- description: 'Sort metrics by ingested or indexed volume. Use `-` for descending
91588+
order.
91589+
91590+
Supported values: `metric_volumes.indexed_volume`, `-metric_volumes.indexed_volume`,
91591+
91592+
`metric_volumes.ingested_volume`, `-metric_volumes.ingested_volume`.
91593+
91594+
Only supported when `include=metric_volumes` is provided.'
91595+
example: -metric_volumes.indexed_volume
91596+
in: query
91597+
name: sort
91598+
required: false
91599+
schema:
91600+
$ref: '#/components/schemas/MetricVolumesSort'
9152091601
- description: 'The number of seconds of look back (from now) to apply to a
9152191602
filter[tag] or filter[queried] query.
9152291603

docs/datadog_api_client.v2.model.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17119,6 +17119,13 @@ datadog\_api\_client.v2.model.metric\_point module
1711917119
:members:
1712017120
:show-inheritance:
1712117121

17122+
datadog\_api\_client.v2.model.metric\_relationships module
17123+
----------------------------------------------------------
17124+
17125+
.. automodule:: datadog_api_client.v2.model.metric_relationships
17126+
:members:
17127+
:show-inheritance:
17128+
1712217129
datadog\_api\_client.v2.model.metric\_resource module
1712317130
-----------------------------------------------------
1712417131

@@ -17301,13 +17308,41 @@ datadog\_api\_client.v2.model.metric\_volumes module
1730117308
:members:
1730217309
:show-inheritance:
1730317310

17311+
datadog\_api\_client.v2.model.metric\_volumes\_include module
17312+
-------------------------------------------------------------
17313+
17314+
.. automodule:: datadog_api_client.v2.model.metric_volumes_include
17315+
:members:
17316+
:show-inheritance:
17317+
17318+
datadog\_api\_client.v2.model.metric\_volumes\_relationship module
17319+
------------------------------------------------------------------
17320+
17321+
.. automodule:: datadog_api_client.v2.model.metric_volumes_relationship
17322+
:members:
17323+
:show-inheritance:
17324+
17325+
datadog\_api\_client.v2.model.metric\_volumes\_relationship\_data module
17326+
------------------------------------------------------------------------
17327+
17328+
.. automodule:: datadog_api_client.v2.model.metric_volumes_relationship_data
17329+
:members:
17330+
:show-inheritance:
17331+
1730417332
datadog\_api\_client.v2.model.metric\_volumes\_response module
1730517333
--------------------------------------------------------------
1730617334

1730717335
.. automodule:: datadog_api_client.v2.model.metric_volumes_response
1730817336
:members:
1730917337
:show-inheritance:
1731017338

17339+
datadog\_api\_client.v2.model.metric\_volumes\_sort module
17340+
----------------------------------------------------------
17341+
17342+
.. automodule:: datadog_api_client.v2.model.metric_volumes_sort
17343+
:members:
17344+
:show-inheritance:
17345+
1731117346
datadog\_api\_client.v2.model.metrics\_aggregator module
1731217347
--------------------------------------------------------
1731317348

src/datadog_api_client/v2/api/metrics_api.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
from datadog_api_client.v2.model.metric_tag_configuration_metric_type_category import (
2121
MetricTagConfigurationMetricTypeCategory,
2222
)
23+
from datadog_api_client.v2.model.metric_volumes_include import MetricVolumesInclude
24+
from datadog_api_client.v2.model.metric_volumes_sort import MetricVolumesSort
2325
from datadog_api_client.v2.model.metrics_and_metric_tag_configurations import MetricsAndMetricTagConfigurations
2426
from datadog_api_client.v2.model.metric_bulk_tag_config_response import MetricBulkTagConfigResponse
2527
from datadog_api_client.v2.model.metric_bulk_tag_config_delete_request import MetricBulkTagConfigDeleteRequest
@@ -366,6 +368,16 @@ def __init__(self, api_client=None):
366368
"attribute": "filter[related_assets]",
367369
"location": "query",
368370
},
371+
"include": {
372+
"openapi_types": (MetricVolumesInclude,),
373+
"attribute": "include",
374+
"location": "query",
375+
},
376+
"sort": {
377+
"openapi_types": (MetricVolumesSort,),
378+
"attribute": "sort",
379+
"location": "query",
380+
},
369381
"window_seconds": {
370382
"openapi_types": (int,),
371383
"attribute": "window[seconds]",
@@ -782,6 +794,8 @@ def list_tag_configurations(
782794
filter_queried_window_seconds: Union[int, UnsetType] = unset,
783795
filter_tags: Union[str, UnsetType] = unset,
784796
filter_related_assets: Union[bool, UnsetType] = unset,
797+
include: Union[MetricVolumesInclude, UnsetType] = unset,
798+
sort: Union[MetricVolumesSort, UnsetType] = unset,
785799
window_seconds: Union[int, UnsetType] = unset,
786800
page_size: Union[int, UnsetType] = unset,
787801
page_cursor: Union[str, UnsetType] = unset,
@@ -792,6 +806,7 @@ def list_tag_configurations(
792806
Optionally, paginate by using the ``page[cursor]`` and/or ``page[size]`` query parameters.
793807
To fetch the first page, pass in a query parameter with either a valid ``page[size]`` or an empty cursor like ``page[cursor]=``. To fetch the next page, pass in the ``next_cursor`` value from the response as the new ``page[cursor]`` value.
794808
Once the ``meta.pagination.next_cursor`` value is null, all pages have been retrieved.
809+
Use ``include=metric_volumes`` to fetch indexed and ingested volume data for each metric, and ``sort`` to order results by volume.
795810
796811
:param filter_configured: Filter custom metrics that have configured tags.
797812
:type filter_configured: bool, optional
@@ -816,6 +831,13 @@ def list_tag_configurations(
816831
:type filter_tags: str, optional
817832
:param filter_related_assets: (Preview) Filter metrics that are used in dashboards, monitors, notebooks, SLOs.
818833
:type filter_related_assets: bool, optional
834+
:param include: Relationship data to include in the response. Use ``metric_volumes`` to include indexed and ingested volumes.
835+
:type include: MetricVolumesInclude, optional
836+
:param sort: Sort metrics by ingested or indexed volume. Use ``-`` for descending order.
837+
Supported values: ``metric_volumes.indexed_volume`` , ``-metric_volumes.indexed_volume`` ,
838+
``metric_volumes.ingested_volume`` , ``-metric_volumes.ingested_volume``.
839+
Only supported when ``include=metric_volumes`` is provided.
840+
:type sort: MetricVolumesSort, optional
819841
:param window_seconds: The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query.
820842
Default value is 3600 (1 hour), maximum value is 5,184,000 (60 days).
821843
:type window_seconds: int, optional
@@ -852,6 +874,12 @@ def list_tag_configurations(
852874
if filter_related_assets is not unset:
853875
kwargs["filter_related_assets"] = filter_related_assets
854876

877+
if include is not unset:
878+
kwargs["include"] = include
879+
880+
if sort is not unset:
881+
kwargs["sort"] = sort
882+
855883
if window_seconds is not unset:
856884
kwargs["window_seconds"] = window_seconds
857885

@@ -874,6 +902,8 @@ def list_tag_configurations_with_pagination(
874902
filter_queried_window_seconds: Union[int, UnsetType] = unset,
875903
filter_tags: Union[str, UnsetType] = unset,
876904
filter_related_assets: Union[bool, UnsetType] = unset,
905+
include: Union[MetricVolumesInclude, UnsetType] = unset,
906+
sort: Union[MetricVolumesSort, UnsetType] = unset,
877907
window_seconds: Union[int, UnsetType] = unset,
878908
page_size: Union[int, UnsetType] = unset,
879909
page_cursor: Union[str, UnsetType] = unset,
@@ -905,6 +935,13 @@ def list_tag_configurations_with_pagination(
905935
:type filter_tags: str, optional
906936
:param filter_related_assets: (Preview) Filter metrics that are used in dashboards, monitors, notebooks, SLOs.
907937
:type filter_related_assets: bool, optional
938+
:param include: Relationship data to include in the response. Use ``metric_volumes`` to include indexed and ingested volumes.
939+
:type include: MetricVolumesInclude, optional
940+
:param sort: Sort metrics by ingested or indexed volume. Use ``-`` for descending order.
941+
Supported values: ``metric_volumes.indexed_volume`` , ``-metric_volumes.indexed_volume`` ,
942+
``metric_volumes.ingested_volume`` , ``-metric_volumes.ingested_volume``.
943+
Only supported when ``include=metric_volumes`` is provided.
944+
:type sort: MetricVolumesSort, optional
908945
:param window_seconds: The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query.
909946
Default value is 3600 (1 hour), maximum value is 5,184,000 (60 days).
910947
:type window_seconds: int, optional
@@ -943,6 +980,12 @@ def list_tag_configurations_with_pagination(
943980
if filter_related_assets is not unset:
944981
kwargs["filter_related_assets"] = filter_related_assets
945982

983+
if include is not unset:
984+
kwargs["include"] = include
985+
986+
if sort is not unset:
987+
kwargs["sort"] = sort
988+
946989
if window_seconds is not unset:
947990
kwargs["window_seconds"] = window_seconds
948991

src/datadog_api_client/v2/model/metric.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,51 @@
1414

1515

1616
if TYPE_CHECKING:
17+
from datadog_api_client.v2.model.metric_relationships import MetricRelationships
1718
from datadog_api_client.v2.model.metric_type import MetricType
1819

1920

2021
class Metric(ModelNormal):
2122
@cached_property
2223
def openapi_types(_):
24+
from datadog_api_client.v2.model.metric_relationships import MetricRelationships
2325
from datadog_api_client.v2.model.metric_type import MetricType
2426

2527
return {
2628
"id": (str,),
29+
"relationships": (MetricRelationships,),
2730
"type": (MetricType,),
2831
}
2932

3033
attribute_map = {
3134
"id": "id",
35+
"relationships": "relationships",
3236
"type": "type",
3337
}
3438

35-
def __init__(self_, id: Union[str, UnsetType] = unset, type: Union[MetricType, UnsetType] = unset, **kwargs):
39+
def __init__(
40+
self_,
41+
id: Union[str, UnsetType] = unset,
42+
relationships: Union[MetricRelationships, UnsetType] = unset,
43+
type: Union[MetricType, UnsetType] = unset,
44+
**kwargs,
45+
):
3646
"""
3747
Object for a single metric tag configuration.
3848
3949
:param id: The metric name for this resource.
4050
:type id: str, optional
4151
52+
:param relationships: Relationships to related metric objects.
53+
:type relationships: MetricRelationships, optional
54+
4255
:param type: The metric resource type.
4356
:type type: MetricType, optional
4457
"""
4558
if id is not unset:
4659
kwargs["id"] = id
60+
if relationships is not unset:
61+
kwargs["relationships"] = relationships
4762
if type is not unset:
4863
kwargs["type"] = type
4964
super().__init__(kwargs)
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Union, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
if TYPE_CHECKING:
17+
from datadog_api_client.v2.model.metric_volumes_relationship import MetricVolumesRelationship
18+
19+
20+
class MetricRelationships(ModelNormal):
21+
@cached_property
22+
def openapi_types(_):
23+
from datadog_api_client.v2.model.metric_volumes_relationship import MetricVolumesRelationship
24+
25+
return {
26+
"metric_volumes": (MetricVolumesRelationship,),
27+
}
28+
29+
attribute_map = {
30+
"metric_volumes": "metric_volumes",
31+
}
32+
33+
def __init__(self_, metric_volumes: Union[MetricVolumesRelationship, UnsetType] = unset, **kwargs):
34+
"""
35+
Relationships to related metric objects.
36+
37+
:param metric_volumes: Relationship to a metric's ingested and indexed volumes.
38+
:type metric_volumes: MetricVolumesRelationship, optional
39+
"""
40+
if metric_volumes is not unset:
41+
kwargs["metric_volumes"] = metric_volumes
42+
super().__init__(kwargs)

0 commit comments

Comments
 (0)