Skip to content

Commit 1299ae0

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit d715381 of spec repo
1 parent 16fecd7 commit 1299ae0

9 files changed

Lines changed: 235 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53206,6 +53206,8 @@ components:
5320653206
description: S3 bucket name.
5320753207
example: "my-bucket"
5320853208
type: string
53209+
buffer:
53210+
$ref: "#/components/schemas/ObservabilityPipelineBufferOptions"
5320953211
compression:
5321053212
$ref: "#/components/schemas/ObservabilityPipelineAmazonS3GenericCompression"
5321153213
encoding:
@@ -53455,6 +53457,8 @@ components:
5345553457

5345653458
**Supported pipeline types:** logs
5345753459
properties:
53460+
buffer:
53461+
$ref: "#/components/schemas/ObservabilityPipelineBufferOptions"
5345853462
endpoint_url_key:
5345953463
description: Name of the environment variable or secret that holds the CloudPrem endpoint URL.
5346053464
example: CLOUDPREM_ENDPOINT_URL
@@ -55105,6 +55109,8 @@ components:
5510555109
properties:
5510655110
auth_strategy:
5510755111
$ref: "#/components/schemas/ObservabilityPipelineHttpClientDestinationAuthStrategy"
55112+
buffer:
55113+
$ref: "#/components/schemas/ObservabilityPipelineBufferOptions"
5510855114
compression:
5510955115
$ref: "#/components/schemas/ObservabilityPipelineHttpClientDestinationCompression"
5511055116
custom_key:
@@ -55389,6 +55395,8 @@ components:
5538955395
description: Name of the environment variable or secret that holds the Kafka bootstrap servers list.
5539055396
example: KAFKA_BOOTSTRAP_SERVERS
5539155397
type: string
55398+
buffer:
55399+
$ref: "#/components/schemas/ObservabilityPipelineBufferOptions"
5539255400
compression:
5539355401
$ref: "#/components/schemas/ObservabilityPipelineKafkaDestinationCompression"
5539455402
encoding:
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
"""
2+
Validate an observability pipeline with cloud_prem destination buffer returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.observability_pipelines_api import ObservabilityPipelinesApi
7+
from datadog_api_client.v2.model.observability_pipeline_buffer_options_disk_type import (
8+
ObservabilityPipelineBufferOptionsDiskType,
9+
)
10+
from datadog_api_client.v2.model.observability_pipeline_buffer_options_when_full import (
11+
ObservabilityPipelineBufferOptionsWhenFull,
12+
)
13+
from datadog_api_client.v2.model.observability_pipeline_cloud_prem_destination import (
14+
ObservabilityPipelineCloudPremDestination,
15+
)
16+
from datadog_api_client.v2.model.observability_pipeline_cloud_prem_destination_type import (
17+
ObservabilityPipelineCloudPremDestinationType,
18+
)
19+
from datadog_api_client.v2.model.observability_pipeline_config import ObservabilityPipelineConfig
20+
from datadog_api_client.v2.model.observability_pipeline_config_processor_group import (
21+
ObservabilityPipelineConfigProcessorGroup,
22+
)
23+
from datadog_api_client.v2.model.observability_pipeline_data_attributes import ObservabilityPipelineDataAttributes
24+
from datadog_api_client.v2.model.observability_pipeline_datadog_agent_source import (
25+
ObservabilityPipelineDatadogAgentSource,
26+
)
27+
from datadog_api_client.v2.model.observability_pipeline_datadog_agent_source_type import (
28+
ObservabilityPipelineDatadogAgentSourceType,
29+
)
30+
from datadog_api_client.v2.model.observability_pipeline_disk_buffer_options import (
31+
ObservabilityPipelineDiskBufferOptions,
32+
)
33+
from datadog_api_client.v2.model.observability_pipeline_filter_processor import ObservabilityPipelineFilterProcessor
34+
from datadog_api_client.v2.model.observability_pipeline_filter_processor_type import (
35+
ObservabilityPipelineFilterProcessorType,
36+
)
37+
from datadog_api_client.v2.model.observability_pipeline_spec import ObservabilityPipelineSpec
38+
from datadog_api_client.v2.model.observability_pipeline_spec_data import ObservabilityPipelineSpecData
39+
40+
body = ObservabilityPipelineSpec(
41+
data=ObservabilityPipelineSpecData(
42+
attributes=ObservabilityPipelineDataAttributes(
43+
config=ObservabilityPipelineConfig(
44+
destinations=[
45+
ObservabilityPipelineCloudPremDestination(
46+
id="cloud-prem-destination",
47+
inputs=[
48+
"my-processor-group",
49+
],
50+
type=ObservabilityPipelineCloudPremDestinationType.CLOUD_PREM,
51+
endpoint_url_key="CLOUDPREM_ENDPOINT_URL",
52+
buffer=ObservabilityPipelineDiskBufferOptions(
53+
type=ObservabilityPipelineBufferOptionsDiskType.DISK,
54+
max_size=1073741824,
55+
when_full=ObservabilityPipelineBufferOptionsWhenFull.BLOCK,
56+
),
57+
),
58+
],
59+
processor_groups=[
60+
ObservabilityPipelineConfigProcessorGroup(
61+
enabled=True,
62+
id="my-processor-group",
63+
include="service:my-service",
64+
inputs=[
65+
"datadog-agent-source",
66+
],
67+
processors=[
68+
ObservabilityPipelineFilterProcessor(
69+
enabled=True,
70+
id="filter-processor",
71+
include="status:error",
72+
type=ObservabilityPipelineFilterProcessorType.FILTER,
73+
),
74+
],
75+
),
76+
],
77+
sources=[
78+
ObservabilityPipelineDatadogAgentSource(
79+
id="datadog-agent-source",
80+
type=ObservabilityPipelineDatadogAgentSourceType.DATADOG_AGENT,
81+
),
82+
],
83+
),
84+
name="Pipeline with CloudPrem Buffer",
85+
),
86+
type="pipelines",
87+
),
88+
)
89+
90+
configuration = Configuration()
91+
with ApiClient(configuration) as api_client:
92+
api_instance = ObservabilityPipelinesApi(api_client)
93+
response = api_instance.validate_pipeline(body=body)
94+
95+
print(response)

src/datadog_api_client/v2/model/observability_pipeline_amazon_s3_generic_destination.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from datadog_api_client.v2.model.observability_pipeline_amazon_s3_generic_batch_settings import (
1919
ObservabilityPipelineAmazonS3GenericBatchSettings,
2020
)
21+
from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions
2122
from datadog_api_client.v2.model.observability_pipeline_amazon_s3_generic_compression import (
2223
ObservabilityPipelineAmazonS3GenericCompression,
2324
)
@@ -30,6 +31,15 @@
3031
from datadog_api_client.v2.model.observability_pipeline_amazon_s3_generic_destination_type import (
3132
ObservabilityPipelineAmazonS3GenericDestinationType,
3233
)
34+
from datadog_api_client.v2.model.observability_pipeline_disk_buffer_options import (
35+
ObservabilityPipelineDiskBufferOptions,
36+
)
37+
from datadog_api_client.v2.model.observability_pipeline_memory_buffer_options import (
38+
ObservabilityPipelineMemoryBufferOptions,
39+
)
40+
from datadog_api_client.v2.model.observability_pipeline_memory_buffer_size_options import (
41+
ObservabilityPipelineMemoryBufferSizeOptions,
42+
)
3343
from datadog_api_client.v2.model.observability_pipeline_amazon_s3_generic_compression_zstd import (
3444
ObservabilityPipelineAmazonS3GenericCompressionZstd,
3545
)
@@ -54,6 +64,7 @@ def openapi_types(_):
5464
from datadog_api_client.v2.model.observability_pipeline_amazon_s3_generic_batch_settings import (
5565
ObservabilityPipelineAmazonS3GenericBatchSettings,
5666
)
67+
from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions
5768
from datadog_api_client.v2.model.observability_pipeline_amazon_s3_generic_compression import (
5869
ObservabilityPipelineAmazonS3GenericCompression,
5970
)
@@ -71,6 +82,7 @@ def openapi_types(_):
7182
"auth": (ObservabilityPipelineAwsAuth,),
7283
"batch_settings": (ObservabilityPipelineAmazonS3GenericBatchSettings,),
7384
"bucket": (str,),
85+
"buffer": (ObservabilityPipelineBufferOptions,),
7486
"compression": (ObservabilityPipelineAmazonS3GenericCompression,),
7587
"encoding": (ObservabilityPipelineAmazonS3GenericEncoding,),
7688
"id": (str,),
@@ -85,6 +97,7 @@ def openapi_types(_):
8597
"auth": "auth",
8698
"batch_settings": "batch_settings",
8799
"bucket": "bucket",
100+
"buffer": "buffer",
88101
"compression": "compression",
89102
"encoding": "encoding",
90103
"id": "id",
@@ -116,6 +129,13 @@ def __init__(
116129
type: ObservabilityPipelineAmazonS3GenericDestinationType,
117130
auth: Union[ObservabilityPipelineAwsAuth, UnsetType] = unset,
118131
batch_settings: Union[ObservabilityPipelineAmazonS3GenericBatchSettings, UnsetType] = unset,
132+
buffer: Union[
133+
ObservabilityPipelineBufferOptions,
134+
ObservabilityPipelineDiskBufferOptions,
135+
ObservabilityPipelineMemoryBufferOptions,
136+
ObservabilityPipelineMemoryBufferSizeOptions,
137+
UnsetType,
138+
] = unset,
119139
key_prefix: Union[str, UnsetType] = unset,
120140
**kwargs,
121141
):
@@ -134,6 +154,9 @@ def __init__(
134154
:param bucket: S3 bucket name.
135155
:type bucket: str
136156
157+
:param buffer: Configuration for buffer settings on destination components.
158+
:type buffer: ObservabilityPipelineBufferOptions, optional
159+
137160
:param compression: Compression algorithm applied to encoded logs.
138161
:type compression: ObservabilityPipelineAmazonS3GenericCompression
139162
@@ -162,6 +185,8 @@ def __init__(
162185
kwargs["auth"] = auth
163186
if batch_settings is not unset:
164187
kwargs["batch_settings"] = batch_settings
188+
if buffer is not unset:
189+
kwargs["buffer"] = buffer
165190
if key_prefix is not unset:
166191
kwargs["key_prefix"] = key_prefix
167192
super().__init__(kwargs)

src/datadog_api_client/v2/model/observability_pipeline_cloud_prem_destination.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,39 @@
1414

1515

1616
if TYPE_CHECKING:
17+
from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions
1718
from datadog_api_client.v2.model.observability_pipeline_cloud_prem_destination_type import (
1819
ObservabilityPipelineCloudPremDestinationType,
1920
)
21+
from datadog_api_client.v2.model.observability_pipeline_disk_buffer_options import (
22+
ObservabilityPipelineDiskBufferOptions,
23+
)
24+
from datadog_api_client.v2.model.observability_pipeline_memory_buffer_options import (
25+
ObservabilityPipelineMemoryBufferOptions,
26+
)
27+
from datadog_api_client.v2.model.observability_pipeline_memory_buffer_size_options import (
28+
ObservabilityPipelineMemoryBufferSizeOptions,
29+
)
2030

2131

2232
class ObservabilityPipelineCloudPremDestination(ModelNormal):
2333
@cached_property
2434
def openapi_types(_):
35+
from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions
2536
from datadog_api_client.v2.model.observability_pipeline_cloud_prem_destination_type import (
2637
ObservabilityPipelineCloudPremDestinationType,
2738
)
2839

2940
return {
41+
"buffer": (ObservabilityPipelineBufferOptions,),
3042
"endpoint_url_key": (str,),
3143
"id": (str,),
3244
"inputs": ([str],),
3345
"type": (ObservabilityPipelineCloudPremDestinationType,),
3446
}
3547

3648
attribute_map = {
49+
"buffer": "buffer",
3750
"endpoint_url_key": "endpoint_url_key",
3851
"id": "id",
3952
"inputs": "inputs",
@@ -45,6 +58,13 @@ def __init__(
4558
id: str,
4659
inputs: List[str],
4760
type: ObservabilityPipelineCloudPremDestinationType,
61+
buffer: Union[
62+
ObservabilityPipelineBufferOptions,
63+
ObservabilityPipelineDiskBufferOptions,
64+
ObservabilityPipelineMemoryBufferOptions,
65+
ObservabilityPipelineMemoryBufferSizeOptions,
66+
UnsetType,
67+
] = unset,
4868
endpoint_url_key: Union[str, UnsetType] = unset,
4969
**kwargs,
5070
):
@@ -53,6 +73,9 @@ def __init__(
5373
5474
**Supported pipeline types:** logs
5575
76+
:param buffer: Configuration for buffer settings on destination components.
77+
:type buffer: ObservabilityPipelineBufferOptions, optional
78+
5679
:param endpoint_url_key: Name of the environment variable or secret that holds the CloudPrem endpoint URL.
5780
:type endpoint_url_key: str, optional
5881
@@ -65,6 +88,8 @@ def __init__(
6588
:param type: The destination type. The value should always be ``cloud_prem``.
6689
:type type: ObservabilityPipelineCloudPremDestinationType
6790
"""
91+
if buffer is not unset:
92+
kwargs["buffer"] = buffer
6893
if endpoint_url_key is not unset:
6994
kwargs["endpoint_url_key"] = endpoint_url_key
7095
super().__init__(kwargs)

