diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index f3ca46bc04..24e99fe17f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -36203,7 +36203,8 @@ components: type: object ObservabilityPipelineEnrichmentTableProcessor: description: The `enrichment_table` processor enriches logs using a static CSV - file or GeoIP database. + file, GeoIP database, or reference table. Exactly one of `file`, `geoip`, + or `reference_table` must be configured. properties: display_name: $ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName' @@ -36224,6 +36225,8 @@ components: targets. example: source:my-source type: string + reference_table: + $ref: '#/components/schemas/ObservabilityPipelineEnrichmentTableReferenceTable' target: description: Path where enrichment results should be stored in the log. example: enriched.geoip @@ -36246,6 +36249,34 @@ components: type: string x-enum-varnames: - ENRICHMENT_TABLE + ObservabilityPipelineEnrichmentTableReferenceTable: + description: Uses a Datadog reference table to enrich logs. + properties: + app_key_key: + default: PROCESSOR_ENRICHMENT_TABLES_APP_KEY + description: Environment variable name containing the application key used + for reference table authentication. + type: string + columns: + description: List of column names to include from the reference table. If + not provided, all columns are included. + items: + type: string + nullable: true + type: array + key_field: + description: Path to the field in the log event to match against the reference + table. + example: log.user.id + type: string + table_id: + description: The unique identifier of the reference table. + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + required: + - key_field + - table_id + type: object ObservabilityPipelineFieldValue: description: Represents a static key-value pair used in various processors. properties: diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 84078e9c26..08b0f99c65 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -15740,6 +15740,13 @@ datadog\_api\_client.v2.model.observability\_pipeline\_enrichment\_table\_proces :members: :show-inheritance: +datadog\_api\_client.v2.model.observability\_pipeline\_enrichment\_table\_reference\_table module +------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.observability_pipeline_enrichment_table_reference_table + :members: + :show-inheritance: + datadog\_api\_client.v2.model.observability\_pipeline\_field\_value module -------------------------------------------------------------------------- diff --git a/src/datadog_api_client/v2/model/observability_pipeline_config_processor_item.py b/src/datadog_api_client/v2/model/observability_pipeline_config_processor_item.py index 8becc43c0d..25fb134768 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_config_processor_item.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_config_processor_item.py @@ -90,6 +90,9 @@ def __init__(self, **kwargs): :param geoip: Uses a GeoIP database to enrich logs based on an IP field. :type geoip: ObservabilityPipelineEnrichmentTableGeoIp, optional + :param reference_table: Uses a Datadog reference table to enrich logs. + :type reference_table: ObservabilityPipelineEnrichmentTableReferenceTable, optional + :param target: Path where enrichment results should be stored in the log. :type target: str diff --git a/src/datadog_api_client/v2/model/observability_pipeline_enrichment_table_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_enrichment_table_processor.py index 3483c95ae4..8277562633 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_enrichment_table_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_enrichment_table_processor.py @@ -20,6 +20,9 @@ from datadog_api_client.v2.model.observability_pipeline_enrichment_table_geo_ip import ( ObservabilityPipelineEnrichmentTableGeoIp, ) + from datadog_api_client.v2.model.observability_pipeline_enrichment_table_reference_table import ( + ObservabilityPipelineEnrichmentTableReferenceTable, + ) from datadog_api_client.v2.model.observability_pipeline_enrichment_table_processor_type import ( ObservabilityPipelineEnrichmentTableProcessorType, ) @@ -34,6 +37,9 @@ def openapi_types(_): from datadog_api_client.v2.model.observability_pipeline_enrichment_table_geo_ip import ( ObservabilityPipelineEnrichmentTableGeoIp, ) + from datadog_api_client.v2.model.observability_pipeline_enrichment_table_reference_table import ( + ObservabilityPipelineEnrichmentTableReferenceTable, + ) from datadog_api_client.v2.model.observability_pipeline_enrichment_table_processor_type import ( ObservabilityPipelineEnrichmentTableProcessorType, ) @@ -45,6 +51,7 @@ def openapi_types(_): "geoip": (ObservabilityPipelineEnrichmentTableGeoIp,), "id": (str,), "include": (str,), + "reference_table": (ObservabilityPipelineEnrichmentTableReferenceTable,), "target": (str,), "type": (ObservabilityPipelineEnrichmentTableProcessorType,), } @@ -56,6 +63,7 @@ def openapi_types(_): "geoip": "geoip", "id": "id", "include": "include", + "reference_table": "reference_table", "target": "target", "type": "type", } @@ -70,10 +78,11 @@ def __init__( display_name: Union[str, UnsetType] = unset, file: Union[ObservabilityPipelineEnrichmentTableFile, UnsetType] = unset, geoip: Union[ObservabilityPipelineEnrichmentTableGeoIp, UnsetType] = unset, + reference_table: Union[ObservabilityPipelineEnrichmentTableReferenceTable, UnsetType] = unset, **kwargs, ): """ - The ``enrichment_table`` processor enriches logs using a static CSV file or GeoIP database. + The ``enrichment_table`` processor enriches logs using a static CSV file, GeoIP database, or reference table. Exactly one of ``file`` , ``geoip`` , or ``reference_table`` must be configured. :param display_name: The display name for a component. :type display_name: str, optional @@ -93,6 +102,9 @@ def __init__( :param include: A Datadog search query used to determine which logs this processor targets. :type include: str + :param reference_table: Uses a Datadog reference table to enrich logs. + :type reference_table: ObservabilityPipelineEnrichmentTableReferenceTable, optional + :param target: Path where enrichment results should be stored in the log. :type target: str @@ -105,6 +117,8 @@ def __init__( kwargs["file"] = file if geoip is not unset: kwargs["geoip"] = geoip + if reference_table is not unset: + kwargs["reference_table"] = reference_table super().__init__(kwargs) self_.enabled = enabled diff --git a/src/datadog_api_client/v2/model/observability_pipeline_enrichment_table_reference_table.py b/src/datadog_api_client/v2/model/observability_pipeline_enrichment_table_reference_table.py new file mode 100644 index 0000000000..6abbb84c03 --- /dev/null +++ b/src/datadog_api_client/v2/model/observability_pipeline_enrichment_table_reference_table.py @@ -0,0 +1,64 @@ +# 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 List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, + unset, + UnsetType, +) + + +class ObservabilityPipelineEnrichmentTableReferenceTable(ModelNormal): + @cached_property + def openapi_types(_): + return { + "app_key_key": (str,), + "columns": ([str], none_type), + "key_field": (str,), + "table_id": (str,), + } + + attribute_map = { + "app_key_key": "app_key_key", + "columns": "columns", + "key_field": "key_field", + "table_id": "table_id", + } + + def __init__( + self_, + key_field: str, + table_id: str, + app_key_key: Union[str, UnsetType] = unset, + columns: Union[List[str], none_type, UnsetType] = unset, + **kwargs, + ): + """ + Uses a Datadog reference table to enrich logs. + + :param app_key_key: Environment variable name containing the application key used for reference table authentication. + :type app_key_key: str, optional + + :param columns: List of column names to include from the reference table. If not provided, all columns are included. + :type columns: [str], none_type, optional + + :param key_field: Path to the field in the log event to match against the reference table. + :type key_field: str + + :param table_id: The unique identifier of the reference table. + :type table_id: str + """ + if app_key_key is not unset: + kwargs["app_key_key"] = app_key_key + if columns is not unset: + kwargs["columns"] = columns + super().__init__(kwargs) + + self_.key_field = key_field + self_.table_id = table_id diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 91f6658a33..7d29307f5e 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -3030,6 +3030,9 @@ from datadog_api_client.v2.model.observability_pipeline_enrichment_table_processor_type import ( ObservabilityPipelineEnrichmentTableProcessorType, ) +from datadog_api_client.v2.model.observability_pipeline_enrichment_table_reference_table import ( + ObservabilityPipelineEnrichmentTableReferenceTable, +) from datadog_api_client.v2.model.observability_pipeline_field_value import ObservabilityPipelineFieldValue from datadog_api_client.v2.model.observability_pipeline_filter_processor import ObservabilityPipelineFilterProcessor from datadog_api_client.v2.model.observability_pipeline_filter_processor_type import ( @@ -7406,6 +7409,7 @@ "ObservabilityPipelineEnrichmentTableGeoIp", "ObservabilityPipelineEnrichmentTableProcessor", "ObservabilityPipelineEnrichmentTableProcessorType", + "ObservabilityPipelineEnrichmentTableReferenceTable", "ObservabilityPipelineFieldValue", "ObservabilityPipelineFilterProcessor", "ObservabilityPipelineFilterProcessorType",