Skip to content
Merged
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
45 changes: 45 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130381,15 +130381,37 @@ components:
example: user@datadoghq.com
readOnly: true
type: string
estimated_change_in_volume:
description: |-
Estimated change in indexed cardinality or points if the exemption is removed and the matching tag indexing
rule applies to the metric. A negative value indicates a reduction in indexed volume, a positive value
indicates an increase, and zero indicates no change. A `null` value indicates that the estimate is unavailable.
example: 45
format: int64
nullable: true
readOnly: true
type: integer
kind:
description: >-
Discriminates between an explicit exemption (`exemption`) and a pre-existing legacy tag configuration acting as an implicit exclusion (`legacy_tag_configuration`).
example: exemption
type: string
missing_indexed_tags:
description: |-
Tag keys used to query this metric in monitors, dashboards, notebooks, and SLOs that the matching rule would
remove or not include if the exemption is removed.
example:
- service
items:
type: string
readOnly: true
type: array
reason:
description: The reason the metric is exempt from tag indexing rules.
example: This metric has a pre-existing tag configuration.
type: string
volume_status:
$ref: "#/components/schemas/TagIndexingRuleExemptionVolumeStatus"
type: object
TagIndexingRuleExemptionCreateAttributes:
description: Attributes for creating a tag indexing rule exemption.
Expand Down Expand Up @@ -130448,6 +130470,22 @@ components:
type: string
x-enum-varnames:
- TAG_INDEXING_RULE_EXEMPTIONS
TagIndexingRuleExemptionVolumeStatus:
description: |-
Indicates whether `estimated_change_in_volume` is available and, if not, why. `ok` indicates a fresh estimate.
`unindexed_tags` indicates that the matching rule uses tags that are not indexed for the metric.
`unavailable` indicates that the estimate is stale, was not computed, or could not be retrieved.
enum:
- ok
- unindexed_tags
- unavailable
example: unavailable
readOnly: true
type: string
x-enum-varnames:
- OK
- UNINDEXED_TAGS
- UNAVAILABLE
TagIndexingRuleMetricMatch:
description: Criteria for matching metrics based on query state.
properties:
Expand Down Expand Up @@ -200912,8 +200950,12 @@ paths:
attributes:
created_at: "2024-01-15T12:00:00.000Z"
created_by_handle: user@datadoghq.com
estimated_change_in_volume: 45
kind: exemption
missing_indexed_tags:
- service
reason: This metric has a pre-existing tag configuration.
volume_status: ok
id: dd.test.metric
type: tag_indexing_rule_exemptions
schema:
Expand Down Expand Up @@ -200989,8 +201031,11 @@ paths:
attributes:
created_at: "2024-01-15T12:00:00.000Z"
created_by_handle: user@datadoghq.com
estimated_change_in_volume:
kind: exemption
missing_indexed_tags: []
reason: This metric has a pre-existing tag configuration.
volume_status: unavailable
id: dd.test.metric
type: tag_indexing_rule_exemptions
schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,67 @@
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Union
from typing import List, Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
datetime,
none_type,
unset,
UnsetType,
)


if TYPE_CHECKING:
from datadog_api_client.v2.model.tag_indexing_rule_exemption_volume_status import (
TagIndexingRuleExemptionVolumeStatus,
)


