diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 8ecd35d467f9..53f0e79ae2be 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -8303,6 +8303,10 @@ components: description: The name assigned to this aggregation, when multiple aggregations are defined for a query. example: "compute_result" type: string + source: + description: Source reference for composite query payloads. + example: "filter_query" + type: string required: - aggregation type: object @@ -8330,6 +8334,10 @@ components: type: integer sort: $ref: "#/components/schemas/MonitorFormulaAndFunctionEventQueryGroupBySort" + source: + description: Source reference for composite query payloads. + example: "filter_query" + type: string required: - facet type: object diff --git a/features/v1/monitors.feature b/features/v1/monitors.feature index f7fd40f4ede2..73ed30421fb3 100644 --- a/features/v1/monitors.feature +++ b/features/v1/monitors.feature @@ -219,7 +219,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 {"assets": [{"category": "runbook", "name": "Monitor Runbook", "resource_key": "12345", "resource_type": "notebook", "url": "/notebooks/12345"}], "draft_status": "published", "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", "name": "compute_result"}, "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 {"assets": [{"category": "runbook", "name": "Monitor Runbook", "resource_key": "12345", "resource_type": "notebook", "url": "/notebooks/12345"}], "draft_status": "published", "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", "name": "compute_result", "source": "filter_query"}, "data_source": "rum", "group_by": [{"facet": "status", "limit": 10, "sort": {"aggregation": "avg", "order": "desc"}, "source": "filter_query"}], "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 diff --git a/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_definition_compute.rb b/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_definition_compute.rb index 144b9d3cbeb5..d397b7504dcb 100644 --- a/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_definition_compute.rb +++ b/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_definition_compute.rb @@ -33,6 +33,9 @@ class MonitorFormulaAndFunctionEventQueryDefinitionCompute # The name assigned to this aggregation, when multiple aggregations are defined for a query. attr_accessor :name + # Source reference for composite query payloads. + attr_accessor :source + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. @@ -42,7 +45,8 @@ def self.attribute_map :'aggregation' => :'aggregation', :'interval' => :'interval', :'metric' => :'metric', - :'name' => :'name' + :'name' => :'name', + :'source' => :'source' } end @@ -53,7 +57,8 @@ def self.openapi_types :'aggregation' => :'MonitorFormulaAndFunctionEventAggregation', :'interval' => :'Integer', :'metric' => :'String', - :'name' => :'String' + :'name' => :'String', + :'source' => :'String' } end @@ -90,6 +95,10 @@ def initialize(attributes = {}) if attributes.key?(:'name') self.name = attributes[:'name'] end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end end # Check to see if the all the properties in the model are valid @@ -140,6 +149,7 @@ def ==(o) interval == o.interval && metric == o.metric && name == o.name && + source == o.source && additional_properties == o.additional_properties end @@ -147,7 +157,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [aggregation, interval, metric, name, additional_properties].hash + [aggregation, interval, metric, name, source, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_group_by.rb b/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_group_by.rb index 87ee9587e468..162f7c113566 100644 --- a/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_group_by.rb +++ b/lib/datadog_api_client/v1/models/monitor_formula_and_function_event_query_group_by.rb @@ -30,6 +30,9 @@ class MonitorFormulaAndFunctionEventQueryGroupBy # Options for sorting group by results. attr_accessor :sort + # Source reference for composite query payloads. + attr_accessor :source + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. @@ -38,7 +41,8 @@ def self.attribute_map { :'facet' => :'facet', :'limit' => :'limit', - :'sort' => :'sort' + :'sort' => :'sort', + :'source' => :'source' } end @@ -48,7 +52,8 @@ def self.openapi_types { :'facet' => :'String', :'limit' => :'Integer', - :'sort' => :'MonitorFormulaAndFunctionEventQueryGroupBySort' + :'sort' => :'MonitorFormulaAndFunctionEventQueryGroupBySort', + :'source' => :'String' } end @@ -81,6 +86,10 @@ def initialize(attributes = {}) if attributes.key?(:'sort') self.sort = attributes[:'sort'] end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end end # Check to see if the all the properties in the model are valid @@ -130,6 +139,7 @@ def ==(o) facet == o.facet && limit == o.limit && sort == o.sort && + source == o.source && additional_properties == o.additional_properties end @@ -137,7 +147,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [facet, limit, sort, additional_properties].hash + [facet, limit, sort, source, additional_properties].hash end end end