Skip to main content

diagrid notification destination update

Update a notification destination

Description​

Update a notification destination.

A flag that is not given leaves that part unchanged. The destination's type cannot be changed after it is created.

--webhook-check-field field=value, or field= for a field that must be missing or empty, replaces the field and the value of the response check. It keeps the stored message field unless --webhook-check-message is also given. --webhook-check-message on its own changes only the message field; an empty value clears it. An empty --webhook-check-field removes the response check, so any 2xx response is delivered again.

diagrid notification destination update <name> [flags]

Examples​


# Point the destination at a new endpoint
diagrid notification destination update ops-webhook \
--webhook-url https://hooks.example.com/catalyst-v2

# Rotate the bearer token
diagrid notification destination update ops-webhook --webhook-auth-token n3ws3cr3t

# Fail deliveries Slack's Web API rejects in its response body
diagrid notification destination update slack \
--webhook-check-field ok=true \
--webhook-check-message error

# Remove the response check
diagrid notification destination update slack --webhook-check-field ""

Options​

-p, --project string Name of existing project
--webhook-url string Replacement endpoint
--webhook-auth-token string Replacement bearer token; stored in the project's secret store
--webhook-header stringArray Replacement request headers as Name:value; giving any replaces the whole set. Content-Type and Authorization are set by the destination and cannot be configured.
--webhook-body-template string Replacement body template
--webhook-check-field string Deliver only when this field of the JSON response body has this value, as field=value (for Slack's Web API: ok=true). field= with no value delivers only when the field is missing, null or empty (for an error field present only on failure: error=). Pass an empty value to remove the response check
--webhook-check-message string Field of the JSON response body whose value is reported as the failure reason (for Slack's Web API: error)
-h, --help help for update

Options inherited from parent commands​

--api-key string Diagrid Cloud API key

SEE ALSO​