Skip to content

[Synthetics] Add monitor name and priority options #473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.4.1.dev8",
"regenerated": "2021-06-08 12:35:42.764856",
"spec_repo_commit": "6fd1064"
"regenerated": "2021-06-08 14:40:53.143657",
"spec_repo_commit": "e6c8320"
},
"v2": {
"apigentools_version": "1.4.1.dev8",
"regenerated": "2021-06-08 12:36:09.047977",
"spec_repo_commit": "6fd1064"
"regenerated": "2021-06-08 14:41:16.671111",
"spec_repo_commit": "e6c8320"
}
}
}
8 changes: 8 additions & 0 deletions docs/v1/SyntheticsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,11 @@ with ApiClient(configuration) as api_client:
follow_redirects=True,
min_failure_duration=1,
min_location_failed=1,
monitor_name="monitor_name_example",
monitor_options=SyntheticsTestOptionsMonitorOptions(
renotify_interval=0,
),
monitor_priority=1,
no_screenshot=True,
retry=SyntheticsTestOptionsRetry(
count=1,
Expand Down Expand Up @@ -484,9 +486,11 @@ with ApiClient(configuration) as api_client:
follow_redirects=True,
min_failure_duration=1,
min_location_failed=1,
monitor_name="monitor_name_example",
monitor_options=SyntheticsTestOptionsMonitorOptions(
renotify_interval=0,
),
monitor_priority=1,
no_screenshot=True,
retry=SyntheticsTestOptionsRetry(
count=1,
Expand Down Expand Up @@ -1898,9 +1902,11 @@ with ApiClient(configuration) as api_client:
follow_redirects=True,
min_failure_duration=1,
min_location_failed=1,
monitor_name="monitor_name_example",
monitor_options=SyntheticsTestOptionsMonitorOptions(
renotify_interval=0,
),
monitor_priority=1,
no_screenshot=True,
retry=SyntheticsTestOptionsRetry(
count=1,
Expand Down Expand Up @@ -2049,9 +2055,11 @@ with ApiClient(configuration) as api_client:
follow_redirects=True,
min_failure_duration=1,
min_location_failed=1,
monitor_name="monitor_name_example",
monitor_options=SyntheticsTestOptionsMonitorOptions(
renotify_interval=0,
),
monitor_priority=1,
no_screenshot=True,
retry=SyntheticsTestOptionsRetry(
count=1,
Expand Down
2 changes: 2 additions & 0 deletions docs/v1/SyntheticsTestOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ Name | Type | Description | Notes
**follow_redirects** | **bool** | For API HTTP test, whether or not the test should follow redirects. | [optional]
**min_failure_duration** | **int** | Minimum amount of time in failure required to trigger an alert. | [optional]
**min_location_failed** | **int** | Minimum number of locations in failure required to trigger an alert. | [optional]
**monitor_name** | **str** | The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs. | [optional]
**monitor_options** | [**SyntheticsTestOptionsMonitorOptions**](SyntheticsTestOptionsMonitorOptions.md) | | [optional]
**monitor_priority** | **int** | Integer from 1 (high) to 5 (low) indicating alert severity. | [optional]
**no_screenshot** | **bool** | Prevents saving screenshots of the steps. | [optional]
**retry** | [**SyntheticsTestOptionsRetry**](SyntheticsTestOptionsRetry.md) | | [optional]
**tick_every** | [**SyntheticsTickInterval**](SyntheticsTickInterval.md) | | [optional]
Expand Down
13 changes: 12 additions & 1 deletion src/datadog_api_client/v1/model/synthetics_test_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ class SyntheticsTestOptions(ModelNormal):

allowed_values = {}

validations = {}
validations = {
("monitor_priority",): {
"inclusive_maximum": 5,
"inclusive_minimum": 1,
},
}

additional_properties_type = None

Expand All @@ -85,7 +90,9 @@ def openapi_types():
"follow_redirects": (bool,), # noqa: E501
"min_failure_duration": (int,), # noqa: E501
"min_location_failed": (int,), # noqa: E501
"monitor_name": (str,), # noqa: E501
"monitor_options": (SyntheticsTestOptionsMonitorOptions,), # noqa: E501
"monitor_priority": (int,), # noqa: E501
"no_screenshot": (bool,), # noqa: E501
"retry": (SyntheticsTestOptionsRetry,), # noqa: E501
"tick_every": (SyntheticsTickInterval,), # noqa: E501
Expand All @@ -103,7 +110,9 @@ def discriminator():
"follow_redirects": "follow_redirects", # noqa: E501
"min_failure_duration": "min_failure_duration", # noqa: E501
"min_location_failed": "min_location_failed", # noqa: E501
"monitor_name": "monitor_name", # noqa: E501
"monitor_options": "monitor_options", # noqa: E501
"monitor_priority": "monitor_priority", # noqa: E501
"no_screenshot": "noScreenshot", # noqa: E501
"retry": "retry", # noqa: E501
"tick_every": "tick_every", # noqa: E501
Expand Down Expand Up @@ -164,7 +173,9 @@ def __init__(self, *args, **kwargs): # noqa: E501
follow_redirects (bool): For API HTTP test, whether or not the test should follow redirects.. [optional] # noqa: E501
min_failure_duration (int): Minimum amount of time in failure required to trigger an alert.. [optional] # noqa: E501
min_location_failed (int): Minimum number of locations in failure required to trigger an alert.. [optional] # noqa: E501
monitor_name (str): The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.. [optional] # noqa: E501
monitor_options (SyntheticsTestOptionsMonitorOptions): [optional] # noqa: E501
monitor_priority (int): Integer from 1 (high) to 5 (low) indicating alert severity.. [optional] # noqa: E501
no_screenshot (bool): Prevents saving screenshots of the steps.. [optional] # noqa: E501
retry (SyntheticsTestOptionsRetry): [optional] # noqa: E501
tick_every (SyntheticsTickInterval): [optional] # noqa: E501
Expand Down
10 changes: 10 additions & 0 deletions src/datadog_api_client/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9778,6 +9778,10 @@ components:
an alert.'
format: int64
type: integer
monitor_name:
description: The monitor name is used for the alert title as well as for
all monitor dashboard widgets and SLOs.
type: string
monitor_options:
description: 'Object containing the options for a Synthetic test as a monitor

Expand All @@ -9793,6 +9797,12 @@ components:
minimum: 0
type: integer
type: object
monitor_priority:
description: Integer from 1 (high) to 5 (low) indicating alert severity.
format: int32
maximum: 5
minimum: 1
type: integer
noScreenshot:
description: Prevents saving screenshots of the steps.
type: boolean
Expand Down
Loading