diff --git a/.generated-info b/.generated-info index bdcbb99f48..6def0798c3 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "d02c8a3", - "generated": "2025-08-08 12:07:20.979" + "spec_repo_commit": "872cf6d", + "generated": "2025-08-12 14:43:31.361" } diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index f6e0e21ed7..dacd4a02b1 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -5123,6 +5123,12 @@ components: error: $ref: '#/components/schemas/LogsAPIError' type: object + LogsAPILimitReachedResponse: + description: Response returned by the Logs API when the max limit has been reached. + properties: + error: + $ref: '#/components/schemas/LogsAPIError' + type: object LogsArithmeticProcessor: description: "Use the Arithmetic Processor to add a new attribute (without spaces or special characters\nin the new attribute name) to a log with the result @@ -29444,6 +29450,12 @@ paths: schema: $ref: '#/components/schemas/APIErrorResponse' description: Forbidden + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/LogsAPILimitReachedResponse' + description: Unprocessable Entity '429': $ref: '#/components/responses/TooManyRequestsResponse' summary: Create an index diff --git a/docs/datadog_api_client.v1.model.rst b/docs/datadog_api_client.v1.model.rst index 8dcb7440c2..8a4579b901 100644 --- a/docs/datadog_api_client.v1.model.rst +++ b/docs/datadog_api_client.v1.model.rst @@ -1558,6 +1558,13 @@ datadog\_api\_client.v1.model.logs\_api\_error\_response module :members: :show-inheritance: +datadog\_api\_client.v1.model.logs\_api\_limit\_reached\_response module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v1.model.logs_api_limit_reached_response + :members: + :show-inheritance: + datadog\_api\_client.v1.model.logs\_arithmetic\_processor module ---------------------------------------------------------------- diff --git a/src/datadog_api_client/v1/model/logs_api_limit_reached_response.py b/src/datadog_api_client/v1/model/logs_api_limit_reached_response.py new file mode 100644 index 0000000000..61d6379c14 --- /dev/null +++ b/src/datadog_api_client/v1/model/logs_api_limit_reached_response.py @@ -0,0 +1,42 @@ +# 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.v1.model.logs_api_error import LogsAPIError + + +class LogsAPILimitReachedResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v1.model.logs_api_error import LogsAPIError + + return { + "error": (LogsAPIError,), + } + + attribute_map = { + "error": "error", + } + + def __init__(self_, error: Union[LogsAPIError, UnsetType] = unset, **kwargs): + """ + Response returned by the Logs API when the max limit has been reached. + + :param error: Error returned by the Logs API + :type error: LogsAPIError, optional + """ + if error is not unset: + kwargs["error"] = error + super().__init__(kwargs) diff --git a/src/datadog_api_client/v1/models/__init__.py b/src/datadog_api_client/v1/models/__init__.py index 45685b6a28..8025d8925f 100644 --- a/src/datadog_api_client/v1/models/__init__.py +++ b/src/datadog_api_client/v1/models/__init__.py @@ -254,6 +254,7 @@ from datadog_api_client.v1.model.log_stream_widget_definition_type import LogStreamWidgetDefinitionType from datadog_api_client.v1.model.logs_api_error import LogsAPIError from datadog_api_client.v1.model.logs_api_error_response import LogsAPIErrorResponse +from datadog_api_client.v1.model.logs_api_limit_reached_response import LogsAPILimitReachedResponse from datadog_api_client.v1.model.logs_arithmetic_processor import LogsArithmeticProcessor from datadog_api_client.v1.model.logs_arithmetic_processor_type import LogsArithmeticProcessorType from datadog_api_client.v1.model.logs_array_processor import LogsArrayProcessor @@ -1326,6 +1327,7 @@ "LogStreamWidgetDefinitionType", "LogsAPIError", "LogsAPIErrorResponse", + "LogsAPILimitReachedResponse", "LogsArithmeticProcessor", "LogsArithmeticProcessorType", "LogsArrayProcessor", diff --git a/tests/v1/features/logs_indexes.feature b/tests/v1/features/logs_indexes.feature index 635c2399c5..e94fea2c62 100644 --- a/tests/v1/features/logs_indexes.feature +++ b/tests/v1/features/logs_indexes.feature @@ -22,6 +22,13 @@ Feature: Logs Indexes When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/logs-backend @team:DataDog/logs-core + Scenario: Create an index returns "Unprocessable Entity" response + Given new "CreateLogsIndex" request + And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15} + When the request is sent + Then the response status is 422 Unprocessable Entity + @generated @skip @team:DataDog/logs-backend @team:DataDog/logs-core Scenario: Delete an index returns "Not Found" response Given new "DeleteLogsIndex" request