diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index f3ca46bc04..ddb5013b8e 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -36030,6 +36030,8 @@ components: description: The index to write logs to in Elasticsearch. example: logs-index type: string + data_stream: + $ref: '#/components/schemas/ObservabilityPipelineElasticsearchDestinationDataStream' id: description: The unique identifier for this component. example: elasticsearch-destination @@ -36063,6 +36065,23 @@ components: - V6 - V7 - V8 + ObservabilityPipelineElasticsearchDestinationDataStream: + description: Configuration options for writing to Elasticsearch Data Streams + instead of a fixed index. + properties: + dataset: + description: The data stream dataset for your logs. This groups logs 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. + type: string + namespace: + description: The data stream namespace for your logs. This separates logs + into different environments or domains. + type: string + type: object ObservabilityPipelineElasticsearchDestinationType: default: elasticsearch description: The destination type. The value should always be `elasticsearch`. diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 84078e9c26..b9fb21d3f7 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -15663,6 +15663,13 @@ datadog\_api\_client.v2.model.observability\_pipeline\_elasticsearch\_destinatio :members: :show-inheritance: +datadog\_api\_client.v2.model.observability\_pipeline\_elasticsearch\_destination\_data\_stream module +------------------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_data_stream + :members: + :show-inheritance: + datadog\_api\_client.v2.model.observability\_pipeline\_elasticsearch\_destination\_type module ---------------------------------------------------------------------------------------------- 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 df018bec4e..f43cb694e8 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 @@ -80,6 +80,9 @@ def __init__(self, **kwargs): :param bulk_index: The index to write logs to in Elasticsearch. :type bulk_index: str, optional + :param data_stream: Configuration options for writing to Elasticsearch Data Streams instead of a fixed index. + :type data_stream: ObservabilityPipelineElasticsearchDestinationDataStream, optional + :param keepalive: Optional socket keepalive duration in milliseconds. :type keepalive: int, optional 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 8ce413b7ef..59babc31b8 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 @@ -17,6 +17,9 @@ from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_api_version import ( ObservabilityPipelineElasticsearchDestinationApiVersion, ) + from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_data_stream import ( + ObservabilityPipelineElasticsearchDestinationDataStream, + ) from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_type import ( ObservabilityPipelineElasticsearchDestinationType, ) @@ -28,6 +31,9 @@ def openapi_types(_): from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_api_version import ( ObservabilityPipelineElasticsearchDestinationApiVersion, ) + from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_data_stream import ( + ObservabilityPipelineElasticsearchDestinationDataStream, + ) from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_type import ( ObservabilityPipelineElasticsearchDestinationType, ) @@ -35,6 +41,7 @@ def openapi_types(_): return { "api_version": (ObservabilityPipelineElasticsearchDestinationApiVersion,), "bulk_index": (str,), + "data_stream": (ObservabilityPipelineElasticsearchDestinationDataStream,), "id": (str,), "inputs": ([str],), "type": (ObservabilityPipelineElasticsearchDestinationType,), @@ -43,6 +50,7 @@ def openapi_types(_): attribute_map = { "api_version": "api_version", "bulk_index": "bulk_index", + "data_stream": "data_stream", "id": "id", "inputs": "inputs", "type": "type", @@ -55,6 +63,7 @@ def __init__( type: ObservabilityPipelineElasticsearchDestinationType, api_version: Union[ObservabilityPipelineElasticsearchDestinationApiVersion, UnsetType] = unset, bulk_index: Union[str, UnsetType] = unset, + data_stream: Union[ObservabilityPipelineElasticsearchDestinationDataStream, UnsetType] = unset, **kwargs, ): """ @@ -66,6 +75,9 @@ def __init__( :param bulk_index: The index to write logs to in Elasticsearch. :type bulk_index: str, optional + :param data_stream: Configuration options for writing to Elasticsearch Data Streams instead of a fixed index. + :type data_stream: ObservabilityPipelineElasticsearchDestinationDataStream, optional + :param id: The unique identifier for this component. :type id: str @@ -79,6 +91,8 @@ def __init__( kwargs["api_version"] = api_version if bulk_index is not unset: kwargs["bulk_index"] = bulk_index + if data_stream is not unset: + kwargs["data_stream"] = data_stream super().__init__(kwargs) self_.id = id 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 new file mode 100644 index 0000000000..8046b936b9 --- /dev/null +++ b/src/datadog_api_client/v2/model/observability_pipeline_elasticsearch_destination_data_stream.py @@ -0,0 +1,56 @@ +# 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 + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class ObservabilityPipelineElasticsearchDestinationDataStream(ModelNormal): + @cached_property + def openapi_types(_): + return { + "dataset": (str,), + "dtype": (str,), + "namespace": (str,), + } + + attribute_map = { + "dataset": "dataset", + "dtype": "dtype", + "namespace": "namespace", + } + + def __init__( + self_, + dataset: Union[str, UnsetType] = unset, + dtype: Union[str, UnsetType] = unset, + namespace: Union[str, 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. + :type dataset: str, optional + + :param dtype: The data stream type for your logs. This determines how logs 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. + :type namespace: str, optional + """ + if dataset is not unset: + kwargs["dataset"] = dataset + if dtype is not unset: + kwargs["dtype"] = dtype + if namespace is not unset: + kwargs["namespace"] = namespace + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 91f6658a33..9c2b3fb6c5 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -2997,6 +2997,9 @@ from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_api_version import ( ObservabilityPipelineElasticsearchDestinationApiVersion, ) +from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_data_stream import ( + ObservabilityPipelineElasticsearchDestinationDataStream, +) from datadog_api_client.v2.model.observability_pipeline_elasticsearch_destination_type import ( ObservabilityPipelineElasticsearchDestinationType, ) @@ -7395,6 +7398,7 @@ "ObservabilityPipelineDedupeProcessorType", "ObservabilityPipelineElasticsearchDestination", "ObservabilityPipelineElasticsearchDestinationApiVersion", + "ObservabilityPipelineElasticsearchDestinationDataStream", "ObservabilityPipelineElasticsearchDestinationType", "ObservabilityPipelineEnrichmentTableFile", "ObservabilityPipelineEnrichmentTableFileEncoding",