Skip to main content

drop

drop is a DDL operation that removes a path and its entire subtree.

Use it when the target must exist and missing data should be treated as an error. For idempotent cleanup, use unset or omit.

YOp

- drop:
path: config/legacy_settings

Parameters

ParameterTypeRequiredDescription
pathstringyesPath to the key or sequence item to remove. The path must exist.

Behavior

  • Removes the target value and all nested values below it.
  • Fails if the path does not exist.
  • Can be used for strict deletion when missing state should stop execution.

Errors

ErrorMeaning
PATH_NOT_FOUNDThe target path does not exist.

Example

yops:
- drop:
path: config/legacy_settings

Input:

config:
host: app.example.com
legacy_settings:
mode: old

Output:

config:
host: app.example.com