diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index e83df8269e..06b0264c01 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -43029,6 +43029,7 @@ components: ObservabilityPipelineConfigDestinationItem: description: "A destination for the pipeline." oneOf: + - $ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestination" - $ref: "#/components/schemas/ObservabilityPipelineHttpClientDestination" - $ref: "#/components/schemas/ObservabilityPipelineAmazonOpenSearchDestination" - $ref: "#/components/schemas/ObservabilityPipelineAmazonS3Destination" @@ -43038,7 +43039,6 @@ components: - $ref: "#/components/schemas/ObservabilityPipelineCloudPremDestination" - $ref: "#/components/schemas/ObservabilityPipelineCrowdStrikeNextGenSiemDestination" - $ref: "#/components/schemas/ObservabilityPipelineDatadogLogsDestination" - - $ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestination" - $ref: "#/components/schemas/ObservabilityPipelineGoogleChronicleDestination" - $ref: "#/components/schemas/ObservabilityPipelineGoogleCloudStorageDestination" - $ref: "#/components/schemas/ObservabilityPipelineGooglePubSubDestination" @@ -43640,9 +43640,9 @@ components: type: object ObservabilityPipelineElasticsearchDestination: description: |- - The `elasticsearch` destination writes logs to an Elasticsearch cluster. + The `elasticsearch` destination writes logs or metrics to an Elasticsearch cluster. - **Supported pipeline types:** logs + **Supported pipeline types:** logs, metrics properties: api_version: $ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestinationApiVersion" @@ -43651,9 +43651,11 @@ components: buffer: $ref: "#/components/schemas/ObservabilityPipelineBufferOptions" bulk_index: - description: The index to write logs to in Elasticsearch. + description: The name of the index to write events to in Elasticsearch. example: logs-index type: string + compression: + $ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestinationCompression" data_stream: $ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestinationDataStream" endpoint_url_key: @@ -43664,6 +43666,10 @@ components: description: The unique identifier for this component. example: "elasticsearch-destination" type: string + id_key: + description: The name of the field used as the document ID in Elasticsearch. + example: id + type: string inputs: description: A list of component IDs whose output is used as the `input` for this component. example: ["filter-processor"] @@ -43671,6 +43677,15 @@ components: description: The ID of a component whose output is used as input for this destination. type: string type: array + pipeline: + description: The name of an Elasticsearch ingest pipeline to apply to events before indexing. + example: my-pipeline + type: string + request_retry_partial: + description: When `true`, retries failed partial bulk requests when some events in a batch fail while others succeed. + type: boolean + tls: + $ref: "#/components/schemas/ObservabilityPipelineTls" type: $ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestinationType" required: @@ -43678,7 +43693,7 @@ components: - type - inputs type: object - x-pipeline-types: [logs] + x-pipeline-types: [logs, metrics] ObservabilityPipelineElasticsearchDestinationApiVersion: description: The Elasticsearch API version to use. Set to `auto` to auto-detect. enum: [auto, v6, v7, v8] @@ -43707,18 +43722,48 @@ components: required: - strategy type: object + ObservabilityPipelineElasticsearchDestinationCompression: + description: Compression configuration for the Elasticsearch destination. + properties: + algorithm: + $ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm" + level: + description: The compression level. Only applicable for `gzip`, `zlib`, and `zstd` algorithms. + example: 6 + format: int64 + type: integer + required: + - algorithm + type: object + ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm: + description: The compression algorithm applied when sending data to Elasticsearch. + enum: [none, gzip, zlib, zstd, snappy] + example: gzip + type: string + x-enum-varnames: + - NONE + - GZIP + - ZLIB + - ZSTD + - SNAPPY ObservabilityPipelineElasticsearchDestinationDataStream: description: Configuration options for writing to Elasticsearch Data Streams instead of a fixed index. properties: + auto_routing: + description: When `true`, automatically routes events to the appropriate data stream based on the event content. + type: boolean dataset: - description: The data stream dataset for your logs. This groups logs by their source or application. + description: The data stream dataset. This groups events by their source or application. type: string dtype: - description: The data stream type for your logs. This determines how logs are categorized within the data stream. + description: The data stream type. This determines how events are categorized within the data stream. type: string namespace: - description: The data stream namespace for your logs. This separates logs into different environments or domains. + description: The data stream namespace. This separates events into different environments or domains. type: string + sync_fields: + description: When `true`, synchronizes data stream fields with the Elasticsearch index mapping. + type: boolean type: object ObservabilityPipelineElasticsearchDestinationType: default: elasticsearch diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index d1dc990342..a0554d8f4a 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -19443,6 +19443,20 @@ datadog\_api\_client.v2.model.observability\_pipeline\_elasticsearch\_destinatio :members: :show-inheritance: +datadog\_api\_client.v2.model.observability\_pipeline\_elasticsearch\_destination\_compression module +----------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_compression + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.observability\_pipeline\_elasticsearch\_destination\_compression\_algorithm module +---------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_compression_algorithm + :members: + :show-inheritance: + datadog\_api\_client.v2.model.observability\_pipeline\_elasticsearch\_destination\_data\_stream module ------------------------------------------------------------------------------------------------------ diff --git a/src/datadog_api_client/v2/model/observability_pipeline_config.py b/src/datadog_api_client/v2/model/observability_pipeline_config.py index e5b0694896..658680e25e 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_config.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_config.py @@ -26,6 +26,9 @@ from datadog_api_client.v2.model.observability_pipeline_config_source_item import ( ObservabilityPipelineConfigSourceItem, ) + from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination import ( + ObservabilityPipelineElasticsearchDestination, + ) from datadog_api_client.v2.model.observability_pipeline_http_client_destination import ( ObservabilityPipelineHttpClientDestination, ) @@ -51,9 +54,6 @@ from datadog_api_client.v2.model.observability_pipeline_datadog_logs_destination import ( ObservabilityPipelineDatadogLogsDestination, ) - from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination import ( - ObservabilityPipelineElasticsearchDestination, - ) from datadog_api_client.v2.model.observability_pipeline_google_chronicle_destination import ( ObservabilityPipelineGoogleChronicleDestination, ) @@ -172,6 +172,7 @@ def __init__( destinations: List[ Union[ ObservabilityPipelineConfigDestinationItem, + ObservabilityPipelineElasticsearchDestination, ObservabilityPipelineHttpClientDestination, ObservabilityPipelineAmazonOpenSearchDestination, ObservabilityPipelineAmazonS3Destination, @@ -181,7 +182,6 @@ def __init__( ObservabilityPipelineCloudPremDestination, ObservabilityPipelineCrowdStrikeNextGenSiemDestination, ObservabilityPipelineDatadogLogsDestination, - ObservabilityPipelineElasticsearchDestination, ObservabilityPipelineGoogleChronicleDestination, ObservabilityPipelineGoogleCloudStorageDestination, ObservabilityPipelineGooglePubSubDestination, diff --git a/src/datadog_api_client/v2/model/observability_pipeline_config_destination_item.py b/src/datadog_api_client/v2/model/observability_pipeline_config_destination_item.py index 2365b2f763..959816e4eb 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_config_destination_item.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_config_destination_item.py @@ -15,52 +15,70 @@ def __init__(self, **kwargs): """ A destination for the pipeline. - :param auth_strategy: HTTP authentication strategy. - :type auth_strategy: ObservabilityPipelineHttpClientDestinationAuthStrategy, optional + :param api_version: The Elasticsearch API version to use. Set to `auto` to auto-detect. + :type api_version: ObservabilityPipelineElasticsearchDestinationApiVersion, optional - :param compression: Compression configuration for HTTP requests. - :type compression: ObservabilityPipelineHttpClientDestinationCompression, optional + :param auth: Authentication settings for the Elasticsearch destination. + When `strategy` is `basic`, use `username_key` and `password_key` to reference credentials stored in environment variables or secrets. + :type auth: ObservabilityPipelineElasticsearchDestinationAuth, optional - :param custom_key: Name of the environment variable or secret that holds a custom header value (used with custom auth strategies). - :type custom_key: str, optional + :param buffer: Configuration for buffer settings on destination components. + :type buffer: ObservabilityPipelineBufferOptions, optional - :param encoding: Encoding format for log events. - :type encoding: ObservabilityPipelineHttpClientDestinationEncoding + :param bulk_index: The name of the index to write events to in Elasticsearch. + :type bulk_index: str, optional + + :param compression: Compression configuration for the Elasticsearch destination. + :type compression: ObservabilityPipelineElasticsearchDestinationCompression, optional + + :param data_stream: Configuration options for writing to Elasticsearch Data Streams instead of a fixed index. + :type data_stream: ObservabilityPipelineElasticsearchDestinationDataStream, optional + + :param endpoint_url_key: Name of the environment variable or secret that holds the Elasticsearch endpoint URL. + :type endpoint_url_key: str, optional :param id: The unique identifier for this component. :type id: str - :param inputs: A list of component IDs whose output is used as the input for this component. + :param id_key: The name of the field used as the document ID in Elasticsearch. + :type id_key: str, optional + + :param inputs: A list of component IDs whose output is used as the `input` for this component. :type inputs: [str] - :param password_key: Name of the environment variable or secret that holds the password (used when `auth_strategy` is `basic`). - :type password_key: str, optional + :param pipeline: The name of an Elasticsearch ingest pipeline to apply to events before indexing. + :type pipeline: str, optional + + :param request_retry_partial: When `true`, retries failed partial bulk requests when some events in a batch fail while others succeed. + :type request_retry_partial: bool, optional :param tls: Configuration for enabling TLS encryption between the pipeline component and external services. :type tls: ObservabilityPipelineTls, optional + :param type: The destination type. The value should always be `elasticsearch`. + :type type: ObservabilityPipelineElasticsearchDestinationType + + :param auth_strategy: HTTP authentication strategy. + :type auth_strategy: ObservabilityPipelineHttpClientDestinationAuthStrategy, optional + + :param custom_key: Name of the environment variable or secret that holds a custom header value (used with custom auth strategies). + :type custom_key: str, optional + + :param encoding: Encoding format for log events. + :type encoding: ObservabilityPipelineHttpClientDestinationEncoding + + :param password_key: Name of the environment variable or secret that holds the password (used when `auth_strategy` is `basic`). + :type password_key: str, optional + :param token_key: Name of the environment variable or secret that holds the bearer token (used when `auth_strategy` is `bearer`). :type token_key: str, optional - :param type: The destination type. The value should always be `http_client`. - :type type: ObservabilityPipelineHttpClientDestinationType - :param uri_key: Name of the environment variable or secret that holds the HTTP endpoint URI. :type uri_key: str, optional :param username_key: Name of the environment variable or secret that holds the username (used when `auth_strategy` is `basic`). :type username_key: str, optional - :param auth: Authentication settings for the Amazon OpenSearch destination. - The `strategy` field determines whether basic or AWS-based authentication is used. - :type auth: ObservabilityPipelineAmazonOpenSearchDestinationAuth - - :param buffer: Configuration for buffer settings on destination components. - :type buffer: ObservabilityPipelineBufferOptions, optional - - :param bulk_index: The index to write logs to. - :type bulk_index: str, optional - :param bucket: S3 bucket name. :type bucket: str @@ -88,18 +106,9 @@ def __init__(self, **kwargs): :param container_name: The name of the Azure Blob Storage container to store logs in. :type container_name: str - :param endpoint_url_key: Name of the environment variable or secret that holds the CloudPrem endpoint URL. - :type endpoint_url_key: str, optional - :param routes: A list of routing rules that forward matching logs to Datadog using dedicated API keys. :type routes: [ObservabilityPipelineDatadogLogsDestinationRoute], optional - :param api_version: The Elasticsearch API version to use. Set to `auto` to auto-detect. - :type api_version: ObservabilityPipelineElasticsearchDestinationApiVersion, optional - - :param data_stream: Configuration options for writing to Elasticsearch Data Streams instead of a fixed index. - :type data_stream: ObservabilityPipelineElasticsearchDestinationDataStream, optional - :param customer_id: The Google Chronicle customer ID. :type customer_id: str @@ -217,6 +226,9 @@ def _composed_schemas(_): # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading + from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination import ( + ObservabilityPipelineElasticsearchDestination, + ) from datadog_api_client.v2.model.observability_pipeline_http_client_destination import ( ObservabilityPipelineHttpClientDestination, ) @@ -242,9 +254,6 @@ def _composed_schemas(_): from datadog_api_client.v2.model.observability_pipeline_datadog_logs_destination import ( ObservabilityPipelineDatadogLogsDestination, ) - from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination import ( - ObservabilityPipelineElasticsearchDestination, - ) from datadog_api_client.v2.model.observability_pipeline_google_chronicle_destination import ( ObservabilityPipelineGoogleChronicleDestination, ) @@ -288,6 +297,7 @@ def _composed_schemas(_): return { "oneOf": [ + ObservabilityPipelineElasticsearchDestination, ObservabilityPipelineHttpClientDestination, ObservabilityPipelineAmazonOpenSearchDestination, ObservabilityPipelineAmazonS3Destination, @@ -297,7 +307,6 @@ def _composed_schemas(_): ObservabilityPipelineCloudPremDestination, ObservabilityPipelineCrowdStrikeNextGenSiemDestination, ObservabilityPipelineDatadogLogsDestination, - ObservabilityPipelineElasticsearchDestination, ObservabilityPipelineGoogleChronicleDestination, ObservabilityPipelineGoogleCloudStorageDestination, ObservabilityPipelineGooglePubSubDestination, diff --git a/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination.py index 22e14fa8f8..f18262acdd 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination.py @@ -21,9 +21,13 @@ ObservabilityPipelineElasticsearchDestinationAuth, ) from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions + from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_compression import ( + ObservabilityPipelineElasticsearchDestinationCompression, + ) from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_data_stream import ( ObservabilityPipelineElasticsearchDestinationDataStream, ) + from datadog_api_client.v2.model.observability_pipeline_tls import ObservabilityPipelineTls from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_type import ( ObservabilityPipelineElasticsearchDestinationType, ) @@ -48,9 +52,13 @@ def openapi_types(_): ObservabilityPipelineElasticsearchDestinationAuth, ) from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions + from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_compression import ( + ObservabilityPipelineElasticsearchDestinationCompression, + ) from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_data_stream import ( ObservabilityPipelineElasticsearchDestinationDataStream, ) + from datadog_api_client.v2.model.observability_pipeline_tls import ObservabilityPipelineTls from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_type import ( ObservabilityPipelineElasticsearchDestinationType, ) @@ -60,10 +68,15 @@ def openapi_types(_): "auth": (ObservabilityPipelineElasticsearchDestinationAuth,), "buffer": (ObservabilityPipelineBufferOptions,), "bulk_index": (str,), + "compression": (ObservabilityPipelineElasticsearchDestinationCompression,), "data_stream": (ObservabilityPipelineElasticsearchDestinationDataStream,), "endpoint_url_key": (str,), "id": (str,), + "id_key": (str,), "inputs": ([str],), + "pipeline": (str,), + "request_retry_partial": (bool,), + "tls": (ObservabilityPipelineTls,), "type": (ObservabilityPipelineElasticsearchDestinationType,), } @@ -72,10 +85,15 @@ def openapi_types(_): "auth": "auth", "buffer": "buffer", "bulk_index": "bulk_index", + "compression": "compression", "data_stream": "data_stream", "endpoint_url_key": "endpoint_url_key", "id": "id", + "id_key": "id_key", "inputs": "inputs", + "pipeline": "pipeline", + "request_retry_partial": "request_retry_partial", + "tls": "tls", "type": "type", } @@ -94,14 +112,19 @@ def __init__( UnsetType, ] = unset, bulk_index: Union[str, UnsetType] = unset, + compression: Union[ObservabilityPipelineElasticsearchDestinationCompression, UnsetType] = unset, data_stream: Union[ObservabilityPipelineElasticsearchDestinationDataStream, UnsetType] = unset, endpoint_url_key: Union[str, UnsetType] = unset, + id_key: Union[str, UnsetType] = unset, + pipeline: Union[str, UnsetType] = unset, + request_retry_partial: Union[bool, UnsetType] = unset, + tls: Union[ObservabilityPipelineTls, UnsetType] = unset, **kwargs, ): """ - The ``elasticsearch`` destination writes logs to an Elasticsearch cluster. + The ``elasticsearch`` destination writes logs or metrics to an Elasticsearch cluster. - **Supported pipeline types:** logs + **Supported pipeline types:** logs, metrics :param api_version: The Elasticsearch API version to use. Set to ``auto`` to auto-detect. :type api_version: ObservabilityPipelineElasticsearchDestinationApiVersion, optional @@ -113,9 +136,12 @@ def __init__( :param buffer: Configuration for buffer settings on destination components. :type buffer: ObservabilityPipelineBufferOptions, optional - :param bulk_index: The index to write logs to in Elasticsearch. + :param bulk_index: The name of the index to write events to in Elasticsearch. :type bulk_index: str, optional + :param compression: Compression configuration for the Elasticsearch destination. + :type compression: ObservabilityPipelineElasticsearchDestinationCompression, optional + :param data_stream: Configuration options for writing to Elasticsearch Data Streams instead of a fixed index. :type data_stream: ObservabilityPipelineElasticsearchDestinationDataStream, optional @@ -125,9 +151,21 @@ def __init__( :param id: The unique identifier for this component. :type id: str + :param id_key: The name of the field used as the document ID in Elasticsearch. + :type id_key: str, optional + :param inputs: A list of component IDs whose output is used as the ``input`` for this component. :type inputs: [str] + :param pipeline: The name of an Elasticsearch ingest pipeline to apply to events before indexing. + :type pipeline: str, optional + + :param request_retry_partial: When ``true`` , retries failed partial bulk requests when some events in a batch fail while others succeed. + :type request_retry_partial: bool, optional + + :param tls: Configuration for enabling TLS encryption between the pipeline component and external services. + :type tls: ObservabilityPipelineTls, optional + :param type: The destination type. The value should always be ``elasticsearch``. :type type: ObservabilityPipelineElasticsearchDestinationType """ @@ -139,10 +177,20 @@ def __init__( kwargs["buffer"] = buffer if bulk_index is not unset: kwargs["bulk_index"] = bulk_index + if compression is not unset: + kwargs["compression"] = compression if data_stream is not unset: kwargs["data_stream"] = data_stream if endpoint_url_key is not unset: kwargs["endpoint_url_key"] = endpoint_url_key + if id_key is not unset: + kwargs["id_key"] = id_key + if pipeline is not unset: + kwargs["pipeline"] = pipeline + if request_retry_partial is not unset: + kwargs["request_retry_partial"] = request_retry_partial + if tls is not unset: + kwargs["tls"] = tls super().__init__(kwargs) self_.id = id diff --git a/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination_compression.py b/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination_compression.py new file mode 100644 index 0000000000..0d7db8376a --- /dev/null +++ b/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination_compression.py @@ -0,0 +1,58 @@ +# 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.v2.model.observability_pipeline_elasticsearch_destination_compression_algorithm import ( + ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm, + ) + + +class ObservabilityPipelineElasticsearchDestinationCompression(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_compression_algorithm import ( + ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm, + ) + + return { + "algorithm": (ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm,), + "level": (int,), + } + + attribute_map = { + "algorithm": "algorithm", + "level": "level", + } + + def __init__( + self_, + algorithm: ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm, + level: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Compression configuration for the Elasticsearch destination. + + :param algorithm: The compression algorithm applied when sending data to Elasticsearch. + :type algorithm: ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm + + :param level: The compression level. Only applicable for ``gzip`` , ``zlib`` , and ``zstd`` algorithms. + :type level: int, optional + """ + if level is not unset: + kwargs["level"] = level + super().__init__(kwargs) + + self_.algorithm = algorithm diff --git a/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination_compression_algorithm.py b/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination_compression_algorithm.py new file mode 100644 index 0000000000..4c41c0e543 --- /dev/null +++ b/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination_compression_algorithm.py @@ -0,0 +1,57 @@ +# 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 ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm(ModelSimple): + """ + The compression algorithm applied when sending data to Elasticsearch. + + :param value: Must be one of ["none", "gzip", "zlib", "zstd", "snappy"]. + :type value: str + """ + + allowed_values = { + "none", + "gzip", + "zlib", + "zstd", + "snappy", + } + NONE: ClassVar["ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm"] + GZIP: ClassVar["ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm"] + ZLIB: ClassVar["ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm"] + ZSTD: ClassVar["ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm"] + SNAPPY: ClassVar["ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm.NONE = ( + ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm("none") +) +ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm.GZIP = ( + ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm("gzip") +) +ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm.ZLIB = ( + ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm("zlib") +) +ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm.ZSTD = ( + ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm("zstd") +) +ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm.SNAPPY = ( + ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm("snappy") +) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination_data_stream.py b/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination_data_stream.py index 8046b936b9..bc06b28148 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination_data_stream.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination_data_stream.py @@ -17,40 +17,56 @@ class ObservabilityPipelineElasticsearchDestinationDataStream(ModelNormal): @cached_property def openapi_types(_): return { + "auto_routing": (bool,), "dataset": (str,), "dtype": (str,), "namespace": (str,), + "sync_fields": (bool,), } attribute_map = { + "auto_routing": "auto_routing", "dataset": "dataset", "dtype": "dtype", "namespace": "namespace", + "sync_fields": "sync_fields", } def __init__( self_, + auto_routing: Union[bool, UnsetType] = unset, dataset: Union[str, UnsetType] = unset, dtype: Union[str, UnsetType] = unset, namespace: Union[str, UnsetType] = unset, + sync_fields: Union[bool, UnsetType] = unset, **kwargs, ): """ Configuration options for writing to Elasticsearch Data Streams instead of a fixed index. - :param dataset: The data stream dataset for your logs. This groups logs by their source or application. + :param auto_routing: When ``true`` , automatically routes events to the appropriate data stream based on the event content. + :type auto_routing: bool, optional + + :param dataset: The data stream dataset. This groups events by their source or application. :type dataset: str, optional - :param dtype: The data stream type for your logs. This determines how logs are categorized within the data stream. + :param dtype: The data stream type. This determines how events are categorized within the data stream. :type dtype: str, optional - :param namespace: The data stream namespace for your logs. This separates logs into different environments or domains. + :param namespace: The data stream namespace. This separates events into different environments or domains. :type namespace: str, optional + + :param sync_fields: When ``true`` , synchronizes data stream fields with the Elasticsearch index mapping. + :type sync_fields: bool, optional """ + if auto_routing is not unset: + kwargs["auto_routing"] = auto_routing if dataset is not unset: kwargs["dataset"] = dataset if dtype is not unset: kwargs["dtype"] = dtype if namespace is not unset: kwargs["namespace"] = namespace + if sync_fields is not unset: + kwargs["sync_fields"] = sync_fields super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 22f4a4d800..8a011e6796 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -3785,6 +3785,12 @@ from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_auth import ( ObservabilityPipelineElasticsearchDestinationAuth, ) +from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_compression import ( + ObservabilityPipelineElasticsearchDestinationCompression, +) +from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_compression_algorithm import ( + ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm, +) from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_data_stream import ( ObservabilityPipelineElasticsearchDestinationDataStream, ) @@ -9586,6 +9592,8 @@ "ObservabilityPipelineElasticsearchDestination", "ObservabilityPipelineElasticsearchDestinationApiVersion", "ObservabilityPipelineElasticsearchDestinationAuth", + "ObservabilityPipelineElasticsearchDestinationCompression", + "ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm", "ObservabilityPipelineElasticsearchDestinationDataStream", "ObservabilityPipelineElasticsearchDestinationType", "ObservabilityPipelineEnrichmentTableFile",