From 11879e20159c12b499c9128d08e7f67b3d611266 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 20 Nov 2025 17:40:27 +0000 Subject: [PATCH] Regenerate client from commit 2aab4b8 of spec repo --- .generator/schemas/v1/openapi.yaml | 62 ++++++++++++++-- docs/datadog_api_client.v1.model.rst | 14 ++++ .../CreateSLO_512760759.py | 68 ++++++++++++++++++ .../v1/model/service_level_objective.py | 7 +- .../v1/model/service_level_objective_query.py | 2 +- .../model/service_level_objective_request.py | 7 +- .../v1/model/slo_count_condition.py | 70 +++++++++++++++++++ .../v1/model/slo_count_spec.py | 45 ++++++++++++ .../v1/model/slo_response_data.py | 17 ++--- .../v1/model/slo_sli_spec.py | 8 ++- src/datadog_api_client/v1/models/__init__.py | 4 ++ .../features/service_level_objectives.feature | 26 +++++++ 12 files changed, 304 insertions(+), 26 deletions(-) create mode 100644 examples/v1/service-level-objectives/CreateSLO_512760759.py create mode 100644 src/datadog_api_client/v1/model/slo_count_condition.py create mode 100644 src/datadog_api_client/v1/model/slo_count_spec.py diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index e4c9496590..c132893290 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -11409,6 +11409,60 @@ components: example: UTC type: string type: object + SLOCountCondition: + description: 'A count-based SLI specification, composed of three parts: the + good events formula, the total events formula, + + and the involved queries.' + example: + good_events_formula: query1 - query2 + queries: + - data_source: metrics + name: query1 + query: sum:trace.servlet.request.success{*} by {env}.as_count() + - data_source: metrics + name: query2 + query: sum:trace.servlet.request.hits{*} by {env}.as_count() + total_events_formula: query2 + properties: + good_events_formula: + $ref: '#/components/schemas/SLOFormula' + queries: + example: + - data_source: metrics + name: query1 + query: sum:trace.servlet.request.hits{*} by {env}.as_count() + items: + $ref: '#/components/schemas/SLODataSourceQueryDefinition' + minItems: 1 + type: array + total_events_formula: + $ref: '#/components/schemas/SLOFormula' + required: + - good_events_formula + - total_events_formula + - queries + type: object + SLOCountSpec: + additionalProperties: false + description: A count-based SLI specification. + example: + count: + good_events_formula: query1 - query2 + queries: + - data_source: metrics + name: query1 + query: sum:trace.servlet.request.success{*} by {env}.as_count() + - data_source: metrics + name: query2 + query: sum:trace.servlet.request.hits{*} by {env}.as_count() + total_events_formula: query2 + properties: + count: + $ref: '#/components/schemas/SLOCountCondition' + required: + - count + type: object SLOCreator: description: The creator of the SLO nullable: true @@ -12295,8 +12349,6 @@ components: type: array timeframe: $ref: '#/components/schemas/SLOTimeframe' - type: - $ref: '#/components/schemas/SLOType' warning_threshold: description: 'The optional warning threshold such that when the service level indicator is @@ -12314,9 +12366,10 @@ components: type: object SLOSliSpec: description: A generic SLI specification. This is currently used for time-slice - SLOs only. + and count-based SLOs only. oneOf: - $ref: '#/components/schemas/SLOTimeSliceSpec' + - $ref: '#/components/schemas/SLOCountSpec' SLOState: description: State of the SLO. enum: @@ -13468,8 +13521,7 @@ components: - type type: object ServiceLevelObjectiveQuery: - description: 'A metric-based SLO. **Required if type is `metric`**. Note that - Datadog only allows the sum by aggregator + description: 'A metric-based SLO. Note that Datadog only allows the sum by aggregator to be used because this will sum up all request counts instead of averaging them, or taking the max or diff --git a/docs/datadog_api_client.v1.model.rst b/docs/datadog_api_client.v1.model.rst index e2f9fc1e6d..447e755e5d 100644 --- a/docs/datadog_api_client.v1.model.rst +++ b/docs/datadog_api_client.v1.model.rst @@ -3644,6 +3644,20 @@ datadog\_api\_client.v1.model.slo\_correction\_update\_request\_attributes modul :members: :show-inheritance: +datadog\_api\_client.v1.model.slo\_count\_condition module +---------------------------------------------------------- + +.. automodule:: datadog_api_client.v1.model.slo_count_condition + :members: + :show-inheritance: + +datadog\_api\_client.v1.model.slo\_count\_spec module +----------------------------------------------------- + +.. automodule:: datadog_api_client.v1.model.slo_count_spec + :members: + :show-inheritance: + datadog\_api\_client.v1.model.slo\_creator module ------------------------------------------------- diff --git a/examples/v1/service-level-objectives/CreateSLO_512760759.py b/examples/v1/service-level-objectives/CreateSLO_512760759.py new file mode 100644 index 0000000000..e8419c5e00 --- /dev/null +++ b/examples/v1/service-level-objectives/CreateSLO_512760759.py @@ -0,0 +1,68 @@ +""" +Create a new metric SLO object using sli_specification returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v1.api.service_level_objectives_api import ServiceLevelObjectivesApi +from datadog_api_client.v1.model.formula_and_function_metric_data_source import FormulaAndFunctionMetricDataSource +from datadog_api_client.v1.model.formula_and_function_metric_query_definition import ( + FormulaAndFunctionMetricQueryDefinition, +) +from datadog_api_client.v1.model.service_level_objective_request import ServiceLevelObjectiveRequest +from datadog_api_client.v1.model.slo_count_condition import SLOCountCondition +from datadog_api_client.v1.model.slo_count_spec import SLOCountSpec +from datadog_api_client.v1.model.slo_formula import SLOFormula +from datadog_api_client.v1.model.slo_threshold import SLOThreshold +from datadog_api_client.v1.model.slo_timeframe import SLOTimeframe +from datadog_api_client.v1.model.slo_type import SLOType + +body = ServiceLevelObjectiveRequest( + type=SLOType.METRIC, + description="Metric SLO using sli_specification", + name="Example-Service-Level-Objective", + sli_specification=SLOCountSpec( + count=SLOCountCondition( + good_events_formula=SLOFormula( + formula="query1", + ), + total_events_formula=SLOFormula( + formula="query2", + ), + queries=[ + FormulaAndFunctionMetricQueryDefinition( + data_source=FormulaAndFunctionMetricDataSource.METRICS, + name="query1", + query="sum:httpservice.success{*}.as_count()", + ), + FormulaAndFunctionMetricQueryDefinition( + data_source=FormulaAndFunctionMetricDataSource.METRICS, + name="query2", + query="sum:httpservice.hits{*}.as_count()", + ), + ], + ), + ), + tags=[ + "env:prod", + "type:count", + ], + thresholds=[ + SLOThreshold( + target=99.0, + target_display="99.0", + timeframe=SLOTimeframe.SEVEN_DAYS, + warning=98.0, + warning_display="98.0", + ), + ], + timeframe=SLOTimeframe.SEVEN_DAYS, + target_threshold=99.0, + warning_threshold=98.0, +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = ServiceLevelObjectivesApi(api_client) + response = api_instance.create_slo(body=body) + + print(response) diff --git a/src/datadog_api_client/v1/model/service_level_objective.py b/src/datadog_api_client/v1/model/service_level_objective.py index a95b993513..25e3f35455 100644 --- a/src/datadog_api_client/v1/model/service_level_objective.py +++ b/src/datadog_api_client/v1/model/service_level_objective.py @@ -22,6 +22,7 @@ from datadog_api_client.v1.model.slo_timeframe import SLOTimeframe from datadog_api_client.v1.model.slo_type import SLOType from datadog_api_client.v1.model.slo_time_slice_spec import SLOTimeSliceSpec + from datadog_api_client.v1.model.slo_count_spec import SLOCountSpec class ServiceLevelObjective(ModelNormal): @@ -94,7 +95,7 @@ def __init__( monitor_ids: Union[List[int], UnsetType] = unset, monitor_tags: Union[List[str], UnsetType] = unset, query: Union[ServiceLevelObjectiveQuery, UnsetType] = unset, - sli_specification: Union[SLOSliSpec, SLOTimeSliceSpec, UnsetType] = unset, + sli_specification: Union[SLOSliSpec, SLOTimeSliceSpec, SLOCountSpec, UnsetType] = unset, tags: Union[List[str], UnsetType] = unset, target_threshold: Union[float, UnsetType] = unset, timeframe: Union[SLOTimeframe, UnsetType] = unset, @@ -151,12 +152,12 @@ def __init__( :param name: The name of the service level objective object. :type name: str - :param query: A metric-based SLO. **Required if type is metric**. Note that Datadog only allows the sum by aggregator + :param query: A metric-based SLO. Note that Datadog only allows the sum by aggregator to be used because this will sum up all request counts instead of averaging them, or taking the max or min of all of those requests. :type query: ServiceLevelObjectiveQuery, optional - :param sli_specification: A generic SLI specification. This is currently used for time-slice SLOs only. + :param sli_specification: A generic SLI specification. This is currently used for time-slice and count-based SLOs only. :type sli_specification: SLOSliSpec, optional :param tags: A list of tags associated with this service level objective. diff --git a/src/datadog_api_client/v1/model/service_level_objective_query.py b/src/datadog_api_client/v1/model/service_level_objective_query.py index ee11656739..775f27eaf4 100644 --- a/src/datadog_api_client/v1/model/service_level_objective_query.py +++ b/src/datadog_api_client/v1/model/service_level_objective_query.py @@ -25,7 +25,7 @@ def openapi_types(_): def __init__(self_, denominator: str, numerator: str, **kwargs): """ - A metric-based SLO. **Required if type is metric**. Note that Datadog only allows the sum by aggregator + A metric-based SLO. Note that Datadog only allows the sum by aggregator to be used because this will sum up all request counts instead of averaging them, or taking the max or min of all of those requests. diff --git a/src/datadog_api_client/v1/model/service_level_objective_request.py b/src/datadog_api_client/v1/model/service_level_objective_request.py index dbeb4bd0d9..87cce03d9c 100644 --- a/src/datadog_api_client/v1/model/service_level_objective_request.py +++ b/src/datadog_api_client/v1/model/service_level_objective_request.py @@ -21,6 +21,7 @@ from datadog_api_client.v1.model.slo_timeframe import SLOTimeframe from datadog_api_client.v1.model.slo_type import SLOType from datadog_api_client.v1.model.slo_time_slice_spec import SLOTimeSliceSpec + from datadog_api_client.v1.model.slo_count_spec import SLOCountSpec class ServiceLevelObjectiveRequest(ModelNormal): @@ -71,7 +72,7 @@ def __init__( groups: Union[List[str], UnsetType] = unset, monitor_ids: Union[List[int], UnsetType] = unset, query: Union[ServiceLevelObjectiveQuery, UnsetType] = unset, - sli_specification: Union[SLOSliSpec, SLOTimeSliceSpec, UnsetType] = unset, + sli_specification: Union[SLOSliSpec, SLOTimeSliceSpec, SLOCountSpec, UnsetType] = unset, tags: Union[List[str], UnsetType] = unset, target_threshold: Union[float, UnsetType] = unset, timeframe: Union[SLOTimeframe, UnsetType] = unset, @@ -102,12 +103,12 @@ def __init__( :param name: The name of the service level objective object. :type name: str - :param query: A metric-based SLO. **Required if type is metric**. Note that Datadog only allows the sum by aggregator + :param query: A metric-based SLO. Note that Datadog only allows the sum by aggregator to be used because this will sum up all request counts instead of averaging them, or taking the max or min of all of those requests. :type query: ServiceLevelObjectiveQuery, optional - :param sli_specification: A generic SLI specification. This is currently used for time-slice SLOs only. + :param sli_specification: A generic SLI specification. This is currently used for time-slice and count-based SLOs only. :type sli_specification: SLOSliSpec, optional :param tags: A list of tags associated with this service level objective. diff --git a/src/datadog_api_client/v1/model/slo_count_condition.py b/src/datadog_api_client/v1/model/slo_count_condition.py new file mode 100644 index 0000000000..4dd5573eef --- /dev/null +++ b/src/datadog_api_client/v1/model/slo_count_condition.py @@ -0,0 +1,70 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v1.model.slo_formula import SLOFormula + from datadog_api_client.v1.model.slo_data_source_query_definition import SLODataSourceQueryDefinition + from datadog_api_client.v1.model.formula_and_function_metric_query_definition import ( + FormulaAndFunctionMetricQueryDefinition, + ) + + +class SLOCountCondition(ModelNormal): + validations = { + "queries": { + "min_items": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v1.model.slo_formula import SLOFormula + from datadog_api_client.v1.model.slo_data_source_query_definition import SLODataSourceQueryDefinition + + return { + "good_events_formula": (SLOFormula,), + "queries": ([SLODataSourceQueryDefinition],), + "total_events_formula": (SLOFormula,), + } + + attribute_map = { + "good_events_formula": "good_events_formula", + "queries": "queries", + "total_events_formula": "total_events_formula", + } + + def __init__( + self_, + good_events_formula: SLOFormula, + queries: List[Union[SLODataSourceQueryDefinition, FormulaAndFunctionMetricQueryDefinition]], + total_events_formula: SLOFormula, + **kwargs, + ): + """ + A count-based SLI specification, composed of three parts: the good events formula, the total events formula, + and the involved queries. + + :param good_events_formula: A formula that specifies how to combine the results of multiple queries. + :type good_events_formula: SLOFormula + + :param queries: + :type queries: [SLODataSourceQueryDefinition] + + :param total_events_formula: A formula that specifies how to combine the results of multiple queries. + :type total_events_formula: SLOFormula + """ + super().__init__(kwargs) + + self_.good_events_formula = good_events_formula + self_.queries = queries + self_.total_events_formula = total_events_formula diff --git a/src/datadog_api_client/v1/model/slo_count_spec.py b/src/datadog_api_client/v1/model/slo_count_spec.py new file mode 100644 index 0000000000..e29dce51e4 --- /dev/null +++ b/src/datadog_api_client/v1/model/slo_count_spec.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v1.model.slo_count_condition import SLOCountCondition + + +class SLOCountSpec(ModelNormal): + @cached_property + def additional_properties_type(_): + return None + + @cached_property + def openapi_types(_): + from datadog_api_client.v1.model.slo_count_condition import SLOCountCondition + + return { + "count": (SLOCountCondition,), + } + + attribute_map = { + "count": "count", + } + + def __init__(self_, count: SLOCountCondition, **kwargs): + """ + A count-based SLI specification. + + :param count: A count-based SLI specification, composed of three parts: the good events formula, the total events formula, + and the involved queries. + :type count: SLOCountCondition + """ + super().__init__(kwargs) + + self_.count = count diff --git a/src/datadog_api_client/v1/model/slo_response_data.py b/src/datadog_api_client/v1/model/slo_response_data.py index 275644beb1..22f23fa83b 100644 --- a/src/datadog_api_client/v1/model/slo_response_data.py +++ b/src/datadog_api_client/v1/model/slo_response_data.py @@ -20,8 +20,8 @@ from datadog_api_client.v1.model.slo_sli_spec import SLOSliSpec from datadog_api_client.v1.model.slo_threshold import SLOThreshold from datadog_api_client.v1.model.slo_timeframe import SLOTimeframe - from datadog_api_client.v1.model.slo_type import SLOType from datadog_api_client.v1.model.slo_time_slice_spec import SLOTimeSliceSpec + from datadog_api_client.v1.model.slo_count_spec import SLOCountSpec class SLOResponseData(ModelNormal): @@ -32,7 +32,6 @@ def openapi_types(_): from datadog_api_client.v1.model.slo_sli_spec import SLOSliSpec from datadog_api_client.v1.model.slo_threshold import SLOThreshold from datadog_api_client.v1.model.slo_timeframe import SLOTimeframe - from datadog_api_client.v1.model.slo_type import SLOType return { "configured_alert_ids": ([int],), @@ -51,7 +50,6 @@ def openapi_types(_): "target_threshold": (float,), "thresholds": ([SLOThreshold],), "timeframe": (SLOTimeframe,), - "type": (SLOType,), "warning_threshold": (float,), } @@ -72,7 +70,6 @@ def openapi_types(_): "target_threshold": "target_threshold", "thresholds": "thresholds", "timeframe": "timeframe", - "type": "type", "warning_threshold": "warning_threshold", } read_only_vars = { @@ -95,12 +92,11 @@ def __init__( monitor_tags: Union[List[str], UnsetType] = unset, name: Union[str, UnsetType] = unset, query: Union[ServiceLevelObjectiveQuery, UnsetType] = unset, - sli_specification: Union[SLOSliSpec, SLOTimeSliceSpec, UnsetType] = unset, + sli_specification: Union[SLOSliSpec, SLOTimeSliceSpec, SLOCountSpec, UnsetType] = unset, tags: Union[List[str], UnsetType] = unset, target_threshold: Union[float, UnsetType] = unset, thresholds: Union[List[SLOThreshold], UnsetType] = unset, timeframe: Union[SLOTimeframe, UnsetType] = unset, - type: Union[SLOType, UnsetType] = unset, warning_threshold: Union[float, UnsetType] = unset, **kwargs, ): @@ -157,12 +153,12 @@ def __init__( :param name: The name of the service level objective object. :type name: str, optional - :param query: A metric-based SLO. **Required if type is metric**. Note that Datadog only allows the sum by aggregator + :param query: A metric-based SLO. Note that Datadog only allows the sum by aggregator to be used because this will sum up all request counts instead of averaging them, or taking the max or min of all of those requests. :type query: ServiceLevelObjectiveQuery, optional - :param sli_specification: A generic SLI specification. This is currently used for time-slice SLOs only. + :param sli_specification: A generic SLI specification. This is currently used for time-slice and count-based SLOs only. :type sli_specification: SLOSliSpec, optional :param tags: A list of tags associated with this service level objective. @@ -182,9 +178,6 @@ def __init__( or updating SLOs. It is only used when querying SLO history over custom timeframes. :type timeframe: SLOTimeframe, optional - :param type: The type of the service level objective. - :type type: SLOType, optional - :param warning_threshold: The optional warning threshold such that when the service level indicator is below this value for the given threshold, but above the target threshold, the objective appears in a "warning" state. This value must be greater than the target @@ -223,8 +216,6 @@ def __init__( kwargs["thresholds"] = thresholds if timeframe is not unset: kwargs["timeframe"] = timeframe - if type is not unset: - kwargs["type"] = type if warning_threshold is not unset: kwargs["warning_threshold"] = warning_threshold super().__init__(kwargs) diff --git a/src/datadog_api_client/v1/model/slo_sli_spec.py b/src/datadog_api_client/v1/model/slo_sli_spec.py index 69f9e701d5..90264d1fb2 100644 --- a/src/datadog_api_client/v1/model/slo_sli_spec.py +++ b/src/datadog_api_client/v1/model/slo_sli_spec.py @@ -13,11 +13,15 @@ class SLOSliSpec(ModelComposed): def __init__(self, **kwargs): """ - A generic SLI specification. This is currently used for time-slice SLOs only. + A generic SLI specification. This is currently used for time-slice and count-based SLOs only. :param time_slice: The time-slice condition, composed of 3 parts: 1. the metric timeseries query, 2. the comparator, and 3. the threshold. Optionally, a fourth part, the query interval, can be provided. :type time_slice: SLOTimeSliceCondition + + :param count: A count-based SLI specification, composed of three parts: the good events formula, the total events formula, + and the involved queries. + :type count: SLOCountCondition """ super().__init__(kwargs) @@ -31,9 +35,11 @@ def _composed_schemas(_): # classes don't exist yet because their module has not finished # loading from datadog_api_client.v1.model.slo_time_slice_spec import SLOTimeSliceSpec + from datadog_api_client.v1.model.slo_count_spec import SLOCountSpec return { "oneOf": [ SLOTimeSliceSpec, + SLOCountSpec, ], } diff --git a/src/datadog_api_client/v1/models/__init__.py b/src/datadog_api_client/v1/models/__init__.py index 001e6874d8..f7a56c4c47 100644 --- a/src/datadog_api_client/v1/models/__init__.py +++ b/src/datadog_api_client/v1/models/__init__.py @@ -535,6 +535,8 @@ from datadog_api_client.v1.model.slo_correction_update_data import SLOCorrectionUpdateData from datadog_api_client.v1.model.slo_correction_update_request import SLOCorrectionUpdateRequest from datadog_api_client.v1.model.slo_correction_update_request_attributes import SLOCorrectionUpdateRequestAttributes +from datadog_api_client.v1.model.slo_count_condition import SLOCountCondition +from datadog_api_client.v1.model.slo_count_spec import SLOCountSpec from datadog_api_client.v1.model.slo_creator import SLOCreator from datadog_api_client.v1.model.slo_data_source_query_definition import SLODataSourceQueryDefinition from datadog_api_client.v1.model.slo_delete_response import SLODeleteResponse @@ -1583,6 +1585,8 @@ "SLOCorrectionUpdateData", "SLOCorrectionUpdateRequest", "SLOCorrectionUpdateRequestAttributes", + "SLOCountCondition", + "SLOCountSpec", "SLOCreator", "SLODataSourceQueryDefinition", "SLODeleteResponse", diff --git a/tests/v1/features/service_level_objectives.feature b/tests/v1/features/service_level_objectives.feature index c5534618a7..3fba149b2d 100644 --- a/tests/v1/features/service_level_objectives.feature +++ b/tests/v1/features/service_level_objectives.feature @@ -48,6 +48,30 @@ Feature: Service Level Objectives When the request is sent Then the response status is 200 OK + @team:DataDog/slo-app + Scenario: Create a metric SLO with both sli_specification and query returns "Bad Request" response + Given new "CreateSLO" request + And body with value {"type":"metric","description":"Invalid SLO with both sli_specification and query","name":"{{ unique }}","sli_specification":{"count":{"good_events_formula":{"formula":"query1"},"total_events_formula":{"formula":"query2"},"queries":[{"data_source":"metrics","name":"query1","query":"sum:httpservice.success{*}.as_count()"},{"data_source":"metrics","name":"query2","query":"sum:httpservice.hits{*}.as_count()"}]}},"query":{"numerator":"sum:httpservice.success{*}.as_count()","denominator":"sum:httpservice.hits{*}.as_count()"},"tags":["env:prod"],"thresholds":[{"target":99.0,"target_display":"99.0","timeframe":"7d","warning":98,"warning_display":"98.0"}],"timeframe":"7d","target_threshold":99.0,"warning_threshold":98} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/slo-app + Scenario: Create a new metric SLO object using sli_specification returns "OK" response + Given new "CreateSLO" request + And body with value {"type":"metric","description":"Metric SLO using sli_specification","name":"{{ unique }}","sli_specification":{"count":{"good_events_formula":{"formula":"query1"},"total_events_formula":{"formula":"query2"},"queries":[{"data_source":"metrics","name":"query1","query":"sum:httpservice.success{*}.as_count()"},{"data_source":"metrics","name":"query2","query":"sum:httpservice.hits{*}.as_count()"}]}},"tags":["env:prod","type:count"],"thresholds":[{"target":99.0,"target_display":"99.0","timeframe":"7d","warning":98,"warning_display":"98.0"}],"timeframe":"7d","target_threshold":99.0,"warning_threshold":98} + When the request is sent + Then the response status is 200 OK + And the response "data[0].timeframe" is equal to "7d" + And the response "data[0].target_threshold" is equal to 99.0 + And the response "data[0].warning_threshold" is equal to 98.0 + And the response "data[0]" has field "sli_specification" + And the response "data[0].sli_specification" has field "count" + And the response "data[0].sli_specification.count" has field "good_events_formula" + And the response "data[0].sli_specification.count" has field "total_events_formula" + And the response "data[0].sli_specification.count" has field "queries" + And the response "data[0].sli_specification.count.queries" has length 2 + And the response "data[0]" does not have field "query" + @team:DataDog/slo-app Scenario: Create a time-slice SLO object returns "OK" response Given new "CreateSLO" request @@ -74,6 +98,8 @@ Feature: Service Level Objectives And the response "data[0].timeframe" is equal to "7d" And the response "data[0].target_threshold" is equal to 97.0 And the response "data[0].warning_threshold" is equal to 98.0 + And the response "data[0]" has field "query" + And the response "data[0]" does not have field "sli_specification" @generated @skip @team:DataDog/slo-app Scenario: Delete an SLO returns "Conflict" response