Skip to content

Commit d4ee184

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ef2d75a of spec repo
1 parent b7f080f commit d4ee184

File tree

35 files changed

+252
-478
lines changed

35 files changed

+252
-478
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25943,17 +25943,17 @@ components:
2594325943
description: Used for fixed span times, such as 'March 1 to March 7'.
2594425944
properties:
2594525945
from:
25946-
description: Start time in seconds since epoch.
25947-
example: 1712080128
25946+
description: Start time in milliseconds since epoch.
25947+
example: 1712080128000
2594825948
format: int64
2594925949
minimum: 0
2595025950
type: integer
2595125951
hide_incomplete_cost_data:
2595225952
description: Whether to hide incomplete cost data in the widget.
2595325953
type: boolean
2595425954
to:
25955-
description: End time in seconds since epoch.
25956-
example: 1712083128
25955+
description: End time in milliseconds since epoch.
25956+
example: 1712083128000
2595725957
format: int64
2595825958
minimum: 0
2595925959
type: integer
@@ -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
@@ -102003,7 +102003,7 @@ paths:
102003102003
appKeyAuth: []
102004102004
- AuthZ:
102005102005
- synthetics_write
102006-
summary: Create a test suite
102006+
summary: 'Synthetics: Create a test suite'
102007102007
tags:
102008102008
- Synthetics
102009102009
x-permission:
@@ -102040,7 +102040,7 @@ paths:
102040102040
appKeyAuth: []
102041102041
- AuthZ:
102042102042
- synthetics_write
102043-
summary: Bulk delete suites
102043+
summary: 'Synthetics: Bulk delete suites'
102044102044
tags:
102045102045
- Synthetics
102046102046
x-permission:
@@ -102049,7 +102049,7 @@ paths:
102049102049
- synthetics_write
102050102050
/api/v2/synthetics/suites/search:
102051102051
get:
102052-
description: Search for test suites.
102052+
description: Search for Synthetics suites.
102053102053
operationId: SearchSuites
102054102054
parameters:
102055102055
- description: The search query.
@@ -102108,7 +102108,7 @@ paths:
102108102108
appKeyAuth: []
102109102109
- AuthZ:
102110102110
- synthetics_read
102111-
summary: Search test suites
102111+
summary: Search Synthetics suites
102112102112
tags:
102113102113
- Synthetics
102114102114
x-permission:
@@ -102145,7 +102145,7 @@ paths:
102145102145
appKeyAuth: []
102146102146
- AuthZ:
102147102147
- synthetics_read
102148-
summary: Get a suite
102148+
summary: 'Synthetics: Get a suite'
102149102149
tags:
102150102150
- Synthetics
102151102151
x-permission:
@@ -102188,7 +102188,7 @@ paths:
102188102188
appKeyAuth: []
102189102189
- AuthZ:
102190102190
- synthetics_write
102191-
summary: Edit a test suite
102191+
summary: 'Synthetics: Edit a test suite'
102192102192
tags:
102193102193
- Synthetics
102194102194
x-permission:
@@ -102230,7 +102230,7 @@ paths:
102230102230
appKeyAuth: []
102231102231
- AuthZ:
102232102232
- synthetics_write
102233-
summary: Bulk delete tests
102233+
summary: 'Synthetics: Bulk delete tests'
102234102234
tags:
102235102235
- Synthetics
102236102236
x-permission:
@@ -102266,7 +102266,7 @@ paths:
102266102266
appKeyAuth: []
102267102267
- AuthZ:
102268102268
- synthetics_write
102269-
summary: Create a Network Path test
102269+
summary: 'Synthetics: Create a Network Path test'
102270102270
tags:
102271102271
- Synthetics
102272102272
x-permission:
@@ -102310,7 +102310,7 @@ paths:
102310102310
appKeyAuth: []
102311102311
- AuthZ:
102312102312
- synthetics_read
102313-
summary: Get a Network Path test
102313+
summary: 'Synthetics: Get a Network Path test'
102314102314
tags:
102315102315
- Synthetics
102316102316
x-permission:
@@ -102359,7 +102359,7 @@ paths:
102359102359
appKeyAuth: []
102360102360
- AuthZ:
102361102361
- synthetics_write
102362-
summary: Edit a Network Path test
102362+
summary: 'Synthetics: Edit a Network Path test'
102363102363
tags:
102364102364
- Synthetics
102365102365
x-permission:
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
"""
2-
Get a mobile test returns "OK" response
2+
Get a Mobile test returns "OK" response
33
"""
44

