Browse docs
On this page

obi patch

Change some fields of a resource from the command line, without opening an editor.

obi patch changes the fields you give and leaves the rest alone.

Shell
obi patch TYPE NAME -p JSON
obi patch TYPE NAME --set KEY=VALUE [--set ...]

Run obi patch with no type to see every type you can patch.

Examples

Shell
obi patch alert payments-errors --set conditionThreshold=100
obi patch alert payments-errors --set conditionThreshold=100 --set windowSeconds=600
obi patch retention -p '{"retentionDays": 30}'

Flags

FlagMeaning
-p, --patch JSONThe fields to change, as a JSON object.
--set KEY=VALUEChange one field. Repeat it for more, and use dotted keys for nested fields. Values are read as JSON when they parse (100, false, null), otherwise as text.
--PARENT NAMEFor a type that belongs to another, the parent, such as --alert.

Field names are the ones obi get TYPE NAME -o yaml shows.