Skip to content

Commit 6262dd4

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 78e926e of spec repo
1 parent 5d69285 commit 6262dd4

12 files changed

Lines changed: 560 additions & 2 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50872,6 +50872,16 @@ components:
5087250872
description: Name of the environment variable or secret that holds the username (used when `auth_strategy` is `plain`).
5087350873
example: HTTP_AUTH_USERNAME
5087450874
type: string
50875+
valid_tokens:
50876+
description: |-
50877+
A list of tokens that are accepted for authenticating incoming HTTP requests. When set,
50878+
the source rejects any request whose token does not match an enabled entry in this list.
50879+
Cannot be combined with the `plain` auth strategy.
50880+
items:
50881+
$ref: "#/components/schemas/ObservabilityPipelineHttpServerSourceValidToken"
50882+
maxItems: 1000
50883+
minItems: 1
50884+
type: array
5087550885
required:
5087650886
- id
5087750887
- type
@@ -50897,6 +50907,55 @@ components:
5089750907
type: string
5089850908
x-enum-varnames:
5089950909
- HTTP_SERVER
50910+
ObservabilityPipelineHttpServerSourceValidToken:
50911+
description: An accepted token used to authenticate incoming HTTP server requests.
50912+
properties:
50913+
enabled:
50914+
default: true
50915+
description: |-
50916+
Indicates whether this token is currently accepted. Disabled tokens are rejected without
50917+
being removed from the configuration.
50918+
example: true
50919+
type: boolean
50920+
field_to_add:
50921+
$ref: "#/components/schemas/ObservabilityPipelineSourceValidTokenFieldToAdd"
50922+
path_to_token:
50923+
$ref: "#/components/schemas/ObservabilityPipelineHttpServerSourceValidTokenPathToToken"
50924+
token_key:
50925+
description: Name of the environment variable or secret that holds the expected token value.
50926+
example: HTTP_SERVER_TOKEN
50927+
pattern: "^[A-Za-z0-9_]+$"
50928+
type: string
50929+
required:
50930+
- token_key
50931+
type: object
50932+
ObservabilityPipelineHttpServerSourceValidTokenPathToToken:
50933+
description: |-
50934+
Specifies where the worker extracts the token from in the incoming HTTP request.
50935+
This can be either a built-in location (`path` or `address`) or an HTTP header object.
50936+
oneOf:
50937+
- $ref: "#/components/schemas/ObservabilityPipelineHttpServerSourceValidTokenPathToTokenLocation"
50938+
- $ref: "#/components/schemas/ObservabilityPipelineHttpServerSourceValidTokenPathToTokenHeader"
50939+
ObservabilityPipelineHttpServerSourceValidTokenPathToTokenHeader:
50940+
description: Extract the token from a specific HTTP request header.
50941+
properties:
50942+
header:
50943+
description: The name of the HTTP header that carries the token.
50944+
example: X-Token
50945+
type: string
50946+
required:
50947+
- header
50948+
type: object
50949+
ObservabilityPipelineHttpServerSourceValidTokenPathToTokenLocation:
50950+
description: Built-in token location on the incoming HTTP request.
50951+
enum:
50952+
- path
50953+
- address
50954+
example: path
50955+
type: string
50956+
x-enum-varnames:
50957+
- PATH
50958+
- ADDRESS
5090050959
ObservabilityPipelineKafkaDestination:
5090150960
description: |-
5090250961
The `kafka` destination sends logs to Apache Kafka topics.
@@ -52920,6 +52979,27 @@ components:
5292052979
type: string
5292152980
x-enum-varnames:
5292252981
- SOCKET
52982+
ObservabilityPipelineSourceValidTokenFieldToAdd:
52983+
description: |-
52984+
An optional metadata field that is attached to every event authenticated by the
52985+
associated token. Both `key` and `value` must match `^[A-Za-z0-9_]+$`.
52986+
properties:
52987+
key:
52988+
description: The metadata field name to add to incoming events.
52989+
example: token_name
52990+
maxLength: 256
52991+
pattern: "^[A-Za-z0-9_]+$"
52992+
type: string
52993+
value:
52994+
description: The metadata field value to add to incoming events.
52995+
example: my_token
52996+
maxLength: 1024
52997+
pattern: "^[A-Za-z0-9_]+$"
52998+
type: string
52999+
required:
53000+
- key
53001+
- value
53002+
type: object
5292353003
ObservabilityPipelineSpec:
5292453004
description: Input schema representing an observability pipeline configuration. Used in create and validate requests.
5292553005
properties:
@@ -53116,6 +53196,15 @@ components:
5311653196
$ref: "#/components/schemas/ObservabilityPipelineTls"
5311753197
type:
5311853198
$ref: "#/components/schemas/ObservabilityPipelineSplunkHecSourceType"
53199+
valid_tokens:
53200+
description: |-
53201+
A list of tokens that are accepted for authenticating incoming HEC requests. When set, the source
53202+
rejects any request whose HEC token does not match an enabled entry in this list.
53203+
items:
53204+
$ref: "#/components/schemas/ObservabilityPipelineSplunkHecSourceValidToken"
53205+
maxItems: 1000
53206+
minItems: 1
53207+
type: array
5311953208
required:
5312053209
- id
5312153210
- type
@@ -53130,6 +53219,26 @@ components:
5313053219
type: string
5313153220
x-enum-varnames:
5313253221
- SPLUNK_HEC
53222+
ObservabilityPipelineSplunkHecSourceValidToken:
53223+
description: An accepted HEC token used to authenticate incoming Splunk HEC requests.
53224+
properties:
53225+
enabled:
53226+
default: true
53227+
description: |-
53228+
Indicates whether this token is currently accepted. Disabled tokens are rejected without
53229+
being removed from the configuration.
53230+
example: true
53231+
type: boolean
53232+
field_to_add:
53233+
$ref: "#/components/schemas/ObservabilityPipelineSourceValidTokenFieldToAdd"
53234+
token_key:
53235+
description: Name of the environment variable or secret that holds the expected HEC token value.
53236+
example: SPLUNK_HEC_TOKEN
53237+
pattern: "^[A-Za-z0-9_]+$"
53238+
type: string
53239+
required:
53240+
- token_key
53241+
type: object
5313353242
ObservabilityPipelineSplunkTcpSource:
5313453243
description: |-
5313553244
The `splunk_tcp` source receives logs from a Splunk Universal Forwarder over TCP.

