Skip to content

Commit cc26f68

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit dde5309 of spec repo
1 parent 7b859dc commit cc26f68

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
@@ -48659,6 +48659,16 @@ components:
4865948659
description: Name of the environment variable or secret that holds the username (used when `auth_strategy` is `plain`).
4866048660
example: HTTP_AUTH_USERNAME
4866148661
type: string
48662+
valid_tokens:
48663+
description: |-
48664+
A list of tokens that are accepted for authenticating incoming HTTP requests. When set,
48665+
the source rejects any request whose token does not match an enabled entry in this list.
48666+
Cannot be combined with the `plain` auth strategy.
48667+
items:
48668+
$ref: "#/components/schemas/ObservabilityPipelineHttpServerSourceValidToken"
48669+
maxItems: 1000
48670+
minItems: 1
48671+
type: array
4866248672
required:
4866348673
- id
4866448674
- type
@@ -48684,6 +48694,55 @@ components:
4868448694
type: string
4868548695
x-enum-varnames:
4868648696
- HTTP_SERVER
48697+
ObservabilityPipelineHttpServerSourceValidToken:
48698+
description: An accepted token used to authenticate incoming HTTP server requests.
48699+
properties:
48700+
enabled:
48701+
default: true
48702+
description: |-
48703+
Whether this token is currently accepted. Disabled tokens are rejected without
48704+
being removed from the configuration.
48705+
example: true
48706+
type: boolean
48707+
field_to_add:
48708+
$ref: "#/components/schemas/ObservabilityPipelineSourceValidTokenFieldToAdd"
48709+
path_to_token:
48710+
$ref: "#/components/schemas/ObservabilityPipelineHttpServerSourceValidTokenPathToToken"
48711+
token_key:
48712+
description: Name of the environment variable or secret that holds the expected token value.
48713+
example: HTTP_SERVER_TOKEN
48714+
pattern: "^[A-Za-z0-9_]+$"
48715+
type: string
48716+
required:
48717+
- token_key
48718+
type: object
48719+
ObservabilityPipelineHttpServerSourceValidTokenPathToToken:
48720+
description: |-
48721+
Specifies where the worker extracts the token from in the incoming HTTP request.
48722+
Either a built-in location (`path` or `address`) or an HTTP header object.
48723+
oneOf:
48724+
- $ref: "#/components/schemas/ObservabilityPipelineHttpServerSourceValidTokenPathToTokenLocation"
48725+
- $ref: "#/components/schemas/ObservabilityPipelineHttpServerSourceValidTokenPathToTokenHeader"
48726+
ObservabilityPipelineHttpServerSourceValidTokenPathToTokenHeader:
48727+
description: Extract the token from a specific HTTP request header.
48728+
properties:
48729+
header:
48730+
description: The name of the HTTP header that carries the token.
48731+
example: X-Token
48732+
type: string
48733+
required:
48734+
- header
48735+
type: object
48736+
ObservabilityPipelineHttpServerSourceValidTokenPathToTokenLocation:
48737+
description: Built-in token location on the incoming HTTP request.
48738+
enum:
48739+
- path
48740+
- address
48741+
example: path
48742+
type: string
48743+
x-enum-varnames:
48744+
- PATH
48745+
- ADDRESS
4868748746
ObservabilityPipelineKafkaDestination:
4868848747
description: |-
4868948748
The `kafka` destination sends logs to Apache Kafka topics.
@@ -50707,6 +50766,27 @@ components:
5070750766
type: string
5070850767
x-enum-varnames:
5070950768
- SOCKET
50769+
ObservabilityPipelineSourceValidTokenFieldToAdd:
50770+
description: |-
50771+
An optional metadata field that is attached to every event authenticated by the
50772+
associated token. Both `key` and `value` must match `^[A-Za-z0-9_]+$`.
50773+
properties:
50774+
key:
50775+
description: The metadata field name to add to incoming events.
50776+
example: token_name
50777+
maxLength: 256
50778+
pattern: "^[A-Za-z0-9_]+$"
50779+
type: string
50780+
value:
50781+
description: The metadata field value to add to incoming events.
50782+
example: my_token
50783+
maxLength: 1024
50784+
pattern: "^[A-Za-z0-9_]+$"
50785+
type: string
50786+
required:
50787+
- key
50788+
- value
50789+
type: object
5071050790
ObservabilityPipelineSpec:
5071150791
description: Input schema representing an observability pipeline configuration. Used in create and validate requests.
5071250792
properties:
@@ -50903,6 +50983,15 @@ components:
5090350983
$ref: "#/components/schemas/ObservabilityPipelineTls"
5090450984
type:
5090550985
$ref: "#/components/schemas/ObservabilityPipelineSplunkHecSourceType"
50986+
valid_tokens:
50987+
description: |-
50988+
A list of tokens that are accepted for authenticating incoming HEC requests. When set, the source
50989+
rejects any request whose HEC token does not match an enabled entry in this list.
50990+
items:
50991+
$ref: "#/components/schemas/ObservabilityPipelineSplunkHecSourceValidToken"
50992+
maxItems: 1000
50993+
minItems: 1
50994+
type: array
5090650995
required:
5090750996
- id
5090850997
- type
@@ -50917,6 +51006,26 @@ components:
5091751006
type: string
5091851007
x-enum-varnames:
5091951008
- SPLUNK_HEC
51009+
ObservabilityPipelineSplunkHecSourceValidToken:
51010+
description: An accepted HEC token used to authenticate incoming Splunk HEC requests.
51011+
properties:
51012+
enabled:
51013+
default: true
51014+
description: |-
51015+
Whether this token is currently accepted. Disabled tokens are rejected without
51016+
being removed from the configuration.
51017+
example: true
51018+
type: boolean
51019+
field_to_add:
51020+
$ref: "#/components/schemas/ObservabilityPipelineSourceValidTokenFieldToAdd"
51021+
token_key:
51022+
description: Name of the environment variable or secret that holds the expected HEC token value.
51023+
example: SPLUNK_HEC_TOKEN
51024+
pattern: "^[A-Za-z0-9_]+$"
51025+
type: string
51026+
required:
51027+
- token_key
51028+
type: object
5092051029
ObservabilityPipelineSplunkTcpSource:
5092151030
description: |-
5092251031
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
@@ -21074,6 +21074,34 @@ datadog\_api\_client.v2.model.observability\_pipeline\_http\_server\_source\_typ
2107421074
:members:
2107521075
:show-inheritance:
2107621076

