Skip to content

Commit cb2b2ac

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Adding datastream to Open Search destination and adding Auth Strategy for Observability Pipeline API (#3096)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent ab9fc35 commit cb2b2ac

File tree

6 files changed

+106
-1
lines changed

6 files changed

+106
-1
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38691,12 +38691,14 @@ components:
3869138691
- none
3869238692
- basic
3869338693
- bearer
38694+
- custom
3869438695
example: basic
3869538696
type: string
3869638697
x-enum-varnames:
3869738698
- NONE
3869838699
- BASIC
3869938700
- BEARER
38701+
- CUSTOM
3870038702
ObservabilityPipelineHttpClientSourceType:
3870138703
default: http_client
3870238704
description: The source type. The value should always be `http_client`.
@@ -39259,6 +39261,8 @@ components:
3925939261
description: The index to write logs to.
3926039262
example: logs-index
3926139263
type: string
39264+
data_stream:
39265+
$ref: '#/components/schemas/ObservabilityPipelineOpenSearchDestinationDataStream'
3926239266
id:
3926339267
description: The unique identifier for this component.
3926439268
example: opensearch-destination
@@ -39280,6 +39284,23 @@ components:
3928039284
type: object
3928139285
x-pipeline-types:
3928239286
- logs
39287+
ObservabilityPipelineOpenSearchDestinationDataStream:
39288+
description: Configuration options for writing to OpenSearch Data Streams instead
39289+
of a fixed index.
39290+
properties:
39291+
dataset:
39292+
description: The data stream dataset for your logs. This groups logs by
39293+
their source or application.
39294+
type: string
39295+
dtype:
39296+
description: The data stream type for your logs. This determines how logs
39297+
are categorized within the data stream.
39298+
type: string
39299+
namespace:
39300+
description: The data stream namespace for your logs. This separates logs
39301+
into different environments or domains.
39302+
type: string
39303+
type: object
3928339304
ObservabilityPipelineOpenSearchDestinationType:
3928439305
default: opensearch
3928539306
description: The destination type. The value should always be `opensearch`.

docs/datadog_api_client.v2.model.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16909,6 +16909,13 @@ datadog\_api\_client.v2.model.observability\_pipeline\_open\_search\_destination
1690916909
:members:
1691016910
:show-inheritance:
1691116911

16912+
datadog\_api\_client.v2.model.observability\_pipeline\_open\_search\_destination\_data\_stream module
16913+
-----------------------------------------------------------------------------------------------------
16914+
16915+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_open_search_destination_data_stream
16916+
:members:
16917+
:show-inheritance:
16918+
1691216919
datadog\_api\_client.v2.model.observability\_pipeline\_open\_search\_destination\_type module
1691316920
---------------------------------------------------------------------------------------------
1691416921

src/datadog_api_client/v2/model/observability_pipeline_http_client_source_auth_strategy.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,20 @@ class ObservabilityPipelineHttpClientSourceAuthStrategy(ModelSimple):
1616
"""
1717
Optional authentication strategy for HTTP requests.
1818
19-
:param value: Must be one of ["none", "basic", "bearer"].
19+
:param value: Must be one of ["none", "basic", "bearer", "custom"].
2020
:type value: str
2121
"""
2222

2323
allowed_values = {
2424
"none",
2525
"basic",
2626
"bearer",
27+
"custom",
2728
}
2829
NONE: ClassVar["ObservabilityPipelineHttpClientSourceAuthStrategy"]
2930
BASIC: ClassVar["ObservabilityPipelineHttpClientSourceAuthStrategy"]
3031
BEARER: ClassVar["ObservabilityPipelineHttpClientSourceAuthStrategy"]
32+
CUSTOM: ClassVar["ObservabilityPipelineHttpClientSourceAuthStrategy"]
3133

3234
@cached_property
3335
def openapi_types(_):
@@ -39,3 +41,4 @@ def openapi_types(_):
3941
ObservabilityPipelineHttpClientSourceAuthStrategy.NONE = ObservabilityPipelineHttpClientSourceAuthStrategy("none")
4042
ObservabilityPipelineHttpClientSourceAuthStrategy.BASIC = ObservabilityPipelineHttpClientSourceAuthStrategy("basic")
4143
ObservabilityPipelineHttpClientSourceAuthStrategy.BEARER = ObservabilityPipelineHttpClientSourceAuthStrategy("bearer")
44+
ObservabilityPipelineHttpClientSourceAuthStrategy.CUSTOM = ObservabilityPipelineHttpClientSourceAuthStrategy("custom")

src/datadog_api_client/v2/model/observability_pipeline_open_search_destination.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515

1616
if TYPE_CHECKING:
17+
from datadog_api_client.v2.model.observability_pipeline_open_search_destination_data_stream import (
18+
ObservabilityPipelineOpenSearchDestinationDataStream,
19+
)
1720
from datadog_api_client.v2.model.observability_pipeline_open_search_destination_type import (
1821
ObservabilityPipelineOpenSearchDestinationType,
1922
)
@@ -22,19 +25,24 @@
2225
class ObservabilityPipelineOpenSearchDestination(ModelNormal):
2326
@cached_property
2427
def openapi_types(_):
28+
from datadog_api_client.v2.model.observability_pipeline_open_search_destination_data_stream import (
29+
ObservabilityPipelineOpenSearchDestinationDataStream,
30+
)
2531
from datadog_api_client.v2.model.observability_pipeline_open_search_destination_type import (
2632
ObservabilityPipelineOpenSearchDestinationType,
2733
)
2834

2935
return {
3036
"bulk_index": (str,),
37+
"data_stream": (ObservabilityPipelineOpenSearchDestinationDataStream,),
3138
"id": (str,),
3239
"inputs": ([str],),
3340
"type": (ObservabilityPipelineOpenSearchDestinationType,),
3441
}
3542

3643
attribute_map = {
3744
"bulk_index": "bulk_index",
45+
"data_stream": "data_stream",
3846
"id": "id",
3947
"inputs": "inputs",
4048
"type": "type",
@@ -46,6 +54,7 @@ def __init__(
4654
inputs: List[str],
4755
type: ObservabilityPipelineOpenSearchDestinationType,
4856
bulk_index: Union[str, UnsetType] = unset,
57+
data_stream: Union[ObservabilityPipelineOpenSearchDestinationDataStream, UnsetType] = unset,
4958
**kwargs,
5059
):
5160
"""
@@ -56,6 +65,9 @@ def __init__(
5665
:param bulk_index: The index to write logs to.
5766
:type bulk_index: str, optional
5867
68+
:param data_stream: Configuration options for writing to OpenSearch Data Streams instead of a fixed index.
69+
:type data_stream: ObservabilityPipelineOpenSearchDestinationDataStream, optional
70+
5971
:param id: The unique identifier for this component.
6072
:type id: str
6173
@@ -67,6 +79,8 @@ def __init__(
6779
"""
6880
if bulk_index is not unset:
6981
kwargs["bulk_index"] = bulk_index
82+
if data_stream is not unset:
83+
kwargs["data_stream"] = data_stream
7084
super().__init__(kwargs)
7185

7286
self_.id = id
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Union
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
class ObservabilityPipelineOpenSearchDestinationDataStream(ModelNormal):
17+
@cached_property
18+
def openapi_types(_):
19+
return {
20+
"dataset": (str,),
21+
"dtype": (str,),
22+
"namespace": (str,),
23+
}
24+
25+
attribute_map = {
26+
"dataset": "dataset",
27+
"dtype": "dtype",
28+
"namespace": "namespace",
29+
}
30+
31+
def __init__(
32+
self_,
33+
dataset: Union[str, UnsetType] = unset,
34+
dtype: Union[str, UnsetType] = unset,
35+
namespace: Union[str, UnsetType] = unset,
36+
**kwargs,
37+
):
38+
"""
39+
Configuration options for writing to OpenSearch Data Streams instead of a fixed index.
40+
41+
:param dataset: The data stream dataset for your logs. This groups logs by their source or application.
42+
:type dataset: str, optional
43+
44+
:param dtype: The data stream type for your logs. This determines how logs are categorized within the data stream.
45+
:type dtype: str, optional
46+
47+
:param namespace: The data stream namespace for your logs. This separates logs into different environments or domains.
48+
:type namespace: str, optional
49+
"""
50+
if dataset is not unset:
51+
kwargs["dataset"] = dataset
52+
if dtype is not unset:
53+
kwargs["dtype"] = dtype
54+
if namespace is not unset:
55+
kwargs["namespace"] = namespace
56+
super().__init__(kwargs)

src/datadog_api_client/v2/models/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3373,6 +3373,9 @@
33733373
from datadog_api_client.v2.model.observability_pipeline_open_search_destination import (
33743374
ObservabilityPipelineOpenSearchDestination,
33753375
)
3376+
from datadog_api_client.v2.model.observability_pipeline_open_search_destination_data_stream import (
3377+
ObservabilityPipelineOpenSearchDestinationDataStream,
3378+
)
33763379
from datadog_api_client.v2.model.observability_pipeline_open_search_destination_type import (
33773380
ObservabilityPipelineOpenSearchDestinationType,
33783381
)
@@ -8109,6 +8112,7 @@
81098112
"ObservabilityPipelineOcsfMapperProcessorType",
81108113
"ObservabilityPipelineOcsfMappingLibrary",
81118114
"ObservabilityPipelineOpenSearchDestination",
8115+
"ObservabilityPipelineOpenSearchDestinationDataStream",
81128116
"ObservabilityPipelineOpenSearchDestinationType",
81138117
"ObservabilityPipelineOpentelemetrySource",
81148118
"ObservabilityPipelineOpentelemetrySourceType",

0 commit comments

Comments
 (0)