dcloud billing budgets createCreate a budget
Synopsis
dcloud billing budgets create --name name --amount-cents amountCents --period period [flags]Flags
--nameRequiredstring
1–255 characters; need not be unique
Constraints: 1-255 chars
--amount-centsRequirednumber
The cap in euro cents (net, before VAT), a positive whole number: 50000 is €500
Constraints: integer, min 1
--periodRequiredenum
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--scopeOptionalobject
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-filterOptionalarray 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-thresholdsOptionalarray 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-emailsOptionalarray 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
--actionOptionalobject
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-thresholdsOptionalarray 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 monthlyGenerated from the API description, the same one the API checks requests against and the CLI is built from.