diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 28f6789e0c..72af2185fd 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -32587,6 +32587,80 @@ components: - bucket_name - bucket_region type: object + DataObservabilityMonitorGroupByValues: + additionalProperties: + type: string + description: The values of the monitor's group-by columns for this group. `N/A` means the column had no value. + example: + region: us + type: object + DataObservabilityMonitorGroupStatus: + description: The state of a monitor group, from the alerting engine. + enum: + - ok + - warn + - alert + - no_data + - unknown + example: alert + type: string + x-enum-varnames: + - OK + - WARN + - ALERT + - NO_DATA + - UNKNOWN + DataObservabilityMonitorRunGroup: + description: A monitor group that is not ok after a run. + properties: + account: + description: The account of the entity, when the platform has one. + example: acme + type: string + column: + description: The column of the entity, when it is a column. + example: AMOUNT + type: string + database: + description: The database of the entity. + example: ANALYTICS + type: string + entity_id: + description: The ID of the table or column the group checks. + example: "84a88e0d362ce9fc" + type: string + entity_type: + description: The type of the entity, such as table or column. + example: table + type: string + group: + description: The group's name in Datadog monitors, as the monitor API and UI show it. Pass it as `filter[group]` to list the group's evaluations. + example: "database:analytics,entity_id:84a88e0d362ce9fc,schema:public,table:orders" + type: string + group_by_values: + $ref: "#/components/schemas/DataObservabilityMonitorGroupByValues" + platform: + description: The data platform of the entity. + example: snowflake + type: string + schema: + description: The schema of the entity, when it has one. + example: PUBLIC + type: string + status: + $ref: "#/components/schemas/DataObservabilityMonitorGroupStatus" + table: + description: The table of the entity, when it is a table or column. + example: ORDERS + type: string + required: + - group + - entity_id + - entity_type + - platform + - database + - status + type: object DataObservabilityMonitorRunStatus: description: The status of a data observability monitor run. enum: @@ -55909,6 +55983,21 @@ components: description: Error message describing why the monitor run failed. Only present when status is error. example: "run completed but produced no metric data" type: string + group_counts: + additionalProperties: + format: int64 + type: integer + description: The number of the monitor's groups in each state, once the run has finished. + example: + alert: 1 + ok: 12 + type: object + groups: + description: The first 1,000 of the monitor's groups that are not ok, once the run has finished. List the monitor's groups for all of them. + items: + $ref: "#/components/schemas/DataObservabilityMonitorRunGroup" + maxItems: 1000 + type: array status: $ref: "#/components/schemas/DataObservabilityMonitorRunStatus" required: diff --git a/src/datadog_api_client/v2/model/data_observability_monitor_group_by_values.py b/src/datadog_api_client/v2/model/data_observability_monitor_group_by_values.py new file mode 100644 index 0000000000..0bc33e50c7 --- /dev/null +++ b/src/datadog_api_client/v2/model/data_observability_monitor_group_by_values.py @@ -0,0 +1,22 @@ +# 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 datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class DataObservabilityMonitorGroupByValues(ModelNormal): + @cached_property + def additional_properties_type(_): + return (str,) + + def __init__(self_, **kwargs): + """ + The values of the monitor's group-by columns for this group. ``N/A`` means the column had no value. + """ + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/data_observability_monitor_group_status.py b/src/datadog_api_client/v2/model/data_observability_monitor_group_status.py new file mode 100644 index 0000000000..922dbd03a9 --- /dev/null +++ b/src/datadog_api_client/v2/model/data_observability_monitor_group_status.py @@ -0,0 +1,47 @@ +# 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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class DataObservabilityMonitorGroupStatus(ModelSimple): + """ + The state of a monitor group, from the alerting engine. + + :param value: Must be one of ["ok", "warn", "alert", "no_data", "unknown"]. + :type value: str + """ + + allowed_values = { + "ok", + "warn", + "alert", + "no_data", + "unknown", + } + OK: ClassVar["DataObservabilityMonitorGroupStatus"] + WARN: ClassVar["DataObservabilityMonitorGroupStatus"] + ALERT: ClassVar["DataObservabilityMonitorGroupStatus"] + NO_DATA: ClassVar["DataObservabilityMonitorGroupStatus"] + UNKNOWN: ClassVar["DataObservabilityMonitorGroupStatus"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DataObservabilityMonitorGroupStatus.OK = DataObservabilityMonitorGroupStatus("ok") +DataObservabilityMonitorGroupStatus.WARN = DataObservabilityMonitorGroupStatus("warn") +DataObservabilityMonitorGroupStatus.ALERT = DataObservabilityMonitorGroupStatus("alert") +DataObservabilityMonitorGroupStatus.NO_DATA = DataObservabilityMonitorGroupStatus("no_data") +DataObservabilityMonitorGroupStatus.UNKNOWN = DataObservabilityMonitorGroupStatus("unknown") diff --git a/src/datadog_api_client/v2/model/data_observability_monitor_run_group.py b/src/datadog_api_client/v2/model/data_observability_monitor_run_group.py new file mode 100644 index 0000000000..d8a79db6f4 --- /dev/null +++ b/src/datadog_api_client/v2/model/data_observability_monitor_run_group.py @@ -0,0 +1,129 @@ +# 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 Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.data_observability_monitor_group_by_values import ( + DataObservabilityMonitorGroupByValues, + ) + from datadog_api_client.v2.model.data_observability_monitor_group_status import DataObservabilityMonitorGroupStatus + + +class DataObservabilityMonitorRunGroup(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.data_observability_monitor_group_by_values import ( + DataObservabilityMonitorGroupByValues, + ) + from datadog_api_client.v2.model.data_observability_monitor_group_status import ( + DataObservabilityMonitorGroupStatus, + ) + + return { + "account": (str,), + "column": (str,), + "database": (str,), + "entity_id": (str,), + "entity_type": (str,), + "group": (str,), + "group_by_values": (DataObservabilityMonitorGroupByValues,), + "platform": (str,), + "schema": (str,), + "status": (DataObservabilityMonitorGroupStatus,), + "table": (str,), + } + + attribute_map = { + "account": "account", + "column": "column", + "database": "database", + "entity_id": "entity_id", + "entity_type": "entity_type", + "group": "group", + "group_by_values": "group_by_values", + "platform": "platform", + "schema": "schema", + "status": "status", + "table": "table", + } + + def __init__( + self_, + database: str, + entity_id: str, + entity_type: str, + group: str, + platform: str, + status: DataObservabilityMonitorGroupStatus, + account: Union[str, UnsetType] = unset, + column: Union[str, UnsetType] = unset, + group_by_values: Union[DataObservabilityMonitorGroupByValues, UnsetType] = unset, + schema: Union[str, UnsetType] = unset, + table: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + A monitor group that is not ok after a run. + + :param account: The account of the entity, when the platform has one. + :type account: str, optional + + :param column: The column of the entity, when it is a column. + :type column: str, optional + + :param database: The database of the entity. + :type database: str + + :param entity_id: The ID of the table or column the group checks. + :type entity_id: str + + :param entity_type: The type of the entity, such as table or column. + :type entity_type: str + + :param group: The group's name in Datadog monitors, as the monitor API and UI show it. Pass it as ``filter[group]`` to list the group's evaluations. + :type group: str + + :param group_by_values: The values of the monitor's group-by columns for this group. ``N/A`` means the column had no value. + :type group_by_values: DataObservabilityMonitorGroupByValues, optional + + :param platform: The data platform of the entity. + :type platform: str + + :param schema: The schema of the entity, when it has one. + :type schema: str, optional + + :param status: The state of a monitor group, from the alerting engine. + :type status: DataObservabilityMonitorGroupStatus + + :param table: The table of the entity, when it is a table or column. + :type table: str, optional + """ + if account is not unset: + kwargs["account"] = account + if column is not unset: + kwargs["column"] = column + if group_by_values is not unset: + kwargs["group_by_values"] = group_by_values + if schema is not unset: + kwargs["schema"] = schema + if table is not unset: + kwargs["table"] = table + super().__init__(kwargs) + + self_.database = database + self_.entity_id = entity_id + self_.entity_type = entity_type + self_.group = group + self_.platform = platform + self_.status = status diff --git a/src/datadog_api_client/v2/model/get_data_observability_monitor_run_status_response_attributes.py b/src/datadog_api_client/v2/model/get_data_observability_monitor_run_status_response_attributes.py index afca0c8dc6..27833d3801 100644 --- a/src/datadog_api_client/v2/model/get_data_observability_monitor_run_status_response_attributes.py +++ b/src/datadog_api_client/v2/model/get_data_observability_monitor_run_status_response_attributes.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Union, TYPE_CHECKING +from typing import Dict, List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -14,26 +14,43 @@ if TYPE_CHECKING: + from datadog_api_client.v2.model.data_observability_monitor_run_group import DataObservabilityMonitorRunGroup from datadog_api_client.v2.model.data_observability_monitor_run_status import DataObservabilityMonitorRunStatus class GetDataObservabilityMonitorRunStatusResponseAttributes(ModelNormal): + validations = { + "groups": { + "max_items": 1000, + }, + } + @cached_property def openapi_types(_): + from datadog_api_client.v2.model.data_observability_monitor_run_group import DataObservabilityMonitorRunGroup from datadog_api_client.v2.model.data_observability_monitor_run_status import DataObservabilityMonitorRunStatus return { "error_message": (str,), + "group_counts": ({str: (int,)},), + "groups": ([DataObservabilityMonitorRunGroup],), "status": (DataObservabilityMonitorRunStatus,), } attribute_map = { "error_message": "error_message", + "group_counts": "group_counts", + "groups": "groups", "status": "status", } def __init__( - self_, status: DataObservabilityMonitorRunStatus, error_message: Union[str, UnsetType] = unset, **kwargs + self_, + status: DataObservabilityMonitorRunStatus, + error_message: Union[str, UnsetType] = unset, + group_counts: Union[Dict[str, int], UnsetType] = unset, + groups: Union[List[DataObservabilityMonitorRunGroup], UnsetType] = unset, + **kwargs, ): """ The attributes of a data observability monitor run status response. @@ -41,11 +58,21 @@ def __init__( :param error_message: Error message describing why the monitor run failed. Only present when status is error. :type error_message: str, optional + :param group_counts: The number of the monitor's groups in each state, once the run has finished. + :type group_counts: {str: (int,)}, optional + + :param groups: The first 1,000 of the monitor's groups that are not ok, once the run has finished. List the monitor's groups for all of them. + :type groups: [DataObservabilityMonitorRunGroup], optional + :param status: The status of a data observability monitor run. :type status: DataObservabilityMonitorRunStatus """ if error_message is not unset: kwargs["error_message"] = error_message + if group_counts is not unset: + kwargs["group_counts"] = group_counts + if groups is not unset: + kwargs["groups"] = groups super().__init__(kwargs) self_.status = status diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 5ab9014f0b..cf9b75b7c3 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -2374,6 +2374,9 @@ from datadog_api_client.v2.model.data_deletion_response_item_attributes import DataDeletionResponseItemAttributes from datadog_api_client.v2.model.data_deletion_response_meta import DataDeletionResponseMeta from datadog_api_client.v2.model.data_export_config import DataExportConfig +from datadog_api_client.v2.model.data_observability_monitor_group_by_values import DataObservabilityMonitorGroupByValues +from datadog_api_client.v2.model.data_observability_monitor_group_status import DataObservabilityMonitorGroupStatus +from datadog_api_client.v2.model.data_observability_monitor_run_group import DataObservabilityMonitorRunGroup from datadog_api_client.v2.model.data_observability_monitor_run_status import DataObservabilityMonitorRunStatus from datadog_api_client.v2.model.data_observability_monitor_run_type import DataObservabilityMonitorRunType from datadog_api_client.v2.model.data_relationships_teams import DataRelationshipsTeams @@ -14828,6 +14831,9 @@ "DataDeletionResponseItemAttributes", "DataDeletionResponseMeta", "DataExportConfig", + "DataObservabilityMonitorGroupByValues", + "DataObservabilityMonitorGroupStatus", + "DataObservabilityMonitorRunGroup", "DataObservabilityMonitorRunStatus", "DataObservabilityMonitorRunType", "DataRelationshipsTeams",