Skip to content
Merged
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
21 changes: 21 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38711,12 +38711,14 @@ components:
- none
- basic
- bearer
- custom
example: basic
type: string
x-enum-varnames:
- NONE
- BASIC
- BEARER
- CUSTOM
ObservabilityPipelineHttpClientSourceType:
default: http_client
description: The source type. The value should always be `http_client`.
Expand Down Expand Up @@ -39279,6 +39281,8 @@ components:
description: The index to write logs to.
example: logs-index
type: string
data_stream:
$ref: '#/components/schemas/ObservabilityPipelineOpenSearchDestinationDataStream'
id:
description: The unique identifier for this component.
example: opensearch-destination
Expand All @@ -39300,6 +39304,23 @@ components:
type: object
x-pipeline-types:
- logs
ObservabilityPipelineOpenSearchDestinationDataStream:
description: Configuration options for writing to OpenSearch 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
ObservabilityPipelineOpenSearchDestinationType:
default: opensearch
description: The destination type. The value should always be `opensearch`.
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 @@ -16923,6 +16923,13 @@ datadog\_api\_client.v2.model.observability\_pipeline\_open\_search\_destination
:members:
:show-inheritance:

datadog\_api\_client.v2.model.observability\_pipeline\_open\_search\_destination\_data\_stream module
-----------------------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.observability_pipeline_open_search_destination_data_stream
:members:
:show-inheritance:

datadog\_api\_client.v2.model.observability\_pipeline\_open\_search\_destination\_type module
---------------------------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,20 @@ class ObservabilityPipelineHttpClientSourceAuthStrategy(ModelSimple):
"""
Optional authentication strategy for HTTP requests.

:param value: Must be one of ["none", "basic", "bearer"].
:param value: Must be one of ["none", "basic", "bearer", "custom"].
:type value: str
"""

allowed_values = {
"none",
"basic",
"bearer",
"custom",
}
NONE: ClassVar["ObservabilityPipelineHttpClientSourceAuthStrategy"]
BASIC: ClassVar["ObservabilityPipelineHttpClientSourceAuthStrategy"]
BEARER: ClassVar["ObservabilityPipelineHttpClientSourceAuthStrategy"]
CUSTOM: ClassVar["ObservabilityPipelineHttpClientSourceAuthStrategy"]

@cached_property
def openapi_types(_):
Expand All @@ -39,3 +41,4 @@ def openapi_types(_):
ObservabilityPipelineHttpClientSourceAuthStrategy.NONE = ObservabilityPipelineHttpClientSourceAuthStrategy("none")
ObservabilityPipelineHttpClientSourceAuthStrategy.BASIC = ObservabilityPipelineHttpClientSourceAuthStrategy("basic")
ObservabilityPipelineHttpClientSourceAuthStrategy.BEARER = ObservabilityPipelineHttpClientSourceAuthStrategy("bearer")
ObservabilityPipelineHttpClientSourceAuthStrategy.CUSTOM = ObservabilityPipelineHttpClientSourceAuthStrategy("custom")
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@


if TYPE_CHECKING:
from datadog_api_client.v2.model.observability_pipeline_open_search_destination_data_stream import (
ObservabilityPipelineOpenSearchDestinationDataStream,
)
from datadog_api_client.v2.model.observability_pipeline_open_search_destination_type import (
ObservabilityPipelineOpenSearchDestinationType,
)
Expand All @@ -22,19 +25,24 @@
class ObservabilityPipelineOpenSearchDestination(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.observability_pipeline_open_search_destination_data_stream import (
ObservabilityPipelineOpenSearchDestinationDataStream,
)
from datadog_api_client.v2.model.observability_pipeline_open_search_destination_type import (
ObservabilityPipelineOpenSearchDestinationType,
)

return {
"bulk_index": (str,),
"data_stream": (ObservabilityPipelineOpenSearchDestinationDataStream,),
"id": (str,),
"inputs": ([str],),
"type": (ObservabilityPipelineOpenSearchDestinationType,),
}

attribute_map = {
"bulk_index": "bulk_index",
"data_stream": "data_stream",
"id": "id",
"inputs": "inputs",
"type": "type",
Expand All @@ -46,6 +54,7 @@ def __init__(
inputs: List[str],
type: ObservabilityPipelineOpenSearchDestinationType,
bulk_index: Union[str, UnsetType] = unset,
data_stream: Union[ObservabilityPipelineOpenSearchDestinationDataStream, UnsetType] = unset,
**kwargs,
):
"""
Expand All @@ -56,6 +65,9 @@ def __init__(
:param bulk_index: The index to write logs to.
:type bulk_index: str, optional

:param data_stream: Configuration options for writing to OpenSearch Data Streams instead of a fixed index.
:type data_stream: ObservabilityPipelineOpenSearchDestinationDataStream, optional

:param id: The unique identifier for this component.
:type id: str

Expand All @@ -67,6 +79,8 @@ def __init__(
"""
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 ObservabilityPipelineOpenSearchDestinationDataStream(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 OpenSearch 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 @@ -3379,6 +3379,9 @@
from datadog_api_client.v2.model.observability_pipeline_open_search_destination import (
ObservabilityPipelineOpenSearchDestination,
)
from datadog_api_client.v2.model.observability_pipeline_open_search_destination_data_stream import (
ObservabilityPipelineOpenSearchDestinationDataStream,
)
from datadog_api_client.v2.model.observability_pipeline_open_search_destination_type import (
ObservabilityPipelineOpenSearchDestinationType,
)
Expand Down Expand Up @@ -8108,6 +8111,7 @@
"ObservabilityPipelineOcsfMapperProcessorType",
"ObservabilityPipelineOcsfMappingLibrary",
"ObservabilityPipelineOpenSearchDestination",
"ObservabilityPipelineOpenSearchDestinationDataStream",
"ObservabilityPipelineOpenSearchDestinationType",
"ObservabilityPipelineOpentelemetrySource",
"ObservabilityPipelineOpentelemetrySourceType",
Expand Down
Loading