Skip to content

Commit 534ac12

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add blockedRequestPatterns to synthetics browser test options (#2864)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent b233a6c commit 534ac12

File tree

5 files changed

+25
-10
lines changed

5 files changed

+25
-10
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17343,6 +17343,11 @@ components:
1734317343
description: Allows loading insecure content for an HTTP request in an API
1734417344
test.
1734517345
type: boolean
17346+
blockedRequestPatterns:
17347+
description: Array of URL patterns to block.
17348+
items:
17349+
type: string
17350+
type: array
1734617351
checkCertificateRevocation:
1734717352
description: For SSL tests, whether or not the test should fail on revoked
1734817353
certificate in stapled OCSP.

examples/v1/synthetics/CreateSyntheticsAPITest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
message="Notification message",
5050
name="Example test name",
5151
options=SyntheticsTestOptions(
52+
blocked_request_patterns=[],
5253
ci=SyntheticsTestCiOptions(
5354
execution_rule=SyntheticsTestExecutionRule.BLOCKING,
5455
),

examples/v1/synthetics/UpdateBrowserTest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
message="",
8686
name="Example test name",
8787
options=SyntheticsTestOptions(
88+
blocked_request_patterns=[],
8889
ci=SyntheticsTestCiOptions(
8990
execution_rule=SyntheticsTestExecutionRule.BLOCKING,
9091
),

src/datadog_api_client/v1/model/synthetics_test_options.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def openapi_types(_):
5050
return {
5151
"accept_self_signed": (bool,),
5252
"allow_insecure": (bool,),
53+
"blocked_request_patterns": ([str],),
5354
"check_certificate_revocation": (bool,),
5455
"ci": (SyntheticsTestCiOptions,),
5556
"device_ids": ([str],),
@@ -78,6 +79,7 @@ def openapi_types(_):
7879
attribute_map = {
7980
"accept_self_signed": "accept_self_signed",
8081
"allow_insecure": "allow_insecure",
82+
"blocked_request_patterns": "blockedRequestPatterns",
8183
"check_certificate_revocation": "checkCertificateRevocation",
8284
"ci": "ci",
8385
"device_ids": "device_ids",
@@ -107,6 +109,7 @@ def __init__(
107109
self_,
108110
accept_self_signed: Union[bool, UnsetType] = unset,
109111
allow_insecure: Union[bool, UnsetType] = unset,
112+
blocked_request_patterns: Union[List[str], UnsetType] = unset,
110113
check_certificate_revocation: Union[bool, UnsetType] = unset,
111114
ci: Union[SyntheticsTestCiOptions, UnsetType] = unset,
112115
device_ids: Union[List[str], UnsetType] = unset,
@@ -142,6 +145,9 @@ def __init__(
142145
:param allow_insecure: Allows loading insecure content for an HTTP request in an API test.
143146
:type allow_insecure: bool, optional
144147
148+
:param blocked_request_patterns: Array of URL patterns to block.
149+
:type blocked_request_patterns: [str], optional
150+
145151
:param check_certificate_revocation: For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.
146152
:type check_certificate_revocation: bool, optional
147153
@@ -227,6 +233,8 @@ def __init__(
227233
kwargs["accept_self_signed"] = accept_self_signed
228234
if allow_insecure is not unset:
229235
kwargs["allow_insecure"] = allow_insecure
236+
if blocked_request_patterns is not unset:
237+
kwargs["blocked_request_patterns"] = blocked_request_patterns
230238
if check_certificate_revocation is not unset:
231239
kwargs["check_certificate_revocation"] = check_certificate_revocation
232240
if ci is not unset:

0 commit comments

Comments
 (0)