Skip to content

Commit 01319b7

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 9991619 of spec repo
1 parent 42fbfd6 commit 01319b7

17 files changed

Lines changed: 825 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64152,6 +64152,7 @@ components:
6415264152
- $ref: "#/components/schemas/ObservabilityPipelineSplunkTcpSource"
6415364153
- $ref: "#/components/schemas/ObservabilityPipelineSumoLogicSource"
6415464154
- $ref: "#/components/schemas/ObservabilityPipelineSyslogNgSource"
64155+
- $ref: "#/components/schemas/ObservabilityPipelineWebsocketSource"
6415564156
- $ref: "#/components/schemas/ObservabilityPipelineOpentelemetrySource"
6415664157
ObservabilityPipelineCrowdStrikeNextGenSiemDestination:
6415764158
description: |-
@@ -68808,6 +68809,128 @@ components:
6880868809
required:
6880968810
- crt_file
6881068811
type: object
68812+
ObservabilityPipelineWebsocketSource:
68813+
description: |-
68814+
The `websocket` source ingests logs from a WebSocket server using the `ws://` or `wss://` protocol.
68815+
68816+
**Supported pipeline types:** logs.
68817+
properties:
68818+
auth_strategy:
68819+
$ref: "#/components/schemas/ObservabilityPipelineWebsocketSourceAuthStrategy"
68820+
custom_key:
68821+
description: Name of the environment variable or secret that holds the custom authorization header value. Used when `auth_strategy` is `custom`.
68822+
example: WS_AUTH_CUSTOM_HEADER
68823+
type: string
68824+
decoding:
68825+
$ref: "#/components/schemas/ObservabilityPipelineDecoding"
68826+
id:
68827+
description: The unique identifier for this component.
68828+
example: websocket-source
68829+
type: string
68830+
password_key:
68831+
description: Name of the environment variable or secret that holds the password. Used when `auth_strategy` is `basic`.
68832+
example: WS_AUTH_PASSWORD
68833+
type: string
68834+
tls:
68835+
$ref: "#/components/schemas/ObservabilityPipelineWebsocketSourceTls"
68836+
token_key:
68837+
description: Name of the environment variable or secret that holds the bearer token. Used when `auth_strategy` is `bearer`.
68838+
example: WS_BEARER_TOKEN
68839+
type: string
68840+
type:
68841+
$ref: "#/components/schemas/ObservabilityPipelineWebsocketSourceType"
68842+
uri_key:
68843+
description: Name of the environment variable or secret that holds the WebSocket server URI (`ws://` or `wss://`).
68844+
example: WS_URI
68845+
type: string
68846+
username_key:
68847+
description: Name of the environment variable or secret that holds the username. Used when `auth_strategy` is `basic`.
68848+
example: WS_AUTH_USERNAME
68849+
type: string
68850+
required:
68851+
- id
68852+
- type
68853+
- decoding
68854+
- auth_strategy
68855+
type: object
68856+
x-pipeline-types: [logs]
68857+
ObservabilityPipelineWebsocketSourceAuthStrategy:
68858+
description: Authentication strategy for the WebSocket source connection.
68859+
enum:
68860+
- none
68861+
- basic
68862+
- bearer
68863+
- custom
68864+
example: bearer
68865+
type: string
68866+
x-enum-varnames:
68867+
- NONE
68868+
- BASIC
68869+
- BEARER
68870+
- CUSTOM
68871+
ObservabilityPipelineWebsocketSourceTls:
68872+
description: TLS configuration for the WebSocket source. Use `enabled` for standard `wss://` connections, or `with_client_cert` to present a client certificate for mutual TLS.
68873+
oneOf:
68874+
- $ref: "#/components/schemas/ObservabilityPipelineWebsocketSourceTlsEnabled"
68875+
- $ref: "#/components/schemas/ObservabilityPipelineWebsocketSourceTlsWithClientCert"
68876+
ObservabilityPipelineWebsocketSourceTlsEnabled:
68877+
description: TLS configuration that enables encryption without a client certificate. Use this for standard `wss://` connections that do not require mutual TLS.
68878+
properties:
68879+
mode:
68880+
$ref: "#/components/schemas/ObservabilityPipelineWebsocketSourceTlsEnabledMode"
68881+
required:
68882+
- mode
68883+
type: object
68884+
ObservabilityPipelineWebsocketSourceTlsEnabledMode:
68885+
description: TLS mode. Must be `enabled`.
68886+
enum:
68887+
- enabled
68888+
example: enabled
68889+
type: string
68890+
x-enum-varnames:
68891+
- ENABLED
68892+
ObservabilityPipelineWebsocketSourceTlsWithClientCert:
68893+
description: TLS configuration that enables encryption and presents a client certificate for mutual TLS authentication.
68894+
properties:
68895+
ca_file:
68896+
description: Path to the Certificate Authority (CA) file used to validate the remote server's TLS certificate.
68897+
example: /path/to/ca.crt
68898+
type: string
68899+
crt_file:
68900+
description: Path to the TLS client certificate file used to identify this source to the remote server.
68901+
example: /path/to/client.crt
68902+
type: string
68903+
key_file:
68904+
description: Path to the private key file associated with the client certificate.
68905+
example: /path/to/client.key
68906+
type: string
68907+
key_pass_key:
68908+
description: Name of the environment variable or secret that holds the passphrase for the private key file.
68909+
example: WS_TLS_KEY_PASSPHRASE
68910+
type: string
68911+
mode:
68912+
$ref: "#/components/schemas/ObservabilityPipelineWebsocketSourceTlsWithClientCertMode"
68913+
required:
68914+
- mode
68915+
- crt_file
68916+
type: object
68917+
ObservabilityPipelineWebsocketSourceTlsWithClientCertMode:
68918+
description: TLS mode. Must be `with_client_cert`.
68919+
enum:
68920+
- with_client_cert
68921+
example: with_client_cert
68922+
type: string
68923+
x-enum-varnames:
68924+
- WITH_CLIENT_CERT
68925+
ObservabilityPipelineWebsocketSourceType:
68926+
default: websocket
68927+
description: The source type. The value should always be `websocket`.
68928+
enum:
68929+
- websocket
68930+
example: websocket
68931+
type: string
68932+
x-enum-varnames:
68933+
- WEBSOCKET
6881168934
OktaAPIToken:
6881268935
description: The definition of the `OktaAPIToken` object.
6881368936
properties:

