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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-06-05 09:49:43.090375",
"spec_repo_commit": "faa72400"
"regenerated": "2025-06-06 09:05:57.195200",
"spec_repo_commit": "14586db5"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-06-05 09:49:43.107941",
"spec_repo_commit": "faa72400"
"regenerated": "2025-06-06 09:05:57.210594",
"spec_repo_commit": "14586db5"
}
}
}
18 changes: 18 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14107,11 +14107,23 @@ components:
enum:
- http
- grpc
- ssl
- dns
- tcp
- udp
- icmp
- websocket
example: http
type: string
x-enum-varnames:
- HTTP
- GRPC
- SSL
- DNS
- TCP
- UDP
- ICMP
- WEBSOCKET
SyntheticsAPITestType:
default: api
description: Type of the Synthetic test, `api`.
Expand Down Expand Up @@ -17177,6 +17189,9 @@ components:
example: ''
type: string
type: array
checkCertificateRevocation:
description: Check for certificate revocation.
type: boolean
compressedJsonDescriptor:
description: A protobuf JSON descriptor that needs to be gzipped first then
base64 encoded.
Expand Down Expand Up @@ -17206,6 +17221,9 @@ components:
type: string
httpVersion:
$ref: '#/components/schemas/SyntheticsTestOptionsHTTPVersion'
isMessageBase64Encoded:
description: Whether the message is base64 encoded.
type: boolean
message:
description: Message to send for UDP or WebSocket tests.
type: string
Expand Down
145 changes: 145 additions & 0 deletions examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from datadog_api_client.v1.model.synthetics_assertion_operator import SyntheticsAssertionOperator
from datadog_api_client.v1.model.synthetics_assertion_target import SyntheticsAssertionTarget
from datadog_api_client.v1.model.synthetics_assertion_type import SyntheticsAssertionType
from datadog_api_client.v1.model.synthetics_basic_auth_web import SyntheticsBasicAuthWeb
from datadog_api_client.v1.model.synthetics_basic_auth_web_type import SyntheticsBasicAuthWebType
from datadog_api_client.v1.model.synthetics_config_variable import SyntheticsConfigVariable
from datadog_api_client.v1.model.synthetics_config_variable_type import SyntheticsConfigVariableType
from datadog_api_client.v1.model.synthetics_global_variable_parser_type import SyntheticsGlobalVariableParserType
Expand All @@ -23,6 +25,7 @@
from datadog_api_client.v1.model.synthetics_parsing_options import SyntheticsParsingOptions
from datadog_api_client.v1.model.synthetics_test_call_type import SyntheticsTestCallType
from datadog_api_client.v1.model.synthetics_test_details_sub_type import SyntheticsTestDetailsSubType
from datadog_api_client.v1.model.synthetics_test_headers import SyntheticsTestHeaders
from datadog_api_client.v1.model.synthetics_test_metadata import SyntheticsTestMetadata
from datadog_api_client.v1.model.synthetics_test_options import SyntheticsTestOptions
from datadog_api_client.v1.model.synthetics_test_options_http_version import SyntheticsTestOptionsHTTPVersion
Expand Down Expand Up @@ -110,6 +113,148 @@
call_type=SyntheticsTestCallType.UNARY,
),
),
SyntheticsAPITestStep(
name="SSL step",
subtype=SyntheticsAPITestStepSubtype.SSL,
allow_failure=False,
is_critical=True,
retry=SyntheticsTestOptionsRetry(
count=0,
interval=300.0,
),
assertions=[
SyntheticsAssertionTarget(
operator=SyntheticsAssertionOperator.IS_IN_MORE_DAYS_THAN,
type=SyntheticsAssertionType.CERTIFICATE,
target=10,
),
],
request=SyntheticsTestRequest(
check_certificate_revocation=True,
host="example.org",
port=443,
),
),
SyntheticsAPITestStep(
name="DNS step",
subtype=SyntheticsAPITestStepSubtype.DNS,
allow_failure=False,
is_critical=True,
retry=SyntheticsTestOptionsRetry(
count=0,
interval=300.0,
),
assertions=[
SyntheticsAssertionTarget(
operator=SyntheticsAssertionOperator.LESS_THAN,
type=SyntheticsAssertionType.RESPONSE_TIME,
target=1000,
),
],
request=SyntheticsTestRequest(
host="troisdizaines.com",
dns_server="8.8.8.8",
dns_server_port="53",
),
),
SyntheticsAPITestStep(
name="TCP step",
subtype=SyntheticsAPITestStepSubtype.TCP,
allow_failure=False,
is_critical=True,
retry=SyntheticsTestOptionsRetry(
count=0,
interval=300.0,
),
assertions=[
SyntheticsAssertionTarget(
operator=SyntheticsAssertionOperator.LESS_THAN,
type=SyntheticsAssertionType.RESPONSE_TIME,
target=1000,
),
],
request=SyntheticsTestRequest(
host="34.95.79.70",
port=80,
should_track_hops=True,
timeout=32.0,
),
),
SyntheticsAPITestStep(
name="ICMP step",
subtype=SyntheticsAPITestStepSubtype.ICMP,
allow_failure=False,
is_critical=True,
retry=SyntheticsTestOptionsRetry(
count=0,
interval=300.0,
),
assertions=[
SyntheticsAssertionTarget(
operator=SyntheticsAssertionOperator.IS,
target=0,
type=SyntheticsAssertionType.PACKET_LOSS_PERCENTAGE,
),
],
request=SyntheticsTestRequest(
host="34.95.79.70",
number_of_packets=4,
should_track_hops=True,
timeout=38.0,
),
),
SyntheticsAPITestStep(
name="Websocket step",
subtype=SyntheticsAPITestStepSubtype.WEBSOCKET,
allow_failure=False,
is_critical=True,
retry=SyntheticsTestOptionsRetry(
count=0,
interval=300.0,
),
assertions=[
SyntheticsAssertionTarget(
operator=SyntheticsAssertionOperator.LESS_THAN,
type=SyntheticsAssertionType.RESPONSE_TIME,
target=1000,
),
],
request=SyntheticsTestRequest(
url="ws://34.95.79.70/web-socket",
message="My message",
is_message_base64_encoded=True,
headers=SyntheticsTestHeaders(
f="g",
),
basic_auth=SyntheticsBasicAuthWeb(
type=SyntheticsBasicAuthWebType.WEB,
username="user",
password="password",
),
),
),
SyntheticsAPITestStep(
name="UDP step",
subtype=SyntheticsAPITestStepSubtype.UDP,
allow_failure=False,
is_critical=True,
retry=SyntheticsTestOptionsRetry(
count=0,
interval=300.0,
),
assertions=[
SyntheticsAssertionTarget(
operator=SyntheticsAssertionOperator.LESS_THAN,
type=SyntheticsAssertionType.RESPONSE_TIME,
target=1000,
),
],
request=SyntheticsTestRequest(
host="8.8.8.8",
port=53,
message="A image.google.com",
),
),
],
),
locations=[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,28 @@ class SyntheticsAPITestStepSubtype(ModelSimple):
"""
The subtype of the Synthetic multi-step API test step.

:param value: Must be one of ["http", "grpc"].
:param value: Must be one of ["http", "grpc", "ssl", "dns", "tcp", "udp", "icmp", "websocket"].
:type value: str
"""

allowed_values = {
"http",
"grpc",
"ssl",
"dns",
"tcp",
"udp",
"icmp",
"websocket",
}
HTTP: ClassVar["SyntheticsAPITestStepSubtype"]
GRPC: ClassVar["SyntheticsAPITestStepSubtype"]
SSL: ClassVar["SyntheticsAPITestStepSubtype"]
DNS: ClassVar["SyntheticsAPITestStepSubtype"]
TCP: ClassVar["SyntheticsAPITestStepSubtype"]
UDP: ClassVar["SyntheticsAPITestStepSubtype"]
ICMP: ClassVar["SyntheticsAPITestStepSubtype"]
WEBSOCKET: ClassVar["SyntheticsAPITestStepSubtype"]

@cached_property
def openapi_types(_):
Expand All @@ -36,3 +48,9 @@ def openapi_types(_):

SyntheticsAPITestStepSubtype.HTTP = SyntheticsAPITestStepSubtype("http")
SyntheticsAPITestStepSubtype.GRPC = SyntheticsAPITestStepSubtype("grpc")
SyntheticsAPITestStepSubtype.SSL = SyntheticsAPITestStepSubtype("ssl")
SyntheticsAPITestStepSubtype.DNS = SyntheticsAPITestStepSubtype("dns")
SyntheticsAPITestStepSubtype.TCP = SyntheticsAPITestStepSubtype("tcp")
SyntheticsAPITestStepSubtype.UDP = SyntheticsAPITestStepSubtype("udp")
SyntheticsAPITestStepSubtype.ICMP = SyntheticsAPITestStepSubtype("icmp")
SyntheticsAPITestStepSubtype.WEBSOCKET = SyntheticsAPITestStepSubtype("websocket")
16 changes: 16 additions & 0 deletions src/datadog_api_client/v1/model/synthetics_test_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def openapi_types(_):
"call_type": (SyntheticsTestCallType,),
"certificate": (SyntheticsTestRequestCertificate,),
"certificate_domains": ([str],),
"check_certificate_revocation": (bool,),
"compressed_json_descriptor": (str,),
"compressed_proto_file": (str,),
"dns_server": (str,),
Expand All @@ -70,6 +71,7 @@ def openapi_types(_):
"headers": (SyntheticsTestHeaders,),
"host": (str,),
"http_version": (SyntheticsTestOptionsHTTPVersion,),
"is_message_base64_encoded": (bool,),
"message": (str,),
"metadata": (SyntheticsTestMetadata,),
"method": (str,),
Expand All @@ -94,6 +96,7 @@ def openapi_types(_):
"call_type": "callType",
"certificate": "certificate",
"certificate_domains": "certificateDomains",
"check_certificate_revocation": "checkCertificateRevocation",
"compressed_json_descriptor": "compressedJsonDescriptor",
"compressed_proto_file": "compressedProtoFile",
"dns_server": "dnsServer",
Expand All @@ -103,6 +106,7 @@ def openapi_types(_):
"headers": "headers",
"host": "host",
"http_version": "httpVersion",
"is_message_base64_encoded": "isMessageBase64Encoded",
"message": "message",
"metadata": "metadata",
"method": "method",
Expand Down Expand Up @@ -137,6 +141,7 @@ def __init__(
call_type: Union[SyntheticsTestCallType, UnsetType] = unset,
certificate: Union[SyntheticsTestRequestCertificate, UnsetType] = unset,
certificate_domains: Union[List[str], UnsetType] = unset,
check_certificate_revocation: Union[bool, UnsetType] = unset,
compressed_json_descriptor: Union[str, UnsetType] = unset,
compressed_proto_file: Union[str, UnsetType] = unset,
dns_server: Union[str, UnsetType] = unset,
Expand All @@ -146,6 +151,7 @@ def __init__(
headers: Union[SyntheticsTestHeaders, UnsetType] = unset,
host: Union[str, UnsetType] = unset,
http_version: Union[SyntheticsTestOptionsHTTPVersion, UnsetType] = unset,
is_message_base64_encoded: Union[bool, UnsetType] = unset,
message: Union[str, UnsetType] = unset,
metadata: Union[SyntheticsTestMetadata, UnsetType] = unset,
method: Union[str, UnsetType] = unset,
Expand Down Expand Up @@ -186,6 +192,9 @@ def __init__(
: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``.
:type certificate_domains: [str], optional

:param check_certificate_revocation: Check for certificate revocation.
:type check_certificate_revocation: bool, optional

:param compressed_json_descriptor: A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.
:type compressed_json_descriptor: str, optional

Expand Down Expand Up @@ -213,6 +222,9 @@ def __init__(
:param http_version: HTTP version to use for a Synthetic test.
:type http_version: SyntheticsTestOptionsHTTPVersion, optional

:param is_message_base64_encoded: Whether the message is base64 encoded.
:type is_message_base64_encoded: bool, optional

:param message: Message to send for UDP or WebSocket tests.
:type message: str, optional

Expand Down Expand Up @@ -271,6 +283,8 @@ def __init__(
kwargs["certificate"] = certificate
if certificate_domains is not unset:
kwargs["certificate_domains"] = certificate_domains
if check_certificate_revocation is not unset:
kwargs["check_certificate_revocation"] = check_certificate_revocation
if compressed_json_descriptor is not unset:
kwargs["compressed_json_descriptor"] = compressed_json_descriptor
if compressed_proto_file is not unset:
Expand All @@ -289,6 +303,8 @@ def __init__(
kwargs["host"] = host
if http_version is not unset:
kwargs["http_version"] = http_version
if is_message_base64_encoded is not unset:
kwargs["is_message_base64_encoded"] = is_message_base64_encoded
if message is not unset:
kwargs["message"] = message
if metadata is not unset:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025-02-25T16:34:23.928Z
2025-06-02T14:06:04.761Z
Loading