Skip to main content

synthetics_variable_jsonpatches

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

Overview

Namesynthetics_variable_jsonpatches
TypeResource
Iddatadog.monitoring.synthetics_variable_jsonpatches

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
patch_global_variableupdatevariable_id, dataPatch a global variable using JSON Patch (RFC 6902).<br />This endpoint allows partial updates to a global variable by specifying only the fields to modify.<br /><br />Common operations include:<br />- Replace field values: &#123;"op": "replace", "path": "/name", "value": "new_name"&#125;<br />- Update nested values: &#123;"op": "replace", "path": "/value/value", "value": "new_value"&#125;<br />- Add/update tags: &#123;"op": "add", "path": "/tags/-", "value": "new_tag"&#125;<br />- Remove fields: &#123;"op": "remove", "path": "/description"&#125;

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.

UPDATE examples

Patch a global variable using JSON Patch (RFC 6902).<br />This endpoint allows partial updates to a global variable by specifying only the fields to modify.<br /><br />Common operations include:<br />- Replace field values: &#123;"op": "replace", "path": "/name", "value": "new_name"&#125;<br />- Update nested values: &#123;"op": "replace", "path": "/value/value", "value": "new_value"&#125;<br />- Add/update tags: &#123;"op": "add", "path": "/tags/-", "value": "new_tag"&#125;<br />- Remove fields: &#123;"op": "remove", "path": "/description"&#125;

UPDATE datadog.monitoring.synthetics_variable_jsonpatches
SET
data = '{{ data }}'
WHERE
variable_id = '{{ variable_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;