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
6 changes: 2 additions & 4 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9580,8 +9580,6 @@ components:

`draft`: The monitor appears as Draft and does not send notifications.
`published`: The monitor is active and evaluates conditions and notify as configured.

This field is in preview. The draft value is only available to customers with the feature enabled.
enum:
- draft
- published
Expand Down Expand Up @@ -10635,7 +10633,7 @@ components:
nullable: true
type: integer
variables:
description: List of requests that can be used in the monitor query. **This feature is currently in beta.**
description: List of requests that can be used in the monitor query.
items:
$ref: "#/components/schemas/MonitorFormulaAndFunctionQueryDefinition"
type: array
Expand All @@ -10658,7 +10656,7 @@ components:
readOnly: true
type: object
MonitorOptionsCustomSchedule:
description: Configuration options for the custom schedule. **This feature is in private beta.**
description: Configuration options for the custom schedule.
properties:
recurrences:
description: Array of custom schedule recurrences.
Expand Down
131 changes: 78 additions & 53 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/v2/tag-rules/CreateTagRule.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
negated=False,
required=True,
rule_type=TagRuleCreateType.SURFACING,
scope="env",
scope="env:prod",
source=TagRuleSource.LOGS,
tag_key="service",
tag_value_patterns=[
"api",
"web",
],
),
type=TagRuleResourceType.TAG_RULE,
type=TagRuleResourceType.TAG_POLICY,
),
)

Expand Down
2 changes: 1 addition & 1 deletion examples/v2/tag-rules/UpdateTagRule.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
tag_value_patterns=[],
),
id="123",
type=TagRuleResourceType.TAG_RULE,
type=TagRuleResourceType.TAG_POLICY,
),
)

