diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index e24a358f1b..3f6d911acd 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -33708,10 +33708,27 @@ components: example: 3600 format: int64 type: integer + fail_on_no_data: + default: true + description: Whether the rule should fail if a matching monitor group is in a NO DATA state. + example: false + type: boolean + fail_on_no_groups_found: + default: false + description: Whether the rule should fail if no monitor groups are found for the query. + example: false + type: boolean query: description: Monitors that match this query are evaluated. example: "service:my-service env:prod" type: string + warmup: + default: 0 + description: Seconds to wait after a deployment starts before evaluating the monitor's status. + example: 0 + format: int64 + minimum: 0 + type: integer required: - query type: object diff --git a/src/datadog_api_client/v2/model/deployment_rule_options_monitor.py b/src/datadog_api_client/v2/model/deployment_rule_options_monitor.py index 5ae363b33d..9147de5203 100644 --- a/src/datadog_api_client/v2/model/deployment_rule_options_monitor.py +++ b/src/datadog_api_client/v2/model/deployment_rule_options_monitor.py @@ -14,6 +14,12 @@ class DeploymentRuleOptionsMonitor(ModelNormal): + validations = { + "warmup": { + "inclusive_minimum": 0, + }, + } + @cached_property def additional_properties_type(_): return None @@ -22,26 +28,55 @@ def additional_properties_type(_): def openapi_types(_): return { "duration": (int,), + "fail_on_no_data": (bool,), + "fail_on_no_groups_found": (bool,), "query": (str,), + "warmup": (int,), } attribute_map = { "duration": "duration", + "fail_on_no_data": "fail_on_no_data", + "fail_on_no_groups_found": "fail_on_no_groups_found", "query": "query", + "warmup": "warmup", } - def __init__(self_, query: str, duration: Union[int, UnsetType] = unset, **kwargs): + def __init__( + self_, + query: str, + duration: Union[int, UnsetType] = unset, + fail_on_no_data: Union[bool, UnsetType] = unset, + fail_on_no_groups_found: Union[bool, UnsetType] = unset, + warmup: Union[int, UnsetType] = unset, + **kwargs, + ): """ Monitor options for deployment rules. :param duration: Seconds the monitor needs to stay in OK status for the rule to pass. :type duration: int, optional + :param fail_on_no_data: Whether the rule should fail if a matching monitor group is in a NO DATA state. + :type fail_on_no_data: bool, optional + + :param fail_on_no_groups_found: Whether the rule should fail if no monitor groups are found for the query. + :type fail_on_no_groups_found: bool, optional + :param query: Monitors that match this query are evaluated. :type query: str + + :param warmup: Seconds to wait after a deployment starts before evaluating the monitor's status. + :type warmup: int, optional """ if duration is not unset: kwargs["duration"] = duration + if fail_on_no_data is not unset: + kwargs["fail_on_no_data"] = fail_on_no_data + if fail_on_no_groups_found is not unset: + kwargs["fail_on_no_groups_found"] = fail_on_no_groups_found + if warmup is not unset: + kwargs["warmup"] = warmup super().__init__(kwargs) self_.query = query diff --git a/src/datadog_api_client/v2/model/deployment_rules_options.py b/src/datadog_api_client/v2/model/deployment_rules_options.py index 09e557c81d..64f838b587 100644 --- a/src/datadog_api_client/v2/model/deployment_rules_options.py +++ b/src/datadog_api_client/v2/model/deployment_rules_options.py @@ -24,8 +24,17 @@ def __init__(self, **kwargs): :param excluded_resources: Resources to exclude from faulty deployment detection. :type excluded_resources: [str], optional + :param fail_on_no_data: Whether the rule should fail if a matching monitor group is in a NO DATA state. + :type fail_on_no_data: bool, optional + + :param fail_on_no_groups_found: Whether the rule should fail if no monitor groups are found for the query. + :type fail_on_no_groups_found: bool, optional + :param query: Monitors that match this query are evaluated. :type query: str + + :param warmup: Seconds to wait after a deployment starts before evaluating the monitor's status. + :type warmup: int, optional """ super().__init__(kwargs)