From 1b75b387993b4e9638c742e88072171460f2a752 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 12 Mar 2026 20:24:13 +0000 Subject: [PATCH] Regenerate client from commit a357f01 of spec repo --- .generator/schemas/v2/openapi.yaml | 59 ++++++++++++++++++- docs/datadog_api_client.v2.model.rst | 28 +++++++++ src/datadog_api_client/v2/api/metrics_api.py | 19 ++++++ src/datadog_api_client/v2/model/metric.py | 17 +++++- .../v2/model/metric_relationships.py | 42 +++++++++++++ .../v2/model/metric_volumes_include.py | 38 ++++++++++++ .../v2/model/metric_volumes_relationship.py | 42 +++++++++++++ .../model/metric_volumes_relationship_data.py | 46 +++++++++++++++ .../metrics_and_metric_tag_configurations.py | 3 + ..._and_metric_tag_configurations_response.py | 10 ++++ src/datadog_api_client/v2/models/__init__.py | 8 +++ 11 files changed, 310 insertions(+), 2 deletions(-) create mode 100644 src/datadog_api_client/v2/model/metric_relationships.py create mode 100644 src/datadog_api_client/v2/model/metric_volumes_include.py create mode 100644 src/datadog_api_client/v2/model/metric_volumes_relationship.py create mode 100644 src/datadog_api_client/v2/model/metric_volumes_relationship_data.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 0057dd635b..6f80e4ca4b 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -38523,6 +38523,8 @@ components: properties: id: $ref: '#/components/schemas/MetricName' + relationships: + $ref: '#/components/schemas/MetricRelationships' type: $ref: '#/components/schemas/MetricType' type: object @@ -39298,6 +39300,12 @@ components: format: double type: number type: object + MetricRelationships: + description: Relationships to related metric objects. + properties: + metric_volumes: + $ref: '#/components/schemas/MetricVolumesRelationship' + type: object MetricResource: description: Metric resource. example: @@ -39741,6 +39749,33 @@ components: oneOf: - $ref: '#/components/schemas/MetricDistinctVolume' - $ref: '#/components/schemas/MetricIngestedIndexedVolume' + MetricVolumesInclude: + description: Comma-separated list of additional data to include in the response. + Allowed values are `metric_volumes`. + enum: + - metric_volumes + - generated_metric_attributes + type: string + x-enum-varnames: + - METRIC_VOLUMES + - GENERATED_METRIC_ATTRIBUTES + MetricVolumesRelationship: + description: Relationship to a metric's ingested and indexed volumes. + properties: + data: + $ref: '#/components/schemas/MetricVolumesRelationshipData' + type: object + MetricVolumesRelationshipData: + description: Relationship data for a metric's ingested and indexed volumes. + properties: + id: + $ref: '#/components/schemas/MetricName' + type: + $ref: '#/components/schemas/MetricIngestedIndexedVolumeType' + required: + - type + - id + type: object MetricVolumesResponse: description: Response object which includes a single metric's volume. properties: @@ -39787,6 +39822,12 @@ components: items: $ref: '#/components/schemas/MetricsAndMetricTagConfigurations' type: array + included: + description: Array of included metric volume objects. Only present when + `include=metric_volumes` is requested. + items: + $ref: '#/components/schemas/MetricIngestedIndexedVolume' + type: array links: $ref: '#/components/schemas/MetricsListResponseLinks' meta: @@ -91450,7 +91491,13 @@ paths: `next_cursor` value from the response as the new `page[cursor]` value. Once the `meta.pagination.next_cursor` value is null, all pages have been - retrieved.' + retrieved. + + Use the `include` query parameter to fetch additional data with the response. + When `include=metric_volumes` is specified, the response includes volume data + for each custom metric in the `included` array, with a corresponding `relationships` + link on each metric in `data`. Volume data is only returned for custom metrics. + All volume values represent a 1-hour timeframe.' operationId: ListTagConfigurations parameters: - description: Filter custom metrics that have configured tags. @@ -91532,6 +91579,16 @@ paths: required: false schema: type: boolean + - description: 'Comma-separated list of additional data to include in the response. + Allowed values: `metric_volumes`. When `metric_volumes` is specified, the + response includes volume data for each custom metric in the `included` array, + with a corresponding `relationships` link on each metric in `data`.' + example: metric_volumes + in: query + name: include + required: false + schema: + $ref: '#/components/schemas/MetricVolumesInclude' - description: 'The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query. diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index c6d029f83c..9754ae6d2d 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -17126,6 +17126,13 @@ datadog\_api\_client.v2.model.metric\_point module :members: :show-inheritance: +datadog\_api\_client.v2.model.metric\_relationships module +---------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.metric_relationships + :members: + :show-inheritance: + datadog\_api\_client.v2.model.metric\_resource module ----------------------------------------------------- @@ -17308,6 +17315,27 @@ datadog\_api\_client.v2.model.metric\_volumes module :members: :show-inheritance: +datadog\_api\_client.v2.model.metric\_volumes\_include module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.metric_volumes_include + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.metric\_volumes\_relationship module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.metric_volumes_relationship + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.metric\_volumes\_relationship\_data module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.metric_volumes_relationship_data + :members: + :show-inheritance: + datadog\_api\_client.v2.model.metric\_volumes\_response module -------------------------------------------------------------- diff --git a/src/datadog_api_client/v2/api/metrics_api.py b/src/datadog_api_client/v2/api/metrics_api.py index 95d7e0b53c..53201e8a02 100644 --- a/src/datadog_api_client/v2/api/metrics_api.py +++ b/src/datadog_api_client/v2/api/metrics_api.py @@ -20,6 +20,7 @@ from datadog_api_client.v2.model.metric_tag_configuration_metric_type_category import ( MetricTagConfigurationMetricTypeCategory, ) +from datadog_api_client.v2.model.metric_volumes_include import MetricVolumesInclude from datadog_api_client.v2.model.metrics_and_metric_tag_configurations import MetricsAndMetricTagConfigurations from datadog_api_client.v2.model.metric_bulk_tag_config_response import MetricBulkTagConfigResponse from datadog_api_client.v2.model.metric_bulk_tag_config_delete_request import MetricBulkTagConfigDeleteRequest @@ -366,6 +367,11 @@ def __init__(self, api_client=None): "attribute": "filter[related_assets]", "location": "query", }, + "include": { + "openapi_types": (MetricVolumesInclude,), + "attribute": "include", + "location": "query", + }, "window_seconds": { "openapi_types": (int,), "attribute": "window[seconds]", @@ -782,6 +788,7 @@ def list_tag_configurations( filter_queried_window_seconds: Union[int, UnsetType] = unset, filter_tags: Union[str, UnsetType] = unset, filter_related_assets: Union[bool, UnsetType] = unset, + include: Union[MetricVolumesInclude, UnsetType] = unset, window_seconds: Union[int, UnsetType] = unset, page_size: Union[int, UnsetType] = unset, page_cursor: Union[str, UnsetType] = unset, @@ -792,6 +799,7 @@ def list_tag_configurations( Optionally, paginate by using the ``page[cursor]`` and/or ``page[size]`` query parameters. 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. Once the ``meta.pagination.next_cursor`` value is null, all pages have been retrieved. + Use the ``include`` query parameter to fetch additional data with the response. When ``include=metric_volumes`` is specified, the response includes volume data for each custom metric in the ``included`` array, with a corresponding ``relationships`` link on each metric in ``data``. Volume data is only returned for custom metrics. All volume values represent a 1-hour timeframe. :param filter_configured: Filter custom metrics that have configured tags. :type filter_configured: bool, optional @@ -816,6 +824,8 @@ def list_tag_configurations( :type filter_tags: str, optional :param filter_related_assets: (Preview) Filter metrics that are used in dashboards, monitors, notebooks, SLOs. :type filter_related_assets: bool, optional + :param include: Comma-separated list of additional data to include in the response. Allowed values: ``metric_volumes``. When ``metric_volumes`` is specified, the response includes volume data for each custom metric in the ``included`` array, with a corresponding ``relationships`` link on each metric in ``data``. + :type include: MetricVolumesInclude, optional :param window_seconds: The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query. Default value is 3600 (1 hour), maximum value is 5,184,000 (60 days). :type window_seconds: int, optional @@ -852,6 +862,9 @@ def list_tag_configurations( if filter_related_assets is not unset: kwargs["filter_related_assets"] = filter_related_assets + if include is not unset: + kwargs["include"] = include + if window_seconds is not unset: kwargs["window_seconds"] = window_seconds @@ -874,6 +887,7 @@ def list_tag_configurations_with_pagination( filter_queried_window_seconds: Union[int, UnsetType] = unset, filter_tags: Union[str, UnsetType] = unset, filter_related_assets: Union[bool, UnsetType] = unset, + include: Union[MetricVolumesInclude, UnsetType] = unset, window_seconds: Union[int, UnsetType] = unset, page_size: Union[int, UnsetType] = unset, page_cursor: Union[str, UnsetType] = unset, @@ -905,6 +919,8 @@ def list_tag_configurations_with_pagination( :type filter_tags: str, optional :param filter_related_assets: (Preview) Filter metrics that are used in dashboards, monitors, notebooks, SLOs. :type filter_related_assets: bool, optional + :param include: Comma-separated list of additional data to include in the response. Allowed values: ``metric_volumes``. When ``metric_volumes`` is specified, the response includes volume data for each custom metric in the ``included`` array, with a corresponding ``relationships`` link on each metric in ``data``. + :type include: MetricVolumesInclude, optional :param window_seconds: The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query. Default value is 3600 (1 hour), maximum value is 5,184,000 (60 days). :type window_seconds: int, optional @@ -943,6 +959,9 @@ def list_tag_configurations_with_pagination( if filter_related_assets is not unset: kwargs["filter_related_assets"] = filter_related_assets + if include is not unset: + kwargs["include"] = include + if window_seconds is not unset: kwargs["window_seconds"] = window_seconds diff --git a/src/datadog_api_client/v2/model/metric.py b/src/datadog_api_client/v2/model/metric.py index 50bffd544b..f5c66cbda9 100644 --- a/src/datadog_api_client/v2/model/metric.py +++ b/src/datadog_api_client/v2/model/metric.py @@ -14,36 +14,51 @@ if TYPE_CHECKING: + from datadog_api_client.v2.model.metric_relationships import MetricRelationships from datadog_api_client.v2.model.metric_type import MetricType class Metric(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.metric_relationships import MetricRelationships from datadog_api_client.v2.model.metric_type import MetricType return { "id": (str,), + "relationships": (MetricRelationships,), "type": (MetricType,), } attribute_map = { "id": "id", + "relationships": "relationships", "type": "type", } - def __init__(self_, id: Union[str, UnsetType] = unset, type: Union[MetricType, UnsetType] = unset, **kwargs): + def __init__( + self_, + id: Union[str, UnsetType] = unset, + relationships: Union[MetricRelationships, UnsetType] = unset, + type: Union[MetricType, UnsetType] = unset, + **kwargs, + ): """ Object for a single metric tag configuration. :param id: The metric name for this resource. :type id: str, optional + :param relationships: Relationships to related metric objects. + :type relationships: MetricRelationships, optional + :param type: The metric resource type. :type type: MetricType, optional """ if id is not unset: kwargs["id"] = id + if relationships is not unset: + kwargs["relationships"] = relationships if type is not unset: kwargs["type"] = type super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/metric_relationships.py b/src/datadog_api_client/v2/model/metric_relationships.py new file mode 100644 index 0000000000..8b7209623a --- /dev/null +++ b/src/datadog_api_client/v2/model/metric_relationships.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.metric_volumes_relationship import MetricVolumesRelationship + + +class MetricRelationships(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.metric_volumes_relationship import MetricVolumesRelationship + + return { + "metric_volumes": (MetricVolumesRelationship,), + } + + attribute_map = { + "metric_volumes": "metric_volumes", + } + + def __init__(self_, metric_volumes: Union[MetricVolumesRelationship, UnsetType] = unset, **kwargs): + """ + Relationships to related metric objects. + + :param metric_volumes: Relationship to a metric's ingested and indexed volumes. + :type metric_volumes: MetricVolumesRelationship, optional + """ + if metric_volumes is not unset: + kwargs["metric_volumes"] = metric_volumes + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/metric_volumes_include.py b/src/datadog_api_client/v2/model/metric_volumes_include.py new file mode 100644 index 0000000000..a3d8ac89ff --- /dev/null +++ b/src/datadog_api_client/v2/model/metric_volumes_include.py @@ -0,0 +1,38 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class MetricVolumesInclude(ModelSimple): + """ + Comma-separated list of additional data to include in the response. Allowed values are `metric_volumes`. + + :param value: Must be one of ["metric_volumes", "generated_metric_attributes"]. + :type value: str + """ + + allowed_values = { + "metric_volumes", + "generated_metric_attributes", + } + METRIC_VOLUMES: ClassVar["MetricVolumesInclude"] + GENERATED_METRIC_ATTRIBUTES: ClassVar["MetricVolumesInclude"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +MetricVolumesInclude.METRIC_VOLUMES = MetricVolumesInclude("metric_volumes") +MetricVolumesInclude.GENERATED_METRIC_ATTRIBUTES = MetricVolumesInclude("generated_metric_attributes") diff --git a/src/datadog_api_client/v2/model/metric_volumes_relationship.py b/src/datadog_api_client/v2/model/metric_volumes_relationship.py new file mode 100644 index 0000000000..8f16cc720f --- /dev/null +++ b/src/datadog_api_client/v2/model/metric_volumes_relationship.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.metric_volumes_relationship_data import MetricVolumesRelationshipData + + +class MetricVolumesRelationship(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.metric_volumes_relationship_data import MetricVolumesRelationshipData + + return { + "data": (MetricVolumesRelationshipData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[MetricVolumesRelationshipData, UnsetType] = unset, **kwargs): + """ + Relationship to a metric's ingested and indexed volumes. + + :param data: Relationship data for a metric's ingested and indexed volumes. + :type data: MetricVolumesRelationshipData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/metric_volumes_relationship_data.py b/src/datadog_api_client/v2/model/metric_volumes_relationship_data.py new file mode 100644 index 0000000000..6b42fbc91b --- /dev/null +++ b/src/datadog_api_client/v2/model/metric_volumes_relationship_data.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.metric_ingested_indexed_volume_type import MetricIngestedIndexedVolumeType + + +class MetricVolumesRelationshipData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.metric_ingested_indexed_volume_type import MetricIngestedIndexedVolumeType + + return { + "id": (str,), + "type": (MetricIngestedIndexedVolumeType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: MetricIngestedIndexedVolumeType, **kwargs): + """ + Relationship data for a metric's ingested and indexed volumes. + + :param id: The metric name for this resource. + :type id: str + + :param type: The metric ingested and indexed volume type. + :type type: MetricIngestedIndexedVolumeType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/metrics_and_metric_tag_configurations.py b/src/datadog_api_client/v2/model/metrics_and_metric_tag_configurations.py index e871e846fd..1a2fa494a6 100644 --- a/src/datadog_api_client/v2/model/metrics_and_metric_tag_configurations.py +++ b/src/datadog_api_client/v2/model/metrics_and_metric_tag_configurations.py @@ -18,6 +18,9 @@ def __init__(self, **kwargs): :param id: The metric name for this resource. :type id: str, optional + :param relationships: Relationships to related metric objects. + :type relationships: MetricRelationships, optional + :param type: The metric resource type. :type type: MetricType, optional diff --git a/src/datadog_api_client/v2/model/metrics_and_metric_tag_configurations_response.py b/src/datadog_api_client/v2/model/metrics_and_metric_tag_configurations_response.py index aec4ba8a85..36992ab30b 100644 --- a/src/datadog_api_client/v2/model/metrics_and_metric_tag_configurations_response.py +++ b/src/datadog_api_client/v2/model/metrics_and_metric_tag_configurations_response.py @@ -15,6 +15,7 @@ if TYPE_CHECKING: from datadog_api_client.v2.model.metrics_and_metric_tag_configurations import MetricsAndMetricTagConfigurations + from datadog_api_client.v2.model.metric_ingested_indexed_volume import MetricIngestedIndexedVolume from datadog_api_client.v2.model.metrics_list_response_links import MetricsListResponseLinks from datadog_api_client.v2.model.metric_pagination_meta import MetricPaginationMeta from datadog_api_client.v2.model.metric import Metric @@ -25,17 +26,20 @@ class MetricsAndMetricTagConfigurationsResponse(ModelNormal): @cached_property def openapi_types(_): from datadog_api_client.v2.model.metrics_and_metric_tag_configurations import MetricsAndMetricTagConfigurations + from datadog_api_client.v2.model.metric_ingested_indexed_volume import MetricIngestedIndexedVolume from datadog_api_client.v2.model.metrics_list_response_links import MetricsListResponseLinks from datadog_api_client.v2.model.metric_pagination_meta import MetricPaginationMeta return { "data": ([MetricsAndMetricTagConfigurations],), + "included": ([MetricIngestedIndexedVolume],), "links": (MetricsListResponseLinks,), "meta": (MetricPaginationMeta,), } attribute_map = { "data": "data", + "included": "included", "links": "links", "meta": "meta", } @@ -43,6 +47,7 @@ def openapi_types(_): def __init__( self_, data: Union[List[Union[MetricsAndMetricTagConfigurations, Metric, MetricTagConfiguration]], UnsetType] = unset, + included: Union[List[MetricIngestedIndexedVolume], UnsetType] = unset, links: Union[MetricsListResponseLinks, UnsetType] = unset, meta: Union[MetricPaginationMeta, UnsetType] = unset, **kwargs, @@ -53,6 +58,9 @@ def __init__( :param data: Array of metrics and metric tag configurations. :type data: [MetricsAndMetricTagConfigurations], optional + :param included: Array of included metric volume objects. Only present when ``include=metric_volumes`` is requested. + :type included: [MetricIngestedIndexedVolume], optional + :param links: Pagination links. Only present if pagination query parameters were provided. :type links: MetricsListResponseLinks, optional @@ -61,6 +69,8 @@ def __init__( """ if data is not unset: kwargs["data"] = data + if included is not unset: + kwargs["included"] = included if links is not unset: kwargs["links"] = links if meta is not unset: diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 8e618b29d7..3bec40c47e 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -3199,6 +3199,7 @@ from datadog_api_client.v2.model.metric_pagination_meta import MetricPaginationMeta from datadog_api_client.v2.model.metric_payload import MetricPayload from datadog_api_client.v2.model.metric_point import MetricPoint +from datadog_api_client.v2.model.metric_relationships import MetricRelationships from datadog_api_client.v2.model.metric_resource import MetricResource from datadog_api_client.v2.model.metric_slo_asset import MetricSLOAsset from datadog_api_client.v2.model.metric_slo_type import MetricSLOType @@ -3233,6 +3234,9 @@ from datadog_api_client.v2.model.metric_tag_configuration_update_request import MetricTagConfigurationUpdateRequest from datadog_api_client.v2.model.metric_type import MetricType from datadog_api_client.v2.model.metric_volumes import MetricVolumes +from datadog_api_client.v2.model.metric_volumes_include import MetricVolumesInclude +from datadog_api_client.v2.model.metric_volumes_relationship import MetricVolumesRelationship +from datadog_api_client.v2.model.metric_volumes_relationship_data import MetricVolumesRelationshipData from datadog_api_client.v2.model.metric_volumes_response import MetricVolumesResponse from datadog_api_client.v2.model.metrics_aggregator import MetricsAggregator from datadog_api_client.v2.model.metrics_and_metric_tag_configurations import MetricsAndMetricTagConfigurations @@ -8902,6 +8906,7 @@ "MetricPaginationMeta", "MetricPayload", "MetricPoint", + "MetricRelationships", "MetricResource", "MetricSLOAsset", "MetricSLOType", @@ -8928,6 +8933,9 @@ "MetricTagConfigurationUpdateRequest", "MetricType", "MetricVolumes", + "MetricVolumesInclude", + "MetricVolumesRelationship", + "MetricVolumesRelationshipData", "MetricVolumesResponse", "MetricsAggregator", "MetricsAndMetricTagConfigurations",