Skip to content

Commit 1ab91a9

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Add tags and description to logs pipelines (#2374)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 6970527 commit 1ab91a9

File tree

6 files changed

+35
-8
lines changed

6 files changed

+35
-8
lines changed

Diff for: .apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-01-23 20:46:00.158208",
8-
"spec_repo_commit": "2350cf2b"
7+
"regenerated": "2025-01-23 21:37:44.264707",
8+
"spec_repo_commit": "ff83ed06"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-01-23 20:46:00.172961",
13-
"spec_repo_commit": "2350cf2b"
12+
"regenerated": "2025-01-23 21:37:44.282504",
13+
"spec_repo_commit": "ff83ed06"
1414
}
1515
}
1616
}

Diff for: .generator/schemas/v1/openapi.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -5926,6 +5926,9 @@ components:
59265926

59275927
Make sure to use an application key created by an admin.'
59285928
properties:
5929+
description:
5930+
description: A description of the pipeline.
5931+
type: string
59295932
filter:
59305933
$ref: '#/components/schemas/LogsFilter'
59315934
id:
@@ -5948,6 +5951,12 @@ components:
59485951
items:
59495952
$ref: '#/components/schemas/LogsProcessor'
59505953
type: array
5954+
tags:
5955+
description: A list of tags associated with the pipeline.
5956+
items:
5957+
description: A single tag using the format `key:value`.
5958+
type: string
5959+
type: array
59515960
type:
59525961
description: Type of pipeline.
59535962
example: pipeline

Diff for: examples/v1/logs-pipelines/CreateLogsPipeline.py

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
type=LogsGrokParserType.GROK_PARSER,
2828
),
2929
],
30+
tags=[],
3031
)
3132

3233
configuration = Configuration()

Diff for: examples/v1/logs-pipelines/UpdateLogsPipeline.py

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
type=LogsGrokParserType.GROK_PARSER,
2828
),
2929
],
30+
tags=[],
3031
)
3132

3233
configuration = Configuration()

Diff for: src/datadog_api_client/v1/model/logs_pipeline.py

+16
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,26 @@ def openapi_types(_):
4141
from datadog_api_client.v1.model.logs_processor import LogsProcessor
4242

4343
return {
44+
"description": (str,),
4445
"filter": (LogsFilter,),
4546
"id": (str,),
4647
"is_enabled": (bool,),
4748
"is_read_only": (bool,),
4849
"name": (str,),
4950
"processors": ([LogsProcessor],),
51+
"tags": ([str],),
5052
"type": (str,),
5153
}
5254

5355
attribute_map = {
56+
"description": "description",
5457
"filter": "filter",
5558
"id": "id",
5659
"is_enabled": "is_enabled",
5760
"is_read_only": "is_read_only",
5861
"name": "name",
5962
"processors": "processors",
63+
"tags": "tags",
6064
"type": "type",
6165
}
6266
read_only_vars = {
@@ -68,6 +72,7 @@ def openapi_types(_):
6872
def __init__(
6973
self_,
7074
name: str,
75+
description: Union[str, UnsetType] = unset,
7176
filter: Union[LogsFilter, UnsetType] = unset,
7277
id: Union[str, UnsetType] = unset,
7378
is_enabled: Union[bool, UnsetType] = unset,
@@ -96,6 +101,7 @@ def __init__(
96101
],
97102
UnsetType,
98103
] = unset,
104+
tags: Union[List[str], UnsetType] = unset,
99105
type: Union[str, UnsetType] = unset,
100106
**kwargs,
101107
):
@@ -106,6 +112,9 @@ def __init__(
106112
**Note** : These endpoints are only available for admin users.
107113
Make sure to use an application key created by an admin.
108114
115+
:param description: A description of the pipeline.
116+
:type description: str, optional
117+
109118
:param filter: Filter for logs.
110119
:type filter: LogsFilter, optional
111120
@@ -124,9 +133,14 @@ def __init__(
124133
:param processors: Ordered list of processors in this pipeline.
125134
:type processors: [LogsProcessor], optional
126135
136+
:param tags: A list of tags associated with the pipeline.
137+
:type tags: [str], optional
138+
127139
:param type: Type of pipeline.
128140
:type type: str, optional
129141
"""
142+
if description is not unset:
143+
kwargs["description"] = description
130144
if filter is not unset:
131145
kwargs["filter"] = filter
132146
if id is not unset:
@@ -137,6 +151,8 @@ def __init__(
137151
kwargs["is_read_only"] = is_read_only
138152
if processors is not unset:
139153
kwargs["processors"] = processors
154+
if tags is not unset:
155+
kwargs["tags"] = tags
140156
if type is not unset:
141157
kwargs["type"] = type
142158
super().__init__(kwargs)

Diff for: tests/v1/features/logs_pipelines.feature

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ Feature: Logs Pipelines
2626
@generated @skip @team:DataDog/event-platform-experience
2727
Scenario: Create a pipeline returns "Bad Request" response
2828
Given new "CreateLogsPipeline" request
29-
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}]}
29+
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
3030
When the request is sent
3131
Then the response status is 400 Bad Request
3232

3333
@generated @skip @team:DataDog/event-platform-experience
3434
Scenario: Create a pipeline returns "OK" response
3535
Given new "CreateLogsPipeline" request
36-
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}]}
36+
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
3737
When the request is sent
3838
Then the response status is 200 OK
3939

@@ -81,15 +81,15 @@ Feature: Logs Pipelines
8181
Scenario: Update a pipeline returns "Bad Request" response
8282
Given new "UpdateLogsPipeline" request
8383
And request contains "pipeline_id" parameter from "REPLACE.ME"
84-
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}]}
84+
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
8585
When the request is sent
8686
Then the response status is 400 Bad Request
8787

8888
@generated @skip @team:DataDog/event-platform-experience
8989
Scenario: Update a pipeline returns "OK" response
9090
Given new "UpdateLogsPipeline" request
9191
And request contains "pipeline_id" parameter from "REPLACE.ME"
92-
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}]}
92+
And body with value {"filter": {"query": "source:python"}, "name": "", "processors": [{"grok": {"match_rules": "rule_name_1 foo\nrule_name_2 bar\n", "support_rules": "rule_name_1 foo\nrule_name_2 bar\n"}, "is_enabled": false, "samples": [], "source": "message", "type": "grok-parser"}], "tags": []}
9393
When the request is sent
9494
Then the response status is 200 OK
9595

0 commit comments

Comments
 (0)