Skip to main content

webhook_custom_variables

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

Overview

Namewebhook_custom_variables
TypeResource
Iddatadog.integrations.webhook_custom_variables

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the variable. It corresponds with <CUSTOM_VARIABLE_NAME>. It must only contains upper-case characters, integers or underscores. (example: CUSTOM_VARIABLE_NAME)
is_secretbooleanMake custom variable is secret or not. If the custom variable is secret, the value is not returned in the response payload.
valuestringValue of the custom variable. It won't be returned if the variable is secret. (example: CUSTOM_VARIABLE_VALUE)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_webhooks_integration_custom_variableselectcustom_variable_nameShows the content of the custom variable with the name <CUSTOM_VARIABLE_NAME>.<br /><br />If the custom variable is secret, the value does not return in the<br />response payload.
create_webhooks_integration_custom_variableinsertname, value, is_secretCreates an endpoint with the name <CUSTOM_VARIABLE_NAME>.
update_webhooks_integration_custom_variablereplacecustom_variable_nameUpdates the endpoint with the name <CUSTOM_VARIABLE_NAME>.
delete_webhooks_integration_custom_variabledeletecustom_variable_nameDeletes the endpoint with the name <CUSTOM_VARIABLE_NAME>.

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
custom_variable_namestringThe name of the custom variable.
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.

SELECT examples

Shows the content of the custom variable with the name <CUSTOM_VARIABLE_NAME>.<br /><br />If the custom variable is secret, the value does not return in the<br />response payload.

SELECT
name,
is_secret,
value
FROM datadog.integrations.webhook_custom_variables
WHERE custom_variable_name = '{{ custom_variable_name }}' -- required
;

INSERT examples

Creates an endpoint with the name <CUSTOM_VARIABLE_NAME>.

INSERT INTO datadog.integrations.webhook_custom_variables (
is_secret,
name,
value
)
SELECT
{{ is_secret }} /* required */,
'{{ name }}' /* required */,
'{{ value }}' /* required */
RETURNING
name,
is_secret,
value
;

REPLACE examples

Updates the endpoint with the name <CUSTOM_VARIABLE_NAME>.

REPLACE datadog.integrations.webhook_custom_variables
SET
is_secret = {{ is_secret }},
name = '{{ name }}',
value = '{{ value }}'
WHERE
custom_variable_name = '{{ custom_variable_name }}' --required
RETURNING
name,
is_secret,
value;

DELETE examples

Deletes the endpoint with the name <CUSTOM_VARIABLE_NAME>.

DELETE FROM datadog.integrations.webhook_custom_variables
WHERE custom_variable_name = '{{ custom_variable_name }}' --required
;