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
19 changes: 19 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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`.
Expand Down
7 changes: 7 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------------------------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand All @@ -28,13 +31,17 @@ 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,
)

return {
"api_version": (ObservabilityPipelineElasticsearchDestinationApiVersion,),
"bulk_index": (str,),
"data_stream": (ObservabilityPipelineElasticsearchDestinationDataStream,),
"id": (str,),
"inputs": ([str],),
"type": (ObservabilityPipelineElasticsearchDestinationType,),
Expand All @@ -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",
Expand All @@ -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,
):
"""
Expand All @@ -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

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 4 additions & 0 deletions src/datadog_api_client/v2/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -7395,6 +7398,7 @@
"ObservabilityPipelineDedupeProcessorType",
"ObservabilityPipelineElasticsearchDestination",
"ObservabilityPipelineElasticsearchDestinationApiVersion",
"ObservabilityPipelineElasticsearchDestinationDataStream",
"ObservabilityPipelineElasticsearchDestinationType",
"ObservabilityPipelineEnrichmentTableFile",
"ObservabilityPipelineEnrichmentTableFileEncoding",
Expand Down
Loading