Skip to content

Commit c752b02

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

16 files changed

Lines changed: 124 additions & 61 deletions

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

Lines changed: 54 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -144149,10 +144149,13 @@ components:
144149144149
- modified_by
144150144150
type: object
144151144151
TagRuleCreateAttributes:
144152-
description: Attributes that can be supplied when creating a tag rule.
144152+
description: |-
144153+
Attributes that can be supplied when creating a tag rule. If `tag_value_patterns`
144154+
contains `*`, set `required` and `negated` to different values. If both are `false`,
144155+
the rule has no effect. If both are `true`, no value can satisfy the rule.
144153144156
properties:
144154144157
enabled:
144155-
description: Whether the rule is currently enforced. Defaults to `true` for newly created rules.
144158+
description: The API ignores this value on creation and always enables new rules. To disable a rule, use the "Update a tag rule" endpoint.
144156144159
example: true
144157144160
type: boolean
144158144161
name:
@@ -144171,26 +144174,35 @@ components:
144171144174
$ref: "#/components/schemas/TagRuleCreateType"
144172144175
scope:
144173144176
description: |-
144174-
The scope the rule applies within. Typically an environment, team, or
144175-
organization-level identifier used to limit where the rule is enforced.
144176-
example: "env"
144177+
The scope the rule applies within. For logs and spans, use a search query, such
144178+
as `env:prod`, or `*` to match all telemetry. For metrics, use a metric selector
144179+
with an optional tag filter, such as `system.cpu.*{env:prod}`. A metric wildcard
144180+
is allowed only once, at the end of the metric selector.
144181+
example: "env:prod"
144177144182
type: string
144178144183
source:
144179144184
$ref: "#/components/schemas/TagRuleSource"
144180144185
tag_key:
144181-
description: The tag key that the rule governs (for example, `service`).
144186+
description: |-
144187+
The tag key that the rule governs (for example, `service`). Allowed characters
144188+
are ASCII letters, digits, underscores, hyphens, periods, and slashes. The keys
144189+
`host` and `device` are not supported in any letter case.
144182144190
example: "service"
144191+
pattern: '^[A-Za-z0-9_.\/-]+$'
144183144192
type: string
144184144193
tag_value_patterns:
144185144194
description: |-
144186-
One or more patterns that valid values for the tag key must match. At least one
144187-
pattern is required.
144195+
Between 1 and 30 non-empty patterns that valid values for the tag key must match.
144196+
Allowed characters are ASCII letters, digits, underscores, colons, hyphens,
144197+
periods, commas, slashes, and asterisks.
144188144198
example:
144189144199
- "api"
144190144200
- "web"
144191144201
items:
144192144202
description: A pattern that valid tag values must match.
144203+
pattern: '^[A-Za-z0-9_:.,\/*-]+$'
144193144204
type: string
144205+
maxItems: 30
144194144206
minItems: 1
144195144207
type: array
144196144208
required:
@@ -144273,13 +144285,15 @@ components:
144273144285
$ref: "#/components/schemas/TagRuleScoreRelationship"
144274144286
type: object
144275144287
TagRuleResourceType:
144276-
description: JSON:API resource type for a tag rule.
144288+
description: JSON:API resource type for a tag rule. Requests accept `tag_rule` or `tag_policy`; responses use `tag_policy`.
144277144289
enum:
144278144290
- tag_rule
144279-
example: "tag_rule"
144291+
- tag_policy
144292+
example: "tag_policy"
144280144293
type: string
144281144294
x-enum-varnames:
144282144295
- TAG_RULE
144296+
- TAG_POLICY
144283144297
TagRuleResponse:
144284144298
description: A single tag rule.
144285144299
properties:
@@ -144360,13 +144374,15 @@ components:
144360144374
- id
144361144375
type: object
144362144376
TagRuleScoreResourceType:
144363-
description: JSON:API resource type for a tag rule compliance score.
144377+
description: JSON:API resource type for a tag rule compliance score. Responses use `tag_policy_score`.
144364144378
enum:
144365144379
- tag_rule_score
144366-
example: "tag_rule_score"
144380+
- tag_policy_score
144381+
example: "tag_policy_score"
144367144382
type: string
144368144383
x-enum-varnames:
144369144384
- TAG_RULE_SCORE
144385+
- TAG_POLICY_SCORE
144370144386
TagRuleScoreResponse:
144371144387
description: A tag rule compliance score.
144372144388
properties:
@@ -144395,6 +144411,7 @@ components:
144395144411
description: |-
144396144412
How the rule is enforced. `blocking` rejects telemetry that violates the rule.
144397144413
`surfacing` only highlights non-compliant telemetry without blocking it.
144414+
RUM supports only `surfacing` rules.
144398144415
enum:
144399144416
- blocking
144400144417
- surfacing
@@ -144406,7 +144423,9 @@ components:
144406144423
TagRuleUpdateAttributes:
144407144424
description: |-
144408144425
Mutable attributes of a tag rule. Each field is optional; omitting a field leaves its
144409-
current value unchanged. The `source` of a rule cannot be changed.
144426+
current value unchanged. The `source` of a rule cannot be changed. Tag keys, patterns,
144427+
and metrics scopes have the same constraints as on creation. If the effective
144428+
`tag_value_patterns` contains `*`, set `required` and `negated` to different values.
144410144429
properties:
144411144430
enabled:
144412144431
description: Whether the rule is currently enforced.
@@ -144427,12 +144446,16 @@ components:
144427144446
type: string
144428144447
tag_key:
144429144448
description: The tag key that the rule governs.
144449+
pattern: '^[A-Za-z0-9_.\/-]+$'
144430144450
type: string
144431144451
tag_value_patterns:
144432144452
description: One or more patterns that valid values for the tag key must match.
144433144453
items:
144434144454
description: A pattern that valid tag values must match.
144455+
pattern: '^[A-Za-z0-9_:.,\/*-]+$'
144435144456
type: string
144457+
maxItems: 30
144458+
minItems: 1
144436144459
type: array
144437144460
type: object
144438144461
TagRuleUpdateData:
@@ -193239,7 +193262,7 @@ paths:
193239193262
required: false
193240193263
schema:
193241193264
$ref: "#/components/schemas/TagRuleSource"
193242-
- description: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Defaults to a recent window appropriate for the source.
193265+
- description: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Defaults to approximately 4 hours before the current time for metrics, or 24 hours before the current time for other sources. The API clamps earlier values to this default, regardless of `ts_end`.
193243193266
example: 1779315066097
193244193267
in: query
193245193268
name: ts_start
@@ -193285,16 +193308,16 @@ paths:
193285193308
score:
193286193309
data:
193287193310
id: "123-v1-1779315066097-1779401466097"
193288-
type: "tag_rule_score"
193289-
type: "tag_rule"
193311+
type: "tag_policy_score"
193312+
type: "tag_policy"
193290193313
included:
193291193314
- attributes:
193292193315
score: 80
193293193316
ts_end: 1779401466097
193294193317
ts_start: 1779315066097
193295193318
version: 1
193296193319
id: "123-v1-1779315066097-1779401466097"
193297-
type: "tag_rule_score"
193320+
type: "tag_policy_score"
193298193321
schema:
193299193322
$ref: "#/components/schemas/TagRulesListResponse"
193300193323
description: OK
@@ -193388,7 +193411,7 @@ paths:
193388193411
- "web"
193389193412
version: 1
193390193413
id: "123"
193391-
type: "tag_rule"
193414+
type: "tag_policy"
193392193415
schema:
193393193416
$ref: "#/components/schemas/TagRuleResponse"
193394193417
description: Created
@@ -193437,7 +193460,8 @@ paths:
193437193460
description: |-
193438193461
Delete a tag rule. By default the rule is soft-deleted so it can be recovered later
193439193462
and so that historical score data remains queryable. Pass `hard_delete=true` to remove
193440-
the rule permanently.
193463+
the rule permanently. Deleting a `blocking` rule additionally requires the
193464+
`telemetry_rules_activate` permission.
193441193465
operationId: DeleteTagRule
193442193466
parameters:
193443193467
- description: The unique identifier of the tag rule to delete.
@@ -193518,7 +193542,7 @@ paths:
193518193542
required: false
193519193543
schema:
193520193544
$ref: "#/components/schemas/TagRuleInclude"
193521-
- description: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds.
193545+
- description: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Defaults to approximately 4 hours before the current time for metrics, or 24 hours before the current time for other sources. The API clamps earlier values to this default, regardless of `ts_end`.
193522193546
example: 1779315066097
193523193547
in: query
193524193548
name: ts_start
@@ -193564,16 +193588,16 @@ paths:
193564193588
score:
193565193589
data:
193566193590
id: "123-v1-1779315066097-1779401466097"
193567-
type: "tag_rule_score"
193568-
type: "tag_rule"
193591+
type: "tag_policy_score"
193592+
type: "tag_policy"
193569193593
included:
193570193594
- attributes:
193571193595
score: 80
193572193596
ts_end: 1779401466097
193573193597
ts_start: 1779315066097
193574193598
version: 1
193575193599
id: "123-v1-1779315066097-1779401466097"
193576-
type: "tag_rule_score"
193600+
type: "tag_policy_score"
193577193601
schema:
193578193602
$ref: "#/components/schemas/TagRuleResponse"
193579193603
description: OK
@@ -193623,6 +193647,9 @@ paths:
193623193647
Update one or more attributes of an existing tag rule. Only the fields supplied in the
193624193648
request body are modified; omitted fields retain their current values. The rule's
193625193649
`source` cannot be changed after creation.
193650+
Promoting a rule from `surfacing` to `blocking` additionally requires the
193651+
`telemetry_rules_activate` permission, and your organization must have access to
193652+
blocking rules. You can't promote RUM rules to `blocking`.
193626193653
operationId: UpdateTagRule
193627193654
parameters:
193628193655
- description: The unique identifier of the tag rule to update.
@@ -193673,7 +193700,7 @@ paths:
193673193700
- "web"
193674193701
version: 2
193675193702
id: "123"
193676-
type: "tag_rule"
193703+
type: "tag_policy"
193677193704
schema:
193678193705
$ref: "#/components/schemas/TagRuleResponse"
193679193706
description: OK
@@ -193733,7 +193760,7 @@ paths:
193733193760
required: true
193734193761
schema:
193735193762
type: string
193736-
- description: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds.
193763+
- description: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Defaults to approximately 4 hours before the current time for metrics, or 24 hours before the current time for other sources. The API clamps earlier values to this default, regardless of `ts_end`.
193737193764
example: 1779315066097
193738193765
in: query
193739193766
name: ts_start
@@ -193763,7 +193790,7 @@ paths:
193763193790
ts_start: 1779315066097
193764193791
version: 1
193765193792
id: "123-v1-1779315066097-1779401466097"
193766-
type: "tag_rule_score"
193793+
type: "tag_policy_score"
193767193794
schema:
193768193795
$ref: "#/components/schemas/TagRuleScoreResponse"
193769193796
description: OK
@@ -275512,7 +275539,7 @@ tags:
275512275539
scoped to a particular telemetry source (such as logs, spans, or metrics). Rules can be
275513275540
`blocking` (data not matching the rule is rejected) or `surfacing` (matching data is
275514275541
highlighted but not blocked). Each rule reports a compliance `score` derived from how
275515-
much recent telemetry adheres to the rule.
275542+
much recent telemetry adheres to the rule. RUM supports only `surfacing` rules.
275516275543
name: Tag Rules
275517275544
- description: View and manage teams within Datadog. See the [Teams page](https://docs.datadoghq.com/account_management/teams/) for more information.
275518275545
name: Teams

‎examples/v2/tag-rules/CreateTagRule.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
negated=False,
2121
required=True,
2222
rule_type=TagRuleCreateType.SURFACING,
23-
scope="env",
23+
scope="env:prod",
2424
source=TagRuleSource.LOGS,
2525
tag_key="service",
2626
tag_value_patterns=[
2727
"api",
2828
"web",
2929
],
3030
),
31-
type=TagRuleResourceType.TAG_RULE,
31+
type=TagRuleResourceType.TAG_POLICY,
3232
),
3333
)
3434