class TagIndexingRuleExemptionAttributes(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.tag_indexing_rule_exemption_volume_status import (
TagIndexingRuleExemptionVolumeStatus,
)

return {
"created_at": (datetime,),
"created_by_handle": (str,),
"estimated_change_in_volume": (int, none_type),
"kind": (str,),
"missing_indexed_tags": ([str],),
"reason": (str,),
"volume_status": (TagIndexingRuleExemptionVolumeStatus,),
}

attribute_map = {
"created_at": "created_at",
"created_by_handle": "created_by_handle",
"estimated_change_in_volume": "estimated_change_in_volume",
"kind": "kind",
"missing_indexed_tags": "missing_indexed_tags",
"reason": "reason",
"volume_status": "volume_status",
}
read_only_vars = {
"created_at",
"created_by_handle",
"estimated_change_in_volume",
"missing_indexed_tags",
"volume_status",
}

def __init__(
self_,
created_at: Union[datetime, UnsetType] = unset,
created_by_handle: Union[str, UnsetType] = unset,
estimated_change_in_volume: Union[int, none_type, UnsetType] = unset,
kind: Union[str, UnsetType] = unset,
missing_indexed_tags: Union[List[str], UnsetType] = unset,
reason: Union[str, UnsetType] = unset,
volume_status: Union[TagIndexingRuleExemptionVolumeStatus, UnsetType] = unset,
**kwargs,
):
"""
Expand All @@ -52,18 +75,38 @@ def __init__(
:param created_by_handle: Handle of the user who created the exemption.
:type created_by_handle: str, optional

:param estimated_change_in_volume: Estimated change in indexed cardinality or points if the exemption is removed and the matching tag indexing
rule applies to the metric. A negative value indicates a reduction in indexed volume, a positive value
indicates an increase, and zero indicates no change. A ``null`` value indicates that the estimate is unavailable.
:type estimated_change_in_volume: int, none_type, optional

:param kind: Discriminates between an explicit exemption ( ``exemption`` ) and a pre-existing legacy tag configuration acting as an implicit exclusion ( ``legacy_tag_configuration`` ).
:type kind: str, optional

:param missing_indexed_tags: Tag keys used to query this metric in monitors, dashboards, notebooks, and SLOs that the matching rule would
remove or not include if the exemption is removed.
:type missing_indexed_tags: [str], optional

:param reason: The reason the metric is exempt from tag indexing rules.
:type reason: str, optional

:param volume_status: Indicates whether ``estimated_change_in_volume`` is available and, if not, why. ``ok`` indicates a fresh estimate.
``unindexed_tags`` indicates that the matching rule uses tags that are not indexed for the metric.
``unavailable`` indicates that the estimate is stale, was not computed, or could not be retrieved.
:type volume_status: TagIndexingRuleExemptionVolumeStatus, optional
"""
if created_at is not unset:
kwargs["created_at"] = created_at
if created_by_handle is not unset:
kwargs["created_by_handle"] = created_by_handle
if estimated_change_in_volume is not unset:
kwargs["estimated_change_in_volume"] = estimated_change_in_volume
if kind is not unset:
kwargs["kind"] = kind
if missing_indexed_tags is not unset:
kwargs["missing_indexed_tags"] = missing_indexed_tags
if reason is not unset:
kwargs["reason"] = reason
if volume_status is not unset:
kwargs["volume_status"] = volume_status
super().__init__(kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations


from datadog_api_client.model_utils import (
ModelSimple,
cached_property,
)

from typing import ClassVar


class TagIndexingRuleExemptionVolumeStatus(ModelSimple):
"""
Indicates whether `estimated_change_in_volume` is available and, if not, why. `ok` indicates a fresh estimate.
`unindexed_tags` indicates that the matching rule uses tags that are not indexed for the metric.
`unavailable` indicates that the estimate is stale, was not computed, or could not be retrieved.

:param value: Must be one of ["ok", "unindexed_tags", "unavailable"].
:type value: str
"""

allowed_values = {
"ok",
"unindexed_tags",
"unavailable",
}
OK: ClassVar["TagIndexingRuleExemptionVolumeStatus"]
UNINDEXED_TAGS: ClassVar["TagIndexingRuleExemptionVolumeStatus"]
UNAVAILABLE: ClassVar["TagIndexingRuleExemptionVolumeStatus"]

@cached_property
def openapi_types(_):
return {
"value": (str,),
}


TagIndexingRuleExemptionVolumeStatus.OK = TagIndexingRuleExemptionVolumeStatus("ok")
TagIndexingRuleExemptionVolumeStatus.UNINDEXED_TAGS = TagIndexingRuleExemptionVolumeStatus("unindexed_tags")
TagIndexingRuleExemptionVolumeStatus.UNAVAILABLE = TagIndexingRuleExemptionVolumeStatus("unavailable")
2 changes: 2 additions & 0 deletions src/datadog_api_client/v2/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11769,6 +11769,7 @@
from datadog_api_client.v2.model.tag_indexing_rule_exemption_data import TagIndexingRuleExemptionData
from datadog_api_client.v2.model.tag_indexing_rule_exemption_response import TagIndexingRuleExemptionResponse
from datadog_api_client.v2.model.tag_indexing_rule_exemption_type import TagIndexingRuleExemptionType
from datadog_api_client.v2.model.tag_indexing_rule_exemption_volume_status import TagIndexingRuleExemptionVolumeStatus
from datadog_api_client.v2.model.tag_indexing_rule_metric_match import TagIndexingRuleMetricMatch
from datadog_api_client.v2.model.tag_indexing_rule_options import TagIndexingRuleOptions
from datadog_api_client.v2.model.tag_indexing_rule_options_data import TagIndexingRuleOptionsData
Expand Down Expand Up @@ -20671,6 +20672,7 @@
"TagIndexingRuleExemptionData",
"TagIndexingRuleExemptionResponse",
"TagIndexingRuleExemptionType",
"TagIndexingRuleExemptionVolumeStatus",
"TagIndexingRuleMetricMatch",
"TagIndexingRuleOptions",
"TagIndexingRuleOptionsData",
Expand Down
Loading