synthetics_mobile_tests
Creates, updates, deletes, gets or lists a synthetics_mobile_tests resource.
Overview
| Name | synthetics_mobile_tests |
| Type | Resource |
| Id | datadog.monitoring.synthetics_mobile_tests |
Fields
The following fields are returned by SELECT queries:
- get_mobile_test
| Name | Datatype | Description |
|---|---|---|
name | string | Name of the test. (example: Example test name) |
monitor_id | integer (int64) | The associated monitor ID. |
public_id | string | The public ID of the test. (example: 123-abc-456) |
config | object | Configuration object for a Synthetic mobile test. |
device_ids | array | Array with the different device IDs used to run the test. |
message | string | Notification message associated with the test. (example: Notification message) |
options | object | Object describing the extra options for a Synthetic test. |
status | string | Define whether you want to start (live) or pause (paused) a Synthetic test. (live, paused) (example: live) |
steps | array | Array of steps for the test. |
tags | array | Array of tags attached to the test. |
type | string | Type of the Synthetic test, mobile. (mobile) (default: mobile, example: mobile) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_mobile_test | select | public_id | Get the detailed configuration associated with<br />a Synthetic mobile test. | |
create_synthetics_mobile_test | insert | config, name, options, type, message | Create a Synthetic mobile test. | |
update_mobile_test | replace | public_id, config, name, options, type, message | Edit the configuration of a Synthetic mobile test. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
public_id | string | The public ID of the test to get details from. |
site | string | The Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both. |
SELECT examples
- get_mobile_test
Get the detailed configuration associated with<br />a Synthetic mobile test.
SELECT
name,
monitor_id,
public_id,
config,
device_ids,
message,
options,
status,
steps,
tags,
type
FROM datadog.monitoring.synthetics_mobile_tests
WHERE public_id = '{{ public_id }}' -- required
;
INSERT examples
- create_synthetics_mobile_test
- Manifest
Create a Synthetic mobile test.
INSERT INTO datadog.monitoring.synthetics_mobile_tests (
config,
device_ids,
message,
name,
options,
status,
steps,
tags,
type
)
SELECT
'{{ config }}' /* required */,
'{{ device_ids }}',
'{{ message }}' /* required */,
'{{ name }}' /* required */,
'{{ options }}' /* required */,
'{{ status }}',
'{{ steps }}',
'{{ tags }}',
'{{ type }}' /* required */
RETURNING
name,
monitor_id,
public_id,
config,
device_ids,
message,
options,
status,
steps,
tags,
type
;
# Description fields are for documentation purposes
- name: synthetics_mobile_tests
props:
- name: config
description: |
Configuration object for a Synthetic mobile test.
value:
initialApplicationArguments: "{{ initialApplicationArguments }}"
variables:
- example: "{{ example }}"
id: "{{ id }}"
name: "{{ name }}"
pattern: "{{ pattern }}"
secure: {{ secure }}
type: "{{ type }}"
- name: device_ids
value:
- "{{ device_ids }}"
description: |
Array with the different device IDs used to run the test.
- name: message
value: "{{ message }}"
description: |
Notification message associated with the test.
- name: name
value: "{{ name }}"
description: |
Name of the test.
- name: options
description: |
Object describing the extra options for a Synthetic test.
value:
allowApplicationCrash: {{ allowApplicationCrash }}
bindings:
- principals: "{{ principals }}"
relation: "{{ relation }}"
ci:
executionRule: "{{ executionRule }}"
defaultStepTimeout: {{ defaultStepTimeout }}
device_ids:
- "{{ device_ids }}"
disableAutoAcceptAlert: {{ disableAutoAcceptAlert }}
min_failure_duration: {{ min_failure_duration }}
mobileApplication:
applicationId: "{{ applicationId }}"
referenceId: "{{ referenceId }}"
referenceType: "{{ referenceType }}"
monitor_name: "{{ monitor_name }}"
monitor_options:
escalation_message: "{{ escalation_message }}"
notification_preset_name: "{{ notification_preset_name }}"
renotify_interval: {{ renotify_interval }}
renotify_occurrences: {{ renotify_occurrences }}
monitor_priority: {{ monitor_priority }}
noScreenshot: {{ noScreenshot }}
restricted_roles:
- "{{ restricted_roles }}"
retry:
count: {{ count }}
interval: {{ interval }}
scheduling:
timeframes:
- day: {{ day }}
from: "{{ from }}"
to: "{{ to }}"
timezone: "{{ timezone }}"
tick_every: {{ tick_every }}
verbosity: {{ verbosity }}
- name: status
value: "{{ status }}"
description: |
Define whether you want to start (`live`) or pause (`paused`) a
Synthetic test.
valid_values: ['live', 'paused']
- name: steps
description: |
Array of steps for the test.
value:
- allowFailure: {{ allowFailure }}
hasNewStepElement: {{ hasNewStepElement }}
isCritical: {{ isCritical }}
name: "{{ name }}"
noScreenshot: {{ noScreenshot }}
params:
check: "{{ check }}"
delay: {{ delay }}
direction: "{{ direction }}"
element:
context: "{{ context }}"
contextType: "{{ contextType }}"
elementDescription: "{{ elementDescription }}"
multiLocator: "{{ multiLocator }}"
relativePosition:
x: {{ x }}
y: {{ y }}
textContent: "{{ textContent }}"
userLocator:
failTestOnCannotLocate: {{ failTestOnCannotLocate }}
values:
- type: "{{ type }}"
value: "{{ value }}"
viewName: "{{ viewName }}"
enabled: {{ enabled }}
maxScrolls: {{ maxScrolls }}
positions:
- x: {{ x }}
y: {{ y }}
subtestPublicId: "{{ subtestPublicId }}"
value: "{{ value }}"
variable:
example: "{{ example }}"
name: "{{ name }}"
withEnter: {{ withEnter }}
x: {{ x }}
y: {{ y }}
publicId: "{{ publicId }}"
timeout: {{ timeout }}
type: "{{ type }}"
- name: tags
value:
- "{{ tags }}"
description: |
Array of tags attached to the test.
- name: type
value: "{{ type }}"
description: |
Type of the Synthetic test, `mobile`.
valid_values: ['mobile']
default: mobile
REPLACE examples
- update_mobile_test
Edit the configuration of a Synthetic mobile test.
REPLACE datadog.monitoring.synthetics_mobile_tests
SET
config = '{{ config }}',
device_ids = '{{ device_ids }}',
message = '{{ message }}',
name = '{{ name }}',
options = '{{ options }}',
status = '{{ status }}',
steps = '{{ steps }}',
tags = '{{ tags }}',
type = '{{ type }}'
WHERE
public_id = '{{ public_id }}' --required
AND config = '{{ config }}' --required
AND name = '{{ name }}' --required
AND options = '{{ options }}' --required
AND type = '{{ type }}' --required
AND message = '{{ message }}' --required
RETURNING
name,
monitor_id,
public_id,
config,
device_ids,
message,
options,
status,
steps,
tags,
type;