‎examples/v2/tag-rules/UpdateTagRule.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
tag_value_patterns=[],
1919
),
2020
id="123",
21-
type=TagRuleResourceType.TAG_RULE,
21+
type=TagRuleResourceType.TAG_POLICY,
2222
),
2323
)
2424

‎src/datadog_api_client/v2/api/tag_rules_api.py‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class TagRulesApi:
2626
scoped to a particular telemetry source (such as logs, spans, or metrics). Rules can be
2727
``blocking`` (data not matching the rule is rejected) or ``surfacing`` (matching data is
2828
highlighted but not blocked). Each rule reports a compliance ``score`` derived from how
29-
much recent telemetry adheres to the rule.
29+
much recent telemetry adheres to the rule. RUM supports only ``surfacing`` rules.
3030
"""
3131

3232
def __init__(self, api_client=None):
@@ -254,7 +254,8 @@ def delete_tag_rule(
254254
255255
Delete a tag rule. By default the rule is soft-deleted so it can be recovered later
256256
and so that historical score data remains queryable. Pass ``hard_delete=true`` to remove
257-
the rule permanently.
257+
the rule permanently. Deleting a ``blocking`` rule additionally requires the
258+
``telemetry_rules_activate`` permission.
258259
259260
:param rule_id: The unique identifier of the tag rule to delete.
260261
:type rule_id: str
@@ -288,7 +289,7 @@ def get_tag_rule(
288289
:type rule_id: str
289290
:param include: Comma-separated list of related resources to include alongside the rule. Currently the only supported value is ``score``.
290291
:type include: TagRuleInclude, optional
291-
:param ts_start: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds.
292+
:param ts_start: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Defaults to approximately 4 hours before the current time for metrics, or 24 hours before the current time for other sources. The API clamps earlier values to this default, regardless of ``ts_end``.
292293
:type ts_start: int, optional
293294
:param ts_end: End of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Must be in the past and greater than ``ts_start``.
294295
:type ts_end: int, optional
@@ -324,7 +325,7 @@ def get_tag_rule_score(
324325
325326
:param rule_id: The unique identifier of the tag rule.
326327
:type rule_id: str
327-
:param ts_start: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds.
328+
:param ts_start: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Defaults to approximately 4 hours before the current time for metrics, or 24 hours before the current time for other sources. The API clamps earlier values to this default, regardless of ``ts_end``.
328329
:type ts_start: int, optional
329330
:param ts_end: End of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Must be in the past and greater than ``ts_start``.
330331
:type ts_end: int, optional
@@ -365,7 +366,7 @@ def list_tag_rules(
365366
:type include: TagRuleInclude, optional
366367
:param filter_source: Restrict the result set to rules whose source matches the given value.
367368
:type filter_source: TagRuleSource, optional
368-
:param ts_start: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Defaults to a recent window appropriate for the source.
369+
:param ts_start: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Defaults to approximately 4 hours before the current time for metrics, or 24 hours before the current time for other sources. The API clamps earlier values to this default, regardless of ``ts_end``.
369370
:type ts_start: int, optional
370371
:param ts_end: End of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Must be in the past and greater than ``ts_start``.
371372
:type ts_end: int, optional
@@ -402,6 +403,9 @@ def update_tag_rule(
402403
Update one or more attributes of an existing tag rule. Only the fields supplied in the
403404
request body are modified; omitted fields retain their current values. The rule's
404405
``source`` cannot be changed after creation.
406+
Promoting a rule from ``surfacing`` to ``blocking`` additionally requires the
407+
``telemetry_rules_activate`` permission, and your organization must have access to
408+
blocking rules. You can't promote RUM rules to ``blocking``.
405409
406410
:param rule_id: The unique identifier of the tag rule to update.
407411
:type rule_id: str

‎src/datadog_api_client/v2/model/tag_rule_attributes.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ def __init__(
119119
120120
:param rule_type: How the rule is enforced. ``blocking`` rejects telemetry that violates the rule.
121121
``surfacing`` only highlights non-compliant telemetry without blocking it.
122+
RUM supports only ``surfacing`` rules.
122123
:type rule_type: TagRuleType
123124
124125
:param scope: The scope the rule applies within.

0 commit comments

Comments
 (0)