src/datadog_api_client/v2/model/observability_pipeline_http_client_destination.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from datadog_api_client.v2.model.observability_pipeline_http_client_destination_auth_strategy import (
1818
ObservabilityPipelineHttpClientDestinationAuthStrategy,
1919
)
20+
from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions
2021
from datadog_api_client.v2.model.observability_pipeline_http_client_destination_compression import (
2122
ObservabilityPipelineHttpClientDestinationCompression,
2223
)
@@ -27,6 +28,15 @@
2728
from datadog_api_client.v2.model.observability_pipeline_http_client_destination_type import (
2829
ObservabilityPipelineHttpClientDestinationType,
2930
)
31+
from datadog_api_client.v2.model.observability_pipeline_disk_buffer_options import (
32+
ObservabilityPipelineDiskBufferOptions,
33+
)
34+
from datadog_api_client.v2.model.observability_pipeline_memory_buffer_options import (
35+
ObservabilityPipelineMemoryBufferOptions,
36+
)
37+
from datadog_api_client.v2.model.observability_pipeline_memory_buffer_size_options import (
38+
ObservabilityPipelineMemoryBufferSizeOptions,
39+
)
3040

3141

3242
class ObservabilityPipelineHttpClientDestination(ModelNormal):
@@ -35,6 +45,7 @@ def openapi_types(_):
3545
from datadog_api_client.v2.model.observability_pipeline_http_client_destination_auth_strategy import (
3646
ObservabilityPipelineHttpClientDestinationAuthStrategy,
3747
)
48+
from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions
3849
from datadog_api_client.v2.model.observability_pipeline_http_client_destination_compression import (
3950
ObservabilityPipelineHttpClientDestinationCompression,
4051
)
@@ -48,6 +59,7 @@ def openapi_types(_):
4859

