diff --git a/.apigentools-info b/.apigentools-info index 1dc07fcbd0..ecdc1d27ea 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.4", - "regenerated": "2022-09-12 15:21:49.969629", - "spec_repo_commit": "dcd92077" + "regenerated": "2022-09-13 07:28:00.920852", + "spec_repo_commit": "82fabb35" }, "v2": { "apigentools_version": "1.6.4", - "regenerated": "2022-09-12 15:21:49.981295", - "spec_repo_commit": "dcd92077" + "regenerated": "2022-09-13 07:28:00.933515", + "spec_repo_commit": "82fabb35" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index d05b721d69..3b423d98db 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -8696,6 +8696,20 @@ components: example: UTC type: string type: object + SLOCreator: + description: The creator of the SLO + nullable: true + properties: + email: + description: Email of the creator. + type: string + id: + description: User ID of the creator. + type: string + name: + description: Name of the creator. + type: string + type: object SLODeleteResponse: description: A response list of all service level objective deleted. properties: @@ -9206,6 +9220,55 @@ components: format: int64 type: integer type: object + SLOOverallStatuses: + description: Overall status of the SLO by timeframes. + properties: + error: + description: Error message if SLO status or error budget could not be calculated. + nullable: true + type: string + indexed_at: + description: 'timestamp (UNIX time in seconds) of when the SLO status and + error budget + + were calculated.' + example: 1662496260 + format: int64 + type: integer + raw_error_budget_remaining: + $ref: '#/components/schemas/SLORawErrorBudgetRemaining' + span_precision: + description: The amount of decimal places the SLI value is accurate to. + example: 2 + format: int64 + type: integer + status: + description: The status of the SLO. + example: 100 + format: double + nullable: true + type: number + target: + description: The target of the SLO. + example: 99 + format: double + type: number + timeframe: + $ref: '#/components/schemas/SLOTimeframe' + type: object + SLORawErrorBudgetRemaining: + description: Error budget remaining for an SLO. + properties: + unit: + description: Error budget remaining unit. + example: requests + type: string + value: + description: Error budget remaining value. + example: 60 + format: double + type: number + type: object SLOResponse: description: A service level objective response containing a single service level objective. @@ -9643,6 +9706,38 @@ components: - formula - dimension type: object + SearchSLOQuery: + description: 'A metric-based SLO. **Required if type is `metric`**. 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.' + nullable: true + properties: + denominator: + description: A Datadog metric query for total (valid) events. + example: sum:my.custom.metric{*}.as_count() + type: string + metrics: + description: 'Metric names used in the query''s numerator and denominator. + + This field will return null and will be implemented in the next version + of this endpoint.' + example: + - my.custom.metric + - my.other.custom.metric + items: + description: Metric name. + type: string + nullable: true + type: array + numerator: + description: A Datadog metric query for good events. + example: sum:my.custom.metric{type:good}.as_count() + type: string + type: object SearchSLOResponse: description: A search SLO response containing results from the search query. properties: @@ -9671,7 +9766,7 @@ components: slo: description: SLOs items: - $ref: '#/components/schemas/ServiceLevelObjective' + $ref: '#/components/schemas/SearchServiceLevelObjective' type: array type: object SearchSLOResponseDataAttributesFacets: @@ -9801,6 +9896,181 @@ components: description: Type of pagination. type: string type: object + SearchSLOThreshold: + description: SLO thresholds (target and optionally warning) for a single time + window. + properties: + target: + description: 'The target value for the service level indicator within the + corresponding + + timeframe.' + example: 99.9 + format: double + type: number + target_display: + description: 'A string representation of the target that indicates its precision. + + It uses trailing zeros to show significant decimal places (for example + `98.00`). + + + Always included in service level objective responses. Ignored in + + create/update requests.' + example: '99.9' + type: string + timeframe: + $ref: '#/components/schemas/SearchSLOTimeframe' + warning: + description: The warning value for the service level objective. + example: 90.0 + format: double + nullable: true + type: number + warning_display: + description: 'A string representation of the warning target (see the description + of + + the `target_display` field for details). + + + Included in service level objective responses if a warning target exists. + + Ignored in create/update requests.' + example: '90.0' + nullable: true + type: string + required: + - timeframe + - target + type: object + SearchSLOTimeframe: + description: The SLO time window options. + enum: + - 7d + - 30d + - 90d + example: 30d + type: string + x-enum-varnames: + - SEVEN_DAYS + - THIRTY_DAYS + - NINETY_DAYS + SearchServiceLevelObjective: + description: 'A service level objective object includes a service level indicator, + thresholds + + for one or more timeframes, and metadata (`name`, `description`, `tags`, etc.).' + properties: + all_tags: + description: 'A list of tags associated with this service level objective. + + Always included in service level objective responses (but may be empty). + + Optional in create/update requests.' + example: + - env:prod + - app:core + items: + description: A tag to apply to your SLO. + type: string + type: array + created_at: + description: 'Creation timestamp (UNIX time in seconds) + + + Always included in service level objective responses.' + format: int64 + readOnly: true + type: integer + creator: + $ref: '#/components/schemas/SLOCreator' + description: + description: 'A user-defined description of the service level objective. + + + Always included in service level objective responses (but may be `null`). + + Optional in create/update requests.' + nullable: true + type: string + groups: + description: 'A list of (up to 100) monitor groups that narrow the scope + of a monitor service level objective. + + + Included in service level objective responses if it is not empty. Optional + in + + create/update requests for monitor service level objectives, but may only + be + + used when then length of the `monitor_ids` field is one.' + example: + - env:prod + - role:mysql + items: + description: A group name, for instance `env:prod`. + type: string + nullable: true + type: array + id: + description: 'A unique identifier for the service level objective object. + + + Always included in service level objective responses.' + readOnly: true + type: string + modified_at: + description: 'Modification timestamp (UNIX time in seconds) + + + Always included in service level objective responses.' + format: int64 + readOnly: true + type: integer + monitor_ids: + description: 'A list of monitor ids that defines the scope of a monitor + service level + + objective. **Required if type is `monitor`**.' + items: + description: A monitor ID. + format: int64 + type: integer + nullable: true + type: array + name: + description: The name of the service level objective object. + example: Custom Metric SLO + type: string + overall_status: + description: calculated status and error budget remaining. + items: + $ref: '#/components/schemas/SLOOverallStatuses' + type: array + query: + $ref: '#/components/schemas/SearchSLOQuery' + thresholds: + description: 'The thresholds (timeframes and associated targets) for this + service level + + objective object.' + example: + - target: 95 + target_display: '95' + timeframe: 7d + - target: 95 + target_display: '95' + timeframe: 30d + warning: 97 + warning_display: '97' + items: + $ref: '#/components/schemas/SearchSLOThreshold' + type: array + type: + $ref: '#/components/schemas/SLOType' Series: description: 'A metric to submit to Datadog. @@ -24378,7 +24648,11 @@ paths: description: Get a list of service level objective objects for your organization. operationId: SearchSLO parameters: - - description: The query string to filter results based on SLO names. + - description: 'The query string to filter results based on SLO names. + + Some examples of queries include `service:` + + and ``.' in: query name: query required: false @@ -24399,6 +24673,12 @@ paths: schema: format: int64 type: integer + - description: Whether or not to return facet information in the response `[default=false]`. + in: query + name: include_facets + required: false + schema: + type: boolean responses: '200': content: @@ -24428,6 +24708,7 @@ paths: description: The regional site for Datadog customers. enum: - datadoghq.com + - datadoghq.eu - us3.datadoghq.com - us5.datadoghq.com - ddog-gov.com @@ -24453,9 +24734,7 @@ paths: summary: Search for SLOs tags: - Service Level Objectives - x-unstable: '**Note**: Note: This endpoint is in public beta for US regions. - - It is not currently supported in the EU region. + x-unstable: '**Note**: This endpoint is in public beta. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v1/slo/{slo_id}: diff --git a/docs/datadog_api_client.v1.model.rst b/docs/datadog_api_client.v1.model.rst index d84988f787..60e19086df 100644 --- a/docs/datadog_api_client.v1.model.rst +++ b/docs/datadog_api_client.v1.model.rst @@ -2584,6 +2584,20 @@ scatterplot\_widget\_formula :members: :show-inheritance: +search\_service\_level\_objective +--------------------------------- + +.. automodule:: datadog_api_client.v1.model.search_service_level_objective + :members: + :show-inheritance: + +search\_slo\_query +------------------ + +.. automodule:: datadog_api_client.v1.model.search_slo_query + :members: + :show-inheritance: + search\_slo\_response --------------------- @@ -2647,6 +2661,20 @@ search\_slo\_response\_meta\_page :members: :show-inheritance: +search\_slo\_threshold +---------------------- + +.. automodule:: datadog_api_client.v1.model.search_slo_threshold + :members: + :show-inheritance: + +search\_slo\_timeframe +---------------------- + +.. automodule:: datadog_api_client.v1.model.search_slo_timeframe + :members: + :show-inheritance: + series ------ @@ -2892,6 +2920,13 @@ slo\_correction\_update\_request\_attributes :members: :show-inheritance: +slo\_creator +------------ + +.. automodule:: datadog_api_client.v1.model.slo_creator + :members: + :show-inheritance: + slo\_delete\_response --------------------- @@ -3004,6 +3039,20 @@ slo\_list\_response\_metadata\_page :members: :show-inheritance: +slo\_overall\_statuses +---------------------- + +.. automodule:: datadog_api_client.v1.model.slo_overall_statuses + :members: + :show-inheritance: + +slo\_raw\_error\_budget\_remaining +---------------------------------- + +.. automodule:: datadog_api_client.v1.model.slo_raw_error_budget_remaining + :members: + :show-inheritance: + slo\_response ------------- diff --git a/src/datadog_api_client/v1/api/service_level_objectives_api.py b/src/datadog_api_client/v1/api/service_level_objectives_api.py index 4d49d7d36d..248997e1b3 100644 --- a/src/datadog_api_client/v1/api/service_level_objectives_api.py +++ b/src/datadog_api_client/v1/api/service_level_objectives_api.py @@ -307,6 +307,7 @@ def __init__(self, api_client=None): "default_value": "datadoghq.com", "enum_values": [ "datadoghq.com", + "datadoghq.eu", "us3.datadoghq.com", "us5.datadoghq.com", "ddog-gov.com", @@ -362,6 +363,11 @@ def __init__(self, api_client=None): "attribute": "page[number]", "location": "query", }, + "include_facets": { + "openapi_types": (bool,), + "attribute": "include_facets", + "location": "query", + }, }, headers_map={ "accept": ["application/json"], @@ -624,17 +630,22 @@ def search_slo( query: Union[str, UnsetType] = unset, page_size: Union[int, UnsetType] = unset, page_number: Union[int, UnsetType] = unset, + include_facets: Union[bool, UnsetType] = unset, ) -> SearchSLOResponse: """Search for SLOs. Get a list of service level objective objects for your organization. :param query: The query string to filter results based on SLO names. + Some examples of queries include ``service:`` + and ````. :type query: str, optional :param page_size: The number of files to return in the response ``[default=10]``. :type page_size: int, optional :param page_number: The identifier of the first page to return. This parameter is used for the pagination feature ``[default=0]``. :type page_number: int, optional + :param include_facets: Whether or not to return facet information in the response ``[default=false]``. + :type include_facets: bool, optional :rtype: SearchSLOResponse """ kwargs: Dict[str, Any] = {} @@ -647,6 +658,9 @@ def search_slo( if page_number is not unset: kwargs["page_number"] = page_number + if include_facets is not unset: + kwargs["include_facets"] = include_facets + return self._search_slo_endpoint.call_with_http_info(**kwargs) def update_slo( diff --git a/src/datadog_api_client/v1/model/search_service_level_objective.py b/src/datadog_api_client/v1/model/search_service_level_objective.py new file mode 100644 index 0000000000..3dd01c3982 --- /dev/null +++ b/src/datadog_api_client/v1/model/search_service_level_objective.py @@ -0,0 +1,124 @@ +# 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 datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, +) + + +class SearchServiceLevelObjective(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v1.model.slo_creator import SLOCreator + from datadog_api_client.v1.model.slo_overall_statuses import SLOOverallStatuses + from datadog_api_client.v1.model.search_slo_query import SearchSLOQuery + from datadog_api_client.v1.model.search_slo_threshold import SearchSLOThreshold + from datadog_api_client.v1.model.slo_type import SLOType + + return { + "all_tags": ([str],), + "created_at": (int,), + "creator": (SLOCreator,), + "description": (str, none_type), + "groups": ([str], none_type), + "id": (str,), + "modified_at": (int,), + "monitor_ids": ([int], none_type), + "name": (str,), + "overall_status": ([SLOOverallStatuses],), + "query": (SearchSLOQuery,), + "thresholds": ([SearchSLOThreshold],), + "type": (SLOType,), + } + + attribute_map = { + "all_tags": "all_tags", + "created_at": "created_at", + "creator": "creator", + "description": "description", + "groups": "groups", + "id": "id", + "modified_at": "modified_at", + "monitor_ids": "monitor_ids", + "name": "name", + "overall_status": "overall_status", + "query": "query", + "thresholds": "thresholds", + "type": "type", + } + read_only_vars = { + "created_at", + "id", + "modified_at", + } + + def __init__(self_, *args, **kwargs): + """ + A service level objective object includes a service level indicator, thresholds + for one or more timeframes, and metadata ( ``name`` , ``description`` , ``tags`` , etc.). + + :param all_tags: A list of tags associated with this service level objective. + Always included in service level objective responses (but may be empty). + Optional in create/update requests. + :type all_tags: [str], optional + + :param created_at: Creation timestamp (UNIX time in seconds) + + Always included in service level objective responses. + :type created_at: int, optional + + :param creator: The creator of the SLO + :type creator: SLOCreator, none_type, optional + + :param description: A user-defined description of the service level objective. + + Always included in service level objective responses (but may be ``null`` ). + Optional in create/update requests. + :type description: str, none_type, optional + + :param groups: A list of (up to 100) monitor groups that narrow the scope of a monitor service level objective. + + Included in service level objective responses if it is not empty. Optional in + create/update requests for monitor service level objectives, but may only be + used when then length of the ``monitor_ids`` field is one. + :type groups: [str], none_type, optional + + :param id: A unique identifier for the service level objective object. + + Always included in service level objective responses. + :type id: str, optional + + :param modified_at: Modification timestamp (UNIX time in seconds) + + Always included in service level objective responses. + :type modified_at: int, optional + + :param monitor_ids: A list of monitor ids that defines the scope of a monitor service level + objective. **Required if type is monitor**. + :type monitor_ids: [int], none_type, optional + + :param name: The name of the service level objective object. + :type name: str, optional + + :param overall_status: calculated status and error budget remaining. + :type overall_status: [SLOOverallStatuses], optional + + :param query: A metric-based SLO. **Required if type is metric**. 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: SearchSLOQuery, none_type, optional + + :param thresholds: The thresholds (timeframes and associated targets) for this service level + objective object. + :type thresholds: [SearchSLOThreshold], optional + + :param type: The type of the service level objective. + :type type: SLOType, optional + """ + super().__init__(kwargs) + + self_._check_pos_args(args) diff --git a/src/datadog_api_client/v1/model/search_slo_query.py b/src/datadog_api_client/v1/model/search_slo_query.py new file mode 100644 index 0000000000..6e41721209 --- /dev/null +++ b/src/datadog_api_client/v1/model/search_slo_query.py @@ -0,0 +1,48 @@ +# 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 datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, +) + + +class SearchSLOQuery(ModelNormal): + _nullable = True + + @cached_property + def openapi_types(_): + return { + "denominator": (str,), + "metrics": ([str], none_type), + "numerator": (str,), + } + + attribute_map = { + "denominator": "denominator", + "metrics": "metrics", + "numerator": "numerator", + } + + def __init__(self_, *args, **kwargs): + """ + A metric-based SLO. **Required if type is metric**. 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. + + :param denominator: A Datadog metric query for total (valid) events. + :type denominator: str, optional + + :param metrics: Metric names used in the query's numerator and denominator. + This field will return null and will be implemented in the next version of this endpoint. + :type metrics: [str], none_type, optional + + :param numerator: A Datadog metric query for good events. + :type numerator: str, optional + """ + super().__init__(kwargs) + + self_._check_pos_args(args) diff --git a/src/datadog_api_client/v1/model/search_slo_response_data_attributes.py b/src/datadog_api_client/v1/model/search_slo_response_data_attributes.py index 0276df9587..9125dbe361 100644 --- a/src/datadog_api_client/v1/model/search_slo_response_data_attributes.py +++ b/src/datadog_api_client/v1/model/search_slo_response_data_attributes.py @@ -15,11 +15,11 @@ def openapi_types(_): from datadog_api_client.v1.model.search_slo_response_data_attributes_facets import ( SearchSLOResponseDataAttributesFacets, ) - from datadog_api_client.v1.model.service_level_objective import ServiceLevelObjective + from datadog_api_client.v1.model.search_service_level_objective import SearchServiceLevelObjective return { "facets": (SearchSLOResponseDataAttributesFacets,), - "slo": ([ServiceLevelObjective],), + "slo": ([SearchServiceLevelObjective],), } attribute_map = { @@ -35,7 +35,7 @@ def __init__(self_, *args, **kwargs): :type facets: SearchSLOResponseDataAttributesFacets, optional :param slo: SLOs - :type slo: [ServiceLevelObjective], optional + :type slo: [SearchServiceLevelObjective], optional """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v1/model/search_slo_threshold.py b/src/datadog_api_client/v1/model/search_slo_threshold.py new file mode 100644 index 0000000000..cf8c917383 --- /dev/null +++ b/src/datadog_api_client/v1/model/search_slo_threshold.py @@ -0,0 +1,67 @@ +# 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 datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, +) + + +class SearchSLOThreshold(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v1.model.search_slo_timeframe import SearchSLOTimeframe + + return { + "target": (float,), + "target_display": (str,), + "timeframe": (SearchSLOTimeframe,), + "warning": (float, none_type), + "warning_display": (str, none_type), + } + + attribute_map = { + "target": "target", + "target_display": "target_display", + "timeframe": "timeframe", + "warning": "warning", + "warning_display": "warning_display", + } + + def __init__(self_, target, timeframe, *args, **kwargs): + """ + SLO thresholds (target and optionally warning) for a single time window. + + :param target: The target value for the service level indicator within the corresponding + timeframe. + :type target: float + + :param target_display: A string representation of the target that indicates its precision. + It uses trailing zeros to show significant decimal places (for example ``98.00`` ). + + Always included in service level objective responses. Ignored in + create/update requests. + :type target_display: str, optional + + :param timeframe: The SLO time window options. + :type timeframe: SearchSLOTimeframe + + :param warning: The warning value for the service level objective. + :type warning: float, none_type, optional + + :param warning_display: A string representation of the warning target (see the description of + the ``target_display`` field for details). + + Included in service level objective responses if a warning target exists. + Ignored in create/update requests. + :type warning_display: str, none_type, optional + """ + super().__init__(kwargs) + + self_._check_pos_args(args) + + self_.target = target + self_.timeframe = timeframe diff --git a/src/datadog_api_client/v1/model/search_slo_timeframe.py b/src/datadog_api_client/v1/model/search_slo_timeframe.py new file mode 100644 index 0000000000..38b9008fcd --- /dev/null +++ b/src/datadog_api_client/v1/model/search_slo_timeframe.py @@ -0,0 +1,40 @@ +# 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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SearchSLOTimeframe(ModelSimple): + """ + The SLO time window options. + + :param value: Must be one of ["7d", "30d", "90d"]. + :type value: str + """ + + allowed_values = { + "7d", + "30d", + "90d", + } + SEVEN_DAYS: ClassVar["SearchSLOTimeframe"] + THIRTY_DAYS: ClassVar["SearchSLOTimeframe"] + NINETY_DAYS: ClassVar["SearchSLOTimeframe"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SearchSLOTimeframe.SEVEN_DAYS = SearchSLOTimeframe("7d") +SearchSLOTimeframe.THIRTY_DAYS = SearchSLOTimeframe("30d") +SearchSLOTimeframe.NINETY_DAYS = SearchSLOTimeframe("90d") diff --git a/src/datadog_api_client/v1/model/slo_creator.py b/src/datadog_api_client/v1/model/slo_creator.py new file mode 100644 index 0000000000..570ecda70a --- /dev/null +++ b/src/datadog_api_client/v1/model/slo_creator.py @@ -0,0 +1,44 @@ +# 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 datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class SLOCreator(ModelNormal): + _nullable = True + + @cached_property + def openapi_types(_): + return { + "email": (str,), + "id": (str,), + "name": (str,), + } + + attribute_map = { + "email": "email", + "id": "id", + "name": "name", + } + + def __init__(self_, *args, **kwargs): + """ + The creator of the SLO + + :param email: Email of the creator. + :type email: str, optional + + :param id: User ID of the creator. + :type id: str, optional + + :param name: Name of the creator. + :type name: str, optional + """ + super().__init__(kwargs) + + self_._check_pos_args(args) diff --git a/src/datadog_api_client/v1/model/slo_overall_statuses.py b/src/datadog_api_client/v1/model/slo_overall_statuses.py new file mode 100644 index 0000000000..ecfc0cd024 --- /dev/null +++ b/src/datadog_api_client/v1/model/slo_overall_statuses.py @@ -0,0 +1,67 @@ +# 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 datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, +) + + +class SLOOverallStatuses(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v1.model.slo_raw_error_budget_remaining import SLORawErrorBudgetRemaining + from datadog_api_client.v1.model.slo_timeframe import SLOTimeframe + + return { + "error": (str, none_type), + "indexed_at": (int,), + "raw_error_budget_remaining": (SLORawErrorBudgetRemaining,), + "span_precision": (int,), + "status": (float, none_type), + "target": (float,), + "timeframe": (SLOTimeframe,), + } + + attribute_map = { + "error": "error", + "indexed_at": "indexed_at", + "raw_error_budget_remaining": "raw_error_budget_remaining", + "span_precision": "span_precision", + "status": "status", + "target": "target", + "timeframe": "timeframe", + } + + def __init__(self_, *args, **kwargs): + """ + Overall status of the SLO by timeframes. + + :param error: Error message if SLO status or error budget could not be calculated. + :type error: str, none_type, optional + + :param indexed_at: timestamp (UNIX time in seconds) of when the SLO status and error budget + were calculated. + :type indexed_at: int, optional + + :param raw_error_budget_remaining: Error budget remaining for an SLO. + :type raw_error_budget_remaining: SLORawErrorBudgetRemaining, optional + + :param span_precision: The amount of decimal places the SLI value is accurate to. + :type span_precision: int, optional + + :param status: The status of the SLO. + :type status: float, none_type, optional + + :param target: The target of the SLO. + :type target: float, optional + + :param timeframe: The SLO time window options. + :type timeframe: SLOTimeframe, optional + """ + super().__init__(kwargs) + + self_._check_pos_args(args) diff --git a/src/datadog_api_client/v1/model/slo_raw_error_budget_remaining.py b/src/datadog_api_client/v1/model/slo_raw_error_budget_remaining.py new file mode 100644 index 0000000000..7c55728c5d --- /dev/null +++ b/src/datadog_api_client/v1/model/slo_raw_error_budget_remaining.py @@ -0,0 +1,37 @@ +# 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 datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class SLORawErrorBudgetRemaining(ModelNormal): + @cached_property + def openapi_types(_): + return { + "unit": (str,), + "value": (float,), + } + + attribute_map = { + "unit": "unit", + "value": "value", + } + + def __init__(self_, *args, **kwargs): + """ + Error budget remaining for an SLO. + + :param unit: Error budget remaining unit. + :type unit: str, optional + + :param value: Error budget remaining value. + :type value: float, optional + """ + super().__init__(kwargs) + + self_._check_pos_args(args) diff --git a/src/datadog_api_client/v1/models/__init__.py b/src/datadog_api_client/v1/models/__init__.py index fdffb8b0c3..f9982a1e90 100644 --- a/src/datadog_api_client/v1/models/__init__.py +++ b/src/datadog_api_client/v1/models/__init__.py @@ -430,6 +430,7 @@ 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_creator import SLOCreator from datadog_api_client.v1.model.slo_delete_response import SLODeleteResponse from datadog_api_client.v1.model.slo_error_budget_remaining_data import SLOErrorBudgetRemainingData from datadog_api_client.v1.model.slo_error_timeframe import SLOErrorTimeframe @@ -446,6 +447,8 @@ from datadog_api_client.v1.model.slo_list_response import SLOListResponse from datadog_api_client.v1.model.slo_list_response_metadata import SLOListResponseMetadata from datadog_api_client.v1.model.slo_list_response_metadata_page import SLOListResponseMetadataPage +from datadog_api_client.v1.model.slo_overall_statuses import SLOOverallStatuses +from datadog_api_client.v1.model.slo_raw_error_budget_remaining import SLORawErrorBudgetRemaining from datadog_api_client.v1.model.slo_response import SLOResponse from datadog_api_client.v1.model.slo_response_data import SLOResponseData from datadog_api_client.v1.model.slo_threshold import SLOThreshold @@ -462,6 +465,7 @@ from datadog_api_client.v1.model.scatterplot_table_request import ScatterplotTableRequest from datadog_api_client.v1.model.scatterplot_widget_aggregator import ScatterplotWidgetAggregator from datadog_api_client.v1.model.scatterplot_widget_formula import ScatterplotWidgetFormula +from datadog_api_client.v1.model.search_slo_query import SearchSLOQuery from datadog_api_client.v1.model.search_slo_response import SearchSLOResponse from datadog_api_client.v1.model.search_slo_response_data import SearchSLOResponseData from datadog_api_client.v1.model.search_slo_response_data_attributes import SearchSLOResponseDataAttributes @@ -475,6 +479,9 @@ from datadog_api_client.v1.model.search_slo_response_links import SearchSLOResponseLinks from datadog_api_client.v1.model.search_slo_response_meta import SearchSLOResponseMeta from datadog_api_client.v1.model.search_slo_response_meta_page import SearchSLOResponseMetaPage +from datadog_api_client.v1.model.search_slo_threshold import SearchSLOThreshold +from datadog_api_client.v1.model.search_slo_timeframe import SearchSLOTimeframe +from datadog_api_client.v1.model.search_service_level_objective import SearchServiceLevelObjective from datadog_api_client.v1.model.series import Series from datadog_api_client.v1.model.service_check import ServiceCheck from datadog_api_client.v1.model.service_check_status import ServiceCheckStatus