Skip to content

Commit 19bd08a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 78e926e of spec repo
1 parent 722ca35 commit 19bd08a

10 files changed

Lines changed: 870 additions & 6 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.

lib/datadog_api_client/inflector.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4207,6 +4207,10 @@ def overrides
42074207
"v2.observability_pipeline_http_server_source" => "ObservabilityPipelineHttpServerSource",
42084208
"v2.observability_pipeline_http_server_source_auth_strategy" => "ObservabilityPipelineHttpServerSourceAuthStrategy",
42094209
"v2.observability_pipeline_http_server_source_type" => "ObservabilityPipelineHttpServerSourceType",
4210+
"v2.observability_pipeline_http_server_source_valid_token" => "ObservabilityPipelineHttpServerSourceValidToken",
4211+
"v2.observability_pipeline_http_server_source_valid_token_path_to_token" => "ObservabilityPipelineHttpServerSourceValidTokenPathToToken",
4212+
"v2.observability_pipeline_http_server_source_valid_token_path_to_token_header" => "ObservabilityPipelineHttpServerSourceValidTokenPathToTokenHeader",
4213+
"v2.observability_pipeline_http_server_source_valid_token_path_to_token_location" => "ObservabilityPipelineHttpServerSourceValidTokenPathToTokenLocation",
42104214
"v2.observability_pipeline_kafka_destination" => "ObservabilityPipelineKafkaDestination",
42114215
"v2.observability_pipeline_kafka_destination_compression" => "ObservabilityPipelineKafkaDestinationCompression",
42124216
"v2.observability_pipeline_kafka_destination_encoding" => "ObservabilityPipelineKafkaDestinationEncoding",
@@ -4332,6 +4336,7 @@ def overrides
43324336
"v2.observability_pipeline_socket_source_framing_octet_counting_method" => "ObservabilityPipelineSocketSourceFramingOctetCountingMethod",
43334337
"v2.observability_pipeline_socket_source_mode" => "ObservabilityPipelineSocketSourceMode",
43344338
"v2.observability_pipeline_socket_source_type" => "ObservabilityPipelineSocketSourceType",
4339+
"v2.observability_pipeline_source_valid_token_field_to_add" => "ObservabilityPipelineSourceValidTokenFieldToAdd",
43354340
"v2.observability_pipeline_spec" => "ObservabilityPipelineSpec",
43364341
"v2.observability_pipeline_spec_data" => "ObservabilityPipelineSpecData",
43374342
"v2.observability_pipeline_split_array_processor" => "ObservabilityPipelineSplitArrayProcessor",
@@ -4343,6 +4348,7 @@ def overrides
43434348
"v2.observability_pipeline_splunk_hec_destination_type" => "ObservabilityPipelineSplunkHecDestinationType",
43444349
"v2.observability_pipeline_splunk_hec_source" => "ObservabilityPipelineSplunkHecSource",
43454350
"v2.observability_pipeline_splunk_hec_source_type" => "ObservabilityPipelineSplunkHecSourceType",
4351+
"v2.observability_pipeline_splunk_hec_source_valid_token" => "ObservabilityPipelineSplunkHecSourceValidToken",
43464352
"v2.observability_pipeline_splunk_tcp_source" => "ObservabilityPipelineSplunkTcpSource",
43474353
"v2.observability_pipeline_splunk_tcp_source_type" => "ObservabilityPipelineSplunkTcpSourceType",
43484354
"v2.observability_pipeline_sumo_logic_destination" => "ObservabilityPipelineSumoLogicDestination",

lib/datadog_api_client/v2/models/observability_pipeline_http_server_source.rb

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ class ObservabilityPipelineHttpServerSource
5050
# Name of the environment variable or secret that holds the username (used when `auth_strategy` is `plain`).
5151
attr_accessor :username_key
5252

53+
# A list of tokens that are accepted for authenticating incoming HTTP requests. When set,
54+
# the source rejects any request whose token does not match an enabled entry in this list.
55+
# Cannot be combined with the `plain` auth strategy.
56+
attr_reader :valid_tokens
57+
5358
attr_accessor :additional_properties
5459

5560
# Attribute mapping from ruby-style variable name to JSON key.
@@ -64,7 +69,8 @@ def self.attribute_map
6469
:'password_key' => :'password_key',
6570
:'tls' => :'tls',
6671
:'type' => :'type',
67-
:'username_key' => :'username_key'
72+
:'username_key' => :'username_key',
73+
:'valid_tokens' => :'valid_tokens'
6874
}
6975
end
7076

@@ -80,7 +86,8 @@ def self.openapi_types
8086
:'password_key' => :'String',
8187
:'tls' => :'ObservabilityPipelineTls',
8288
:'type' => :'ObservabilityPipelineHttpServerSourceType',
83-
:'username_key' => :'String'
89+
:'username_key' => :'String',
90+
:'valid_tokens' => :'Array<ObservabilityPipelineHttpServerSourceValidToken>'
8491
}
8592
end
8693

@@ -137,6 +144,12 @@ def initialize(attributes = {})
137144
if attributes.key?(:'username_key')
138145
self.username_key = attributes[:'username_key']
139146
end
147+
148+
if attributes.key?(:'valid_tokens')
149+
if (value = attributes[:'valid_tokens']).is_a?(Array)
150+
self.valid_tokens = value
151+
end
152+
end
140153
end
141154

142155
# Check to see if the all the properties in the model are valid
@@ -147,6 +160,8 @@ def valid?
147160
return false if @decoding.nil?
148161
return false if @id.nil?
149162
return false if @type.nil?
163+
return false if !@valid_tokens.nil? && @valid_tokens.length > 1000
164+
return false if !@valid_tokens.nil? && @valid_tokens.length < 1
150165
true
151166
end
152167

@@ -190,6 +205,19 @@ def type=(type)
190205
@type = type
191206
end
192207

208+
# Custom attribute writer method with validation
209+
# @param valid_tokens [Object] Object to be assigned
210+
# @!visibility private
211+
def valid_tokens=(valid_tokens)
212+
if !valid_tokens.nil? && valid_tokens.length > 1000
213+
fail ArgumentError, 'invalid value for "valid_tokens", number of items must be less than or equal to 1000.'
214+
end
215+
if !valid_tokens.nil? && valid_tokens.length < 1
216+
fail ArgumentError, 'invalid value for "valid_tokens", number of items must be greater than or equal to 1.'
217+
end
218+
@valid_tokens = valid_tokens
219+
end
220+
193221
# Returns the object in the form of hash, with additionalProperties support.
194222
# @return [Hash] Returns the object in the form of hash
195223
# @!visibility private
@@ -225,14 +253,15 @@ def ==(o)
225253
tls == o.tls &&
226254
type == o.type &&
227255
username_key == o.username_key &&
256+
valid_tokens == o.valid_tokens &&
228257
additional_properties == o.additional_properties
229258
end
230259

231260
# Calculates hash code according to all attributes.
232261
# @return [Integer] Hash code
233262
# @!visibility private
234263
def hash
235-
[address_key, auth_strategy, custom_key, decoding, id, password_key, tls, type, username_key, additional_properties].hash
264+
[address_key, auth_strategy, custom_key, decoding, id, password_key, tls, type, username_key, valid_tokens, additional_properties].hash
236265
end
237266
end
238267
end

0 commit comments

Comments
 (0)