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
27 changes: 24 additions & 3 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25417,7 +25417,14 @@ components:
format: int64
type: integer
feature_flags_config_requests_sum:
description: Shows the sum of all Feature Flags Client-Side SDK config requests over all hours in the current date for all organizations.
description: |-
Shows the sum of all Feature Flags configuration-request usage units from client-side and server-side SDK
requests over all hours in the current date for all organizations. Each metered client-side request
contributes 1 unit, and each metered server-side request contributes 10 units. This value already includes
the server-side multiplier, so do not multiply it again. For example, 100 metered client-side requests and
10 metered server-side requests total 200 units, not 110. Periods before server-side metering began include
no server-side requests.
See [Monthly Flag Configuration Requests](https://docs.datadoghq.com/feature_flags/concepts/monthly_flag_configuration_requests/).
format: int64
type: integer
flex_logs_compute_large_avg:
Expand Down Expand Up @@ -26658,7 +26665,14 @@ components:
format: int64
type: integer
feature_flags_config_requests_sum:
description: Shows the sum of all Feature Flags Client-Side SDK config requests over all hours in the current date for the given org.
description: |-
Shows the sum of all Feature Flags configuration-request usage units from client-side and server-side SDK
requests over all hours in the current date for the given org. Each metered client-side request contributes
1 unit, and each metered server-side request contributes 10 units. This value already includes the
server-side multiplier, so do not multiply it again. For example, 100 metered client-side requests and 10
metered server-side requests total 200 units, not 110. Periods before server-side metering began include no
server-side requests.
See [Monthly Flag Configuration Requests](https://docs.datadoghq.com/feature_flags/concepts/monthly_flag_configuration_requests/).
format: int64
type: integer
flex_logs_compute_large_avg:
Expand Down Expand Up @@ -27910,7 +27924,14 @@ components:
format: int64
type: integer
feature_flags_config_requests_agg_sum:
description: Shows the sum of all Feature Flags Client-Side SDK config requests over all hours in the current month for all organizations.
description: |-
Shows the sum of all Feature Flags configuration-request usage units from client-side and server-side SDK
requests over all hours in the current month for all organizations. Each metered client-side request
contributes 1 unit, and each metered server-side request contributes 10 units. This value already includes
the server-side multiplier, so do not multiply it again. For example, 100 metered client-side requests and
10 metered server-side requests total 200 units, not 110. Periods before server-side metering began include
no server-side requests.
See [Monthly Flag Configuration Requests](https://docs.datadoghq.com/feature_flags/concepts/monthly_flag_configuration_requests/).
format: int64
type: integer
flex_logs_compute_large_avg_sum:
Expand Down
129 changes: 78 additions & 51 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
8 changes: 7 additions & 1 deletion src/datadog_api_client/v1/model/usage_summary_date.py
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,13 @@ def __init__(
:param fargate_tasks_count_hwm: Shows the average of all Fargate tasks over all hours in the current date for all organizations.
:type fargate_tasks_count_hwm: int, optional

:param feature_flags_config_requests_sum: Shows the sum of all Feature Flags Client-Side SDK config requests over all hours in the current date for all organizations.
:param feature_flags_config_requests_sum: Shows the sum of all Feature Flags configuration-request usage units from client-side and server-side SDK
requests over all hours in the current date for all organizations. Each metered client-side request
contributes 1 unit, and each metered server-side request contributes 10 units. This value already includes
the server-side multiplier, so do not multiply it again. For example, 100 metered client-side requests and
10 metered server-side requests total 200 units, not 110. Periods before server-side metering began include
no server-side requests.
See `Monthly Flag Configuration Requests <https://docs.datadoghq.com/feature_flags/concepts/monthly_flag_configuration_requests/>`_.
:type feature_flags_config_requests_sum: int, optional

:param flex_logs_compute_large_avg: Shows the average number of Flex Logs Compute Large Instances over all hours in the current date for the given org.
Expand Down
8 changes: 7 additions & 1 deletion src/datadog_api_client/v1/model/usage_summary_date_org.py
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,13 @@ def __init__(
:param fargate_tasks_count_hwm: Shows the high-water mark of all Fargate tasks over all hours in the current date for the given org.
:type fargate_tasks_count_hwm: int, optional

:param feature_flags_config_requests_sum: Shows the sum of all Feature Flags Client-Side SDK config requests over all hours in the current date for the given org.
:param feature_flags_config_requests_sum: Shows the sum of all Feature Flags configuration-request usage units from client-side and server-side SDK
requests over all hours in the current date for the given org. Each metered client-side request contributes
1 unit, and each metered server-side request contributes 10 units. This value already includes the
server-side multiplier, so do not multiply it again. For example, 100 metered client-side requests and 10
metered server-side requests total 200 units, not 110. Periods before server-side metering began include no
server-side requests.
See `Monthly Flag Configuration Requests <https://docs.datadoghq.com/feature_flags/concepts/monthly_flag_configuration_requests/>`_.
:type feature_flags_config_requests_sum: int, optional

:param flex_logs_compute_large_avg: Shows the average number of Flex Logs Compute Large Instances over all hours in the current date for the given org.
Expand Down
8 changes: 7 additions & 1 deletion src/datadog_api_client/v1/model/usage_summary_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,13 @@ def __init__(
:param fargate_tasks_count_hwm_sum: Shows the sum of the high-water marks of all Fargate tasks over all hours in the current month for all organizations.
:type fargate_tasks_count_hwm_sum: int, optional

:param feature_flags_config_requests_agg_sum: Shows the sum of all Feature Flags Client-Side SDK config requests over all hours in the current month for all organizations.
:param feature_flags_config_requests_agg_sum: Shows the sum of all Feature Flags configuration-request usage units from client-side and server-side SDK
requests over all hours in the current month for all organizations. Each metered client-side request
contributes 1 unit, and each metered server-side request contributes 10 units. This value already includes
the server-side multiplier, so do not multiply it again. For example, 100 metered client-side requests and
10 metered server-side requests total 200 units, not 110. Periods before server-side metering began include
no server-side requests.
See `Monthly Flag Configuration Requests <https://docs.datadoghq.com/feature_flags/concepts/monthly_flag_configuration_requests/>`_.
:type feature_flags_config_requests_agg_sum: int, optional

:param flex_logs_compute_large_avg_sum: Shows the average number of Flex Logs Compute Large Instances over all hours in the current months for all organizations.
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")
Loading
Loading