Skip to content

Commit eda32ce

Browse files
dd-octo-sts[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit c47d7ce of spec repo (#4210)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 9567308 commit eda32ce

11 files changed

Lines changed: 520 additions & 1 deletion

File tree

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131403,6 +131403,21 @@ components:
131403131403
$ref: "#/components/schemas/TagIndexingRuleExemptionData"
131404131404
readOnly: true
131405131405
type: object
131406+
TagIndexingRuleExemptionSort:
131407+
default: estimated_change_in_volume
131408+
description: Sort field for tag indexing rule exemptions.
131409+
enum:
131410+
- name
131411+
- -name
131412+
- estimated_change_in_volume
131413+
- -estimated_change_in_volume
131414+
example: estimated_change_in_volume
131415+
type: string
131416+
x-enum-varnames:
131417+
- NAME
131418+
- NAME_DESCENDING
131419+
- ESTIMATED_CHANGE_IN_VOLUME
131420+
- ESTIMATED_CHANGE_IN_VOLUME_DESCENDING
131406131421
TagIndexingRuleExemptionType:
131407131422
default: tag_indexing_rule_exemptions
131408131423
description: The tag indexing rule exemption resource type.
@@ -131428,6 +131443,20 @@ components:
131428131443
- OK
131429131444
- UNINDEXED_TAGS
131430131445
- UNAVAILABLE
131446+
TagIndexingRuleExemptionsResponse:
131447+
description: Response containing a page of tag indexing rule exemptions.
131448+
properties:
131449+
data:
131450+
description: Array of tag indexing rule exemption objects.
131451+
items:
131452+
$ref: "#/components/schemas/TagIndexingRuleExemptionData"
131453+
type: array
131454+
links:
131455+
$ref: "#/components/schemas/MetricsListResponseLinks"
131456+
meta:
131457+
$ref: "#/components/schemas/MetricPaginationMeta"
131458+
readOnly: true
131459+
type: object
131431131460
TagIndexingRuleMetricMatch:
131432131461
description: Criteria for matching metrics based on query state.
131433131462
properties:
@@ -202030,6 +202059,137 @@ paths:
202030202059
x-unstable: |-
202031202060
**Note**: This endpoint is in preview and is subject to change.
202032202061
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
202062+
/api/v2/metrics/list-tag-indexing-rule-exemptions:
202063+
get:
202064+
description: |-
202065+
Returns explicit exemptions and legacy tag configurations that exclude metrics from tag indexing rules.
202066+
You can filter results by metric name prefix, whether an exemption is safe to remove, or the UUID of a matching
202067+
tag indexing rule. You can sort results by metric name or by estimated change in indexed volume.
202068+
operationId: ListTagIndexingRuleExemptions
202069+
parameters:
202070+
- description: |-
202071+
Filter exemptions to metrics whose names start with this literal prefix.
202072+
Matching is case-sensitive. Wildcard characters are treated literally.
202073+
example: dd.test.
202074+
in: query
202075+
name: filter[metric_prefix]
202076+
schema:
202077+
type: string
202078+
- description: |-
202079+
Filter exemptions by whether they are safe to remove. An exemption is considered safe when a fresh, usable
202080+
estimate indicates that removing it would not increase indexed volume and would not drop tags used to query
202081+
the metric in monitors, dashboards, notebooks, or SLOs. Set to `true` to return safe-to-remove exemptions,
202082+
or `false` to return all other exemptions, including those with unavailable or stale estimates.
202083+
example: true
202084+
in: query
202085+
name: filter[safe]
202086+
schema:
202087+
type: boolean
202088+
- description: Filter exemptions to metrics matched by the tag indexing rule with this UUID.
202089+
example: 00000000-0000-0000-0000-000000000001
202090+
in: query
202091+
name: filter[tag_indexing_rule_id]
202092+
schema:
202093+
format: uuid
202094+
type: string
202095+
- description: |-
202096+
Sort field. Prefix the field with `-` for descending order. The default is `estimated_change_in_volume` in ascending order, with the largest reductions (most negative values) first.
202097+
example: estimated_change_in_volume
202098+
in: query
202099+
name: sort
202100+
schema:
202101+
$ref: "#/components/schemas/TagIndexingRuleExemptionSort"
202102+
- description: |-
202103+
Maximum number of results per page. Defaults to 10000; accepts values from 1 to 10000. If
202104+
`meta.pagination.next_cursor` is non-null, request the next page by passing that value as `page[cursor]`.
202105+
Continue until `next_cursor` is null.
202106+
example: 100
202107+
in: query
202108+
name: page[size]
202109+
required: false
202110+
schema:
202111+
default: 10000
202112+
format: int32
202113+
maximum: 10000
202114+
minimum: 1
202115+
type: integer
202116+
- description: |-
202117+
Cursor for pagination. Use `page[size]` to opt-in to pagination and get the first page; for subsequent pages, use the value from `meta.pagination.next_cursor` in the response. Pagination is complete when `next_cursor` is null.
202118+
in: query
202119+
name: page[cursor]
202120+
required: false
202121+
schema:
202122+
type: string
202123+
responses:
202124+
"200":
202125+
content:
202126+
application/json:
202127+
examples:
202128+
default:
202129+
value:
202130+
data:
202131+
- attributes:
202132+
created_at: "2024-01-15T12:00:00.000Z"
202133+
created_by_handle: user@datadoghq.com
202134+
estimated_change_in_volume: 45
202135+
kind: exemption
202136+
missing_indexed_tags:
202137+
- service
202138+
reason: This metric has a pre-existing tag configuration.
202139+
volume_status: ok
202140+
id: dd.test.metric
202141+
type: tag_indexing_rule_exemptions
202142+
links:
202143+
first: /api/v2/metrics/list-tag-indexing-rule-exemptions?page[size]=100
202144+
next: /api/v2/metrics/list-tag-indexing-rule-exemptions?page[size]=100&page[cursor]=next-page-cursor
202145+
self: /api/v2/metrics/list-tag-indexing-rule-exemptions?page[size]=100
202146+
meta:
202147+
pagination:
202148+
cursor:
202149+
limit: 1
202150+
next_cursor: next-page-cursor
202151+
type: cursor_limit
202152+
schema:
202153+
$ref: "#/components/schemas/TagIndexingRuleExemptionsResponse"
202154+
description: OK
202155+
"400":
202156+
content:
202157+
application/json:
202158+
schema:
202159+
$ref: "#/components/schemas/JSONAPIErrorResponse"
202160+
description: Bad Request
202161+
"403":
202162+
content:
202163+
application/json:
202164+
schema:
202165+
$ref: "#/components/schemas/JSONAPIErrorResponse"
202166+
description: Forbidden
202167+
"429":
202168+
content:
202169+
application/json:
202170+
schema:
202171+
$ref: "#/components/schemas/JSONAPIErrorResponse"
202172+
description: Too Many Requests
202173+
security:
202174+
- apiKeyAuth: []
202175+
appKeyAuth: []
202176+
- AuthZ:
202177+
- metrics_read
202178+
summary: List tag indexing rule exemptions
202179+
tags:
202180+
- Metrics
202181+
x-pagination:
202182+
cursorParam: page[cursor]
202183+
cursorPath: meta.pagination.next_cursor
202184+
limitParam: page[size]
202185+
resultsPath: data
202186+
"x-permission":
202187+
operator: OR
202188+
permissions:
202189+
- metrics_read
202190+
x-unstable: |-
202191+
**Note**: The Tag Indexing Rules feature is currently in Preview.
202192+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
202033202193
/api/v2/metrics/tag-indexing-rules:
202034202194
get:
202035202195
description: List tag indexing rules for an org, sorted by `rule_order`, with offset/limit pagination.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
List tag indexing rule exemptions returns "OK" response
3+
"""
4+
5+
from os import environ
6+
from datadog_api_client import ApiClient, Configuration
7+
from datadog_api_client.v2.api.metrics_api import MetricsApi
8+
9+
configuration = Configuration()
10+
configuration.access_token = environ["DD_BEARER_TOKEN"]
11+
configuration.unstable_operations["list_tag_indexing_rule_exemptions"] = True
12+
with ApiClient(configuration) as api_client:
13+
api_instance = MetricsApi(api_client)
14+
response = api_instance.list_tag_indexing_rule_exemptions()
15+
16+
print(response)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
List tag indexing rule exemptions returns "OK" response with pagination
3+
"""
4+
5+
from os import environ
6+
from datadog_api_client import ApiClient, Configuration
7+
from datadog_api_client.v2.api.metrics_api import MetricsApi
8+
9+
configuration = Configuration()
10+
configuration.access_token = environ["DD_BEARER_TOKEN"]
11+
configuration.unstable_operations["list_tag_indexing_rule_exemptions"] = True
12+
with ApiClient(configuration) as api_client:
13+
api_instance = MetricsApi(api_client)
14+
items = api_instance.list_tag_indexing_rule_exemptions_with_pagination()
15+
for item in items:
16+
print(item)

‎src/datadog_api_client/configuration.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,7 @@ def __init__(
732732
"v2.get_historical_metrics_configuration": False,
733733
"v2.get_tag_indexing_rule": False,
734734
"v2.get_tag_indexing_rule_exemption": False,
735+
"v2.list_tag_indexing_rule_exemptions": False,
735736
"v2.list_tag_indexing_rules": False,
736737
"v2.list_tag_indexing_rules_for_metric": False,
737738
"v2.reorder_tag_indexing_rules": False,

0 commit comments

Comments
 (0)