Skip to content

Commit 1b75b38

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a357f01 of spec repo
1 parent 9fc28ba commit 1b75b38

11 files changed

Lines changed: 310 additions & 2 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38523,6 +38523,8 @@ components:
3852338523
properties:
3852438524
id:
3852538525
$ref: '#/components/schemas/MetricName'
38526+
relationships:
38527+
$ref: '#/components/schemas/MetricRelationships'
3852638528
type:
3852738529
$ref: '#/components/schemas/MetricType'
3852838530
type: object
@@ -39298,6 +39300,12 @@ components:
3929839300
format: double
3929939301
type: number
3930039302
type: object
39303+
MetricRelationships:
39304+
description: Relationships to related metric objects.
39305+
properties:
39306+
metric_volumes:
39307+
$ref: '#/components/schemas/MetricVolumesRelationship'
39308+
type: object
3930139309
MetricResource:
3930239310
description: Metric resource.
3930339311
example:
@@ -39741,6 +39749,33 @@ components:
3974139749
oneOf:
3974239750
- $ref: '#/components/schemas/MetricDistinctVolume'
3974339751
- $ref: '#/components/schemas/MetricIngestedIndexedVolume'
39752+
MetricVolumesInclude:
39753+
description: Comma-separated list of additional data to include in the response.
39754+
Allowed values are `metric_volumes`.
39755+
enum:
39756+
- metric_volumes
39757+
- generated_metric_attributes
39758+
type: string
39759+
x-enum-varnames:
39760+
- METRIC_VOLUMES
39761+
- GENERATED_METRIC_ATTRIBUTES
39762+
MetricVolumesRelationship:
39763+
description: Relationship to a metric's ingested and indexed volumes.
39764+
properties:
39765+
data:
39766+
$ref: '#/components/schemas/MetricVolumesRelationshipData'
39767+
type: object
39768+
MetricVolumesRelationshipData:
39769+
description: Relationship data for a metric's ingested and indexed volumes.
39770+
properties:
39771+
id:
39772+
$ref: '#/components/schemas/MetricName'
39773+
type:
39774+
$ref: '#/components/schemas/MetricIngestedIndexedVolumeType'
39775+
required:
39776+
- type
39777+
- id
39778+
type: object
3974439779
MetricVolumesResponse:
3974539780
description: Response object which includes a single metric's volume.
3974639781
properties:
@@ -39787,6 +39822,12 @@ components:
3978739822
items:
3978839823
$ref: '#/components/schemas/MetricsAndMetricTagConfigurations'
3978939824
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
3979039831
links:
3979139832
$ref: '#/components/schemas/MetricsListResponseLinks'
3979239833
meta:
@@ -91450,7 +91491,13 @@ paths:
9145091491
`next_cursor` value from the response as the new `page[cursor]` value.
9145191492

9145291493
Once the `meta.pagination.next_cursor` value is null, all pages have been
91453-
retrieved.'
91494+
retrieved.
91495+
91496+
Use the `include` query parameter to fetch additional data with the response.
91497+
When `include=metric_volumes` is specified, the response includes volume data
91498+
for each custom metric in the `included` array, with a corresponding `relationships`
91499+
link on each metric in `data`. Volume data is only returned for custom metrics.
91500+
All volume values represent a 1-hour timeframe.'
9145491501
operationId: ListTagConfigurations
9145591502
parameters:
9145691503
- description: Filter custom metrics that have configured tags.
@@ -91532,6 +91579,16 @@ paths:
9153291579
required: false
9153391580
schema:
9153491581
type: boolean
91582+
- description: 'Comma-separated list of additional data to include in the response.
91583+
Allowed values: `metric_volumes`. When `metric_volumes` is specified, the
91584+
response includes volume data for each custom metric in the `included` array,
91585+
with a corresponding `relationships` link on each metric in `data`.'
91586+
example: metric_volumes
91587+
in: query
91588+
name: include
91589+
required: false
91590+
schema:
91591+
$ref: '#/components/schemas/MetricVolumesInclude'
9153591592
- description: 'The number of seconds of look back (from now) to apply to a
9153691593
filter[tag] or filter[queried] query.
9153791594

docs/datadog_api_client.v2.model.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17126,6 +17126,13 @@ datadog\_api\_client.v2.model.metric\_point module
1712617126
:members:
1712717127
:show-inheritance:
1712817128

17129+
datadog\_api\_client.v2.model.metric\_relationships module
17130+
----------------------------------------------------------
17131+
17132+
.. automodule:: datadog_api_client.v2.model.metric_relationships
17133+
:members:
17134+
:show-inheritance:
17135+
1712917136
datadog\_api\_client.v2.model.metric\_resource module
1713017137
-----------------------------------------------------
1713117138

@@ -17308,6 +17315,27 @@ datadog\_api\_client.v2.model.metric\_volumes module
1730817315
:members:
1730917316
:show-inheritance:
1731017317

17318+
datadog\_api\_client.v2.model.metric\_volumes\_include module
17319+
-------------------------------------------------------------
17320+
17321+
.. automodule:: datadog_api_client.v2.model.metric_volumes_include
17322+
:members:
17323+
:show-inheritance:
17324+
17325+
datadog\_api\_client.v2.model.metric\_volumes\_relationship module
17326+
------------------------------------------------------------------
17327+
17328+
.. automodule:: datadog_api_client.v2.model.metric_volumes_relationship
17329+
:members:
17330+
:show-inheritance:
17331+
17332+
datadog\_api\_client.v2.model.metric\_volumes\_relationship\_data module
17333+
------------------------------------------------------------------------
17334+
17335+
.. automodule:: datadog_api_client.v2.model.metric_volumes_relationship_data
17336+
:members:
17337+
:show-inheritance:
17338+
1731117339
datadog\_api\_client.v2.model.metric\_volumes\_response module
1731217340
--------------------------------------------------------------
1731317341

