Skip to content

Commit 21a1f38

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add documentation for Logs Pipelines ReferenceTableLogsLookupProcessor (#1240)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 24b5165 commit 21a1f38

File tree

8 files changed

+161
-7
lines changed

8 files changed

+161
-7
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.4",
7-
"regenerated": "2022-11-18 17:23:41.566917",
8-
"spec_repo_commit": "b939bbb4"
7+
"regenerated": "2022-11-18 18:21:26.952058",
8+
"spec_repo_commit": "4aa21954"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2022-11-18 17:23:41.583133",
13-
"spec_repo_commit": "b939bbb4"
12+
"regenerated": "2022-11-18 18:21:26.967357",
13+
"spec_repo_commit": "4aa21954"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5012,7 +5012,9 @@ components:
50125012
associated target attribute values,
50135013

50145014
formatted as `["source_key1,target_value1", "source_key2,target_value2"]`'
5015-
example: []
5015+
example:
5016+
- source_key1,target_value1
5017+
- source_key2,target_value2
50165018
items:
50175019
description: Mapping between a source and a value, it should follow the
50185020
format `"<SOURCE>,<VALUE>"`.
@@ -5023,14 +5025,14 @@ components:
50235025
type: string
50245026
source:
50255027
description: Source attribute used to perform the lookup.
5026-
example: ''
5028+
example: service_id
50275029
type: string
50285030
target:
50295031
description: 'Name of the attribute that contains the corresponding value
50305032
in the mapping list
50315033

50325034
or the `default_lookup` if not found in the mapping list.'
5033-
example: ''
5035+
example: service
50345036
type: string
50355037
type:
50365038
$ref: '#/components/schemas/LogsLookupProcessorType'
@@ -5217,6 +5219,7 @@ components:
52175219
- $ref: '#/components/schemas/LogsPipelineProcessor'
52185220
- $ref: '#/components/schemas/LogsGeoIPParser'
52195221
- $ref: '#/components/schemas/LogsLookupProcessor'
5222+
- $ref: '#/components/schemas/ReferenceTableLogsLookupProcessor'
52205223
- $ref: '#/components/schemas/LogsTraceRemapper'
52215224
type: object
52225225
LogsQueryCompute:
@@ -8515,6 +8518,51 @@ components:
85158518
security_query:
85168519
$ref: '#/components/schemas/LogQueryDefinition'
85178520
type: object
8521+
ReferenceTableLogsLookupProcessor:
8522+
description: '**Note**: Reference Tables are in public beta.
8523+
8524+
Use the Lookup Processor to define a mapping between a log attribute
8525+
8526+
and a human readable value saved in a Reference Table.
8527+
8528+
For example, you can use the Lookup Processor to map an internal service ID
8529+
8530+
into a human readable service name. Alternatively, you could also use it to
8531+
check
8532+
8533+
if the MAC address that just attempted to connect to the production
8534+
8535+
environment belongs to your list of stolen machines.'
8536+
properties:
8537+
is_enabled:
8538+
default: false
8539+
description: Whether or not the processor is enabled.
8540+
type: boolean
8541+
lookup_enrichment_table:
8542+
description: Name of the Reference Table for the source attribute and their
8543+
associated target attribute values.
8544+
example: service_id_to_service_name_table
8545+
type: string
8546+
name:
8547+
description: Name of the processor.
8548+
type: string
8549+
source:
8550+
description: Source attribute used to perform the lookup.
8551+
example: service_id
8552+
type: string
8553+
target:
8554+
description: Name of the attribute that contains the corresponding value
8555+
in the mapping list.
8556+
example: service
8557+
type: string
8558+
type:
8559+
$ref: '#/components/schemas/LogsLookupProcessorType'
8560+
required:
8561+
- source
8562+
- target
8563+
- lookup_enrichment_table
8564+
- type
8565+
type: object
85188566
ResponseMetaAttributes:
85198567
description: Object describing meta attributes of response.
85208568
properties:

docs/datadog_api_client.v1.model.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2535,6 +2535,13 @@ query\_value\_widget\_request
25352535
:members:
25362536
:show-inheritance:
25372537

2538+
reference\_table\_logs\_lookup\_processor
2539+
-----------------------------------------
2540+
2541+
.. automodule:: datadog_api_client.v1.model.reference_table_logs_lookup_processor
2542+
:members:
2543+
:show-inheritance:
2544+
25382545
response\_meta\_attributes
25392546
--------------------------
25402547

src/datadog_api_client/v1/model/logs_pipeline.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from datadog_api_client.v1.model.logs_pipeline_processor import LogsPipelineProcessor
3131
from datadog_api_client.v1.model.logs_geo_ip_parser import LogsGeoIPParser
3232
from datadog_api_client.v1.model.logs_lookup_processor import LogsLookupProcessor
33+
from datadog_api_client.v1.model.reference_table_logs_lookup_processor import ReferenceTableLogsLookupProcessor
3334
from datadog_api_client.v1.model.logs_trace_remapper import LogsTraceRemapper
3435

3536

@@ -89,6 +90,7 @@ def __init__(
8990
LogsPipelineProcessor,
9091
LogsGeoIPParser,
9192
LogsLookupProcessor,
93+
ReferenceTableLogsLookupProcessor,
9294
LogsTraceRemapper,
9395
]
9496
],

