dcloud billing budgets create

Create a budget

IAM billing:CreateBudgetChanges state

Synopsis

dcloud billing budgets create --name name --amount-cents amountCents --period period [flags]

Flags

  • --nameRequired

    string

    1–255 characters; need not be unique

    Constraints: 1-255 chars

  • --amount-centsRequired

    number

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

    Constraints: integer, min 1

  • --periodRequired

    enum

    monthly, quarterly or annual; required here (the console’s form starts at monthly). 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. Default: the whole organization

    Constraints: JSON

  • --service-filterOptional

    array of string

    Count only usage of these service ids, e.g. ["ec2","rds"]; omitted: every service. An unknown id is accepted and counts nothing

  • --alert-thresholdsOptional

    array of number

    Percentages of the cap (whole numbers, 1–1000) at which to alert, each once per period; default [80, 100]

    Constraints: integer, 1-1000

  • --notification-emailsOptional

    array of string

    Who is mailed when a threshold fires or an action is proposed; default none (the alert is still recorded and sent as an event). The console’s form fills in your own address

    Constraints: email

  • --actionOptional

    object

    Let the budget propose stopping non-production resources: {thresholdPercent (default 100), selector (tag clauses, default environment in dev/development/test/staging/preview)}. A person approves each proposal.

    Constraints: JSON

    May be null.

  • --forecast-thresholdsOptional

    array of number

    Monthly budgets: also alert (mail and the ews.billing "Budget Threshold Crossed" event, kind forecast) when the month-end forecast reaches these percentages, at most 10 of 1–1000, e.g. [100]. Default none here; the console’s form starts at [100]

    Constraints: integer, 1-1000

    May be null.

Example

dcloud billing budgets create --name example --amount-cents 1 --period monthly

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