Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
799 changes: 796 additions & 3 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-06-24T16:45:05.037Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

83 changes: 83 additions & 0 deletions examples/v2/observability-pipelines/ValidatePipeline_253109967.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Validate an observability pipeline with ClickHouse destination with all fields set returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::ObservabilityPipelinesAPI.new

body = DatadogAPIClient::V2::ObservabilityPipelineSpec.new({
data: DatadogAPIClient::V2::ObservabilityPipelineSpecData.new({
attributes: DatadogAPIClient::V2::ObservabilityPipelineDataAttributes.new({
config: DatadogAPIClient::V2::ObservabilityPipelineConfig.new({
destinations: [
DatadogAPIClient::V2::ObservabilityPipelineClickhouseDestination.new({
id: "clickhouse-destination",
inputs: [
"my-processor-group",
],
type: DatadogAPIClient::V2::ObservabilityPipelineClickhouseDestinationType::CLICKHOUSE,
endpoint_url_key: "CLICKHOUSE_ENDPOINT_URL",
database: "my_database",
table: "application_logs",
format: DatadogAPIClient::V2::ObservabilityPipelineClickhouseDestinationFormat::ARROW_STREAM,
skip_unknown_fields: true,
date_time_best_effort: true,
compression: DatadogAPIClient::V2::ObservabilityPipelineClickhouseDestinationCompressionObject.new({
algorithm: DatadogAPIClient::V2::ObservabilityPipelineClickhouseDestinationCompressionAlgorithm::GZIP,
level: 6,
}),
auth: DatadogAPIClient::V2::ObservabilityPipelineClickhouseDestinationAuth.new({
strategy: DatadogAPIClient::V2::ObservabilityPipelineClickhouseDestinationAuthStrategy::BASIC,
username_key: "CLICKHOUSE_USERNAME",
password_key: "CLICKHOUSE_PASSWORD",
}),
batch: DatadogAPIClient::V2::ObservabilityPipelineClickhouseDestinationBatch.new({
max_events: 1000,
timeout_secs: 1,
}),
batch_encoding: DatadogAPIClient::V2::ObservabilityPipelineClickhouseDestinationBatchEncoding.new({
codec: DatadogAPIClient::V2::ObservabilityPipelineClickhouseDestinationBatchEncodingCodec::ARROW_STREAM,
allow_nullable_fields: true,
}),
tls: DatadogAPIClient::V2::ObservabilityPipelineTls.new({
crt_file: "/path/to/cert.crt",
ca_file: "/path/to/ca.crt",
key_file: "/path/to/key.key",
key_pass_key: "TLS_KEY_PASSPHRASE",
}),
buffer: DatadogAPIClient::V2::ObservabilityPipelineMemoryBufferSizeOptions.new({
type: DatadogAPIClient::V2::ObservabilityPipelineBufferOptionsMemoryType::MEMORY,
max_events: 500,
when_full: DatadogAPIClient::V2::ObservabilityPipelineBufferOptionsWhenFull::BLOCK,
}),
}),
],
processor_groups: [
DatadogAPIClient::V2::ObservabilityPipelineConfigProcessorGroup.new({
enabled: true,
id: "my-processor-group",
include: "service:my-service",
inputs: [
"datadog-agent-source",
],
processors: [
DatadogAPIClient::V2::ObservabilityPipelineFilterProcessor.new({
enabled: true,
id: "filter-processor",
include: "status:error",
type: DatadogAPIClient::V2::ObservabilityPipelineFilterProcessorType::FILTER,
}),
],
}),
],
sources: [
DatadogAPIClient::V2::ObservabilityPipelineDatadogAgentSource.new({
id: "datadog-agent-source",
type: DatadogAPIClient::V2::ObservabilityPipelineDatadogAgentSourceType::DATADOG_AGENT,
}),
],
}),
name: "Pipeline with ClickHouse Destination All Fields",
}),
type: "pipelines",
}),
})
p api_instance.validate_pipeline(body)
2 changes: 1 addition & 1 deletion examples/v2/report-schedules/CreateReportSchedule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
],
}),
],
timeframe: "calendar_month",
timeframe: "1w",
timezone: "America/New_York",
title: "Weekly Infrastructure Report",
}),
Expand Down
5 changes: 5 additions & 0 deletions examples/v2/report-schedules/DeleteReportSchedule.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Delete a report schedule returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::ReportSchedulesAPI.new
p api_instance.delete_report_schedule("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")
5 changes: 5 additions & 0 deletions examples/v2/report-schedules/GetReportSchedule.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get a report schedule returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::ReportSchedulesAPI.new
p api_instance.get_report_schedule("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")
5 changes: 5 additions & 0 deletions examples/v2/report-schedules/GetReportSchedulesForResource.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get report schedules for a resource returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::ReportSchedulesAPI.new
p api_instance.get_report_schedules_for_resource(ReportScheduleResourceType::DASHBOARD, "resource_id")
5 changes: 5 additions & 0 deletions examples/v2/report-schedules/ListReportSchedules.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# List report schedules returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::ReportSchedulesAPI.new
p api_instance.list_report_schedules()
2 changes: 1 addition & 1 deletion examples/v2/report-schedules/PatchReportSchedule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
],
}),
],
timeframe: "calendar_month",
timeframe: "1w",
timezone: "America/New_York",
title: "Weekly Infrastructure Report",
}),
Expand Down
14 changes: 14 additions & 0 deletions examples/v2/report-schedules/ToggleReportSchedule.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Toggle a report schedule returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::ReportSchedulesAPI.new

