webhook_custom_variables
Creates, updates, deletes, gets or lists a webhook_custom_variables resource.
Overview
| Name | webhook_custom_variables |
| Type | Resource |
| Id | datadog.integrations.webhook_custom_variables |
Fields
The following fields are returned by SELECT queries:
- get_webhooks_integration_custom_variable
| Name | Datatype | Description |
|---|---|---|
name | string | The 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_secret | boolean | Make custom variable is secret or not. If the custom variable is secret, the value is not returned in the response payload. |
value | string | Value 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_webhooks_integration_custom_variable | select | custom_variable_name | 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. | |
create_webhooks_integration_custom_variable | insert | name, value, is_secret | Creates an endpoint with the name <CUSTOM_VARIABLE_NAME>. | |
update_webhooks_integration_custom_variable | replace | custom_variable_name | Updates the endpoint with the name <CUSTOM_VARIABLE_NAME>. | |
delete_webhooks_integration_custom_variable | delete | custom_variable_name | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
custom_variable_name | string | The name of the custom variable. |
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_webhooks_integration_custom_variable
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
- create_webhooks_integration_custom_variable
- Manifest
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
;
# Description fields are for documentation purposes
- name: webhook_custom_variables
props:
- name: is_secret
value: {{ is_secret }}
description: |
Make custom variable is secret or not.
If the custom variable is secret, the value is not returned in the response payload.
- name: name
value: "{{ name }}"
description: |
The name of the variable. It corresponds with `<CUSTOM_VARIABLE_NAME>`.
- name: value
value: "{{ value }}"
description: |
Value of the custom variable.
REPLACE examples
- update_webhooks_integration_custom_variable
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
- delete_webhooks_integration_custom_variable
Deletes the endpoint with the name <CUSTOM_VARIABLE_NAME>.
DELETE FROM datadog.integrations.webhook_custom_variables
WHERE custom_variable_name = '{{ custom_variable_name }}' --required
;