diff --git a/.apigentools-info b/.apigentools-info index eaeeeb8b9c..de98159aed 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-02-27 21:31:40.799230", - "spec_repo_commit": "0b2e3d20" + "regenerated": "2025-02-28 17:49:27.289434", + "spec_repo_commit": "59e6a448" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-02-27 21:31:40.813872", - "spec_repo_commit": "0b2e3d20" + "regenerated": "2025-02-28 17:49:27.303661", + "spec_repo_commit": "59e6a448" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 3958e7ef78..9ead562825 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -7439,7 +7439,7 @@ components: properties: day_starts: description: The time of the day at which a one day cumulative evaluation - window starts. Must be defined in UTC time in `HH:mm` format. + window starts. example: 04:00 type: string hour_starts: @@ -7458,6 +7458,11 @@ components: maximum: 1 minimum: 1 type: integer + timezone: + description: The timezone of the time of the day of the cumulative evaluation + window start. + example: Europe/Paris + type: string type: object MonitorOverallStates: description: The different states your monitor can be in. diff --git a/src/datadog_api_client/v1/model/monitor_options_scheduling_options_evaluation_window.py b/src/datadog_api_client/v1/model/monitor_options_scheduling_options_evaluation_window.py index b05ee67b14..ea09bbe53d 100644 --- a/src/datadog_api_client/v1/model/monitor_options_scheduling_options_evaluation_window.py +++ b/src/datadog_api_client/v1/model/monitor_options_scheduling_options_evaluation_window.py @@ -31,12 +31,14 @@ def openapi_types(_): "day_starts": (str,), "hour_starts": (int,), "month_starts": (int,), + "timezone": (str,), } attribute_map = { "day_starts": "day_starts", "hour_starts": "hour_starts", "month_starts": "month_starts", + "timezone": "timezone", } def __init__( @@ -44,12 +46,13 @@ def __init__( day_starts: Union[str, UnsetType] = unset, hour_starts: Union[int, UnsetType] = unset, month_starts: Union[int, UnsetType] = unset, + timezone: Union[str, UnsetType] = unset, **kwargs, ): """ 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. - :param day_starts: The time of the day at which a one day cumulative evaluation window starts. Must be defined in UTC time in ``HH:mm`` format. + :param day_starts: The time of the day at which a one day cumulative evaluation window starts. :type day_starts: str, optional :param hour_starts: The minute of the hour at which a one hour cumulative evaluation window starts. @@ -57,6 +60,9 @@ def __init__( :param month_starts: The day of the month at which a one month cumulative evaluation window starts. :type month_starts: int, optional + + :param timezone: The timezone of the time of the day of the cumulative evaluation window start. + :type timezone: str, optional """ if day_starts is not unset: kwargs["day_starts"] = day_starts @@ -64,4 +70,6 @@ def __init__( kwargs["hour_starts"] = hour_starts if month_starts is not unset: kwargs["month_starts"] = month_starts + if timezone is not unset: + kwargs["timezone"] = timezone super().__init__(kwargs) diff --git a/tests/v1/features/monitors.feature b/tests/v1/features/monitors.feature index bb344afd78..05ef98216e 100644 --- a/tests/v1/features/monitors.feature +++ b/tests/v1/features/monitors.feature @@ -164,7 +164,7 @@ Feature: Monitors Scenario: Edit a monitor returns "Bad Request" response Given new "UpdateMonitor" request And request contains "monitor_id" parameter from "REPLACE.ME" - And body with value {"options": {"evaluation_delay": null, "include_tags": true, "min_failure_duration": 0, "min_location_failed": 1, "new_group_delay": null, "new_host_delay": 300, "no_data_timeframe": null, "notification_preset_name": "show_all", "notify_audit": false, "notify_by": [], "on_missing_data": "default", "renotify_interval": null, "renotify_occurrences": null, "renotify_statuses": ["alert"], "scheduling_options": {"custom_schedule": {"recurrences": [{"rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR", "start": "2023-08-31T16:30:00", "timezone": "Europe/Paris"}]}, "evaluation_window": {"day_starts": "04:00", "hour_starts": 0, "month_starts": 1}}, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": null, "variables": [{"compute": {"aggregation": "avg", "interval": 60000, "metric": "@duration"}, "data_source": "rum", "group_by": [{"facet": "status", "limit": 10, "sort": {"aggregation": "avg", "order": "desc"}}], "indexes": ["days-3", "days-7"], "name": "query_errors", "search": {"query": "service:query"}}]}, "priority": null, "restricted_roles": [], "tags": [], "type": "query alert"} + And body with value {"options": {"evaluation_delay": null, "include_tags": true, "min_failure_duration": 0, "min_location_failed": 1, "new_group_delay": null, "new_host_delay": 300, "no_data_timeframe": null, "notification_preset_name": "show_all", "notify_audit": false, "notify_by": [], "on_missing_data": "default", "renotify_interval": null, "renotify_occurrences": null, "renotify_statuses": ["alert"], "scheduling_options": {"custom_schedule": {"recurrences": [{"rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR", "start": "2023-08-31T16:30:00", "timezone": "Europe/Paris"}]}, "evaluation_window": {"day_starts": "04:00", "hour_starts": 0, "month_starts": 1, "timezone": "Europe/Paris"}}, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": null, "variables": [{"compute": {"aggregation": "avg", "interval": 60000, "metric": "@duration"}, "data_source": "rum", "group_by": [{"facet": "status", "limit": 10, "sort": {"aggregation": "avg", "order": "desc"}}], "indexes": ["days-3", "days-7"], "name": "query_errors", "search": {"query": "service:query"}}]}, "priority": null, "restricted_roles": [], "tags": [], "type": "query alert"} When the request is sent Then the response status is 400 Bad Request