21077+
datadog\_api\_client.v2.model.observability\_pipeline\_http\_server\_source\_valid\_token module
21078+
------------------------------------------------------------------------------------------------
21079+
21080+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_http_server_source_valid_token
21081+
:members:
21082+
:show-inheritance:
21083+
21084+
datadog\_api\_client.v2.model.observability\_pipeline\_http\_server\_source\_valid\_token\_path\_to\_token module
21085+
-----------------------------------------------------------------------------------------------------------------
21086+
21087+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_http_server_source_valid_token_path_to_token
21088+
:members:
21089+
:show-inheritance:
21090+
21091+
datadog\_api\_client.v2.model.observability\_pipeline\_http\_server\_source\_valid\_token\_path\_to\_token\_header module
21092+
-------------------------------------------------------------------------------------------------------------------------
21093+
21094+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_http_server_source_valid_token_path_to_token_header
21095+
:members:
21096+
:show-inheritance:
21097+
21098+
datadog\_api\_client.v2.model.observability\_pipeline\_http\_server\_source\_valid\_token\_path\_to\_token\_location module
21099+
---------------------------------------------------------------------------------------------------------------------------
21100+
21101+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_http_server_source_valid_token_path_to_token_location
21102+
:members:
21103+
:show-inheritance:
21104+
2107721105
datadog\_api\_client.v2.model.observability\_pipeline\_kafka\_destination module
2107821106
--------------------------------------------------------------------------------
2107921107

@@ -21949,6 +21977,13 @@ datadog\_api\_client.v2.model.observability\_pipeline\_socket\_source\_type modu
2194921977
:members:
2195021978
:show-inheritance:
2195121979

21980+
datadog\_api\_client.v2.model.observability\_pipeline\_source\_valid\_token\_field\_to\_add module
21981+
--------------------------------------------------------------------------------------------------
21982+
21983+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_source_valid_token_field_to_add
21984+
:members:
21985+
:show-inheritance:
21986+
2195221987
datadog\_api\_client.v2.model.observability\_pipeline\_spec module
2195321988
------------------------------------------------------------------
2195421989

@@ -22026,6 +22061,13 @@ datadog\_api\_client.v2.model.observability\_pipeline\_splunk\_hec\_source\_type
2202622061
:members:
2202722062
:show-inheritance:
2202822063

22064+
datadog\_api\_client.v2.model.observability\_pipeline\_splunk\_hec\_source\_valid\_token module
22065+
-----------------------------------------------------------------------------------------------
22066+
22067+
.. automodule:: datadog_api_client.v2.model.observability_pipeline_splunk_hec_source_valid_token
22068+
:members:
22069+
:show-inheritance:
22070+
2202922071
datadog\_api\_client.v2.model.observability\_pipeline\_splunk\_tcp\_source module
2203022072
---------------------------------------------------------------------------------
2203122073

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: 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+
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)