docs/datadog_api_client.v2.model.rst

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28578,6 +28578,62 @@ datadog\_api\_client.v2.model.observability\_pipeline\_tls module
2857828578
:members:
2857928579
:show-inheritance:
2858028580

28581+
datadog\_api\_client.v2.model.observability\_pipeline\_websocket\_source module
28582+
-------------------------------------------------------------------------------
28583+
28584+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_websocket_source
28585+
:members:
28586+
:show-inheritance:
28587+
28588+
datadog\_api\_client.v2.model.observability\_pipeline\_websocket\_source\_auth\_strategy module
28589+
-----------------------------------------------------------------------------------------------
28590+
28591+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_websocket_source_auth_strategy
28592+
:members:
28593+
:show-inheritance:
28594+
28595+
datadog\_api\_client.v2.model.observability\_pipeline\_websocket\_source\_tls module
28596+
------------------------------------------------------------------------------------
28597+
28598+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_websocket_source_tls
28599+
:members:
28600+
:show-inheritance:
28601+
28602+
datadog\_api\_client.v2.model.observability\_pipeline\_websocket\_source\_tls\_enabled module
28603+
---------------------------------------------------------------------------------------------
28604+
28605+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_websocket_source_tls_enabled
28606+
:members:
28607+
:show-inheritance:
28608+
28609+
datadog\_api\_client.v2.model.observability\_pipeline\_websocket\_source\_tls\_enabled\_mode module
28610+
---------------------------------------------------------------------------------------------------
28611+
28612+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_websocket_source_tls_enabled_mode
28613+
:members:
28614+
:show-inheritance:
28615+
28616+
datadog\_api\_client.v2.model.observability\_pipeline\_websocket\_source\_tls\_with\_client\_cert module
28617+
--------------------------------------------------------------------------------------------------------
28618+
28619+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_websocket_source_tls_with_client_cert
28620+
:members:
28621+
:show-inheritance:
28622+
28623+
datadog\_api\_client.v2.model.observability\_pipeline\_websocket\_source\_tls\_with\_client\_cert\_mode module
28624+
--------------------------------------------------------------------------------------------------------------
28625+
28626+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_websocket_source_tls_with_client_cert_mode
28627+
:members:
28628+
:show-inheritance:
28629+
28630+
datadog\_api\_client.v2.model.observability\_pipeline\_websocket\_source\_type module
28631+
-------------------------------------------------------------------------------------
28632+
28633+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_websocket_source_type
28634+
:members:
28635+
:show-inheritance:
28636+
2858128637
datadog\_api\_client.v2.model.oci\_config module
2858228638
------------------------------------------------
2858328639

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
"""
2+
Validate an observability pipeline with websocket source bearer auth returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.observability_pipelines_api import ObservabilityPipelinesApi
7+
from datadog_api_client.v2.model.observability_pipeline_config import ObservabilityPipelineConfig
8+
from datadog_api_client.v2.model.observability_pipeline_config_processor_group import (
9+
ObservabilityPipelineConfigProcessorGroup,
10+
)
11+
from datadog_api_client.v2.model.observability_pipeline_data_attributes import ObservabilityPipelineDataAttributes
12+
from datadog_api_client.v2.model.observability_pipeline_datadog_logs_destination import (
13+
ObservabilityPipelineDatadogLogsDestination,
14+
)
15+
from datadog_api_client.v2.model.observability_pipeline_datadog_logs_destination_type import (
16+
ObservabilityPipelineDatadogLogsDestinationType,
17+
)
18+
from datadog_api_client.v2.model.observability_pipeline_decoding import ObservabilityPipelineDecoding
19+
from datadog_api_client.v2.model.observability_pipeline_filter_processor import ObservabilityPipelineFilterProcessor
20+
from datadog_api_client.v2.model.observability_pipeline_filter_processor_type import (
21+
ObservabilityPipelineFilterProcessorType,
22+
)
23+
from datadog_api_client.v2.model.observability_pipeline_spec import ObservabilityPipelineSpec
24+
from datadog_api_client.v2.model.observability_pipeline_spec_data import ObservabilityPipelineSpecData
25+
from datadog_api_client.v2.model.observability_pipeline_websocket_source import ObservabilityPipelineWebsocketSource
26+
from datadog_api_client.v2.model.observability_pipeline_websocket_source_auth_strategy import (
27+
ObservabilityPipelineWebsocketSourceAuthStrategy,
28+
)
29+
from datadog_api_client.v2.model.observability_pipeline_websocket_source_tls_enabled import (
30+
ObservabilityPipelineWebsocketSourceTlsEnabled,
31+
)
32+
from datadog_api_client.v2.model.observability_pipeline_websocket_source_tls_enabled_mode import (
33+
ObservabilityPipelineWebsocketSourceTlsEnabledMode,
34+
)
35+
from datadog_api_client.v2.model.observability_pipeline_websocket_source_type import (
36+
ObservabilityPipelineWebsocketSourceType,
37+
)
38+
39+
body = ObservabilityPipelineSpec(
40+
data=ObservabilityPipelineSpecData(
41+
attributes=ObservabilityPipelineDataAttributes(
42+
config=ObservabilityPipelineConfig(
43+
destinations=[
44+
ObservabilityPipelineDatadogLogsDestination(
45+
id="datadog-logs-destination",
46+
inputs=[
47+
"my-processor-group",
48+
],
49+
type=ObservabilityPipelineDatadogLogsDestinationType.DATADOG_LOGS,
50+
),
51+
],
52+
processor_groups=[
53+
ObservabilityPipelineConfigProcessorGroup(
54+
enabled=True,
55+
id="my-processor-group",
56+
include="service:my-service",
57+
inputs=[
58+
"websocket-source",
59+
],
60+
processors=[
61+
ObservabilityPipelineFilterProcessor(
62+
enabled=True,
63+
id="filter-processor",
64+
include="status:error",
65+
type=ObservabilityPipelineFilterProcessorType.FILTER,
66+
),
67+
],
68+
),
69+
],
70+
sources=[
71+
ObservabilityPipelineWebsocketSource(
72+
id="websocket-source",
73+
type=ObservabilityPipelineWebsocketSourceType.WEBSOCKET,
74+
decoding=ObservabilityPipelineDecoding.DECODE_JSON,
75+
auth_strategy=ObservabilityPipelineWebsocketSourceAuthStrategy.BEARER,
76+
token_key="WS_BEARER_TOKEN",
77+
uri_key="WS_URI",
78+
tls=ObservabilityPipelineWebsocketSourceTlsEnabled(
79+
mode=ObservabilityPipelineWebsocketSourceTlsEnabledMode.ENABLED,
80+
),
81+
),
82+
],
83+
),
84+
name="Pipeline with WebSocket Source",
85+
),
86+
type="pipelines",
87+
),
88+
)
89+
90+
configuration = Configuration()
91+
with ApiClient(configuration) as api_client:
92+
api_instance = ObservabilityPipelinesApi(api_client)
93+
response = api_instance.validate_pipeline(body=body)
94+
95+
print(response)

src/datadog_api_client/v2/model/observability_pipeline_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@
137137
ObservabilityPipelineSumoLogicSource,
138138
)
139139
from datadog_api_client.v2.model.observability_pipeline_syslog_ng_source import ObservabilityPipelineSyslogNgSource
140+
from datadog_api_client.v2.model.observability_pipeline_websocket_source import ObservabilityPipelineWebsocketSource
140141
from datadog_api_client.v2.model.observability_pipeline_opentelemetry_source import (
141142
ObservabilityPipelineOpentelemetrySource,
142143
)
@@ -229,6 +230,7 @@ def __init__(
229230
ObservabilityPipelineSplunkTcpSource,
230231
ObservabilityPipelineSumoLogicSource,
231232
ObservabilityPipelineSyslogNgSource,
233+
ObservabilityPipelineWebsocketSource,
232234
ObservabilityPipelineOpentelemetrySource,
233235
]
234236
],

src/datadog_api_client/v2/model/observability_pipeline_config_source_item.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ def __init__(self, **kwargs):
103103
This allows downstream components to forward the token to other Splunk HEC destinations.
104104
:type store_hec_token: bool, optional
105105
106+
:param uri_key: Name of the environment variable or secret that holds the WebSocket server URI (`ws://` or `wss://`).
107+
:type uri_key: str, optional
108+
106109
:param grpc_address_key: Environment variable name containing the gRPC server address for receiving OTLP data. Must be a valid environment variable name (alphanumeric characters and underscores only).
107110
:type grpc_address_key: str, optional
108111
@@ -160,6 +163,9 @@ def _composed_schemas(_):
160163
from datadog_api_client.v2.model.observability_pipeline_syslog_ng_source import (
161164
ObservabilityPipelineSyslogNgSource,
162165
)
166+
from datadog_api_client.v2.model.observability_pipeline_websocket_source import (
167+
ObservabilityPipelineWebsocketSource,
168+
)
163169
from datadog_api_client.v2.model.observability_pipeline_opentelemetry_source import (
164170
ObservabilityPipelineOpentelemetrySource,
165171
)
@@ -182,6 +188,7 @@ def _composed_schemas(_):
182188
ObservabilityPipelineSplunkTcpSource,
183189
ObservabilityPipelineSumoLogicSource,
184190
ObservabilityPipelineSyslogNgSource,
191+
ObservabilityPipelineWebsocketSource,
185192
ObservabilityPipelineOpentelemetrySource,
186193
],
187194
}

0 commit comments

Comments
 (0)