Skip to content

Commit d871069

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add support for all subtypes in multistep steps (#2573)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 4ed8fc8 commit d871069

16 files changed

+477
-64
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
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-06-05 09:49:43.090375",
8-
"spec_repo_commit": "faa72400"
7+
"regenerated": "2025-06-06 09:05:57.195200",
8+
"spec_repo_commit": "14586db5"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-05 09:49:43.107941",
13-
"spec_repo_commit": "faa72400"
12+
"regenerated": "2025-06-06 09:05:57.210594",
13+
"spec_repo_commit": "14586db5"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14107,11 +14107,23 @@ components:
1410714107
enum:
1410814108
- http
1410914109
- grpc
14110+
- ssl
14111+
- dns
14112+
- tcp
14113+
- udp
14114+
- icmp
14115+
- websocket
1411014116
example: http
1411114117
type: string
1411214118
x-enum-varnames:
1411314119
- HTTP
1411414120
- GRPC
14121+
- SSL
14122+
- DNS
14123+
- TCP
14124+
- UDP
14125+
- ICMP
14126+
- WEBSOCKET
1411514127
SyntheticsAPITestType:
1411614128
default: api
1411714129
description: Type of the Synthetic test, `api`.
@@ -17177,6 +17189,9 @@ components:
1717717189
example: ''
1717817190
type: string
1717917191
type: array
17192+
checkCertificateRevocation:
17193+
description: Check for certificate revocation.
17194+
type: boolean
1718017195
compressedJsonDescriptor:
1718117196
description: A protobuf JSON descriptor that needs to be gzipped first then
1718217197
base64 encoded.
@@ -17206,6 +17221,9 @@ components:
1720617221
type: string
1720717222
httpVersion:
1720817223
$ref: '#/components/schemas/SyntheticsTestOptionsHTTPVersion'
17224+
isMessageBase64Encoded:
17225+
description: Whether the message is base64 encoded.
17226+
type: boolean
1720917227
message:
1721017228
description: Message to send for UDP or WebSocket tests.
1721117229
type: string

examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.py

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
from datadog_api_client.v1.model.synthetics_assertion_operator import SyntheticsAssertionOperator
1515
from datadog_api_client.v1.model.synthetics_assertion_target import SyntheticsAssertionTarget
1616
from datadog_api_client.v1.model.synthetics_assertion_type import SyntheticsAssertionType
17+
from datadog_api_client.v1.model.synthetics_basic_auth_web import SyntheticsBasicAuthWeb
18+
from datadog_api_client.v1.model.synthetics_basic_auth_web_type import SyntheticsBasicAuthWebType
1719
from datadog_api_client.v1.model.synthetics_config_variable import SyntheticsConfigVariable
1820
from datadog_api_client.v1.model.synthetics_config_variable_type import SyntheticsConfigVariableType
1921
from datadog_api_client.v1.model.synthetics_global_variable_parser_type import SyntheticsGlobalVariableParserType
@@ -23,6 +25,7 @@
2325
from datadog_api_client.v1.model.synthetics_parsing_options import SyntheticsParsingOptions
2426
from datadog_api_client.v1.model.synthetics_test_call_type import SyntheticsTestCallType
2527
from datadog_api_client.v1.model.synthetics_test_details_sub_type import SyntheticsTestDetailsSubType
28+
from datadog_api_client.v1.model.synthetics_test_headers import SyntheticsTestHeaders
2629
from datadog_api_client.v1.model.synthetics_test_metadata import SyntheticsTestMetadata
2730
from datadog_api_client.v1.model.synthetics_test_options import SyntheticsTestOptions
2831
from datadog_api_client.v1.model.synthetics_test_options_http_version import SyntheticsTestOptionsHTTPVersion
@@ -110,6 +113,148 @@
110113
call_type=SyntheticsTestCallType.UNARY,
111114
),
112115
),
116+
SyntheticsAPITestStep(
117+
name="SSL step",
118+
subtype=SyntheticsAPITestStepSubtype.SSL,
119+
allow_failure=False,
120+
is_critical=True,
121+
retry=SyntheticsTestOptionsRetry(
122+
count=0,
123+
interval=300.0,
124+
),
125+
assertions=[
126+
SyntheticsAssertionTarget(
127+
operator=SyntheticsAssertionOperator.IS_IN_MORE_DAYS_THAN,
128+
type=SyntheticsAssertionType.CERTIFICATE,
129+
target=10,
130+
),
131+
],
132+
request=SyntheticsTestRequest(
133+
check_certificate_revocation=True,
134+
host="example.org",
135+
port=443,
136+
),
137+
),
138+
SyntheticsAPITestStep(
139+
name="DNS step",
140+
subtype=SyntheticsAPITestStepSubtype.DNS,
141+
allow_failure=False,
142+
is_critical=True,
143+
retry=SyntheticsTestOptionsRetry(
144+
count=0,
145+
interval=300.0,
146+
),
147+
assertions=[
148+
SyntheticsAssertionTarget(
149+
operator=SyntheticsAssertionOperator.LESS_THAN,
150+
type=SyntheticsAssertionType.RESPONSE_TIME,
151+
target=1000,
152+
),
153+
],
154+
request=SyntheticsTestRequest(
155+
host="troisdizaines.com",
156+
dns_server="8.8.8.8",
157+
dns_server_port="53",
158+
),
159+
),
160+
SyntheticsAPITestStep(
161+
name="TCP step",
162+
subtype=SyntheticsAPITestStepSubtype.TCP,
163+
allow_failure=False,
164+
is_critical=True,
165+
retry=SyntheticsTestOptionsRetry(
166+
count=0,
167+
interval=300.0,
168+
),
169+
assertions=[
170+
SyntheticsAssertionTarget(
171+
operator=SyntheticsAssertionOperator.LESS_THAN,
172+
type=SyntheticsAssertionType.RESPONSE_TIME,
173+
target=1000,
174+
),
175+
],
176+
request=SyntheticsTestRequest(
177+
host="34.95.79.70",
178+
port=80,
179+
should_track_hops=True,
180+
timeout=32.0,
181+
),
182+
),
183+
SyntheticsAPITestStep(
184+
name="ICMP step",
185+
subtype=SyntheticsAPITestStepSubtype.ICMP,
186+
allow_failure=False,
187+
is_critical=True,
188+
retry=SyntheticsTestOptionsRetry(
189+
count=0,
190+
interval=300.0,
191+
),
192+
assertions=[
193+
SyntheticsAssertionTarget(
194+
operator=SyntheticsAssertionOperator.IS,
195+
target=0,
196+
type=SyntheticsAssertionType.PACKET_LOSS_PERCENTAGE,
197+
),
198+
],
199+
request=SyntheticsTestRequest(
200+
host="34.95.79.70",
201+
number_of_packets=4,
202+
should_track_hops=True,
203+
timeout=38.0,
204+
),
205+
),
206+
SyntheticsAPITestStep(
207+
name="Websocket step",
208+
subtype=SyntheticsAPITestStepSubtype.WEBSOCKET,
209+
allow_failure=False,
210+
is_critical=True,
211+
retry=SyntheticsTestOptionsRetry(
212+
count=0,
213+
interval=300.0,
214+
),
215+
assertions=[
216+
SyntheticsAssertionTarget(
217+
operator=SyntheticsAssertionOperator.LESS_THAN,
218+
type=SyntheticsAssertionType.RESPONSE_TIME,
219+
target=1000,
220+
),
221+
],
222+
request=SyntheticsTestRequest(
223+
url="ws://34.95.79.70/web-socket",
224+
message="My message",
225+
is_message_base64_encoded=True,
226+
headers=SyntheticsTestHeaders(
227+
f="g",
228+
),
229+
basic_auth=SyntheticsBasicAuthWeb(
230+
type=SyntheticsBasicAuthWebType.WEB,
231+
username="user",
232+
password="password",
233+
),
234+
),
235+
),
236+
SyntheticsAPITestStep(
237+
name="UDP step",
238+
subtype=SyntheticsAPITestStepSubtype.UDP,
239+
allow_failure=False,
240+
is_critical=True,
241+
retry=SyntheticsTestOptionsRetry(
242+
count=0,
243+
interval=300.0,
244+
),
245+
assertions=[
246+
SyntheticsAssertionTarget(
247+
operator=SyntheticsAssertionOperator.LESS_THAN,
248+
type=SyntheticsAssertionType.RESPONSE_TIME,
249+
target=1000,
250+
),
251+
],
252+
request=SyntheticsTestRequest(
253+
host="8.8.8.8",
254+
port=53,
255+
message="A image.google.com",
256+
),
257+
),
113258
],
114259
),
115260
locations=[

src/datadog_api_client/v1/model/synthetics_api_test_step_subtype.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,28 @@ class SyntheticsAPITestStepSubtype(ModelSimple):
1616
"""
1717
The subtype of the Synthetic multi-step API test step.
1818
19-
:param value: Must be one of ["http", "grpc"].
19+
:param value: Must be one of ["http", "grpc", "ssl", "dns", "tcp", "udp", "icmp", "websocket"].
2020
:type value: str
2121
"""
2222

2323
allowed_values = {
2424
"http",
2525
"grpc",
26+
"ssl",
27+
"dns",
28+
"tcp",
29+
"udp",
30+
"icmp",
31+
"websocket",
2632
}
2733
HTTP: ClassVar["SyntheticsAPITestStepSubtype"]
2834
GRPC: ClassVar["SyntheticsAPITestStepSubtype"]
35+
SSL: ClassVar["SyntheticsAPITestStepSubtype"]
36+
DNS: ClassVar["SyntheticsAPITestStepSubtype"]
37+
TCP: ClassVar["SyntheticsAPITestStepSubtype"]
38+
UDP: ClassVar["SyntheticsAPITestStepSubtype"]
39+
ICMP: ClassVar["SyntheticsAPITestStepSubtype"]
40+
WEBSOCKET: ClassVar["SyntheticsAPITestStepSubtype"]
2941

3042
@cached_property
3143
def openapi_types(_):
@@ -36,3 +48,9 @@ def openapi_types(_):
3648

3749
SyntheticsAPITestStepSubtype.HTTP = SyntheticsAPITestStepSubtype("http")
3850
SyntheticsAPITestStepSubtype.GRPC = SyntheticsAPITestStepSubtype("grpc")
51+
SyntheticsAPITestStepSubtype.SSL = SyntheticsAPITestStepSubtype("ssl")
52+
SyntheticsAPITestStepSubtype.DNS = SyntheticsAPITestStepSubtype("dns")
53+
SyntheticsAPITestStepSubtype.TCP = SyntheticsAPITestStepSubtype("tcp")
54+
SyntheticsAPITestStepSubtype.UDP = SyntheticsAPITestStepSubtype("udp")
55+
SyntheticsAPITestStepSubtype.ICMP = SyntheticsAPITestStepSubtype("icmp")
56+
SyntheticsAPITestStepSubtype.WEBSOCKET = SyntheticsAPITestStepSubtype("websocket")

src/datadog_api_client/v1/model/synthetics_test_request.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def openapi_types(_):
6161
"call_type": (SyntheticsTestCallType,),
6262
"certificate": (SyntheticsTestRequestCertificate,),
6363
"certificate_domains": ([str],),
64+
"check_certificate_revocation": (bool,),
6465
"compressed_json_descriptor": (str,),
6566
"compressed_proto_file": (str,),
6667
"dns_server": (str,),
@@ -70,6 +71,7 @@ def openapi_types(_):
7071
"headers": (SyntheticsTestHeaders,),
7172
"host": (str,),
7273
"http_version": (SyntheticsTestOptionsHTTPVersion,),
74+
"is_message_base64_encoded": (bool,),
7375
"message": (str,),
7476
"metadata": (SyntheticsTestMetadata,),
7577
"method": (str,),
@@ -94,6 +96,7 @@ def openapi_types(_):
9496
"call_type": "callType",
9597
"certificate": "certificate",
9698
"certificate_domains": "certificateDomains",
99+
"check_certificate_revocation": "checkCertificateRevocation",
97100
"compressed_json_descriptor": "compressedJsonDescriptor",
98101
"compressed_proto_file": "compressedProtoFile",
99102
"dns_server": "dnsServer",
@@ -103,6 +106,7 @@ def openapi_types(_):
103106
"headers": "headers",
104107
"host": "host",
105108
"http_version": "httpVersion",
109+
"is_message_base64_encoded": "isMessageBase64Encoded",
106110
"message": "message",
107111
"metadata": "metadata",
108112
"method": "method",
@@ -137,6 +141,7 @@ def __init__(
137141
call_type: Union[SyntheticsTestCallType, UnsetType] = unset,
138142
certificate: Union[SyntheticsTestRequestCertificate, UnsetType] = unset,
139143
certificate_domains: Union[List[str], UnsetType] = unset,
144+
check_certificate_revocation: Union[bool, UnsetType] = unset,
140145
compressed_json_descriptor: Union[str, UnsetType] = unset,
141146
compressed_proto_file: Union[str, UnsetType] = unset,
142147
dns_server: Union[str, UnsetType] = unset,
@@ -146,6 +151,7 @@ def __init__(
146151
headers: Union[SyntheticsTestHeaders, UnsetType] = unset,
147152
host: Union[str, UnsetType] = unset,
148153
http_version: Union[SyntheticsTestOptionsHTTPVersion, UnsetType] = unset,
154+
is_message_base64_encoded: Union[bool, UnsetType] = unset,
149155
message: Union[str, UnsetType] = unset,
150156
metadata: Union[SyntheticsTestMetadata, UnsetType] = unset,
151157
method: Union[str, UnsetType] = unset,
@@ -186,6 +192,9 @@ def __init__(
186192
:param certificate_domains: By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in ``certificateDomains``.
187193
:type certificate_domains: [str], optional
188194
195+
:param check_certificate_revocation: Check for certificate revocation.
196+
:type check_certificate_revocation: bool, optional
197+
189198
:param compressed_json_descriptor: A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.
190199
:type compressed_json_descriptor: str, optional
191200
@@ -213,6 +222,9 @@ def __init__(
213222
:param http_version: HTTP version to use for a Synthetic test.
214223
:type http_version: SyntheticsTestOptionsHTTPVersion, optional
215224
225+
:param is_message_base64_encoded: Whether the message is base64 encoded.
226+
:type is_message_base64_encoded: bool, optional
227+
216228
:param message: Message to send for UDP or WebSocket tests.
217229
:type message: str, optional
218230
@@ -271,6 +283,8 @@ def __init__(
271283
kwargs["certificate"] = certificate
272284
if certificate_domains is not unset:
273285
kwargs["certificate_domains"] = certificate_domains
286+
if check_certificate_revocation is not unset:
287+
kwargs["check_certificate_revocation"] = check_certificate_revocation
274288
if compressed_json_descriptor is not unset:
275289
kwargs["compressed_json_descriptor"] = compressed_json_descriptor
276290
if compressed_proto_file is not unset:
@@ -289,6 +303,8 @@ def __init__(
289303
kwargs["host"] = host
290304
if http_version is not unset:
291305
kwargs["http_version"] = http_version
306+
if is_message_base64_encoded is not unset:
307+
kwargs["is_message_base64_encoded"] = is_message_base64_encoded
292308
if message is not unset:
293309
kwargs["message"] = message
294310
if metadata is not unset:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-02-25T16:34:23.928Z
1+
2025-06-02T14:06:04.761Z

0 commit comments

Comments
 (0)