docs/datadog_api_client.v2.model.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21844,6 +21844,34 @@ datadog\_api\_client.v2.model.observability\_pipeline\_http\_server\_source\_typ
2184421844
:members:
2184521845
:show-inheritance:
2184621846

21847+
datadog\_api\_client.v2.model.observability\_pipeline\_http\_server\_source\_valid\_token module
21848+
------------------------------------------------------------------------------------------------
21849+
21850+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_http_server_source_valid_token
21851+
:members:
21852+
:show-inheritance:
21853+
21854+
datadog\_api\_client.v2.model.observability\_pipeline\_http\_server\_source\_valid\_token\_path\_to\_token module
21855+
-----------------------------------------------------------------------------------------------------------------
21856+
21857+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_http_server_source_valid_token_path_to_token
21858+
:members:
21859+
:show-inheritance:
21860+
21861+
datadog\_api\_client.v2.model.observability\_pipeline\_http\_server\_source\_valid\_token\_path\_to\_token\_header module
21862+
-------------------------------------------------------------------------------------------------------------------------
21863+
21864+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_http_server_source_valid_token_path_to_token_header
21865+
:members:
21866+
:show-inheritance:
21867+
21868+
datadog\_api\_client.v2.model.observability\_pipeline\_http\_server\_source\_valid\_token\_path\_to\_token\_location module
21869+
---------------------------------------------------------------------------------------------------------------------------
21870+
21871+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_http_server_source_valid_token_path_to_token_location
21872+
:members:
21873+
:show-inheritance:
21874+
2184721875
datadog\_api\_client.v2.model.observability\_pipeline\_kafka\_destination module
2184821876
--------------------------------------------------------------------------------
2184921877

@@ -22719,6 +22747,13 @@ datadog\_api\_client.v2.model.observability\_pipeline\_socket\_source\_type modu
2271922747
:members:
2272022748
:show-inheritance:
2272122749

22750+
datadog\_api\_client.v2.model.observability\_pipeline\_source\_valid\_token\_field\_to\_add module
22751+
--------------------------------------------------------------------------------------------------
22752+
22753+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_source_valid_token_field_to_add
22754+
:members:
22755+
:show-inheritance:
22756+
2272222757
datadog\_api\_client.v2.model.observability\_pipeline\_spec module
2272322758
------------------------------------------------------------------
2272422759

