Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6212,6 +6212,38 @@ components:
type: string
x-enum-varnames:
- DECODER_PROCESSOR
LogsExcludeAttributeProcessor:
description: |-
Use this processor to remove an attribute from a log during processing.
The processor strips the specified attribute from the log event, which is useful
when the attribute contains sensitive data or is no longer needed downstream.
properties:
attribute_to_exclude:
description: Name of the log attribute to remove from the log event.
example: foo
type: string
is_enabled:
default: false
description: Whether or not the processor is enabled.
type: boolean
name:
description: Name of the processor.
type: string
type:
$ref: "#/components/schemas/LogsExcludeAttributeProcessorType"
required:
- type
- attribute_to_exclude
type: object
LogsExcludeAttributeProcessorType:
default: exclude-attribute
description: Type of logs exclude attribute processor.
enum:
- exclude-attribute
example: exclude-attribute
type: string
x-enum-varnames:
- EXCLUDE_ATTRIBUTE
LogsExclusion:
description: Represents the index exclusion filter object from configuration API.
properties:
Expand Down Expand Up @@ -6819,6 +6851,7 @@ components:
- $ref: "#/components/schemas/LogsArrayProcessor"
- $ref: "#/components/schemas/LogsDecoderProcessor"
- $ref: "#/components/schemas/LogsSchemaProcessor"
- $ref: "#/components/schemas/LogsExcludeAttributeProcessor"
LogsQueryCompute:
description: Define computation for a log query.
properties:
Expand Down
14 changes: 14 additions & 0 deletions docs/datadog_api_client.v1.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2027,6 +2027,20 @@ datadog\_api\_client.v1.model.logs\_decoder\_processor\_type module
:members:
:show-inheritance:

datadog\_api\_client.v1.model.logs\_exclude\_attribute\_processor module
------------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.logs_exclude_attribute_processor
:members:
:show-inheritance:

datadog\_api\_client.v1.model.logs\_exclude\_attribute\_processor\_type module
------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.logs_exclude_attribute_processor_type
:members:
:show-inheritance:

datadog\_api\_client.v1.model.logs\_exclusion module
----------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# 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_exclude_attribute_processor_type import LogsExcludeAttributeProcessorType


class LogsExcludeAttributeProcessor(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v1.model.logs_exclude_attribute_processor_type import LogsExcludeAttributeProcessorType

return {
"attribute_to_exclude": (str,),
"is_enabled": (bool,),
"name": (str,),
"type": (LogsExcludeAttributeProcessorType,),
}

attribute_map = {
"attribute_to_exclude": "attribute_to_exclude",
"is_enabled": "is_enabled",
"name": "name",
"type": "type",
}

def __init__(
self_,
attribute_to_exclude: str,
type: LogsExcludeAttributeProcessorType,
is_enabled: Union[bool, UnsetType] = unset,
name: Union[str, UnsetType] = unset,
**kwargs,
):
"""
Use this processor to remove an attribute from a log during processing.
The processor strips the specified attribute from the log event, which is useful
when the attribute contains sensitive data or is no longer needed downstream.

:param attribute_to_exclude: Name of the log attribute to remove from the log event.
:type attribute_to_exclude: str

:param is_enabled: Whether or not the processor is enabled.
:type is_enabled: bool, optional

:param name: Name of the processor.
:type name: str, optional

:param type: Type of logs exclude attribute processor.
:type type: LogsExcludeAttributeProcessorType
"""
if is_enabled is not unset:
kwargs["is_enabled"] = is_enabled
if name is not unset:
kwargs["name"] = name
super().__init__(kwargs)

self_.attribute_to_exclude = attribute_to_exclude
self_.type = type
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 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 LogsExcludeAttributeProcessorType(ModelSimple):
"""
Type of logs exclude attribute processor.

:param value: If omitted defaults to "exclude-attribute". Must be one of ["exclude-attribute"].
:type value: str
"""

allowed_values = {
"exclude-attribute",
}
EXCLUDE_ATTRIBUTE: ClassVar["LogsExcludeAttributeProcessorType"]

@cached_property
def openapi_types(_):
return {
"value": (str,),
}


LogsExcludeAttributeProcessorType.EXCLUDE_ATTRIBUTE = LogsExcludeAttributeProcessorType("exclude-attribute")
2 changes: 2 additions & 0 deletions src/datadog_api_client/v1/model/logs_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from datadog_api_client.v1.model.logs_array_processor import LogsArrayProcessor
from datadog_api_client.v1.model.logs_decoder_processor import LogsDecoderProcessor
from datadog_api_client.v1.model.logs_schema_processor import LogsSchemaProcessor
from datadog_api_client.v1.model.logs_exclude_attribute_processor import LogsExcludeAttributeProcessor


class LogsPipeline(ModelNormal):
Expand Down Expand Up @@ -105,6 +106,7 @@ def __init__(
LogsArrayProcessor,
LogsDecoderProcessor,
LogsSchemaProcessor,
LogsExcludeAttributeProcessor,
]
],
UnsetType,
Expand Down
2 changes: 2 additions & 0 deletions src/datadog_api_client/v1/model/logs_pipeline_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from datadog_api_client.v1.model.logs_array_processor import LogsArrayProcessor
from datadog_api_client.v1.model.logs_decoder_processor import LogsDecoderProcessor
from datadog_api_client.v1.model.logs_schema_processor import LogsSchemaProcessor
from datadog_api_client.v1.model.logs_exclude_attribute_processor import LogsExcludeAttributeProcessor


