Skip to content

Commit 4516018

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Adding Observability Pipelines Secret Management feature support (#3526)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 909abfd commit 4516018

File tree

48 files changed

+1061
-14
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1061
-14
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 281 additions & 5 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2026-02-20T14:42:05.988Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"log": {
3+
"_recordingName": "Observability Pipelines/Validate an observability pipeline with destination secret key returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "c01ed7042c1eca7eb2709abf07f54e60",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 526,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 583,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"config\":{\"destinations\":[{\"endpoint_url_key\":\"SUMO_LOGIC_ENDPOINT_URL\",\"id\":\"sumo-logic-destination\",\"inputs\":[\"my-processor-group\"],\"type\":\"sumo_logic\"}],\"processor_groups\":[{\"enabled\":true,\"id\":\"my-processor-group\",\"include\":\"service:my-service\",\"inputs\":[\"datadog-agent-source\"],\"processors\":[{\"enabled\":true,\"id\":\"filter-processor\",\"include\":\"status:error\",\"type\":\"filter\"}]}],\"sources\":[{\"id\":\"datadog-agent-source\",\"type\":\"datadog_agent\"}]},\"name\":\"Pipeline with Secret Key\"},\"type\":\"pipelines\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/obs-pipelines/pipelines/validate"
39+
},
40+
"response": {
41+
"bodySize": 14,
42+
"content": {
43+
"mimeType": "application/vnd.api+json",
44+
"size": 14,
45+
"text": "{\"errors\":[]}\n"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/vnd.api+json"
52+
}
53+
],
54+
"headersSize": 370,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2026-02-20T14:42:05.991Z",
61+
"time": 369
62+
}
63+
],
64+
"pages": [],
65+
"version": "1.2"
66+
}
67+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2026-02-20T14:42:32.372Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"log": {
3+
"_recordingName": "Observability Pipelines/Validate an observability pipeline with source secret key returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "abf3ef3d218bce08cf81f3126665181b",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 608,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 583,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"config\":{\"destinations\":[{\"id\":\"datadog-logs-destination\",\"inputs\":[\"my-processor-group\"],\"type\":\"datadog_logs\"}],\"processor_groups\":[{\"enabled\":true,\"id\":\"my-processor-group\",\"include\":\"service:my-service\",\"inputs\":[\"http-client-source\"],\"processors\":[{\"enabled\":true,\"id\":\"filter-processor\",\"include\":\"status:error\",\"type\":\"filter\"}]}],\"sources\":[{\"auth_strategy\":\"bearer\",\"decoding\":\"bytes\",\"id\":\"http-client-source\",\"scrape_interval_secs\":15,\"scrape_timeout_secs\":5,\"token_key\":\"HTTP_CLIENT_TOKEN\",\"type\":\"http_client\"}]},\"name\":\"Pipeline with Source Secret\"},\"type\":\"pipelines\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/obs-pipelines/pipelines/validate"
39+
},
40+
"response": {
41+
"bodySize": 14,
42+
"content": {
43+
"mimeType": "application/vnd.api+json",
44+
"size": 14,
45+
"text": "{\"errors\":[]}\n"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/vnd.api+json"
52+
}
53+
],
54+
"headersSize": 370,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2026-02-20T14:42:32.375Z",
61+
"time": 375
62+
}
63+
],
64+
"pages": [],
65+
"version": "1.2"
66+
}
67+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/**
2+
* Validate an observability pipeline with destination secret key returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.ObservabilityPipelinesApi(configuration);
9+
10+
const params: v2.ObservabilityPipelinesApiValidatePipelineRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
config: {
15+
destinations: [
16+
{
17+
id: "sumo-logic-destination",
18+
inputs: ["my-processor-group"],
19+
type: "sumo_logic",
20+
endpointUrlKey: "SUMO_LOGIC_ENDPOINT_URL",
21+
},
22+
],
23+
processorGroups: [
24+
{
25+
enabled: true,
26+
id: "my-processor-group",
27+
include: "service:my-service",
28+
inputs: ["datadog-agent-source"],
29+
processors: [
30+
{
31+
enabled: true,
32+
id: "filter-processor",
33+
include: "status:error",
34+
type: "filter",
35+
},
36+
],
37+
},
38+
],
39+
sources: [
40+
{
41+
id: "datadog-agent-source",
42+
type: "datadog_agent",
43+
},
44+
],
45+
},
46+
name: "Pipeline with Secret Key",
47+
},
48+
type: "pipelines",
49+
},
50+
},
51+
};
52+
53+
apiInstance
54+
.validatePipeline(params)
55+
.then((data: v2.ValidationResponse) => {
56+
console.log(
57+
"API called successfully. Returned data: " + JSON.stringify(data)
58+
);
59+
})
60+
.catch((error: any) => console.error(error));
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/**
2+
* Validate an observability pipeline with source secret key returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.ObservabilityPipelinesApi(configuration);
9+
10+
const params: v2.ObservabilityPipelinesApiValidatePipelineRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
config: {
15+
destinations: [
16+
{
17+
id: "datadog-logs-destination",
18+
inputs: ["my-processor-group"],
19+
type: "datadog_logs",
20+
},
21+
],
22+
processorGroups: [
23+
{
24+
enabled: true,
25+
id: "my-processor-group",
26+
include: "service:my-service",
27+
inputs: ["http-client-source"],
28+
processors: [
29+
{
30+
enabled: true,
31+
id: "filter-processor",
32+
include: "status:error",
33+
type: "filter",
34+
},
35+
],
36+
},
37+
],
38+
sources: [
39+
{
40+
id: "http-client-source",
41+
type: "http_client",
42+
decoding: "bytes",
43+
scrapeIntervalSecs: 15,
44+
scrapeTimeoutSecs: 5,
45+
authStrategy: "bearer",
46+
tokenKey: "HTTP_CLIENT_TOKEN",
47+
},
48+
],
49+
},
50+
name: "Pipeline with Source Secret",
51+
},
52+
type: "pipelines",
53+
},
54+
},
55+
};
56+
57+
apiInstance
58+
.validatePipeline(params)
59+
.then((data: v2.ValidationResponse) => {
60+
console.log(
61+
"API called successfully. Returned data: " + JSON.stringify(data)
62+
);
63+
})
64+
.catch((error: any) => console.error(error));

features/v2/observability_pipelines.feature

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,3 +190,19 @@ Feature: Observability Pipelines
190190
When the request is sent
191191
Then the response status is 200 OK
192192
And the response "errors" has length 0
193+
194+
@team:DataDog/observability-pipelines
195+
Scenario: Validate an observability pipeline with destination secret key returns "OK" response
196+
Given new "ValidatePipeline" request
197+
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "sumo-logic-destination", "inputs": ["my-processor-group"], "type": "sumo_logic", "endpoint_url_key": "SUMO_LOGIC_ENDPOINT_URL"}], "processor_groups": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Pipeline with Secret Key"}, "type": "pipelines"}}
198+
When the request is sent
199+
Then the response status is 200 OK
200+
And the response "errors" has length 0
201+
202+
@team:DataDog/observability-pipelines
203+
Scenario: Validate an observability pipeline with source secret key returns "OK" response
204+
Given new "ValidatePipeline" request
205+
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processor_groups": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["http-client-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "http-client-source", "type": "http_client", "decoding": "bytes", "scrape_interval_secs": 15, "scrape_timeout_secs": 5, "auth_strategy": "bearer", "token_key": "HTTP_CLIENT_TOKEN"}]}, "name": "Pipeline with Source Secret"}, "type": "pipelines"}}
206+
When the request is sent
207+
Then the response status is 200 OK
208+
And the response "errors" has length 0

packages/datadog-api-client-v2/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3711,6 +3711,7 @@ export { ObservabilityPipelineDedupeProcessorType } from "./models/Observability
37113711
export { ObservabilityPipelineDiskBufferOptions } from "./models/ObservabilityPipelineDiskBufferOptions";
37123712
export { ObservabilityPipelineElasticsearchDestination } from "./models/ObservabilityPipelineElasticsearchDestination";
37133713
export { ObservabilityPipelineElasticsearchDestinationApiVersion } from "./models/ObservabilityPipelineElasticsearchDestinationApiVersion";
3714+
export { ObservabilityPipelineElasticsearchDestinationAuth } from "./models/ObservabilityPipelineElasticsearchDestinationAuth";
37143715
export { ObservabilityPipelineElasticsearchDestinationDataStream } from "./models/ObservabilityPipelineElasticsearchDestinationDataStream";
37153716
export { ObservabilityPipelineElasticsearchDestinationType } from "./models/ObservabilityPipelineElasticsearchDestinationType";
37163717
export { ObservabilityPipelineEnrichmentTableFile } from "./models/ObservabilityPipelineEnrichmentTableFile";

packages/datadog-api-client-v2/models/AzureStorageDestination.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ export class AzureStorageDestination {
2222
* Configuration for buffer settings on destination components.
2323
*/
2424
"buffer"?: ObservabilityPipelineBufferOptions;
25+
/**
26+
* Name of the environment variable or secret that holds the Azure Storage connection string.
27+
*/
28+
"connectionStringKey"?: string;
2529
/**
2630
* The name of the Azure Blob Storage container to store logs in.
2731
*/
@@ -63,6 +67,10 @@ export class AzureStorageDestination {
6367
baseName: "buffer",
6468
type: "ObservabilityPipelineBufferOptions",
6569
},
70+
connectionStringKey: {
71+
baseName: "connection_string_key",
72+
type: "string",
73+
},
6674
containerName: {
6775
baseName: "container_name",
6876
type: "string",

0 commit comments

Comments
 (0)