4960
return {
5061
"auth_strategy": (ObservabilityPipelineHttpClientDestinationAuthStrategy,),
62+
"buffer": (ObservabilityPipelineBufferOptions,),
5163
"compression": (ObservabilityPipelineHttpClientDestinationCompression,),
5264
"custom_key": (str,),
5365
"encoding": (ObservabilityPipelineHttpClientDestinationEncoding,),
@@ -63,6 +75,7 @@ def openapi_types(_):
6375

6476
attribute_map = {
6577
"auth_strategy": "auth_strategy",
78+
"buffer": "buffer",
6679
"compression": "compression",
6780
"custom_key": "custom_key",
6881
"encoding": "encoding",
@@ -83,6 +96,13 @@ def __init__(
8396
inputs: List[str],
8497
type: ObservabilityPipelineHttpClientDestinationType,
8598
auth_strategy: Union[ObservabilityPipelineHttpClientDestinationAuthStrategy, UnsetType] = unset,
99+
buffer: Union[
100+
ObservabilityPipelineBufferOptions,
101+
ObservabilityPipelineDiskBufferOptions,
102+
ObservabilityPipelineMemoryBufferOptions,
103+
ObservabilityPipelineMemoryBufferSizeOptions,
104+
UnsetType,
105+
] = unset,
86106
compression: Union[ObservabilityPipelineHttpClientDestinationCompression, UnsetType] = unset,
87107
custom_key: Union[str, UnsetType] = unset,
88108
password_key: Union[str, UnsetType] = unset,
@@ -100,6 +120,9 @@ def __init__(
100120
:param auth_strategy: HTTP authentication strategy.
101121
:type auth_strategy: ObservabilityPipelineHttpClientDestinationAuthStrategy, optional
102122
123+
:param buffer: Configuration for buffer settings on destination components.
124+
:type buffer: ObservabilityPipelineBufferOptions, optional
125+
103126
:param compression: Compression configuration for HTTP requests.
104127
:type compression: ObservabilityPipelineHttpClientDestinationCompression, optional
105128
@@ -135,6 +158,8 @@ def __init__(
135158
"""
136159
if auth_strategy is not unset:
137160
kwargs["auth_strategy"] = auth_strategy
161+
if buffer is not unset:
162+
kwargs["buffer"] = buffer
138163
if compression is not unset:
139164
kwargs["compression"] = compression
140165
if custom_key is not unset:

0 commit comments

Comments
 (0)