Skip to main content

Returns

Returns the updated Monitor object.

Example

To pause or resume a monitor, use monitors.pause() and monitors.resume(). Setting status here still works. Users may set only ACTIVE (resume) or PAUSED (pause); CAPPED, NO_CREDITS, and FAILING are system-set and are rejected.

Parameters

string
required
The ID of the monitor to update.
string
New name for the monitor.
string
New version to watch. Pass None to watch every version of the product.
list[string]
New metric family IDs (metric.metric_group_id) to score with. Adding a self-hosted metric family raises an error, for the same reason as on create. So does a newly bound Classifier (Jev) family when classifier metrics are off on the deployment. A family the monitor already binds can still be resent: only a newly bound family is checked.
number
New sampling percentage, from just above 0 up to 100.
int
New monthly credit cap. Must be positive when set. Pass None for no cap.
string | MonitorStatus
New status. Prefer pause() and resume(). Valid user-settable values: ACTIVE (resume), PAUSED (pause). Other string values are sent to the API unchanged, so values added in newer API versions can be used; the API rejects invalid ones.
Only the fields you pass are updated. Any field you omit is left unchanged. Pass None to clear a nullable field such as version_id or monthly_credit_cap.