src/datadog_api_client/v1/model/logs_pipeline_processor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from datadog_api_client.v1.model.logs_string_builder_processor import LogsStringBuilderProcessor
3131
from datadog_api_client.v1.model.logs_geo_ip_parser import LogsGeoIPParser
3232
from datadog_api_client.v1.model.logs_lookup_processor import LogsLookupProcessor
33+
from datadog_api_client.v1.model.reference_table_logs_lookup_processor import ReferenceTableLogsLookupProcessor
3334
from datadog_api_client.v1.model.logs_trace_remapper import LogsTraceRemapper
3435

3536

@@ -80,6 +81,7 @@ def __init__(
8081
LogsPipelineProcessor,
8182
LogsGeoIPParser,
8283
LogsLookupProcessor,
84+
ReferenceTableLogsLookupProcessor,
8385
LogsTraceRemapper,
8486
]
8587
],

src/datadog_api_client/v1/model/logs_processor.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ def __init__(self, **kwargs):
8888
:param lookup_table: Mapping table of values for the source attribute and their associated target attribute values,
8989
formatted as `["source_key1,target_value1", "source_key2,target_value2"]`
9090
:type lookup_table: [str]
91+
92+
:param lookup_enrichment_table: Name of the Reference Table for the source attribute and their associated target attribute values.
93+
:type lookup_enrichment_table: str
9194
"""
9295
super().__init__(kwargs)
9396

@@ -114,6 +117,7 @@ def _composed_schemas(_):
114117
from datadog_api_client.v1.model.logs_pipeline_processor import LogsPipelineProcessor
115118
from datadog_api_client.v1.model.logs_geo_ip_parser import LogsGeoIPParser
116119
from datadog_api_client.v1.model.logs_lookup_processor import LogsLookupProcessor
120+
from datadog_api_client.v1.model.reference_table_logs_lookup_processor import ReferenceTableLogsLookupProcessor
117121
from datadog_api_client.v1.model.logs_trace_remapper import LogsTraceRemapper
118122

119123
return {
@@ -132,6 +136,7 @@ def _composed_schemas(_):
132136
LogsPipelineProcessor,
133137
LogsGeoIPParser,
134138
LogsLookupProcessor,
139+
ReferenceTableLogsLookupProcessor,
135140
LogsTraceRemapper,
136141
],
137142
}
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import TYPE_CHECKING, Union
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
if TYPE_CHECKING:
17+
from datadog_api_client.v1.model.logs_lookup_processor_type import LogsLookupProcessorType
18+
19+
20+
class ReferenceTableLogsLookupProcessor(ModelNormal):
21+
@cached_property
22+
def openapi_types(_):
23+
from datadog_api_client.v1.model.logs_lookup_processor_type import LogsLookupProcessorType
24+
25+
return {
26+
"is_enabled": (bool,),
27+
"lookup_enrichment_table": (str,),
28+
"name": (str,),
29+
"source": (str,),
30+
"target": (str,),
31+
"type": (LogsLookupProcessorType,),
32+
}
33+
34+
attribute_map = {
35+
"is_enabled": "is_enabled",
36+
"lookup_enrichment_table": "lookup_enrichment_table",
37+
"name": "name",
38+
"source": "source",
39+
"target": "target",
40+
"type": "type",
41+
}
42+
43+
def __init__(
44+
self_,
45+
lookup_enrichment_table: str,
46+
source: str,
47+
target: str,
48+
type: LogsLookupProcessorType,
49+
is_enabled: Union[bool, UnsetType] = unset,
50+
name: Union[str, UnsetType] = unset,
51+
**kwargs,
52+
):
53+
"""
54+
**Note** : Reference Tables are in public beta.
55+
Use the Lookup Processor to define a mapping between a log attribute
56+
and a human readable value saved in a Reference Table.
57+
For example, you can use the Lookup Processor to map an internal service ID
58+
into a human readable service name. Alternatively, you could also use it to check
59+
if the MAC address that just attempted to connect to the production
60+
environment belongs to your list of stolen machines.
61+
62+
:param is_enabled: Whether or not the processor is enabled.
63+
:type is_enabled: bool, optional
64+
65+
:param lookup_enrichment_table: Name of the Reference Table for the source attribute and their associated target attribute values.
66+
:type lookup_enrichment_table: str
67+
68+
:param name: Name of the processor.
69+
:type name: str, optional
70+
71+
:param source: Source attribute used to perform the lookup.
72+
:type source: str
73+
74+
:param target: Name of the attribute that contains the corresponding value in the mapping list.
75+
:type target: str
76+
77+
:param type: Type of logs lookup processor.
78+
:type type: LogsLookupProcessorType
79+
"""
80+
if is_enabled is not unset:
81+
kwargs["is_enabled"] = is_enabled
82+
if name is not unset:
83+
kwargs["name"] = name
84+
super().__init__(kwargs)
85+
86+
self_.lookup_enrichment_table = lookup_enrichment_table
87+
self_.source = source
88+
self_.target = target
89+
self_.type = type

src/datadog_api_client/v1/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@
414414
from datadog_api_client.v1.model.query_value_widget_definition import QueryValueWidgetDefinition
415415
from datadog_api_client.v1.model.query_value_widget_definition_type import QueryValueWidgetDefinitionType
416416
from datadog_api_client.v1.model.query_value_widget_request import QueryValueWidgetRequest
417+
from datadog_api_client.v1.model.reference_table_logs_lookup_processor import ReferenceTableLogsLookupProcessor
417418
from datadog_api_client.v1.model.response_meta_attributes import ResponseMetaAttributes
418419
from datadog_api_client.v1.model.slo_bulk_delete import SLOBulkDelete
419420
from datadog_api_client.v1.model.slo_bulk_delete_error import SLOBulkDeleteError

0 commit comments

Comments
 (0)