-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathsynthetics_api_step.py
More file actions
74 lines (56 loc) · 2.87 KB
/
synthetics_api_step.py
File metadata and controls
74 lines (56 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations
from datadog_api_client.model_utils import (
ModelComposed,
cached_property,
)
class SyntheticsAPIStep(ModelComposed):
def __init__(self, **kwargs):
"""
The steps used in a Synthetic multi-step API test.
:param allow_failure: Determines whether or not to continue with test if this step fails.
:type allow_failure: bool, optional
:param assertions: Array of assertions used for the test.
:type assertions: [SyntheticsAssertion]
:param exit_if_succeed: Determines whether or not to exit the test if the step succeeds.
:type exit_if_succeed: bool, optional
:param extracted_values: Array of values to parse and save as variables from the response.
:type extracted_values: [SyntheticsParsingOptions], optional
:param extracted_values_from_script: Generate variables using JavaScript.
:type extracted_values_from_script: str, optional
:param id: ID of the step.
:type id: str, optional
:param is_critical: Determines whether or not to consider the entire test as failed if this step fails.
Can be used only if `allowFailure` is `true`.
:type is_critical: bool, optional
:param name: The name of the step.
:type name: str
:param request: Object describing the Synthetic test request.
:type request: SyntheticsTestRequest
:param retry: Object describing the retry strategy to apply to a Synthetic test.
:type retry: SyntheticsTestOptionsRetry, optional
:param subtype: The subtype of the Synthetic multi-step API test step.
:type subtype: SyntheticsAPITestStepSubtype
:param value: The time to wait in seconds. Minimum value: 0. Maximum value: 180.
:type value: int
"""
super().__init__(kwargs)
@cached_property
def _composed_schemas(_):
# we need this here to make our import statements work
# we must store _composed_schemas in here so the code is only run
# when we invoke this method. If we kept this at the class
# level we would get an error because the class level
# code would be run when this module is imported, and these composed
# classes don't exist yet because their module has not finished
# loading
from datadog_api_client.v1.model.synthetics_api_test_step import SyntheticsAPITestStep
from datadog_api_client.v1.model.synthetics_api_wait_step import SyntheticsAPIWaitStep
return {
"oneOf": [
SyntheticsAPITestStep,
SyntheticsAPIWaitStep,
],
}