Skip to main content

synthetics_global_variables

Creates, updates, deletes, gets or lists a synthetics_global_variables resource.

Overview

Namesynthetics_global_variables
TypeResource
Iddatadog.monitoring.synthetics_global_variables

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringUnique identifier of the global variable.
namestringName of the global variable. Unique across Synthetic global variables. (example: MY_VARIABLE)
parse_test_public_idstringA Synthetic test ID to use as a test to generate the variable value. (example: abc-def-123)
attributesobjectAttributes of the global variable.
descriptionstringDescription of the global variable. (example: Example description)
is_fidobooleanDetermines if the global variable is a FIDO variable.
is_totpbooleanDetermines if the global variable is a TOTP/MFA variable.
parse_test_optionsobjectParser options to use for retrieving a Synthetic global variable from a Synthetic test. Used in conjunction with parse_test_public_id.
tagsarrayTags of the global variable.
valueobjectValue of the global variable.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_global_variableselectvariable_idGet the detailed configuration of a global variable.
list_global_variablesselectGet the list of all Synthetic global variables.
create_global_variableinsertdescription, name, tagsCreate a Synthetic global variable.
edit_global_variablereplacevariable_id, description, name, tagsEdit a Synthetic global variable.
delete_global_variabledeletevariable_idDelete a Synthetic global variable.

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.

NameDatatypeDescription
sitestringThe 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.
variable_idstringThe ID of the global variable.

SELECT examples

Get the detailed configuration of a global variable.

SELECT
id,
name,
parse_test_public_id,
attributes,
description,
is_fido,
is_totp,
parse_test_options,
tags,
value
FROM datadog.monitoring.synthetics_global_variables
WHERE variable_id = '{{ variable_id }}' -- required
;

INSERT examples

Create a Synthetic global variable.

INSERT INTO datadog.monitoring.synthetics_global_variables (
attributes,
description,
is_fido,
is_totp,
name,
parse_test_options,
parse_test_public_id,
tags,
value
)
SELECT
'{{ attributes }}',
'{{ description }}' /* required */,
{{ is_fido }},
{{ is_totp }},
'{{ name }}' /* required */,
'{{ parse_test_options }}',
'{{ parse_test_public_id }}',
'{{ tags }}' /* required */,
'{{ value }}'
RETURNING
id,
name,
parse_test_public_id,
attributes,
description,
is_fido,
is_totp,
parse_test_options,
tags,
value
;

REPLACE examples

Edit a Synthetic global variable.

REPLACE datadog.monitoring.synthetics_global_variables
SET
attributes = '{{ attributes }}',
description = '{{ description }}',
is_fido = {{ is_fido }},
is_totp = {{ is_totp }},
name = '{{ name }}',
parse_test_options = '{{ parse_test_options }}',
parse_test_public_id = '{{ parse_test_public_id }}',
tags = '{{ tags }}',
value = '{{ value }}'
WHERE
variable_id = '{{ variable_id }}' --required
AND description = '{{ description }}' --required
AND name = '{{ name }}' --required
AND tags = '{{ tags }}' --required
RETURNING
id,
name,
parse_test_public_id,
attributes,
description,
is_fido,
is_totp,
parse_test_options,
tags,
value;

DELETE examples

Delete a Synthetic global variable.

DELETE FROM datadog.monitoring.synthetics_global_variables
WHERE variable_id = '{{ variable_id }}' --required
;