src/datadog_api_client/v2/api/metrics_api.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
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
2324
from datadog_api_client.v2.model.metrics_and_metric_tag_configurations import MetricsAndMetricTagConfigurations
2425
from datadog_api_client.v2.model.metric_bulk_tag_config_response import MetricBulkTagConfigResponse
2526
from datadog_api_client.v2.model.metric_bulk_tag_config_delete_request import MetricBulkTagConfigDeleteRequest
@@ -366,6 +367,11 @@ def __init__(self, api_client=None):
366367
"attribute": "filter[related_assets]",
367368
"location": "query",
368369
},
370+
"include": {
371+
"openapi_types": (MetricVolumesInclude,),
372+
"attribute": "include",
373+
"location": "query",
374+
},
369375
"window_seconds": {
370376
"openapi_types": (int,),
371377
"attribute": "window[seconds]",
@@ -782,6 +788,7 @@ def list_tag_configurations(
782788
filter_queried_window_seconds: Union[int, UnsetType] = unset,
783789
filter_tags: Union[str, UnsetType] = unset,
784790
filter_related_assets: Union[bool, UnsetType] = unset,
791+
include: Union[MetricVolumesInclude, UnsetType] = unset,
785792
window_seconds: Union[int, UnsetType] = unset,
786793
page_size: Union[int, UnsetType] = unset,
787794
page_cursor: Union[str, UnsetType] = unset,
@@ -792,6 +799,7 @@ def list_tag_configurations(
792799
Optionally, paginate by using the ``page[cursor]`` and/or ``page[size]`` query parameters.
793800
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.
794801
Once the ``meta.pagination.next_cursor`` value is null, all pages have been retrieved.
802+
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.
795803
796804
:param filter_configured: Filter custom metrics that have configured tags.
797805
:type filter_configured: bool, optional
@@ -816,6 +824,8 @@ def list_tag_configurations(
816824
:type filter_tags: str, optional
817825
:param filter_related_assets: (Preview) Filter metrics that are used in dashboards, monitors, notebooks, SLOs.
818826
:type filter_related_assets: bool, optional
827+
: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``.
828+
:type include: MetricVolumesInclude, optional
819829
:param window_seconds: The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query.
820830
Default value is 3600 (1 hour), maximum value is 5,184,000 (60 days).
821831
:type window_seconds: int, optional
@@ -852,6 +862,9 @@ def list_tag_configurations(
852862
if filter_related_assets is not unset:
853863
kwargs["filter_related_assets"] = filter_related_assets
854864

865+
if include is not unset:
866+
kwargs["include"] = include
867+
855868
if window_seconds is not unset:
856869
kwargs["window_seconds"] = window_seconds
857870

@@ -874,6 +887,7 @@ def list_tag_configurations_with_pagination(
874887
filter_queried_window_seconds: Union[int, UnsetType] = unset,
875888
filter_tags: Union[str, UnsetType] = unset,
876889
filter_related_assets: Union[bool, UnsetType] = unset,
890+
include: Union[MetricVolumesInclude, UnsetType] = unset,
877891
window_seconds: Union[int, UnsetType] = unset,
878892
page_size: Union[int, UnsetType] = unset,
879893
page_cursor: Union[str, UnsetType] = unset,
@@ -905,6 +919,8 @@ def list_tag_configurations_with_pagination(
905919
:type filter_tags: str, optional
906920
:param filter_related_assets: (Preview) Filter metrics that are used in dashboards, monitors, notebooks, SLOs.
907921
:type filter_related_assets: bool, optional
922+
: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``.
923+
:type include: MetricVolumesInclude, optional
908924
:param window_seconds: The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query.
909925
Default value is 3600 (1 hour), maximum value is 5,184,000 (60 days).
910926
:type window_seconds: int, optional
@@ -943,6 +959,9 @@ def list_tag_configurations_with_pagination(
943959
if filter_related_assets is not unset:
944960
kwargs["filter_related_assets"] = filter_related_assets
945961

962+
if include is not unset:
963+
kwargs["include"] = include
964+
946965
if window_seconds is not unset:
947966
kwargs["window_seconds"] = window_seconds
948967

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)
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
7+
from datadog_api_client.model_utils import (
8+
ModelSimple,
9+
cached_property,
10+
)
11+
12+
from typing import ClassVar
13+
14+
15+
class MetricVolumesInclude(ModelSimple):
16+
"""
17+
Comma-separated list of additional data to include in the response. Allowed values are `metric_volumes`.
18+
19+
:param value: Must be one of ["metric_volumes", "generated_metric_attributes"].
20+
:type value: str
21+
"""
22+
23+
allowed_values = {
24+
"metric_volumes",
25+
"generated_metric_attributes",
26+
}
27+
METRIC_VOLUMES: ClassVar["MetricVolumesInclude"]
28+
GENERATED_METRIC_ATTRIBUTES: ClassVar["MetricVolumesInclude"]
29+
30+
@cached_property
31+
def openapi_types(_):
32+
return {
33+
"value": (str,),
34+
}
35+
36+
37+
MetricVolumesInclude.METRIC_VOLUMES = MetricVolumesInclude("metric_volumes")
38+
MetricVolumesInclude.GENERATED_METRIC_ATTRIBUTES = MetricVolumesInclude("generated_metric_attributes")

0 commit comments

Comments
 (0)