synthetics_browser_tests
Creates, updates, deletes, gets or lists a synthetics_browser_tests resource.
Overview
| Name | synthetics_browser_tests |
| Type | Resource |
| Id | datadog.monitoring.synthetics_browser_tests |
Fields
The following fields are returned by SELECT queries:
- get_browser_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. |
config | object | Configuration object for a Synthetic browser test. |
locations | array | Array of locations used to run the test. |
message | string | Notification message associated with the test. Message can either be text or an empty string. (example: ) |
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, browser. (browser) (default: browser, example: browser) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_browser_test | select | public_id | Get the detailed configuration (including steps) associated with<br />a Synthetic browser test. | |
create_synthetics_browser_test | insert | config, locations, name, options, type, message | Create a Synthetic browser test. | |
update_browser_test | replace | public_id, config, locations, name, options, type, message | Edit the configuration of a Synthetic browser 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 edit. |
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_browser_test
Get the detailed configuration (including steps) associated with<br />a Synthetic browser test.
SELECT
name,
monitor_id,
public_id,
config,
locations,
message,
options,
status,
steps,
tags,
type
FROM datadog.monitoring.synthetics_browser_tests
WHERE public_id = '{{ public_id }}' -- required
;
INSERT examples
- create_synthetics_browser_test
- Manifest
Create a Synthetic browser test.
INSERT INTO datadog.monitoring.synthetics_browser_tests (
config,
locations,
message,
name,
options,
status,
steps,
tags,
type
)
SELECT
'{{ config }}' /* required */,
'{{ locations }}' /* required */,
'{{ message }}' /* required */,
'{{ name }}' /* required */,
'{{ options }}' /* required */,
'{{ status }}',
'{{ steps }}',
'{{ tags }}',
'{{ type }}' /* required */
RETURNING
name,
monitor_id,
public_id,
config,
locations,
message,
options,
status,
steps,
tags,
type
;
# Description fields are for documentation purposes
- name: synthetics_browser_tests
props:
- name: config
description: |
Configuration object for a Synthetic browser test.
value:
assertions:
- operator: "{{ operator }}"
property: "{{ property }}"
target: {{ target }}
timingsScope: "{{ timingsScope }}"
type: "{{ type }}"
code: "{{ code }}"
configVariables:
- example: "{{ example }}"
id: "{{ id }}"
name: "{{ name }}"
pattern: "{{ pattern }}"
secure: {{ secure }}
type: "{{ type }}"
request:
allow_insecure: {{ allow_insecure }}
basicAuth:
password: "{{ password }}"
type: "{{ type }}"
username: "{{ username }}"
accessKey: "{{ accessKey }}"
region: "{{ region }}"
secretKey: "{{ secretKey }}"
serviceName: "{{ serviceName }}"
sessionToken: "{{ sessionToken }}"
domain: "{{ domain }}"
workstation: "{{ workstation }}"
accessTokenUrl: "{{ accessTokenUrl }}"
audience: "{{ audience }}"
clientId: "{{ clientId }}"
clientSecret: "{{ clientSecret }}"
resource: "{{ resource }}"
scope: "{{ scope }}"
tokenApiAuthentication: "{{ tokenApiAuthentication }}"
addClaims:
exp: {{ exp }}
iat: {{ iat }}
algorithm: "{{ algorithm }}"
expiresIn: {{ expiresIn }}
header: "{{ header }}"
payload: "{{ payload }}"
secret: "{{ secret }}"
tokenPrefix: "{{ tokenPrefix }}"
body: "{{ body }}"
bodyType: "{{ bodyType }}"
callType: "{{ callType }}"
certificate:
cert:
content: "{{ content }}"
filename: "{{ filename }}"
updatedAt: "{{ updatedAt }}"
key:
content: "{{ content }}"
filename: "{{ filename }}"
updatedAt: "{{ updatedAt }}"
certificateDomains:
- "{{ certificateDomains }}"
checkCertificateRevocation: {{ checkCertificateRevocation }}
compressedJsonDescriptor: "{{ compressedJsonDescriptor }}"
compressedProtoFile: "{{ compressedProtoFile }}"
disableAiaIntermediateFetching: {{ disableAiaIntermediateFetching }}
dnsServer: "{{ dnsServer }}"
dnsServerPort: {{ dnsServerPort }}
files:
- bucketKey: "{{ bucketKey }}"
content: "{{ content }}"
encoding: "{{ encoding }}"
name: "{{ name }}"
originalFileName: "{{ originalFileName }}"
size: {{ size }}
type: "{{ type }}"
follow_redirects: {{ follow_redirects }}
form: "{{ form }}"
headers: "{{ headers }}"
host: "{{ host }}"
httpVersion: "{{ httpVersion }}"
ignore_certificate_validation: {{ ignore_certificate_validation }}
isMessageBase64Encoded: {{ isMessageBase64Encoded }}
mcpProtocolVersion: "{{ mcpProtocolVersion }}"
message: "{{ message }}"
metadata: "{{ metadata }}"
method: "{{ method }}"
noSavingResponseBody: {{ noSavingResponseBody }}
numberOfPackets: {{ numberOfPackets }}
persistCookies: {{ persistCookies }}
port: {{ port }}
proxy:
headers: "{{ headers }}"
url: "{{ url }}"
query: "{{ query }}"
servername: "{{ servername }}"
service: "{{ service }}"
shouldTrackHops: {{ shouldTrackHops }}
timeout: {{ timeout }}
toolArgs: "{{ toolArgs }}"
toolName: "{{ toolName }}"
url: "{{ url }}"
setCookie: "{{ setCookie }}"
variables:
- example: "{{ example }}"
id: "{{ id }}"
name: "{{ name }}"
pattern: "{{ pattern }}"
secure: {{ secure }}
type: "{{ type }}"
- name: locations
value:
- "{{ locations }}"
description: |
Array of locations used to run the test.
- name: message
value: "{{ message }}"
description: |
Notification message associated with the test. Message can either be text or an empty string.
- name: name
value: "{{ name }}"
description: |
Name of the test.
- name: options
description: |
Object describing the extra options for a Synthetic test.
value:
accept_self_signed: {{ accept_self_signed }}
allow_insecure: {{ allow_insecure }}
blockedRequestPatterns:
- "{{ blockedRequestPatterns }}"
captureNetworkPayloads: {{ captureNetworkPayloads }}
checkCertificateRevocation: {{ checkCertificateRevocation }}
ci:
executionRule: "{{ executionRule }}"
device_ids:
- "{{ device_ids }}"
disableAiaIntermediateFetching: {{ disableAiaIntermediateFetching }}
disableCors: {{ disableCors }}
disableCsp: {{ disableCsp }}
enableProfiling: {{ enableProfiling }}
enableSecurityTesting: {{ enableSecurityTesting }}
follow_redirects: {{ follow_redirects }}
httpVersion: "{{ httpVersion }}"
ignoreServerCertificateError: {{ ignoreServerCertificateError }}
ignore_certificate_validation: {{ ignore_certificate_validation }}
initialNavigationTimeout: {{ initialNavigationTimeout }}
min_failure_duration: {{ min_failure_duration }}
min_location_failed: {{ min_location_failed }}
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 }}
rumSettings:
applicationId: "{{ applicationId }}"
clientTokenId: {{ clientTokenId }}
isEnabled: {{ isEnabled }}
scheduling:
timeframes:
- day: {{ day }}
from: "{{ from }}"
to: "{{ to }}"
timezone: "{{ timezone }}"
tick_every: {{ tick_every }}
- 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 }}
alwaysExecute: {{ alwaysExecute }}
exitIfSucceed: {{ exitIfSucceed }}
isCritical: {{ isCritical }}
name: "{{ name }}"
noScreenshot: {{ noScreenshot }}
params: "{{ params }}"
public_id: "{{ public_id }}"
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, `browser`.
valid_values: ['browser']
default: browser
REPLACE examples
- update_browser_test
Edit the configuration of a Synthetic browser test.
REPLACE datadog.monitoring.synthetics_browser_tests
SET
config = '{{ config }}',
locations = '{{ locations }}',
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 locations = '{{ locations }}' --required
AND name = '{{ name }}' --required
AND options = '{{ options }}' --required
AND type = '{{ type }}' --required
AND message = '{{ message }}' --required
RETURNING
name,
monitor_id,
public_id,
config,
locations,
message,
options,
status,
steps,
tags,
type;