@@ -22796,6 +22831,13 @@ datadog\_api\_client.v2.model.observability\_pipeline\_splunk\_hec\_source\_type
2279622831
:members:
2279722832
:show-inheritance:
2279822833

22834+
datadog\_api\_client.v2.model.observability\_pipeline\_splunk\_hec\_source\_valid\_token module
22835+
-----------------------------------------------------------------------------------------------
22836+
22837+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_splunk_hec_source_valid_token
22838+
:members:
22839+
:show-inheritance:
22840+
2279922841
datadog\_api\_client.v2.model.observability\_pipeline\_splunk\_tcp\_source module
2280022842
---------------------------------------------------------------------------------
2280122843

src/datadog_api_client/v2/model/observability_pipeline_config_source_item.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ def __init__(self, **kwargs):
7373
:param username_key: Name of the environment variable or secret that holds the username (used when `auth_strategy` is `basic`).
7474
:type username_key: str, optional
7575
76+
:param valid_tokens: A list of tokens that are accepted for authenticating incoming HTTP requests. When set,
77+
the source rejects any request whose token does not match an enabled entry in this list.
78+
Cannot be combined with the `plain` auth strategy.
79+
:type valid_tokens: [ObservabilityPipelineHttpServerSourceValidToken], optional
80+
7681
:param bootstrap_servers_key: Name of the environment variable or secret that holds the Kafka bootstrap servers list.
7782
:type bootstrap_servers_key: str, optional
7883

src/datadog_api_client/v2/model/observability_pipeline_http_server_source.py

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

6-
from typing import Union, TYPE_CHECKING
6+
from typing import List, Union, TYPE_CHECKING
77

