Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 82 additions & 4 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58798,13 +58798,15 @@ components:
- token
type: object
Metric:
description: Object for a single metric tag configuration.
description: Object for a single metric.
example:
id: metric.foo.bar
type: metrics
properties:
id:
$ref: "#/components/schemas/MetricName"
relationships:
$ref: "#/components/schemas/MetricRelationships"
type:
$ref: "#/components/schemas/MetricType"
type: object
Expand Down Expand Up @@ -59341,12 +59343,12 @@ components:
description: Object containing the definition of a metric's ingested and indexed volume.
properties:
indexed_volume:
description: Indexed volume for the given metric.
description: Estimated average hourly number of indexed time series for the given metric over the last hour. For organizations on Metric Name Pricing, this represents the estimated sum of indexed data points over the last hour.
example: 10
format: int64
type: integer
ingested_volume:
description: Ingested volume for the given metric.
description: Estimated average hourly number of ingested time series for the given metric over the last hour. This value is 0 for metrics not configured with Metrics Without Limits. For organizations on Metric Name Pricing, this represents the estimated sum of ingested data points over the last hour.
example: 20
format: int64
type: integer
Expand Down Expand Up @@ -59523,6 +59525,12 @@ components:
format: double
type: number
type: object
MetricRelationships:
description: Relationships for a metric.
properties:
metric_volumes:
$ref: "#/components/schemas/MetricVolumesRelationship"
type: object
MetricResource:
description: Metric resource.
example: {name: "dummyhost", type: "host"}
Expand Down Expand Up @@ -59715,6 +59723,8 @@ components:
$ref: "#/components/schemas/MetricTagConfigurationAttributes"
id:
$ref: "#/components/schemas/MetricName"
relationships:
$ref: "#/components/schemas/MetricRelationships"
type:
$ref: "#/components/schemas/MetricTagConfigurationType"
type: object
Expand Down Expand Up @@ -59927,6 +59937,20 @@ components:
oneOf:
- $ref: "#/components/schemas/MetricDistinctVolume"
- $ref: "#/components/schemas/MetricIngestedIndexedVolume"
MetricVolumesRelationship:
description: Relationship to a metric volume included in the response.
properties:
data:
$ref: "#/components/schemas/MetricVolumesRelationshipData"
type: object
MetricVolumesRelationshipData:
description: Relationship data for a metric volume.
properties:
id:
$ref: "#/components/schemas/MetricName"
type:
$ref: "#/components/schemas/MetricIngestedIndexedVolumeType"
type: object
MetricVolumesResponse:
description: Response object which includes a single metric's volume.
properties:
Expand Down Expand Up @@ -59972,6 +59996,11 @@ components:
items:
$ref: "#/components/schemas/MetricsAndMetricTagConfigurations"
type: array
included:
description: Array of metric volume resources included when requested with `include=metric_volumes`.
items:
$ref: "#/components/schemas/MetricIngestedIndexedVolume"
type: array
links:
$ref: "#/components/schemas/MetricsListResponseLinks"
meta:
Expand Down Expand Up @@ -152116,13 +152145,20 @@ paths:
Query parameters use bracket notation (for example, `filter[tags]`, `filter[queried][window][seconds]`). Pass them as standard URL query strings, URL-encoding the brackets if your client does not handle them. For example: `GET /api/v2/metrics?filter[tags]=env:prod&window[seconds]=86400&page[size]=500`.
operationId: ListTagConfigurations
parameters:
- description: Only return custom metrics that have been configured with Metrics Without Limits.
- description: Only return custom metrics that have been configured (`true`) or not configured (`false`) with Metrics Without Limits.
example: true
in: query
name: filter[configured]
required: false
schema:
type: boolean
- description: Only return metrics that are eligible (`true`) or ineligible (`false`) for configuration with Metrics Without Limits.
example: true
in: query
name: filter[is_configurable]
required: false
schema:
type: boolean
- description: Only return metrics that have the given tag key(s) in their Metrics Without Limits configuration (included or excluded).
example: "app,env"
in: query
Expand Down Expand Up @@ -152180,6 +152216,20 @@ paths:
required: false
schema:
type: boolean
- description: Include related resources in the response. Set to `metric_volumes` to include indexed and ingested volume counts for each metric.
example: metric_volumes
in: query
name: include
required: false
schema:
type: string
- description: "Sort results by metric volume. Prefix a key with `-` for descending order. Supported keys: `metric_volumes.indexed_volume`, `metric_volumes.ingested_volume`, `metric_volumes.indexed_volume_delta`, `metric_volumes.ingested_volume_delta`. Requires a paginated request (`page[size]` or `page[cursor]`)."
example: "-metric_volumes.indexed_volume"
in: query
name: sort
required: false
schema:
type: string
- description: |-
Only return metrics that have been actively reporting in the specified window. The default value is 3600 seconds (1 hour), the maximum value is 2,592,000 seconds (30 days), and the minimum value is 1 second.
example: 3600
Expand Down Expand Up @@ -152221,6 +152271,34 @@ paths:
meta:
pagination:
next_cursor:
with_metric_volumes:
value:
data:
- id: user.custom.cpu.usage
relationships:
metric_volumes:
data:
id: user.custom.cpu.usage
type: metric_volumes
type: metrics
- id: user.custom.mem.usage
relationships:
metric_volumes:
data:
id: user.custom.mem.usage
type: metric_volumes
type: metrics
included:
- attributes:
indexed_volume: 1000
ingested_volume: 456
id: user.custom.cpu.usage
type: metric_volumes
- attributes:
indexed_volume: 250
ingested_volume: 1011
id: user.custom.mem.usage
type: metric_volumes
schema:
$ref: "#/components/schemas/MetricsAndMetricTagConfigurationsResponse"
description: Success
Expand Down
21 changes: 21 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24602,6 +24602,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
-----------------------------------------------------

