Skip to content

Commit 2784117

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ce2db978 of spec repo
1 parent 25424b2 commit 2784117

14 files changed

+567
-5
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-12-10 14:43:50.083055",
8-
"spec_repo_commit": "408f0b84"
7+
"regenerated": "2024-12-10 15:34:47.167020",
8+
"spec_repo_commit": "ce2db978"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-12-10 14:43:50.102581",
13-
"spec_repo_commit": "408f0b84"
12+
"regenerated": "2024-12-10 15:34:47.185458",
13+
"spec_repo_commit": "ce2db978"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 95 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15869,6 +15869,36 @@ components:
1586915869
- COUNT
1587015870
- RATE
1587115871
- GAUGE
15872+
MetricMetaPage:
15873+
description: Paging attributes. Only present if pagination query parameters
15874+
were provided.
15875+
properties:
15876+
cursor:
15877+
description: The cursor used to get the current results, if any.
15878+
nullable: true
15879+
type: string
15880+
limit:
15881+
description: Number of results returned
15882+
format: int32
15883+
maximum: 20000
15884+
minimum: 0
15885+
type: integer
15886+
next_cursor:
15887+
description: The cursor used to get the next results, if any.
15888+
nullable: true
15889+
type: string
15890+
type:
15891+
$ref: '#/components/schemas/MetricMetaPageType'
15892+
type: object
15893+
MetricMetaPageType:
15894+
default: cursor_limit
15895+
description: Type of metric pagination.
15896+
enum:
15897+
- cursor_limit
15898+
example: cursor_limit
15899+
type: string
15900+
x-enum-varnames:
15901+
- CURSOR_LIMIT
1587215902
MetricMetadata:
1587315903
description: Metadata for the metric.
1587415904
properties:
@@ -15951,6 +15981,12 @@ components:
1595115981
maximum: 1000
1595215982
type: integer
1595315983
type: object
15984+
MetricPaginationMeta:
15985+
description: Response metadata object.
15986+
properties:
15987+
pagination:
15988+
$ref: '#/components/schemas/MetricMetaPage'
15989+
type: object
1595415990
MetricPayload:
1595515991
description: The metrics' payload.
1595615992
properties:
@@ -16427,6 +16463,10 @@ components:
1642716463
items:
1642816464
$ref: '#/components/schemas/MetricsAndMetricTagConfigurations'
1642916465
type: array
16466+
links:
16467+
$ref: '#/components/schemas/MetricsListResponseLinks'
16468+
meta:
16469+
$ref: '#/components/schemas/MetricPaginationMeta'
1643016470
readOnly: true
1643116471
type: object
1643216472
MetricsDataSource:
@@ -16440,6 +16480,29 @@ components:
1644016480
x-enum-varnames:
1644116481
- METRICS
1644216482
- CLOUD_COST
16483+
MetricsListResponseLinks:
16484+
description: Pagination links. Only present if pagination query parameters were
16485+
provided.
16486+
properties:
16487+
first:
16488+
description: Link to the first page.
16489+
type: string
16490+
last:
16491+
description: Link to the last page.
16492+
nullable: true
16493+
type: string
16494+
next:
16495+
description: Link to the next page.
16496+
nullable: true
16497+
type: string
16498+
prev:
16499+
description: Link to previous page.
16500+
nullable: true
16501+
type: string
16502+
self:
16503+
description: Link to current page.
16504+
type: string
16505+
type: object
1644316506
MetricsScalarQuery:
1644416507
description: An individual scalar metrics query.
1644516508
properties:
@@ -35623,7 +35686,12 @@ paths:
3562335686
get:
3562435687
description: "Returns all metrics that can be configured in the Metrics Summary
3562535688
page or with Metrics without Limits\u2122 (matching additional filters if
35626-
specified)."
35689+
specified).\nOptionally, paginate by using the `page[cursor]` and/or `page[size]`
35690+
query parameters.\nTo fetch the first page, pass in a query parameter with
35691+
either a valid `page[size]` or an empty cursor like `page[cursor]=`. To fetch
35692+
the next page, pass in the `next_cursor` value from the response as the new
35693+
`page[cursor]` value.\nOnce the `meta.pagination.next_cursor` value is null,
35694+
all pages have been retrieved."
3562735695
operationId: ListTagConfigurations
3562835696
parameters:
3562935697
- description: Filter custom metrics that have configured tags.
@@ -35688,6 +35756,27 @@ paths:
3568835756
schema:
3568935757
format: int64
3569035758
type: integer
35759+
- description: Maximum number of results returned.
35760+
in: query
35761+
name: page[size]
35762+
required: false
35763+
schema:
35764+
default: 10000
35765+
format: int32
35766+
maximum: 10000
35767+
minimum: 1
35768+
type: integer
35769+
- description: 'String to query the next page of results.
35770+
35771+
This key is provided with each valid response from the API in `meta.pagination.next_cursor`.
35772+
35773+
Once the `meta.pagination.next_cursor` key is null, all pages have been
35774+
retrieved.'
35775+
in: query
35776+
name: page[cursor]
35777+
required: false
35778+
schema:
35779+
type: string
3569135780
responses:
3569235781
'200':
3569335782
content:
@@ -35721,6 +35810,11 @@ paths:
3572135810
summary: Get a list of metrics
3572235811
tags:
3572335812
- Metrics
35813+
x-pagination:
35814+
cursorParam: page[cursor]
35815+
cursorPath: meta.pagination.next_cursor
35816+
limitParam: page[size]
35817+
resultsPath: data
3572435818
x-permission:
3572535819
operator: OR
3572635820
permissions:

