Skip to content

Commit 075afb3

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 1256c66 of spec repo
1 parent f3f689a commit 075afb3

30 files changed

+439
-231
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35525,7 +35525,7 @@ paths:
3552535525
get:
3552635526
description: 'Get the detailed configuration associated with
3552735527

35528-
a Synthetic Mobile test.'
35528+
a Synthetic mobile test.'
3552935529
operationId: GetMobileTest
3553035530
parameters:
3553135531
- description: The public ID of the test to get details from.
@@ -35562,15 +35562,15 @@ paths:
3556235562
appKeyAuth: []
3556335563
- AuthZ:
3556435564
- synthetics_read
35565-
summary: Get a Mobile test
35565+
summary: Get a mobile test
3556635566
tags:
3556735567
- Synthetics
3556835568
x-permission:
3556935569
operator: OR
3557035570
permissions:
3557135571
- synthetics_read
3557235572
put:
35573-
description: Edit the configuration of a Synthetic Mobile test.
35573+
description: Edit the configuration of a Synthetic mobile test.
3557435574
operationId: UpdateMobileTest
3557535575
parameters:
3557635576
- description: The public ID of the test to get details from.
@@ -35624,7 +35624,7 @@ paths:
3562435624
appKeyAuth: []
3562535625
- AuthZ:
3562635626
- synthetics_write
35627-
summary: Edit a Mobile test
35627+
summary: Edit a mobile test
3562835628
tags:
3562935629
- Synthetics
3563035630
x-codegen-request-body-name: body

.generator/schemas/v2/openapi.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100968,7 +100968,7 @@ paths:
100968100968
appKeyAuth: []
100969100969
- AuthZ:
100970100970
- synthetics_write
100971-
summary: 'Synthetics: Create a test suite'
100971+
summary: Create a test suite
100972100972
tags:
100973100973
- Synthetics
100974100974
x-permission:
@@ -101005,7 +101005,7 @@ paths:
101005101005
appKeyAuth: []
101006101006
- AuthZ:
101007101007
- synthetics_write
101008-
summary: 'Synthetics: Bulk delete suites'
101008+
summary: Bulk delete suites
101009101009
tags:
101010101010
- Synthetics
101011101011
x-permission:
@@ -101110,7 +101110,7 @@ paths:
101110101110
appKeyAuth: []
101111101111
- AuthZ:
101112101112
- synthetics_read
101113-
summary: 'Synthetics: Get a suite'
101113+
summary: Get a suite
101114101114
tags:
101115101115
- Synthetics
101116101116
x-permission:
@@ -101153,7 +101153,7 @@ paths:
101153101153
appKeyAuth: []
101154101154
- AuthZ:
101155101155
- synthetics_write
101156-
summary: 'Synthetics: Edit a test suite'
101156+
summary: Edit a test suite
101157101157
tags:
101158101158
- Synthetics
101159101159
x-permission:
@@ -101195,7 +101195,7 @@ paths:
101195101195
appKeyAuth: []
101196101196
- AuthZ:
101197101197
- synthetics_write
101198-
summary: 'Synthetics: Bulk delete tests'
101198+
summary: Bulk delete tests
101199101199
tags:
101200101200
- Synthetics
101201101201
x-permission:
@@ -101231,7 +101231,7 @@ paths:
101231101231
appKeyAuth: []
101232101232
- AuthZ:
101233101233
- synthetics_write
101234-
summary: 'Synthetics: Create a Network Path test'
101234+
summary: Create a Network Path test
101235101235
tags:
101236101236
- Synthetics
101237101237
x-permission:
@@ -101275,7 +101275,7 @@ paths:
101275101275
appKeyAuth: []
101276101276
- AuthZ:
101277101277
- synthetics_read
101278-
summary: 'Synthetics: Get a Network Path test'
101278+
summary: Get a Network Path test
101279101279
tags:
101280101280
- Synthetics
101281101281
x-permission:
@@ -101324,7 +101324,7 @@ paths:
101324101324
appKeyAuth: []
101325101325
- AuthZ:
101326101326
- synthetics_write
101327-
summary: 'Synthetics: Edit a Network Path test'
101327+
summary: Edit a Network Path test
101328101328
tags:
101329101329
- Synthetics
101330101330
x-permission:
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
"""
2-
Get a Mobile test returns "OK" response
2+
Get a mobile test returns "OK" response
33
"""
44

5-
from os import environ
65
from datadog_api_client import ApiClient, Configuration
76
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
87

