billing.budgets.update

Update a budget

PATCH /billing/api/budgets/{id}IAM billing:UpdateBudgetChanges stateDestructive

Request syntax

PATCH /billing/api/budgets/{id}
{
  "name": "string",
  "amountCents": "number",
  "period": "enum",
  "scope": "object",
  "serviceFilter": "array of string",
  "alertThresholds": "array of number",
  "notificationEmails": "array of string",
  "action": "object",
  "forecastThresholds": "array of number"
}

Path parameters

  • idRequired

    string

    Constraints: uuid

Request body

  • nameOptional

    string

    1–255 characters; need not be unique

    Constraints: 1-255 chars

  • amountCentsOptional

    number

    The cap in euro cents (net, before VAT), a positive whole number: 50000 is €500

    Constraints: integer, min 1

  • periodOptional

    enum

    monthly, quarterly or annual; periods start at midnight German time, like the invoice

    One of: monthly, quarterly, annual

  • scopeOptional

    object

    What the budget counts: {type: organization}, {type: resourceProject, projectId} (a project), {type: project, projectId} (a saved tag view) or {type: tags, clauses}. A resource without the scope’s tags is not counted. A project that does not exist is accepted and reported as a broken scope. Omitted: unchanged

    Constraints: JSON

  • serviceFilterOptional

    array of string

    Count only usage of these service ids; null: every service; omitted: unchanged

    May be null.

  • alertThresholdsOptional

    array of number

    Percentages of the cap (1–1000) at which to alert; null resets to [80, 100]; omitted: unchanged

    Constraints: integer, 1-1000

    May be null.

  • notificationEmailsOptional

    array of string

    Who is mailed; null: nobody; omitted: unchanged

    Constraints: email

    May be null.

  • actionOptional

    object

    The budget’s action; null removes it (the budget then only notifies)

    Constraints: JSON

    May be null.

  • forecastThresholdsOptional

    array of number

    Forecast alert percentages (monthly budgets), at most 10 of 1–1000; null or []: none; omitted: unchanged

    Constraints: integer, 1-1000

    May be null.

Response

200 with the budget after the change, as `list` shows it; only the fields sent change. Alerts already fired this period stay fired. 404 when it is not in your organization.

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Errors

  • 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
  • 401No credentials, or an access key that is unknown, revoked or expired.
  • 403The caller's policies do not allow billing:UpdateBudget on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
  • 404The resource does not exist in your organization.

Examples

The required parameters only, with example values. Replace id and the other placeholders with your own.

dcloud billing budgets update id

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_billing_budgets_update.