diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 715f38f30c74..bb37f6e74302 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -6683,6 +6683,9 @@ components: A pipeline can contain Nested Pipelines and Processors whereas a Nested Pipeline can only contain Processors.' properties: + description: + description: A description of the pipeline. + type: string filter: $ref: '#/components/schemas/LogsFilter' is_enabled: @@ -6697,6 +6700,12 @@ components: items: $ref: '#/components/schemas/LogsProcessor' type: array + tags: + description: A list of tags associated with the pipeline. + items: + description: A single tag using the format `key:value`. + type: string + type: array type: $ref: '#/components/schemas/LogsPipelineProcessorType' required: diff --git a/cassettes/features/v1/logs_pipelines/Create-a-pipeline-with-nested-pipeline-processor-returns-OK-response.frozen b/cassettes/features/v1/logs_pipelines/Create-a-pipeline-with-nested-pipeline-processor-returns-OK-response.frozen new file mode 100644 index 000000000000..4db6fe406273 --- /dev/null +++ b/cassettes/features/v1/logs_pipelines/Create-a-pipeline-with-nested-pipeline-processor-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-03-18T17:10:40.108Z \ No newline at end of file diff --git a/cassettes/features/v1/logs_pipelines/Create-a-pipeline-with-nested-pipeline-processor-returns-OK-response.yml b/cassettes/features/v1/logs_pipelines/Create-a-pipeline-with-nested-pipeline-processor-returns-OK-response.yml new file mode 100644 index 000000000000..2450e8a7cce0 --- /dev/null +++ b/cassettes/features/v1/logs_pipelines/Create-a-pipeline-with-nested-pipeline-processor-returns-OK-response.yml @@ -0,0 +1,50 @@ +http_interactions: +- recorded_at: Wed, 18 Mar 2026 17:10:40 GMT + request: + body: + encoding: UTF-8 + string: '{"description":"Pipeline containing nested processor with tags and + description","filter":{"query":"source:python"},"name":"testPipelineWithNested","processors":[{"description":"This + is a nested pipeline for production logs","filter":{"query":"env:production"},"is_enabled":true,"name":"nested_pipeline_with_metadata","tags":["env:prod","type:nested"],"type":"pipeline"}],"tags":["team:test"]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/logs/config/pipelines + response: + body: + encoding: UTF-8 + string: '{"id":"GyYNpCrVQtOB3KhqJSpOOA","type":"pipeline","name":"testPipelineWithNested","is_enabled":false,"is_read_only":false,"filter":{"query":"source:python"},"processors":[{"type":"pipeline","name":"nested_pipeline_with_metadata","is_enabled":true,"filter":{"query":"env:production"},"processors":[],"tags":["env:prod","type:nested"],"description":"This + is a nested pipeline for production logs"}],"tags":["team:test"],"description":"Pipeline + containing nested processor with tags and description"} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 18 Mar 2026 17:10:40 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v1/logs/config/pipelines/GyYNpCrVQtOB3KhqJSpOOA + response: + body: + encoding: UTF-8 + string: '{} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/examples/v1/logs-pipelines/CreateLogsPipeline_2599033345.rb b/examples/v1/logs-pipelines/CreateLogsPipeline_2599033345.rb new file mode 100644 index 000000000000..2275aec1a743 --- /dev/null +++ b/examples/v1/logs-pipelines/CreateLogsPipeline_2599033345.rb @@ -0,0 +1,31 @@ +# Create a pipeline with nested pipeline processor returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V1::LogsPipelinesAPI.new + +body = DatadogAPIClient::V1::LogsPipeline.new({ + filter: DatadogAPIClient::V1::LogsFilter.new({ + query: "source:python", + }), + name: "testPipelineWithNested", + processors: [ + DatadogAPIClient::V1::LogsPipelineProcessor.new({ + type: DatadogAPIClient::V1::LogsPipelineProcessorType::PIPELINE, + is_enabled: true, + name: "nested_pipeline_with_metadata", + filter: DatadogAPIClient::V1::LogsFilter.new({ + query: "env:production", + }), + tags: [ + "env:prod", + "type:nested", + ], + description: "This is a nested pipeline for production logs", + }), + ], + tags: [ + "team:test", + ], + description: "Pipeline containing nested processor with tags and description", +}) +p api_instance.create_logs_pipeline(body) diff --git a/features/v1/logs_pipelines.feature b/features/v1/logs_pipelines.feature index 5f7dde5db679..00b7369e2317 100644 --- a/features/v1/logs_pipelines.feature +++ b/features/v1/logs_pipelines.feature @@ -98,6 +98,13 @@ Feature: Logs Pipelines When the request is sent Then the response status is 200 OK + @team:DataDog/event-platform-experience + Scenario: Create a pipeline with nested pipeline processor returns "OK" response + Given new "CreateLogsPipeline" request + And body with value {"filter": {"query": "source:python"}, "name": "testPipelineWithNested", "processors": [{"type": "pipeline", "is_enabled": true, "name": "nested_pipeline_with_metadata", "filter": {"query": "env:production"}, "tags": ["env:prod", "type:nested"], "description": "This is a nested pipeline for production logs"}], "tags": ["team:test"], "description": "Pipeline containing nested processor with tags and description"} + When the request is sent + Then the response status is 200 OK + @team:DataDog/event-platform-experience Scenario: Create a pipeline with schema processor Given new "CreateLogsPipeline" request diff --git a/lib/datadog_api_client/v1/models/logs_pipeline_processor.rb b/lib/datadog_api_client/v1/models/logs_pipeline_processor.rb index 760f037e02d5..3f4f33696fd4 100644 --- a/lib/datadog_api_client/v1/models/logs_pipeline_processor.rb +++ b/lib/datadog_api_client/v1/models/logs_pipeline_processor.rb @@ -25,6 +25,9 @@ module DatadogAPIClient::V1 class LogsPipelineProcessor include BaseGenericModel + # A description of the pipeline. + attr_accessor :description + # Filter for logs. attr_accessor :filter @@ -37,6 +40,9 @@ class LogsPipelineProcessor # Ordered list of processors in this pipeline. attr_accessor :processors + # A list of tags associated with the pipeline. + attr_accessor :tags + # Type of logs pipeline processor. attr_reader :type @@ -46,10 +52,12 @@ class LogsPipelineProcessor # @!visibility private def self.attribute_map { + :'description' => :'description', :'filter' => :'filter', :'is_enabled' => :'is_enabled', :'name' => :'name', :'processors' => :'processors', + :'tags' => :'tags', :'type' => :'type' } end @@ -58,10 +66,12 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'description' => :'String', :'filter' => :'LogsFilter', :'is_enabled' => :'Boolean', :'name' => :'String', :'processors' => :'Array', + :'tags' => :'Array', :'type' => :'LogsPipelineProcessorType' } end @@ -84,6 +94,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + if attributes.key?(:'filter') self.filter = attributes[:'filter'] end @@ -102,6 +116,12 @@ def initialize(attributes = {}) end end + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + if attributes.key?(:'type') self.type = attributes[:'type'] end @@ -151,10 +171,12 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + description == o.description && filter == o.filter && is_enabled == o.is_enabled && name == o.name && processors == o.processors && + tags == o.tags && type == o.type && additional_properties == o.additional_properties end @@ -163,7 +185,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [filter, is_enabled, name, processors, type, additional_properties].hash + [description, filter, is_enabled, name, processors, tags, type, additional_properties].hash end end end