9-
# there is a valid "synthetics_mobile_test" in the system
10-
SYNTHETICS_MOBILE_TEST_PUBLIC_ID = environ["SYNTHETICS_MOBILE_TEST_PUBLIC_ID"]
11-
128
configuration = Configuration()
139
with ApiClient(configuration) as api_client:
1410
api_instance = SyntheticsApi(api_client)
1511
response = api_instance.get_mobile_test(
16-
public_id=SYNTHETICS_MOBILE_TEST_PUBLIC_ID,
12+
public_id="public_id",
1713
)
1814

1915
print(response)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""
2+
Get a Mobile test returns "OK" response
3+
"""
4+
5+
from os import environ
6+
from datadog_api_client import ApiClient, Configuration
7+
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
8+
9+
# there is a valid "synthetics_mobile_test" in the system
10+
SYNTHETICS_MOBILE_TEST_PUBLIC_ID = environ["SYNTHETICS_MOBILE_TEST_PUBLIC_ID"]
11+
12+
configuration = Configuration()
13+
with ApiClient(configuration) as api_client:
14+
api_instance = SyntheticsApi(api_client)
15+
response = api_instance.get_mobile_test(
16+
public_id=SYNTHETICS_MOBILE_TEST_PUBLIC_ID,
17+
)
18+
19+
print(response)
Lines changed: 131 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,36 @@
11
"""
2-
Edit a Mobile test returns "OK" response
2+
Edit a mobile test returns "OK" response
33
"""
44

5-
from os import environ
65
from datadog_api_client import ApiClient, Configuration
76
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
7+
from datadog_api_client.v1.model.synthetics_check_type import SyntheticsCheckType
8+
from datadog_api_client.v1.model.synthetics_config_variable import SyntheticsConfigVariable
9+
from datadog_api_client.v1.model.synthetics_config_variable_type import SyntheticsConfigVariableType
10+
from datadog_api_client.v1.model.synthetics_mobile_step import SyntheticsMobileStep
11+
from datadog_api_client.v1.model.synthetics_mobile_step_params import SyntheticsMobileStepParams
12+
from datadog_api_client.v1.model.synthetics_mobile_step_params_direction import SyntheticsMobileStepParamsDirection
13+
from datadog_api_client.v1.model.synthetics_mobile_step_params_element import SyntheticsMobileStepParamsElement
14+
from datadog_api_client.v1.model.synthetics_mobile_step_params_element_context_type import (
15+
SyntheticsMobileStepParamsElementContextType,
16+
)
17+
from datadog_api_client.v1.model.synthetics_mobile_step_params_element_relative_position import (
18+
SyntheticsMobileStepParamsElementRelativePosition,
19+
)
20+
from datadog_api_client.v1.model.synthetics_mobile_step_params_element_user_locator import (
21+
SyntheticsMobileStepParamsElementUserLocator,
22+
)
23+
from datadog_api_client.v1.model.synthetics_mobile_step_params_element_user_locator_values_items import (
24+
SyntheticsMobileStepParamsElementUserLocatorValuesItems,
25+
)
26+
from datadog_api_client.v1.model.synthetics_mobile_step_params_element_user_locator_values_items_type import (
27+
SyntheticsMobileStepParamsElementUserLocatorValuesItemsType,
28+
)
29+
from datadog_api_client.v1.model.synthetics_mobile_step_params_positions_items import (
30+
SyntheticsMobileStepParamsPositionsItems,
31+
)
32+
from datadog_api_client.v1.model.synthetics_mobile_step_params_variable import SyntheticsMobileStepParamsVariable
33+
from datadog_api_client.v1.model.synthetics_mobile_step_type import SyntheticsMobileStepType
834
from datadog_api_client.v1.model.synthetics_mobile_test import SyntheticsMobileTest
935
from datadog_api_client.v1.model.synthetics_mobile_test_config import SyntheticsMobileTestConfig
1036
from datadog_api_client.v1.model.synthetics_mobile_test_options import SyntheticsMobileTestOptions
@@ -15,36 +41,124 @@
1541
from datadog_api_client.v1.model.synthetics_mobile_tests_mobile_application_reference_type import (
1642
SyntheticsMobileTestsMobileApplicationReferenceType,
1743
)
44+
from datadog_api_client.v1.model.synthetics_restricted_roles import SyntheticsRestrictedRoles
45+
from datadog_api_client.v1.model.synthetics_test_ci_options import SyntheticsTestCiOptions
46+
from datadog_api_client.v1.model.synthetics_test_execution_rule import SyntheticsTestExecutionRule
47+
from datadog_api_client.v1.model.synthetics_test_options_monitor_options import SyntheticsTestOptionsMonitorOptions
48+
from datadog_api_client.v1.model.synthetics_test_options_monitor_options_notification_preset_name import (
49+
SyntheticsTestOptionsMonitorOptionsNotificationPresetName,
50+
)
51+
from datadog_api_client.v1.model.synthetics_test_options_retry import SyntheticsTestOptionsRetry
52+
from datadog_api_client.v1.model.synthetics_test_options_scheduling import SyntheticsTestOptionsScheduling
53+
from datadog_api_client.v1.model.synthetics_test_options_scheduling_timeframe import (
54+
SyntheticsTestOptionsSchedulingTimeframe,
55+
)
1856
from datadog_api_client.v1.model.synthetics_test_pause_status import SyntheticsTestPauseStatus
19-
20-
# there is a valid "synthetics_mobile_test" in the system
21-
SYNTHETICS_MOBILE_TEST_PUBLIC_ID = environ["SYNTHETICS_MOBILE_TEST_PUBLIC_ID"]
57+
from datadog_api_client.v1.model.synthetics_test_restriction_policy_binding import (
58+
SyntheticsTestRestrictionPolicyBinding,
59+
)
60+
from datadog_api_client.v1.model.synthetics_test_restriction_policy_binding_relation import (
61+
SyntheticsTestRestrictionPolicyBindingRelation,
62+
)
2263

2364
body = SyntheticsMobileTest(
24-
name="Example-Synthetic-updated",
25-
status=SyntheticsTestPauseStatus.PAUSED,
26-
type=SyntheticsMobileTestType.MOBILE,
2765
config=SyntheticsMobileTestConfig(
28-
variables=[],
66+
variables=[
67+
SyntheticsConfigVariable(
68+
name="VARIABLE_NAME",
69+
secure=False,
70+
type=SyntheticsConfigVariableType.TEXT,
71+
),
72+
],
2973
),
30-
message="",
74+
device_ids=[
75+
"chrome.laptop_large",
76+
],
77+
message="Notification message",
78+
name="Example test name",
3179
options=SyntheticsMobileTestOptions(
80+
bindings=[
81+
SyntheticsTestRestrictionPolicyBinding(
82+
principals=[],
83+
relation=SyntheticsTestRestrictionPolicyBindingRelation.EDITOR,
84+
),
85+
],
86+
ci=SyntheticsTestCiOptions(
87+
execution_rule=SyntheticsTestExecutionRule.BLOCKING,
88+
),
3289
device_ids=[
33-
"synthetics:mobile:device:iphone_15_ios_17",
90+
"synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16",
3491
],
3592
mobile_application=SyntheticsMobileTestsMobileApplication(
36-
application_id="ab0e0aed-536d-411a-9a99-5428c27d8f8e",
37-
reference_id="6115922a-5f5d-455e-bc7e-7955a57f3815",
38-
reference_type=SyntheticsMobileTestsMobileApplicationReferenceType.VERSION,
93+
application_id="00000000-0000-0000-0000-aaaaaaaaaaaa",
94+
reference_id="00000000-0000-0000-0000-aaaaaaaaaaab",
95+
reference_type=SyntheticsMobileTestsMobileApplicationReferenceType.LATEST,
3996
),
40-
tick_every=3600,
97+
monitor_options=SyntheticsTestOptionsMonitorOptions(
98+
notification_preset_name=SyntheticsTestOptionsMonitorOptionsNotificationPresetName.SHOW_ALL,
99+
),
100+
restricted_roles=SyntheticsRestrictedRoles(
101+
[
102+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
103+
]
104+
),
105+
retry=SyntheticsTestOptionsRetry(),
106+
scheduling=SyntheticsTestOptionsScheduling(
107+
timeframes=[
108+
SyntheticsTestOptionsSchedulingTimeframe(
109+
day=1,
110+
_from="07:00",
111+
to="16:00",
112+
),
113+
SyntheticsTestOptionsSchedulingTimeframe(
114+
day=3,
115+
_from="07:00",
116+
to="16:00",
117+
),
118+
],
119+
timezone="America/New_York",
120+
),
121+
tick_every=300,
41122
),
42-
steps=[],
123+
status=SyntheticsTestPauseStatus.LIVE,
124+
steps=[
125+
SyntheticsMobileStep(
126+
name="",
127+
params=SyntheticsMobileStepParams(
128+
check=SyntheticsCheckType.EQUALS,
129+
direction=SyntheticsMobileStepParamsDirection.UP,
130+
element=SyntheticsMobileStepParamsElement(
131+
context_type=SyntheticsMobileStepParamsElementContextType.NATIVE,
132+
relative_position=SyntheticsMobileStepParamsElementRelativePosition(),
133+
user_locator=SyntheticsMobileStepParamsElementUserLocator(
134+
values=[
135+
SyntheticsMobileStepParamsElementUserLocatorValuesItems(
136+
type=SyntheticsMobileStepParamsElementUserLocatorValuesItemsType.ACCESSIBILITY_ID,
137+
),
138+
],
139+
),
140+
),
141+
positions=[
142+
SyntheticsMobileStepParamsPositionsItems(),
143+
],
144+
variable=SyntheticsMobileStepParamsVariable(
145+
example="",
146+
name="VAR_NAME",
147+
),
148+
),
149+
public_id="pub-lic-id0",
150+
type=SyntheticsMobileStepType.ASSERTELEMENTCONTENT,
151+
),
152+
],
153+
tags=[
154+
"env:production",
155+
],
156+
type=SyntheticsMobileTestType.MOBILE,
43157
)
44158

45159
configuration = Configuration()
46160
with ApiClient(configuration) as api_client:
47161
api_instance = SyntheticsApi(api_client)
48-
response = api_instance.update_mobile_test(public_id=SYNTHETICS_MOBILE_TEST_PUBLIC_ID, body=body)
162+
response = api_instance.update_mobile_test(public_id="public_id", body=body)
49163

50164
print(response)
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
"""
2+
Edit a Mobile test returns "OK" response
3+
"""
4+
5+
from os import environ
6+
from datadog_api_client import ApiClient, Configuration
7+
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
8+
from datadog_api_client.v1.model.synthetics_mobile_test import SyntheticsMobileTest
9+
from datadog_api_client.v1.model.synthetics_mobile_test_config import SyntheticsMobileTestConfig
10+
from datadog_api_client.v1.model.synthetics_mobile_test_options import SyntheticsMobileTestOptions
11+
from datadog_api_client.v1.model.synthetics_mobile_test_type import SyntheticsMobileTestType
12+
from datadog_api_client.v1.model.synthetics_mobile_tests_mobile_application import (
13+
SyntheticsMobileTestsMobileApplication,
14+
)
15+
from datadog_api_client.v1.model.synthetics_mobile_tests_mobile_application_reference_type import (
16+
SyntheticsMobileTestsMobileApplicationReferenceType,
17+
)
18+
from datadog_api_client.v1.model.synthetics_test_pause_status import SyntheticsTestPauseStatus
19+
20+
# there is a valid "synthetics_mobile_test" in the system
21+
SYNTHETICS_MOBILE_TEST_PUBLIC_ID = environ["SYNTHETICS_MOBILE_TEST_PUBLIC_ID"]
22+
23+
body = SyntheticsMobileTest(
24+
name="Example-Synthetic-updated",
25+
status=SyntheticsTestPauseStatus.PAUSED,
26+
type=SyntheticsMobileTestType.MOBILE,
27+
config=SyntheticsMobileTestConfig(
28+
variables=[],
29+
),
30+
message="",
31+
options=SyntheticsMobileTestOptions(
32+
device_ids=[
33+
"synthetics:mobile:device:iphone_15_ios_17",
34+
],
35+
mobile_application=SyntheticsMobileTestsMobileApplication(
36+
application_id="ab0e0aed-536d-411a-9a99-5428c27d8f8e",
37+
reference_id="6115922a-5f5d-455e-bc7e-7955a57f3815",
38+
reference_type=SyntheticsMobileTestsMobileApplicationReferenceType.VERSION,
39+
),
40+
tick_every=3600,
41+
),
42+
steps=[],
43+
)
44+
45+
configuration = Configuration()
46+
with ApiClient(configuration) as api_client:
47+
api_instance = SyntheticsApi(api_client)
48+
response = api_instance.update_mobile_test(public_id=SYNTHETICS_MOBILE_TEST_PUBLIC_ID, body=body)
49+
50+
print(response)

examples/v2/synthetics/CreateSyntheticsNetworkTest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Synthetics: Create a Network Path test returns "OK" response
2+
Create a Network Path test returns "OK" response
33
"""
44

55
from datadog_api_client import ApiClient, Configuration

examples/v2/synthetics/CreateSyntheticsSuite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Synthetics: Create a test suite returns "OK" response
2+
Create a test suite returns "OK" response
33
"""
44

55
from datadog_api_client import ApiClient, Configuration

0 commit comments

Comments
 (0)