class LogsPipelineProcessor(ModelNormal):
Expand Down Expand Up @@ -96,6 +97,7 @@ def __init__(
LogsArrayProcessor,
LogsDecoderProcessor,
LogsSchemaProcessor,
LogsExcludeAttributeProcessor,
]
],
UnsetType,
Expand Down
5 changes: 5 additions & 0 deletions src/datadog_api_client/v1/model/logs_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ def __init__(self, **kwargs):

:param schema: Configuration of the schema data to use.
:type schema: LogsSchemaData

:param attribute_to_exclude: Name of the log attribute to remove from the log event.
:type attribute_to_exclude: str
"""
super().__init__(kwargs)

Expand Down Expand Up @@ -144,6 +147,7 @@ def _composed_schemas(_):
from datadog_api_client.v1.model.logs_array_processor import LogsArrayProcessor
from datadog_api_client.v1.model.logs_decoder_processor import LogsDecoderProcessor
from datadog_api_client.v1.model.logs_schema_processor import LogsSchemaProcessor
from datadog_api_client.v1.model.logs_exclude_attribute_processor import LogsExcludeAttributeProcessor

return {
"oneOf": [
Expand All @@ -167,5 +171,6 @@ def _composed_schemas(_):
LogsArrayProcessor,
LogsDecoderProcessor,
LogsSchemaProcessor,
LogsExcludeAttributeProcessor,
],
}
4 changes: 4 additions & 0 deletions src/datadog_api_client/v1/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@
LogsDecoderProcessorInputRepresentation,
)
from datadog_api_client.v1.model.logs_decoder_processor_type import LogsDecoderProcessorType
from datadog_api_client.v1.model.logs_exclude_attribute_processor import LogsExcludeAttributeProcessor
from datadog_api_client.v1.model.logs_exclude_attribute_processor_type import LogsExcludeAttributeProcessorType
from datadog_api_client.v1.model.logs_exclusion import LogsExclusion
from datadog_api_client.v1.model.logs_exclusion_filter import LogsExclusionFilter
from datadog_api_client.v1.model.logs_filter import LogsFilter
Expand Down Expand Up @@ -1635,6 +1637,8 @@
"LogsDecoderProcessorBinaryToTextEncoding",
"LogsDecoderProcessorInputRepresentation",
"LogsDecoderProcessorType",
"LogsExcludeAttributeProcessor",
"LogsExcludeAttributeProcessorType",
"LogsExclusion",
"LogsExclusionFilter",
"LogsFilter",
Expand Down
Loading