88
from datadog_api_client.model_utils import (
99
ModelNormal,
@@ -22,9 +22,19 @@
2222
from datadog_api_client.v2.model.observability_pipeline_http_server_source_type import (
2323
ObservabilityPipelineHttpServerSourceType,
2424
)
25+
from datadog_api_client.v2.model.observability_pipeline_http_server_source_valid_token import (
26+
ObservabilityPipelineHttpServerSourceValidToken,
27+
)
2528

2629

2730
class ObservabilityPipelineHttpServerSource(ModelNormal):
31+
validations = {
32+
"valid_tokens": {
33+
"max_items": 1000,
34+
"min_items": 1,
35+
},
36+
}
37+
2838
@cached_property
2939
def openapi_types(_):
3040
from datadog_api_client.v2.model.observability_pipeline_http_server_source_auth_strategy import (
@@ -35,6 +45,9 @@ def openapi_types(_):
3545
from datadog_api_client.v2.model.observability_pipeline_http_server_source_type import (
3646
ObservabilityPipelineHttpServerSourceType,
3747
)
48+
from datadog_api_client.v2.model.observability_pipeline_http_server_source_valid_token import (
49+
ObservabilityPipelineHttpServerSourceValidToken,
50+
)
3851

3952
return {
4053
"address_key": (str,),
@@ -46,6 +59,7 @@ def openapi_types(_):
4659
"tls": (ObservabilityPipelineTls,),
4760
"type": (ObservabilityPipelineHttpServerSourceType,),
4861
"username_key": (str,),
62+
"valid_tokens": ([ObservabilityPipelineHttpServerSourceValidToken],),
4963
}
5064

5165
attribute_map = {
@@ -58,6 +72,7 @@ def openapi_types(_):
5872
"tls": "tls",
5973
"type": "type",
6074
"username_key": "username_key",
75+
"valid_tokens": "valid_tokens",
6176
}
6277

6378
def __init__(
@@ -71,6 +86,7 @@ def __init__(
7186
password_key: Union[str, UnsetType] = unset,
7287
tls: Union[ObservabilityPipelineTls, UnsetType] = unset,
7388
username_key: Union[str, UnsetType] = unset,
89+
valid_tokens: Union[List[ObservabilityPipelineHttpServerSourceValidToken], UnsetType] = unset,
7490
**kwargs,
7591
):
7692
"""
@@ -104,6 +120,11 @@ def __init__(
104120
105121
:param username_key: Name of the environment variable or secret that holds the username (used when ``auth_strategy`` is ``plain`` ).
106122
:type username_key: str, optional
123+
124+
:param valid_tokens: A list of tokens that are accepted for authenticating incoming HTTP requests. When set,
125+
the source rejects any request whose token does not match an enabled entry in this list.
126+
Cannot be combined with the ``plain`` auth strategy.
127+
:type valid_tokens: [ObservabilityPipelineHttpServerSourceValidToken], optional
107128
"""
108129
if address_key is not unset:
109130
kwargs["address_key"] = address_key
@@ -115,6 +136,8 @@ def __init__(
115136
kwargs["tls"] = tls
116137
if username_key is not unset:
117138
kwargs["username_key"] = username_key
139+
if valid_tokens is not unset:
140+
kwargs["valid_tokens"] = valid_tokens
118141
super().__init__(kwargs)
119142

120143
self_.auth_strategy = auth_strategy
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
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, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
if TYPE_CHECKING:
17+
from datadog_api_client.v2.model.observability_pipeline_source_valid_token_field_to_add import (
18+
ObservabilityPipelineSourceValidTokenFieldToAdd,
19+
)
20+
from datadog_api_client.v2.model.observability_pipeline_http_server_source_valid_token_path_to_token import (
21+
ObservabilityPipelineHttpServerSourceValidTokenPathToToken,
22+
)
23+
from datadog_api_client.v2.model.observability_pipeline_http_server_source_valid_token_path_to_token_header import (
24+
ObservabilityPipelineHttpServerSourceValidTokenPathToTokenHeader,
25+
)
26+
27+
28+
class ObservabilityPipelineHttpServerSourceValidToken(ModelNormal):
29+
validations = {
30+
"token_key": {},
31+
}
32+
33+
@cached_property
34+
def openapi_types(_):
35+
from datadog_api_client.v2.model.observability_pipeline_source_valid_token_field_to_add import (
36+
ObservabilityPipelineSourceValidTokenFieldToAdd,
37+
)
38+
from datadog_api_client.v2.model.observability_pipeline_http_server_source_valid_token_path_to_token import (
39+
ObservabilityPipelineHttpServerSourceValidTokenPathToToken,
40+
)
41+
42+
return {
43+
"enabled": (bool,),
44+
"field_to_add": (ObservabilityPipelineSourceValidTokenFieldToAdd,),
45+
"path_to_token": (ObservabilityPipelineHttpServerSourceValidTokenPathToToken,),
46+
"token_key": (str,),
47+
}
48+
49+
attribute_map = {
50+
"enabled": "enabled",
51+
"field_to_add": "field_to_add",
52+
"path_to_token": "path_to_token",
53+
"token_key": "token_key",
54+
}
55+
56+
def __init__(
57+
self_,
58+
token_key: str,
59+
enabled: Union[bool, UnsetType] = unset,
60+
field_to_add: Union[ObservabilityPipelineSourceValidTokenFieldToAdd, UnsetType] = unset,
61+
path_to_token: Union[
62+
ObservabilityPipelineHttpServerSourceValidTokenPathToToken,
63+
str,
64+
ObservabilityPipelineHttpServerSourceValidTokenPathToTokenHeader,
65+
UnsetType,
66+
] = unset,
67+
**kwargs,
68+
):
69+
"""
70+
An accepted token used to authenticate incoming HTTP server requests.
71+
72+
:param enabled: Indicates whether this token is currently accepted. Disabled tokens are rejected without
73+
being removed from the configuration.
74+
:type enabled: bool, optional
75+
76+
:param field_to_add: An optional metadata field that is attached to every event authenticated by the
77+
associated token. Both ``key`` and ``value`` must match ``^[A-Za-z0-9_]+$``.
78+
:type field_to_add: ObservabilityPipelineSourceValidTokenFieldToAdd, optional
79+
80+
:param path_to_token: Specifies where the worker extracts the token from in the incoming HTTP request.
81+
This can be either a built-in location ( ``path`` or ``address`` ) or an HTTP header object.
82+
:type path_to_token: ObservabilityPipelineHttpServerSourceValidTokenPathToToken, optional
83+
84+
:param token_key: Name of the environment variable or secret that holds the expected token value.
85+
:type token_key: str
86+
"""
87+
if enabled is not unset:
88+
kwargs["enabled"] = enabled
89+
if field_to_add is not unset:
90+
kwargs["field_to_add"] = field_to_add
91+
if path_to_token is not unset:
92+
kwargs["path_to_token"] = path_to_token
93+
super().__init__(kwargs)
94+
95+
self_.token_key = token_key

0 commit comments

Comments
 (0)