Expand Down Expand Up @@ -24784,6 +24791,20 @@ datadog\_api\_client.v2.model.metric\_volumes module
: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
--------------------------------------------------------------

Expand Down
55 changes: 53 additions & 2 deletions src/datadog_api_client/v2/api/metrics_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,11 @@ def __init__(self, api_client=None):
"attribute": "filter[configured]",
"location": "query",
},
"filter_is_configurable": {
"openapi_types": (bool,),
"attribute": "filter[is_configurable]",
"location": "query",
},
"filter_tags_configured": {
"openapi_types": (str,),
"attribute": "filter[tags_configured]",
Expand Down Expand Up @@ -512,6 +517,16 @@ def __init__(self, api_client=None):
"attribute": "filter[related_assets]",
"location": "query",
},
"include": {
"openapi_types": (str,),
"attribute": "include",
"location": "query",
},
"sort": {
"openapi_types": (str,),
"attribute": "sort",
"location": "query",
},
"window_seconds": {
"validation": {
"inclusive_maximum": 2592000,
Expand Down Expand Up @@ -1153,13 +1168,16 @@ def list_tag_configurations(
self,
*,
filter_configured: Union[bool, UnsetType] = unset,
filter_is_configurable: Union[bool, UnsetType] = unset,
filter_tags_configured: Union[str, UnsetType] = unset,
filter_metric_type: Union[MetricTagConfigurationMetricTypeCategory, UnsetType] = unset,
filter_include_percentiles: Union[bool, UnsetType] = unset,
filter_queried: Union[bool, UnsetType] = unset,
filter_queried_window_seconds: Union[int, UnsetType] = unset,
filter_tags: Union[str, UnsetType] = unset,
filter_related_assets: Union[bool, UnsetType] = unset,
include: Union[str, UnsetType] = unset,
sort: Union[str, UnsetType] = unset,
window_seconds: Union[int, UnsetType] = unset,
page_size: Union[int, UnsetType] = unset,
page_cursor: Union[str, UnsetType] = unset,
Expand All @@ -1170,8 +1188,10 @@ def list_tag_configurations(

Query parameters use bracket notation (for example, ``filter[tags]`` , ``filter[queried][window][seconds]`` ). Pass them as standard URL query strings, URL-encoding the brackets if your client does not handle them. For example: ``GET /api/v2/metrics?filter[tags]=env:prod&window[seconds]=86400&page[size]=500``.

:param filter_configured: Only return custom metrics that have been configured with Metrics Without Limits.
:param filter_configured: Only return custom metrics that have been configured ( ``true`` ) or not configured ( ``false`` ) with Metrics Without Limits.
:type filter_configured: bool, optional
:param filter_is_configurable: Only return metrics that are eligible ( ``true`` ) or ineligible ( ``false`` ) for configuration with Metrics Without Limits.
:type filter_is_configurable: bool, optional
:param filter_tags_configured: Only return metrics that have the given tag key(s) in their Metrics Without Limits configuration (included or excluded).
:type filter_tags_configured: str, optional
:param filter_metric_type: Only return metrics of the given metric type.
Expand All @@ -1186,6 +1206,10 @@ def list_tag_configurations(
:type filter_tags: str, optional
:param filter_related_assets: Only return metrics that are used in at least one dashboard, monitor, notebook, or SLO.
:type filter_related_assets: bool, optional
:param include: Include related resources in the response. Set to ``metric_volumes`` to include indexed and ingested volume counts for each metric.
:type include: str, optional
:param sort: Sort results by metric volume. Prefix a key with ``-`` for descending order. Supported keys: ``metric_volumes.indexed_volume`` , ``metric_volumes.ingested_volume`` , ``metric_volumes.indexed_volume_delta`` , ``metric_volumes.ingested_volume_delta``. Requires a paginated request ( ``page[size]`` or ``page[cursor]`` ).
:type sort: str, optional
:param window_seconds: Only return metrics that have been actively reporting in the specified window. The default value is 3600 seconds (1 hour), the maximum value is 2,592,000 seconds (30 days), and the minimum value is 1 second.
:type window_seconds: int, optional
:param page_size: Maximum number of results per page. Send ``page[size]`` on the first request to opt in to pagination. On each subsequent request, send ``page[cursor]`` set to the value of ``meta.pagination.next_cursor`` from the previous response. The default value is 10000, the maximum value is 10000, and the minimum value is 1.
Expand All @@ -1198,6 +1222,9 @@ def list_tag_configurations(
if filter_configured is not unset:
kwargs["filter_configured"] = filter_configured

if filter_is_configurable is not unset:
kwargs["filter_is_configurable"] = filter_is_configurable

if filter_tags_configured is not unset:
kwargs["filter_tags_configured"] = filter_tags_configured

Expand All @@ -1219,6 +1246,12 @@ 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 sort is not unset:
kwargs["sort"] = sort

if window_seconds is not unset:
kwargs["window_seconds"] = window_seconds

Expand All @@ -1234,13 +1267,16 @@ def list_tag_configurations_with_pagination(
self,
*,
filter_configured: Union[bool, UnsetType] = unset,
filter_is_configurable: Union[bool, UnsetType] = unset,
filter_tags_configured: Union[str, UnsetType] = unset,
filter_metric_type: Union[MetricTagConfigurationMetricTypeCategory, UnsetType] = unset,
filter_include_percentiles: Union[bool, UnsetType] = unset,
filter_queried: Union[bool, UnsetType] = unset,
filter_queried_window_seconds: Union[int, UnsetType] = unset,
filter_tags: Union[str, UnsetType] = unset,
filter_related_assets: Union[bool, UnsetType] = unset,
include: Union[str, UnsetType] = unset,
sort: Union[str, UnsetType] = unset,
window_seconds: Union[int, UnsetType] = unset,
page_size: Union[int, UnsetType] = unset,
page_cursor: Union[str, UnsetType] = unset,
Expand All @@ -1249,8 +1285,10 @@ def list_tag_configurations_with_pagination(

Provide a paginated version of :meth:`list_tag_configurations`, returning all items.

:param filter_configured: Only return custom metrics that have been configured with Metrics Without Limits.
:param filter_configured: Only return custom metrics that have been configured ( ``true`` ) or not configured ( ``false`` ) with Metrics Without Limits.
:type filter_configured: bool, optional
:param filter_is_configurable: Only return metrics that are eligible ( ``true`` ) or ineligible ( ``false`` ) for configuration with Metrics Without Limits.
:type filter_is_configurable: bool, optional
:param filter_tags_configured: Only return metrics that have the given tag key(s) in their Metrics Without Limits configuration (included or excluded).
:type filter_tags_configured: str, optional
:param filter_metric_type: Only return metrics of the given metric type.
Expand All @@ -1265,6 +1303,10 @@ def list_tag_configurations_with_pagination(
:type filter_tags: str, optional
:param filter_related_assets: Only return metrics that are used in at least one dashboard, monitor, notebook, or SLO.
:type filter_related_assets: bool, optional
:param include: Include related resources in the response. Set to ``metric_volumes`` to include indexed and ingested volume counts for each metric.
:type include: str, optional
:param sort: Sort results by metric volume. Prefix a key with ``-`` for descending order. Supported keys: ``metric_volumes.indexed_volume`` , ``metric_volumes.ingested_volume`` , ``metric_volumes.indexed_volume_delta`` , ``metric_volumes.ingested_volume_delta``. Requires a paginated request ( ``page[size]`` or ``page[cursor]`` ).
:type sort: str, optional
:param window_seconds: Only return metrics that have been actively reporting in the specified window. The default value is 3600 seconds (1 hour), the maximum value is 2,592,000 seconds (30 days), and the minimum value is 1 second.
:type window_seconds: int, optional
:param page_size: Maximum number of results per page. Send ``page[size]`` on the first request to opt in to pagination. On each subsequent request, send ``page[cursor]`` set to the value of ``meta.pagination.next_cursor`` from the previous response. The default value is 10000, the maximum value is 10000, and the minimum value is 1.
Expand All @@ -1279,6 +1321,9 @@ def list_tag_configurations_with_pagination(
if filter_configured is not unset:
kwargs["filter_configured"] = filter_configured

if filter_is_configurable is not unset:
kwargs["filter_is_configurable"] = filter_is_configurable

if filter_tags_configured is not unset:
kwargs["filter_tags_configured"] = filter_tags_configured

Expand All @@ -1300,6 +1345,12 @@ 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 sort is not unset:
kwargs["sort"] = sort

if window_seconds is not unset:
kwargs["window_seconds"] = window_seconds

Expand Down
Loading
Loading