body = DatadogAPIClient::V2::ReportScheduleToggleRequest.new({
data: DatadogAPIClient::V2::ReportScheduleToggleRequestData.new({
attributes: DatadogAPIClient::V2::ReportScheduleToggleRequestAttributes.new({
status: DatadogAPIClient::V2::ReportScheduleStatus::ACTIVE,
}),
type: DatadogAPIClient::V2::ReportScheduleType::SCHEDULE,
}),
})
p api_instance.toggle_report_schedule("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
21 changes: 21 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4890,10 +4890,31 @@
"v2.CreateReportSchedule" => {
"body" => "ReportScheduleCreateRequest",
},
"v2.ListReportSchedules" => {
"page_limit" => "Integer",
"page_offset" => "Integer",
"filter_title" => "String",
"filter_author_uuid" => "UUID",
"filter_recipients" => "String",
},
"v2.GetReportSchedulesForResource" => {
"resource_type" => "ReportScheduleResourceType",
"resource_id" => "String",
},
"v2.DeleteReportSchedule" => {
"schedule_uuid" => "UUID",
},
"v2.GetReportSchedule" => {
"schedule_uuid" => "UUID",
},
"v2.PatchReportSchedule" => {
"schedule_uuid" => "UUID",
"body" => "ReportSchedulePatchRequest",
},
"v2.ToggleReportSchedule" => {
"schedule_uuid" => "UUID",
"body" => "ReportScheduleToggleRequest",
},
"v2.DeleteRestrictionPolicy" => {
"resource_id" => "String",
},
Expand Down
8 changes: 8 additions & 0 deletions features/v2/observability_pipelines.feature
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,14 @@ Feature: Observability Pipelines
Then the response status is 200 OK
And the response "errors" has length 0

@team:DataDog/observability-pipelines
Scenario: Validate an observability pipeline with ClickHouse destination with all fields set returns "OK" response
Given new "ValidatePipeline" request
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "clickhouse-destination", "inputs": ["my-processor-group"], "type": "clickhouse", "endpoint_url_key": "CLICKHOUSE_ENDPOINT_URL", "database": "my_database", "table": "application_logs", "format": "arrow_stream", "skip_unknown_fields": true, "date_time_best_effort": true, "compression": {"algorithm": "gzip", "level": 6}, "auth": {"strategy": "basic", "username_key": "CLICKHOUSE_USERNAME", "password_key": "CLICKHOUSE_PASSWORD"}, "batch": {"max_events": 1000, "timeout_secs": 1}, "batch_encoding": {"codec": "arrow_stream", "allow_nullable_fields": true}, "tls": {"crt_file": "/path/to/cert.crt", "ca_file": "/path/to/ca.crt", "key_file": "/path/to/key.key", "key_pass_key": "TLS_KEY_PASSPHRASE"}, "buffer": {"type": "memory", "max_events": 500, "when_full": "block"}}], "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 ClickHouse Destination All Fields"}, "type": "pipelines"}}
When the request is sent
Then the response status is 200 OK
And the response "errors" has length 0

@team:DataDog/observability-pipelines
Scenario: Validate an observability pipeline with HTTP server source valid_tokens returns "OK" response
Given new "ValidatePipeline" request
Expand Down
Loading
Loading