Register a new usage threshold alert
Register a new usage threshold alert. Air calls UCP to register the alert, persists the returned alert id with the supplied recipients, and returns the full serialized instance. threshold is the org’s remaining balance in compute hours at which UCP will fire the webhook; it must be at least 1 (a threshold of 0 is reserved for the balance-exhaustion shutdown flow). recipients must contain at least one valid email address; if the creator wants to be notified when the alert fires they must include their own email address in this list. If Air fails to persist the alert after UCP registration, the UCP alert is deleted compensatingly before the request surfaces an error.
Required role: air_org_admin
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
Remaining balance (in compute hours) at which UCP will fire the webhook back to Air. Must be at least 1 (0 is reserved for the balance-exhaustion shutdown flow) and at most 21474836.
Response
The UCP webhook event this alert is registered for.
USAGE_REMAINING_ALERT- USAGE_REMAINING_ALERTUSAGE_GRANT_THRESHOLD_REACHED- USAGE_GRANT_THRESHOLD_REACHEDUSAGE_GRANT_EXHAUSTED- USAGE_GRANT_EXHAUSTEDCONTRACT_ENDED- CONTRACT_ENDED
Email addresses notified when UCP fires the webhook. Providing a value on update overwrites the existing recipients rather than appending to them; to add a new recipient include the existing recipients in the request as well.