5+
from os import environ
56
from datadog_api_client import ApiClient, Configuration
67
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
78

9+
# there is a valid "synthetics_mobile_test" in the system
10+
SYNTHETICS_MOBILE_TEST_PUBLIC_ID = environ["SYNTHETICS_MOBILE_TEST_PUBLIC_ID"]
11+
812
configuration = Configuration()
913
with ApiClient(configuration) as api_client:
1014
api_instance = SyntheticsApi(api_client)
1115
response = api_instance.get_mobile_test(
12-
public_id="public_id",
16+
public_id=SYNTHETICS_MOBILE_TEST_PUBLIC_ID,
1317
)
1418

1519
print(response)

examples/v1/synthetics/GetMobileTest_212471226.py

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 17 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,10 @@
11
"""
2-
Edit a mobile test returns "OK" response
2+
Edit a Mobile test returns "OK" response
33
"""
44

5+
from os import environ
56
from datadog_api_client import ApiClient, Configuration
67
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
348
from datadog_api_client.v1.model.synthetics_mobile_test import SyntheticsMobileTest
359
from datadog_api_client.v1.model.synthetics_mobile_test_config import SyntheticsMobileTestConfig
3610
from datadog_api_client.v1.model.synthetics_mobile_test_options import SyntheticsMobileTestOptions
@@ -41,124 +15,36 @@
4115
from datadog_api_client.v1.model.synthetics_mobile_tests_mobile_application_reference_type import (
4216
SyntheticsMobileTestsMobileApplicationReferenceType,
4317
)
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-
)
5618
from datadog_api_client.v1.model.synthetics_test_pause_status import SyntheticsTestPauseStatus
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-
)
19+
20+
# there is a valid "synthetics_mobile_test" in the system
21+
SYNTHETICS_MOBILE_TEST_PUBLIC_ID = environ["SYNTHETICS_MOBILE_TEST_PUBLIC_ID"]
6322

6423
body = SyntheticsMobileTest(
24+
name="Example-Synthetic-updated",
25+
status=SyntheticsTestPauseStatus.PAUSED,
26+
type=SyntheticsMobileTestType.MOBILE,
6527
config=SyntheticsMobileTestConfig(
66-
variables=[
67-
SyntheticsConfigVariable(
68-
name="VARIABLE_NAME",
69-
secure=False,
70-
type=SyntheticsConfigVariableType.TEXT,
71-
),
72-
],
28+
variables=[],
7329
),
74-
device_ids=[
75-
"chrome.laptop_large",
76-
],
77-
message="Notification message",
78-
name="Example test name",
30+
message="",
7931
options=SyntheticsMobileTestOptions(
80-
bindings=[
81-
SyntheticsTestRestrictionPolicyBinding(
82-
principals=[],
83-
relation=SyntheticsTestRestrictionPolicyBindingRelation.EDITOR,
84-
),
85-
],
86-
ci=SyntheticsTestCiOptions(
87-
execution_rule=SyntheticsTestExecutionRule.BLOCKING,
88-
),
8932
device_ids=[
90-
"synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16",
33+
"synthetics:mobile:device:iphone_15_ios_17",
9134
],
9235
mobile_application=SyntheticsMobileTestsMobileApplication(
93-
application_id="00000000-0000-0000-0000-aaaaaaaaaaaa",
94-
reference_id="00000000-0000-0000-0000-aaaaaaaaaaab",
95-
reference_type=SyntheticsMobileTestsMobileApplicationReferenceType.LATEST,
36+
application_id="ab0e0aed-536d-411a-9a99-5428c27d8f8e",
37+
reference_id="6115922a-5f5d-455e-bc7e-7955a57f3815",
38+
reference_type=SyntheticsMobileTestsMobileApplicationReferenceType.VERSION,
9639
),
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,
40+
tick_every=3600,
12241
),
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,
42+
steps=[],
15743
)
15844

15945
configuration = Configuration()
16046
with ApiClient(configuration) as api_client:
16147
api_instance = SyntheticsApi(api_client)
162-
response = api_instance.update_mobile_test(public_id="public_id", body=body)
48+
response = api_instance.update_mobile_test(public_id=SYNTHETICS_MOBILE_TEST_PUBLIC_ID, body=body)
16349

16450
print(response)

0 commit comments

Comments
 (0)