diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 7e53bd7654..8073a79c03 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -7265,6 +7265,12 @@ components: maximum: 99.99 minimum: 50 type: number + description: + description: |- + A description of the index, to help explain its purpose or configuration to other users. + Maximum length of 250 characters. + example: "Contains logs matching the criteria defined by the filter." + type: string exclusion_filters: description: |- An array of exclusion objects. The logs are tested against the query of each filter, @@ -7339,6 +7345,12 @@ components: maximum: 99.99 minimum: 50 type: number + description: + description: |- + A description of the index, to help explain its purpose or configuration to other users. + Maximum length of 250 characters. + example: "Contains logs matching the criteria defined by the filter." + type: string disable_daily_limit: description: |- If true, sets the `daily_limit` value to null and the index is not limited on a daily basis (any diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index d3d0025738..7afb2b537d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -185612,8 +185612,8 @@ paths: x-codegen-request-body-name: body x-sunset: "2026-04-01" x-unstable: |- - **Note**: This endpoint is deprecated. To update outcomes, use the - [Update Scorecard outcomes](https://docs.datadoghq.com/api/latest/scorecards/update-scorecard-outcomes/) endpoint. + **Note**: This endpoint is in Preview. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/scorecard/rules: get: description: Fetch all rules. diff --git a/examples/v1/logs-indexes/CreateLogsIndex.py b/examples/v1/logs-indexes/CreateLogsIndex.py index 9f2d0f5889..c842df5887 100644 --- a/examples/v1/logs-indexes/CreateLogsIndex.py +++ b/examples/v1/logs-indexes/CreateLogsIndex.py @@ -17,6 +17,7 @@ reset_utc_offset="+02:00", ), daily_limit_warning_threshold_percentage=70.0, + description="Contains logs matching the criteria defined by the filter.", exclusion_filters=[ LogsExclusion( filter=LogsExclusionFilter( diff --git a/examples/v1/logs-indexes/UpdateLogsIndex.py b/examples/v1/logs-indexes/UpdateLogsIndex.py index 8059e2c38d..f3349fc2b0 100644 --- a/examples/v1/logs-indexes/UpdateLogsIndex.py +++ b/examples/v1/logs-indexes/UpdateLogsIndex.py @@ -17,6 +17,7 @@ reset_utc_offset="+02:00", ), daily_limit_warning_threshold_percentage=70.0, + description="Contains logs matching the criteria defined by the filter.", disable_daily_limit=False, exclusion_filters=[ LogsExclusion( diff --git a/src/datadog_api_client/v1/model/logs_index.py b/src/datadog_api_client/v1/model/logs_index.py index d2d19d96b9..2b8b57ed11 100644 --- a/src/datadog_api_client/v1/model/logs_index.py +++ b/src/datadog_api_client/v1/model/logs_index.py @@ -37,6 +37,7 @@ def openapi_types(_): "daily_limit": (int,), "daily_limit_reset": (LogsDailyLimitReset,), "daily_limit_warning_threshold_percentage": (float,), + "description": (str,), "exclusion_filters": ([LogsExclusion],), "filter": (LogsFilter,), "is_rate_limited": (bool,), @@ -50,6 +51,7 @@ def openapi_types(_): "daily_limit": "daily_limit", "daily_limit_reset": "daily_limit_reset", "daily_limit_warning_threshold_percentage": "daily_limit_warning_threshold_percentage", + "description": "description", "exclusion_filters": "exclusion_filters", "filter": "filter", "is_rate_limited": "is_rate_limited", @@ -69,6 +71,7 @@ def __init__( daily_limit: Union[int, UnsetType] = unset, daily_limit_reset: Union[LogsDailyLimitReset, UnsetType] = unset, daily_limit_warning_threshold_percentage: Union[float, UnsetType] = unset, + description: Union[str, UnsetType] = unset, exclusion_filters: Union[List[LogsExclusion], UnsetType] = unset, is_rate_limited: Union[bool, UnsetType] = unset, num_flex_logs_retention_days: Union[int, UnsetType] = unset, @@ -88,6 +91,10 @@ def __init__( :param daily_limit_warning_threshold_percentage: A percentage threshold of the daily quota at which a Datadog warning event is generated. :type daily_limit_warning_threshold_percentage: float, optional + :param description: A description of the index, to help explain its purpose or configuration to other users. + Maximum length of 250 characters. + :type description: str, optional + :param exclusion_filters: An array of exclusion objects. The logs are tested against the query of each filter, following the order of the array. Only the first matching active exclusion matters, others (if any) are ignored. @@ -122,6 +129,8 @@ def __init__( kwargs["daily_limit_reset"] = daily_limit_reset if daily_limit_warning_threshold_percentage is not unset: kwargs["daily_limit_warning_threshold_percentage"] = daily_limit_warning_threshold_percentage + if description is not unset: + kwargs["description"] = description if exclusion_filters is not unset: kwargs["exclusion_filters"] = exclusion_filters if is_rate_limited is not unset: diff --git a/src/datadog_api_client/v1/model/logs_index_update_request.py b/src/datadog_api_client/v1/model/logs_index_update_request.py index 35da4a3586..008830d8f0 100644 --- a/src/datadog_api_client/v1/model/logs_index_update_request.py +++ b/src/datadog_api_client/v1/model/logs_index_update_request.py @@ -37,6 +37,7 @@ def openapi_types(_): "daily_limit": (int,), "daily_limit_reset": (LogsDailyLimitReset,), "daily_limit_warning_threshold_percentage": (float,), + "description": (str,), "disable_daily_limit": (bool,), "exclusion_filters": ([LogsExclusion],), "filter": (LogsFilter,), @@ -49,6 +50,7 @@ def openapi_types(_): "daily_limit": "daily_limit", "daily_limit_reset": "daily_limit_reset", "daily_limit_warning_threshold_percentage": "daily_limit_warning_threshold_percentage", + "description": "description", "disable_daily_limit": "disable_daily_limit", "exclusion_filters": "exclusion_filters", "filter": "filter", @@ -63,6 +65,7 @@ def __init__( daily_limit: Union[int, UnsetType] = unset, daily_limit_reset: Union[LogsDailyLimitReset, UnsetType] = unset, daily_limit_warning_threshold_percentage: Union[float, UnsetType] = unset, + description: Union[str, UnsetType] = unset, disable_daily_limit: Union[bool, UnsetType] = unset, exclusion_filters: Union[List[LogsExclusion], UnsetType] = unset, num_flex_logs_retention_days: Union[int, UnsetType] = unset, @@ -82,6 +85,10 @@ def __init__( :param daily_limit_warning_threshold_percentage: A percentage threshold of the daily quota at which a Datadog warning event is generated. :type daily_limit_warning_threshold_percentage: float, optional + :param description: A description of the index, to help explain its purpose or configuration to other users. + Maximum length of 250 characters. + :type description: str, optional + :param disable_daily_limit: If true, sets the ``daily_limit`` value to null and the index is not limited on a daily basis (any specified ``daily_limit`` value in the request is ignored). If false or omitted, the index's current ``daily_limit`` is maintained. @@ -118,6 +125,8 @@ def __init__( kwargs["daily_limit_reset"] = daily_limit_reset if daily_limit_warning_threshold_percentage is not unset: kwargs["daily_limit_warning_threshold_percentage"] = daily_limit_warning_threshold_percentage + if description is not unset: + kwargs["description"] = description if disable_daily_limit is not unset: kwargs["disable_daily_limit"] = disable_daily_limit if exclusion_filters is not unset: diff --git a/tests/v1/features/logs_indexes.feature b/tests/v1/features/logs_indexes.feature index 4091527029..d3f0b48fe1 100644 --- a/tests/v1/features/logs_indexes.feature +++ b/tests/v1/features/logs_indexes.feature @@ -11,21 +11,21 @@ Feature: Logs Indexes @generated @skip @team:DataDog/logs-backend @team:DataDog/logs-core Scenario: Create an index returns "Invalid Parameter Error" 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_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} + 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, "description": "Contains logs matching the criteria defined by the filter.", "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} When the request is sent Then the response status is 400 Invalid Parameter Error @generated @skip @team:DataDog/logs-backend @team:DataDog/logs-core Scenario: Create an index returns "OK" 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_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} + 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, "description": "Contains logs matching the criteria defined by the filter.", "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} 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_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} + 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, "description": "Contains logs matching the criteria defined by the filter.", "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} When the request is sent Then the response status is 422 Unprocessable Entity @@ -73,7 +73,7 @@ Feature: Logs Indexes Scenario: Update an index returns "Invalid Parameter Error" response Given new "UpdateLogsIndex" request And request contains "name" parameter from "REPLACE.ME" - 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, "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} + 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, "description": "Contains logs matching the criteria defined by the filter.", "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} When the request is sent Then the response status is 400 Invalid Parameter Error @@ -81,7 +81,7 @@ Feature: Logs Indexes Scenario: Update an index returns "OK" response Given new "UpdateLogsIndex" request And request contains "name" parameter from "REPLACE.ME" - 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, "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} + 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, "description": "Contains logs matching the criteria defined by the filter.", "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} When the request is sent Then the response status is 200 OK