Update a budget for the organization.
- Base URL
-
https://cloud.elastic.coPublic
- POST /api/v1/billing/organization/{organization_id}/budget/{budget_id}
Update an organization's existing budget
Request body
-
alertsobjectrequired -
List of budget alerts. The service enforces a server-side limit on the number of alerts per budget.
-
perioddeprecated -
Deprecated, use window instead. period=monthly is equivalent to a monthly window with reset_on.day=1. If both period and window are sent they must describe the same schedule.
-
Values:
monthly -
recipient_group -
Optional list of recipient types who receive budget alerts (organization-admins, billing-admins, resource-viewers, resource-editors, resource-admins). resource-viewers, resource-editors and resource-admins cannot be used with scope_type=organization.
-
Values:
organization-adminsbilling-adminsresource-viewersresource-editorsresource-admins -
windowobject -
Recurring budget window. Allowed (repeat_unit, repeat_every) pairs and the reset_on fields each one requires: daily (day, 1) with no reset_on; weekly (week, 1) with reset_on.weekday; monthly (month, 1) with reset_on.day; quarterly (month, 3) with reset_on.month, resetting on the 1st; yearly (year, 1) with reset_on.month and reset_on.day. Any other combination, or a missing or extra reset_on field, returns 400. Windows reset at 00:00 UTC. Days 29-31 clamp to the last day of shorter months, recomputed every period (day 31 resets on Jan 31, Feb 28, Mar 31, Apr 30).
-
reset_onobject -
The user's reset selection. Only the fields required by the window frequency are set: weekly uses weekday, monthly uses day, quarterly uses month, yearly uses month and day. Days 29-31 clamp to the last day of shorter months, recomputed every period from this selection (day 31 resets on Jan 31, Feb 28, Mar 31, Apr 30; Feb 29 resets on Feb 28 in non-leap years).
Responses
Budget updated successfully
Invalid request
Not allowed to update this budget
Budget not found
Internal Server Error