Skip to content

Commit 0711223

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a9f0899 of spec repo
1 parent 088a162 commit 0711223

33 files changed

Lines changed: 470 additions & 244 deletions

.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: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101907,7 +101907,7 @@ paths:
101907101907
appKeyAuth: []
101908101908
- AuthZ:
101909101909
- synthetics_write
101910-
summary: 'Synthetics: Create a test suite'
101910+
summary: Create a test suite
101911101911
tags:
101912101912
- Synthetics
101913101913
x-permission:
@@ -101944,7 +101944,7 @@ paths:
101944101944
appKeyAuth: []
101945101945
- AuthZ:
101946101946
- synthetics_write
101947-
summary: 'Synthetics: Bulk delete suites'
101947+
summary: Bulk delete suites
101948101948
tags:
101949101949
- Synthetics
101950101950
x-permission:
@@ -101953,7 +101953,7 @@ paths:
101953101953
- synthetics_write
101954101954
/api/v2/synthetics/suites/search:
101955101955
get:
101956-
description: Search for Synthetics suites.
101956+
description: Search for test suites.
101957101957
operationId: SearchSuites
101958101958
parameters:
101959101959
- description: The search query.
@@ -102012,7 +102012,7 @@ paths:
102012102012
appKeyAuth: []
102013102013
- AuthZ:
102014102014
- synthetics_read
102015-
summary: Search Synthetics suites
102015+
summary: Search test suites
102016102016
tags:
102017102017
- Synthetics
102018102018
x-permission:
@@ -102049,7 +102049,7 @@ paths:
102049102049
appKeyAuth: []
102050102050
- AuthZ:
102051102051
- synthetics_read
102052-
summary: 'Synthetics: Get a suite'
102052+
summary: Get a suite
102053102053
tags:
102054102054
- Synthetics
102055102055
x-permission:
@@ -102092,7 +102092,7 @@ paths:
102092102092
appKeyAuth: []
102093102093
- AuthZ:
102094102094
- synthetics_write
102095-
summary: 'Synthetics: Edit a test suite'
102095+
summary: Edit a test suite
102096102096
tags:
102097102097
- Synthetics
102098102098
x-permission:
@@ -102134,7 +102134,7 @@ paths:
102134102134
appKeyAuth: []
102135102135
- AuthZ:
102136102136
- synthetics_write
102137-
summary: 'Synthetics: Bulk delete tests'
102137+
summary: Bulk delete tests
102138102138
tags:
102139102139
- Synthetics
102140102140
x-permission:
@@ -102170,7 +102170,7 @@ paths:
102170102170
appKeyAuth: []
102171102171
- AuthZ:
102172102172
- synthetics_write
102173-
summary: 'Synthetics: Create a Network Path test'
102173+
summary: Create a Network Path test
102174102174
tags:
102175102175
- Synthetics
102176102176
x-permission:
@@ -102214,7 +102214,7 @@ paths:
102214102214
appKeyAuth: []
102215102215
- AuthZ:
102216102216
- synthetics_read
102217-
summary: 'Synthetics: Get a Network Path test'
102217+
summary: Get a Network Path test
102218102218
tags:
102219102219
- Synthetics
102220102220
x-permission:
@@ -102263,7 +102263,7 @@ paths:
102263102263
appKeyAuth: []
102264102264
- AuthZ:
102265102265
- synthetics_write
102266-
summary: 'Synthetics: Edit a Network Path test'
102266+
summary: Edit a Network Path test
102267102267
tags:
102268102268
- Synthetics
102269102269
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)

0 commit comments

Comments
 (0)