synthetics_global_variables
Creates, updates, deletes, gets or lists a synthetics_global_variables resource.
Overview
| Name | synthetics_global_variables |
| Type | Resource |
| Id | datadog.monitoring.synthetics_global_variables |
Fields
The following fields are returned by SELECT queries:
- get_global_variable
- list_global_variables
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier of the global variable. |
name | string | Name of the global variable. Unique across Synthetic global variables. (example: MY_VARIABLE) |
parse_test_public_id | string | A Synthetic test ID to use as a test to generate the variable value. (example: abc-def-123) |
attributes | object | Attributes of the global variable. |
description | string | Description of the global variable. (example: Example description) |
is_fido | boolean | Determines if the global variable is a FIDO variable. |
is_totp | boolean | Determines if the global variable is a TOTP/MFA variable. |
parse_test_options | object | Parser options to use for retrieving a Synthetic global variable from a Synthetic test. Used in conjunction with parse_test_public_id. |
tags | array | Tags of the global variable. |
value | object | Value of the global variable. |
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier of the global variable. |
name | string | Name of the global variable. Unique across Synthetic global variables. (example: MY_VARIABLE) |
parse_test_public_id | string | A Synthetic test ID to use as a test to generate the variable value. (example: abc-def-123) |
attributes | object | Attributes of the global variable. |
description | string | Description of the global variable. (example: Example description) |
is_fido | boolean | Determines if the global variable is a FIDO variable. |
is_totp | boolean | Determines if the global variable is a TOTP/MFA variable. |
parse_test_options | object | Parser options to use for retrieving a Synthetic global variable from a Synthetic test. Used in conjunction with parse_test_public_id. |
tags | array | Tags of the global variable. |
value | object | Value of the global variable. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_global_variable | select | variable_id | Get the detailed configuration of a global variable. | |
list_global_variables | select | Get the list of all Synthetic global variables. | ||
create_global_variable | insert | description, name, tags | Create a Synthetic global variable. | |
edit_global_variable | replace | variable_id, description, name, tags | Edit a Synthetic global variable. | |
delete_global_variable | delete | variable_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
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. |
variable_id | string | The ID of the global variable. |
SELECT examples
- get_global_variable
- list_global_variables
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
;
Get the list of all Synthetic global variables.
SELECT
id,
name,
parse_test_public_id,
attributes,
description,
is_fido,
is_totp,
parse_test_options,
tags,
value
FROM datadog.monitoring.synthetics_global_variables
;
INSERT examples
- create_global_variable
- Manifest
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
;
# Description fields are for documentation purposes
- name: synthetics_global_variables
props:
- name: attributes
description: |
Attributes of the global variable.
value:
restricted_roles:
- "{{ restricted_roles }}"
- name: description
value: "{{ description }}"
description: |
Description of the global variable.
- name: is_fido
value: {{ is_fido }}
description: |
Determines if the global variable is a FIDO variable.
- name: is_totp
value: {{ is_totp }}
description: |
Determines if the global variable is a TOTP/MFA variable.
- name: name
value: "{{ name }}"
description: |
Name of the global variable. Unique across Synthetic global variables.
- name: parse_test_options
description: |
Parser options to use for retrieving a Synthetic global variable from a Synthetic test. Used in conjunction with `parse_test_public_id`.
value:
field: "{{ field }}"
localVariableName: "{{ localVariableName }}"
parser:
type: "{{ type }}"
value: "{{ value }}"
type: "{{ type }}"
- name: parse_test_public_id
value: "{{ parse_test_public_id }}"
description: |
A Synthetic test ID to use as a test to generate the variable value.
- name: tags
value:
- "{{ tags }}"
description: |
Tags of the global variable.
- name: value
description: |
Value of the global variable.
value:
options:
totp_parameters:
digits: {{ digits }}
refresh_interval: {{ refresh_interval }}
secure: {{ secure }}
value: "{{ value }}"
REPLACE examples
- edit_global_variable
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_global_variable
Delete a Synthetic global variable.
DELETE FROM datadog.monitoring.synthetics_global_variables
WHERE variable_id = '{{ variable_id }}' --required
;