docs/datadog_api_client.v2.model.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6794,6 +6794,20 @@ datadog\_api\_client.v2.model.metric\_intake\_type module
67946794
:members:
67956795
:show-inheritance:
67966796

6797+
datadog\_api\_client.v2.model.metric\_meta\_page module
6798+
-------------------------------------------------------
6799+
6800+
.. automodule:: datadog_api_client.v2.model.metric_meta_page
6801+
:members:
6802+
:show-inheritance:
6803+
6804+
datadog\_api\_client.v2.model.metric\_meta\_page\_type module
6805+
-------------------------------------------------------------
6806+
6807+
.. automodule:: datadog_api_client.v2.model.metric_meta_page_type
6808+
:members:
6809+
:show-inheritance:
6810+
67976811
datadog\_api\_client.v2.model.metric\_metadata module
67986812
-----------------------------------------------------
67996813

@@ -6836,6 +6850,13 @@ datadog\_api\_client.v2.model.metric\_origin module
68366850
:members:
68376851
:show-inheritance:
68386852

6853+
datadog\_api\_client.v2.model.metric\_pagination\_meta module
6854+
-------------------------------------------------------------
6855+
6856+
.. automodule:: datadog_api_client.v2.model.metric_pagination_meta
6857+
:members:
6858+
:show-inheritance:
6859+
68396860
datadog\_api\_client.v2.model.metric\_payload module
68406861
----------------------------------------------------
68416862

@@ -7039,6 +7060,13 @@ datadog\_api\_client.v2.model.metrics\_data\_source module
70397060
:members:
70407061
:show-inheritance:
70417062

7063+
datadog\_api\_client.v2.model.metrics\_list\_response\_links module
7064+
-------------------------------------------------------------------
7065+
7066+
.. automodule:: datadog_api_client.v2.model.metrics_list_response_links
7067+
:members:
7068+
:show-inheritance:
7069+
70427070
datadog\_api\_client.v2.model.metrics\_scalar\_query module
70437071
-----------------------------------------------------------
70447072

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
Get a list of metrics returns "Success" response with pagination
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.metrics_api import MetricsApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = MetricsApi(api_client)
11+
items = api_instance.list_tag_configurations_with_pagination(
12+
page_size=2,
13+
)
14+
for item in items:
15+
print(item)

0 commit comments

Comments
 (0)