Expand Down
2 changes: 0 additions & 2 deletions src/datadog_api_client/v1/model/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ def __init__(

``draft`` : The monitor appears as Draft and does not send notifications.
``published`` : The monitor is active and evaluates conditions and notify as configured.

This field is in preview. The draft value is only available to customers with the feature enabled.
:type draft_status: MonitorDraftStatus, optional

:param id: ID of this monitor.
Expand Down
2 changes: 0 additions & 2 deletions src/datadog_api_client/v1/model/monitor_draft_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ class MonitorDraftStatus(ModelSimple):
`draft`: The monitor appears as Draft and does not send notifications.
`published`: The monitor is active and evaluates conditions and notify as configured.

This field is in preview. The draft value is only available to customers with the feature enabled.

:param value: If omitted defaults to "published". Must be one of ["draft", "published"].
:type value: str
"""
Expand Down
2 changes: 1 addition & 1 deletion src/datadog_api_client/v1/model/monitor_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def __init__(
:param timeout_h: The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours.
:type timeout_h: int, none_type, optional

:param variables: List of requests that can be used in the monitor query. **This feature is currently in beta.**
:param variables: List of requests that can be used in the monitor query.
:type variables: [MonitorFormulaAndFunctionQueryDefinition], optional
"""
if aggregation is not unset:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def openapi_types(_):

def __init__(self_, recurrences: Union[List[MonitorOptionsCustomScheduleRecurrence], UnsetType] = unset, **kwargs):
"""
Configuration options for the custom schedule. **This feature is in private beta.**
Configuration options for the custom schedule.

:param recurrences: Array of custom schedule recurrences.
:type recurrences: [MonitorOptionsCustomScheduleRecurrence], optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(
"""
Configuration options for scheduling.

:param custom_schedule: Configuration options for the custom schedule. **This feature is in private beta.**
:param custom_schedule: Configuration options for the custom schedule.
:type custom_schedule: MonitorOptionsCustomSchedule, optional

:param evaluation_window: Configuration options for the evaluation window. If ``hour_starts`` is set, no other fields may be set. Otherwise, ``day_starts`` and ``month_starts`` must be set together.
Expand Down
2 changes: 0 additions & 2 deletions src/datadog_api_client/v1/model/monitor_update_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ def __init__(

``draft`` : The monitor appears as Draft and does not send notifications.
``published`` : The monitor is active and evaluates conditions and notify as configured.

This field is in preview. The draft value is only available to customers with the feature enabled.
:type draft_status: MonitorDraftStatus, optional

:param id: ID of this monitor.
Expand Down
2 changes: 0 additions & 2 deletions src/datadog_api_client/v2/api/downtimes_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

class DowntimesApi:
"""
**Note** : Downtime V2 is currently in private beta. To request access, contact `Datadog support <https://docs.datadoghq.com/help/>`_.

`Downtiming <https://docs.datadoghq.com/monitors/notify/downtimes>`_ gives
you greater control over monitor notifications by allowing you to globally exclude
scopes from alerting. Downtime settings, which can be scheduled with start and
Expand Down
14 changes: 9 additions & 5 deletions src/datadog_api_client/v2/api/tag_rules_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TagRulesApi:
scoped to a particular telemetry source (such as logs, spans, or metrics). Rules can be
``blocking`` (data not matching the rule is rejected) or ``surfacing`` (matching data is
highlighted but not blocked). Each rule reports a compliance ``score`` derived from how
much recent telemetry adheres to the rule.
much recent telemetry adheres to the rule. RUM supports only ``surfacing`` rules.
"""

def __init__(self, api_client=None):
Expand Down Expand Up @@ -254,7 +254,8 @@ def delete_tag_rule(
Delete a tag rule. By default the rule is soft-deleted so it can be recovered later
and so that historical score data remains queryable. Pass ``hard_delete=true`` to remove
the rule permanently.
the rule permanently. Deleting a ``blocking`` rule additionally requires the
``telemetry_rules_activate`` permission.
:param rule_id: The unique identifier of the tag rule to delete.
:type rule_id: str
Expand Down Expand Up @@ -288,7 +289,7 @@ def get_tag_rule(
:type rule_id: str
:param include: Comma-separated list of related resources to include alongside the rule. Currently the only supported value is ``score``.
:type include: TagRuleInclude, optional
:param ts_start: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds.
: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``.
:type ts_start: int, optional
: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``.
:type ts_end: int, optional
Expand Down Expand Up @@ -324,7 +325,7 @@ def get_tag_rule_score(
:param rule_id: The unique identifier of the tag rule.
:type rule_id: str
:param ts_start: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds.
: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``.
:type ts_start: int, optional
: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``.
:type ts_end: int, optional
Expand Down Expand Up @@ -365,7 +366,7 @@ def list_tag_rules(
:type include: TagRuleInclude, optional
:param filter_source: Restrict the result set to rules whose source matches the given value.
:type filter_source: TagRuleSource, optional
: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.
: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``.
:type ts_start: int, optional
: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``.
:type ts_end: int, optional
Expand Down Expand Up @@ -402,6 +403,9 @@ def update_tag_rule(
Update one or more attributes of an existing tag rule. Only the fields supplied in the
request body are modified; omitted fields retain their current values. The rule's
``source`` cannot be changed after creation.
Promoting a rule from ``surfacing`` to ``blocking`` additionally requires the
``telemetry_rules_activate`` permission, and your organization must have access to
blocking rules. You can't promote RUM rules to ``blocking``.
:param rule_id: The unique identifier of the tag rule to update.
:type rule_id: str
Expand Down
1 change: 1 addition & 0 deletions src/datadog_api_client/v2/model/tag_rule_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def __init__(
:param rule_type: How the rule is enforced. ``blocking`` rejects telemetry that violates the rule.
``surfacing`` only highlights non-compliant telemetry without blocking it.
RUM supports only ``surfacing`` rules.
:type rule_type: TagRuleType
:param scope: The scope the rule applies within.
Expand Down
23 changes: 16 additions & 7 deletions src/datadog_api_client/v2/model/tag_rule_create_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@

class TagRuleCreateAttributes(ModelNormal):
validations = {
"tag_key": {},
"tag_value_patterns": {
"max_items": 30,
"min_items": 1,
},
}
Expand Down Expand Up @@ -68,9 +70,11 @@ def __init__(
**kwargs,
):
"""
Attributes that can be supplied when creating a tag rule.
Attributes that can be supplied when creating a tag rule. If ``tag_value_patterns``
contains ``*`` , set ``required`` and ``negated`` to different values. If both are ``false`` ,
the rule has no effect. If both are ``true`` , no value can satisfy the rule.

:param enabled: Whether the rule is currently enforced. Defaults to ``true`` for newly created rules.
:param enabled: The API ignores this value on creation and always enables new rules. To disable a rule, use the "Update a tag rule" endpoint.
:type enabled: bool, optional

:param name: Human-readable name for the tag rule.
Expand All @@ -86,18 +90,23 @@ def __init__(
creation time.
:type rule_type: TagRuleCreateType

:param scope: The scope the rule applies within. Typically an environment, team, or
organization-level identifier used to limit where the rule is enforced.
:param scope: The scope the rule applies within. For logs and spans, use a search query, such
as ``env:prod`` , or ``*`` to match all telemetry. For metrics, use a metric selector
with an optional tag filter, such as ``system.cpu.*{env:prod}``. A metric wildcard
is allowed only once, at the end of the metric selector.
:type scope: str

:param source: The telemetry source that a tag rule applies to.
:type source: TagRuleSource

:param tag_key: The tag key that the rule governs (for example, ``service`` ).
:param tag_key: The tag key that the rule governs (for example, ``service`` ). Allowed characters
are ASCII letters, digits, underscores, hyphens, periods, and slashes. The keys
``host`` and ``device`` are not supported in any letter case.
:type tag_key: str

:param tag_value_patterns: One or more patterns that valid values for the tag key must match. At least one
pattern is required.
:param tag_value_patterns: Between 1 and 30 non-empty patterns that valid values for the tag key must match.
Allowed characters are ASCII letters, digits, underscores, colons, hyphens,
periods, commas, slashes, and asterisks.
:type tag_value_patterns: [str]
"""
if enabled is not unset:
Expand Down
6 changes: 4 additions & 2 deletions src/datadog_api_client/v2/model/tag_rule_create_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ def __init__(self_, attributes: TagRuleCreateAttributes, type: TagRuleResourceTy
"""
Data object for creating a tag rule.

:param attributes: Attributes that can be supplied when creating a tag rule.
:param attributes: Attributes that can be supplied when creating a tag rule. If ``tag_value_patterns``
contains ``*`` , set ``required`` and ``negated`` to different values. If both are ``false`` ,
the rule has no effect. If both are ``true`` , no value can satisfy the rule.
:type attributes: TagRuleCreateAttributes

:param type: JSON:API resource type for a tag rule.
:param type: JSON:API resource type for a tag rule. Requests accept ``tag_rule`` or ``tag_policy`` ; responses use ``tag_policy``.
:type type: TagRuleResourceType
"""
super().__init__(kwargs)
Expand Down
2 changes: 1 addition & 1 deletion src/datadog_api_client/v2/model/tag_rule_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __init__(
:param relationships: Related resources for a tag rule. Only present when the corresponding ``include`` query parameter is supplied.
:type relationships: TagRuleRelationships, optional

:param type: JSON:API resource type for a tag rule.
:param type: JSON:API resource type for a tag rule. Requests accept ``tag_rule`` or ``tag_policy`` ; responses use ``tag_policy``.
:type type: TagRuleResourceType
"""
if relationships is not unset:
Expand Down
7 changes: 5 additions & 2 deletions src/datadog_api_client/v2/model/tag_rule_resource_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@

class TagRuleResourceType(ModelSimple):
"""
JSON:API resource type for a tag rule.
JSON:API resource type for a tag rule. Requests accept `tag_rule` or `tag_policy`; responses use `tag_policy`.

:param value: If omitted defaults to "tag_rule". Must be one of ["tag_rule"].
:param value: Must be one of ["tag_rule", "tag_policy"].
:type value: str
"""

allowed_values = {
"tag_rule",
"tag_policy",
}
TAG_RULE: ClassVar["TagRuleResourceType"]
TAG_POLICY: ClassVar["TagRuleResourceType"]

@cached_property
def openapi_types(_):
Expand All @@ -33,3 +35,4 @@ def openapi_types(_):


TagRuleResourceType.TAG_RULE = TagRuleResourceType("tag_rule")
TagRuleResourceType.TAG_POLICY = TagRuleResourceType("tag_policy")
2 changes: 1 addition & 1 deletion src/datadog_api_client/v2/model/tag_rule_score_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self_, attributes: TagRuleScoreAttributes, id: str, type: TagRuleSc
:param id: The unique identifier of the compliance score resource.
:type id: str

:param type: JSON:API resource type for a tag rule compliance score.
:param type: JSON:API resource type for a tag rule compliance score. Responses use ``tag_policy_score``.
:type type: TagRuleScoreResourceType
"""
super().__init__(kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self_, id: str, type: TagRuleScoreResourceType, **kwargs):
:param id: The unique identifier of the related compliance score resource.
:type id: str

:param type: JSON:API resource type for a tag rule compliance score.
:param type: JSON:API resource type for a tag rule compliance score. Responses use ``tag_policy_score``.
:type type: TagRuleScoreResourceType
"""
super().__init__(kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@

class TagRuleScoreResourceType(ModelSimple):
"""
JSON:API resource type for a tag rule compliance score.
JSON:API resource type for a tag rule compliance score. Responses use `tag_policy_score`.

:param value: If omitted defaults to "tag_rule_score". Must be one of ["tag_rule_score"].
:param value: Must be one of ["tag_rule_score", "tag_policy_score"].
:type value: str
"""

allowed_values = {
"tag_rule_score",
"tag_policy_score",
}
TAG_RULE_SCORE: ClassVar["TagRuleScoreResourceType"]
TAG_POLICY_SCORE: ClassVar["TagRuleScoreResourceType"]

@cached_property
def openapi_types(_):
Expand All @@ -33,3 +35,4 @@ def openapi_types(_):


TagRuleScoreResourceType.TAG_RULE_SCORE = TagRuleScoreResourceType("tag_rule_score")
TagRuleScoreResourceType.TAG_POLICY_SCORE = TagRuleScoreResourceType("tag_policy_score")
1 change: 1 addition & 0 deletions src/datadog_api_client/v2/model/tag_rule_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class TagRuleType(ModelSimple):
"""
How the rule is enforced. `blocking` rejects telemetry that violates the rule.
`surfacing` only highlights non-compliant telemetry without blocking it.
RUM supports only `surfacing` rules.

:param value: Must be one of ["blocking", "surfacing"].
:type value: str
Expand Down
13 changes: 12 additions & 1 deletion src/datadog_api_client/v2/model/tag_rule_update_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@


class TagRuleUpdateAttributes(ModelNormal):
validations = {
"tag_key": {},
"tag_value_patterns": {
"max_items": 30,
"min_items": 1,
},
}

@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.tag_rule_type import TagRuleType
Expand Down Expand Up @@ -58,7 +66,9 @@ def __init__(
):
"""
Mutable attributes of a tag rule. Each field is optional; omitting a field leaves its
current value unchanged. The ``source`` of a rule cannot be changed.
current value unchanged. The ``source`` of a rule cannot be changed. Tag keys, patterns,
and metrics scopes have the same constraints as on creation. If the effective
``tag_value_patterns`` contains ``*`` , set ``required`` and ``negated`` to different values.

:param enabled: Whether the rule is currently enforced.
:type enabled: bool, optional
Expand All @@ -74,6 +84,7 @@ def __init__(

:param rule_type: How the rule is enforced. ``blocking`` rejects telemetry that violates the rule.
``surfacing`` only highlights non-compliant telemetry without blocking it.
RUM supports only ``surfacing`` rules.
:type rule_type: TagRuleType, optional

:param scope: The scope the rule applies within.
Expand Down
6 changes: 4 additions & 2 deletions src/datadog_api_client/v2/model/tag_rule_update_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ def __init__(
Data object for updating a tag rule.

:param attributes: Mutable attributes of a tag rule. Each field is optional; omitting a field leaves its
current value unchanged. The ``source`` of a rule cannot be changed.
current value unchanged. The ``source`` of a rule cannot be changed. Tag keys, patterns,
and metrics scopes have the same constraints as on creation. If the effective
``tag_value_patterns`` contains ``*`` , set ``required`` and ``negated`` to different values.
:type attributes: TagRuleUpdateAttributes, optional

:param id: The unique identifier of the tag rule being updated.
:type id: str

:param type: JSON:API resource type for a tag rule.
:param type: JSON:API resource type for a tag rule. Requests accept ``tag_rule`` or ``tag_policy`` ; responses use ``tag_policy``.
:type type: TagRuleResourceType
"""
if attributes is not unset:
Expand Down
2 changes: 0 additions & 2 deletions tests/v2/features/downtimes.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@endpoint(downtimes) @endpoint(downtimes-v2)
Feature: Downtimes
**Note**: Downtime V2 is currently in private beta. To request access,
contact [Datadog support](https://docs.datadoghq.com/help/).
[Downtiming](https://docs.datadoghq.com/monitors/notify/downtimes) gives
you greater control over monitor notifications by allowing you to globally
exclude scopes from alerting. Downtime settings, which can be scheduled
Expand Down
Loading
Loading