From e45bed5cea3a8bb6c54159006811976132a16448 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 27 Oct 2026 09:39:55 +0000 Subject: [PATCH] Regenerate client from commit 863269d of spec repo --- .generator/schemas/v2/openapi.yaml | 29 ++++++++++ .../v2/model/historical_job_failure.py | 54 +++++++++++++++++++ .../v2/model/historical_job_failure_reason.py | 41 ++++++++++++++ .../historical_job_response_attributes.py | 10 ++++ src/datadog_api_client/v2/models/__init__.py | 4 ++ 5 files changed, 138 insertions(+) create mode 100644 src/datadog_api_client/v2/model/historical_job_failure.py create mode 100644 src/datadog_api_client/v2/model/historical_job_failure_reason.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 93cb8f7827..22c0fffedb 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -59300,6 +59300,33 @@ components: type: string x-enum-varnames: - HISTORICALDETECTIONSJOB + HistoricalJobFailure: + description: |- + Details about why the job failed. Only present when the job has failed and won't be retried. + properties: + hint: + description: A suggestion to fix the failure. + example: Narrow the time range or reduce the data scanned. + type: string + reason: + $ref: "#/components/schemas/HistoricalJobFailureReason" + type: object + HistoricalJobFailureReason: + description: The reason why the job failed. + enum: + - rule_configuration + - query_too_expensive + - internal_error + example: query_too_expensive + type: string + x-enum-descriptions: + - The rule, or the dataset it references, can't run as written. + - The query scans too much data. + - An internal error occurred. These are usually temporary. + x-enum-varnames: + - RULE_CONFIGURATION + - QUERY_TOO_EXPENSIVE + - INTERNAL_ERROR HistoricalJobListMeta: description: Metadata about the list of jobs. properties: @@ -59426,6 +59453,8 @@ components: createdFromRuleId: description: ID of the rule used to create the job (if it is created from a rule). type: string + failure: + $ref: "#/components/schemas/HistoricalJobFailure" jobDefinition: $ref: "#/components/schemas/JobDefinition" jobName: diff --git a/src/datadog_api_client/v2/model/historical_job_failure.py b/src/datadog_api_client/v2/model/historical_job_failure.py new file mode 100644 index 0000000000..a4dc2fc992 --- /dev/null +++ b/src/datadog_api_client/v2/model/historical_job_failure.py @@ -0,0 +1,54 @@ +# 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.historical_job_failure_reason import HistoricalJobFailureReason + + +class HistoricalJobFailure(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.historical_job_failure_reason import HistoricalJobFailureReason + + return { + "hint": (str,), + "reason": (HistoricalJobFailureReason,), + } + + attribute_map = { + "hint": "hint", + "reason": "reason", + } + + def __init__( + self_, + hint: Union[str, UnsetType] = unset, + reason: Union[HistoricalJobFailureReason, UnsetType] = unset, + **kwargs, + ): + """ + Details about why the job failed. Only present when the job has failed and won't be retried. + + :param hint: A suggestion to fix the failure. + :type hint: str, optional + + :param reason: The reason why the job failed. + :type reason: HistoricalJobFailureReason, optional + """ + if hint is not unset: + kwargs["hint"] = hint + if reason is not unset: + kwargs["reason"] = reason + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/historical_job_failure_reason.py b/src/datadog_api_client/v2/model/historical_job_failure_reason.py new file mode 100644 index 0000000000..f42c2a8a94 --- /dev/null +++ b/src/datadog_api_client/v2/model/historical_job_failure_reason.py @@ -0,0 +1,41 @@ +# 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 HistoricalJobFailureReason(ModelSimple): + """ + The reason why the job failed. + + :param value: Must be one of ["rule_configuration", "query_too_expensive", "internal_error"]. + :type value: str + """ + + allowed_values = { + "rule_configuration", + "query_too_expensive", + "internal_error", + } + RULE_CONFIGURATION: ClassVar["HistoricalJobFailureReason"] + QUERY_TOO_EXPENSIVE: ClassVar["HistoricalJobFailureReason"] + INTERNAL_ERROR: ClassVar["HistoricalJobFailureReason"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +HistoricalJobFailureReason.RULE_CONFIGURATION = HistoricalJobFailureReason("rule_configuration") +HistoricalJobFailureReason.QUERY_TOO_EXPENSIVE = HistoricalJobFailureReason("query_too_expensive") +HistoricalJobFailureReason.INTERNAL_ERROR = HistoricalJobFailureReason("internal_error") diff --git a/src/datadog_api_client/v2/model/historical_job_response_attributes.py b/src/datadog_api_client/v2/model/historical_job_response_attributes.py index be972e1358..b7a0072136 100644 --- a/src/datadog_api_client/v2/model/historical_job_response_attributes.py +++ b/src/datadog_api_client/v2/model/historical_job_response_attributes.py @@ -14,12 +14,14 @@ if TYPE_CHECKING: + from datadog_api_client.v2.model.historical_job_failure import HistoricalJobFailure from datadog_api_client.v2.model.job_definition import JobDefinition class HistoricalJobResponseAttributes(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.historical_job_failure import HistoricalJobFailure from datadog_api_client.v2.model.job_definition import JobDefinition return { @@ -27,6 +29,7 @@ def openapi_types(_): "created_by_handle": (str,), "created_by_name": (str,), "created_from_rule_id": (str,), + "failure": (HistoricalJobFailure,), "job_definition": (JobDefinition,), "job_name": (str,), "job_status": (str,), @@ -40,6 +43,7 @@ def openapi_types(_): "created_by_handle": "createdByHandle", "created_by_name": "createdByName", "created_from_rule_id": "createdFromRuleId", + "failure": "failure", "job_definition": "jobDefinition", "job_name": "jobName", "job_status": "jobStatus", @@ -54,6 +58,7 @@ def __init__( created_by_handle: Union[str, UnsetType] = unset, created_by_name: Union[str, UnsetType] = unset, created_from_rule_id: Union[str, UnsetType] = unset, + failure: Union[HistoricalJobFailure, UnsetType] = unset, job_definition: Union[JobDefinition, UnsetType] = unset, job_name: Union[str, UnsetType] = unset, job_status: Union[str, UnsetType] = unset, @@ -77,6 +82,9 @@ def __init__( :param created_from_rule_id: ID of the rule used to create the job (if it is created from a rule). :type created_from_rule_id: str, optional + :param failure: Details about why the job failed. Only present when the job has failed and won't be retried. + :type failure: HistoricalJobFailure, optional + :param job_definition: Definition of a historical job. :type job_definition: JobDefinition, optional @@ -103,6 +111,8 @@ def __init__( kwargs["created_by_name"] = created_by_name if created_from_rule_id is not unset: kwargs["created_from_rule_id"] = created_from_rule_id + if failure is not unset: + kwargs["failure"] = failure if job_definition is not unset: kwargs["job_definition"] = job_definition if job_name is not unset: diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 035f191c5c..c8b1225721 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -4657,6 +4657,8 @@ from datadog_api_client.v2.model.hamr_org_connection_status import HamrOrgConnectionStatus from datadog_api_client.v2.model.hamr_org_connection_type import HamrOrgConnectionType from datadog_api_client.v2.model.historical_job_data_type import HistoricalJobDataType +from datadog_api_client.v2.model.historical_job_failure import HistoricalJobFailure +from datadog_api_client.v2.model.historical_job_failure_reason import HistoricalJobFailureReason from datadog_api_client.v2.model.historical_job_list_meta import HistoricalJobListMeta from datadog_api_client.v2.model.historical_job_options import HistoricalJobOptions from datadog_api_client.v2.model.historical_job_query import HistoricalJobQuery @@ -16244,6 +16246,8 @@ "HamrOrgConnectionStatus", "HamrOrgConnectionType", "HistoricalJobDataType", + "HistoricalJobFailure", + "HistoricalJobFailureReason", "HistoricalJobListMeta", "HistoricalJobOptions", "HistoricalJobQuery",