Skip to content
Proud to collaborate with Microsoft for Startups

gcp.billing.budget.ensure ​

Create or update a billing budget (matched by display name).

Overview ​

PropertyValue
Workflow typeLinear
LibraryBase-gcp
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidYes—GCP CloudConnection UUID.
project_idstringNo—GCP project override for auth; defaults to the connection's project.
billing_account_idstringYes—Billing account id or billingAccounts/* name.
display_namestringYes—Budget display name; used as the idempotency key.
amount_unitsintegerNo—Specified budget amount in whole currency units.
currency_codestringNo—Currency for amount; defaults to USD.
use_last_period_amountbooleanNo—Use last period's spend as the amount instead of a fixed amount.
threshold_percentsjsonNo—List of threshold fractions, e.g. [0.5, 0.9, 1.0].
spend_basisstringNo—Threshold spend basis, e.g. CURRENT_SPEND.
budget_filterjsonNo—Raw budgetFilter object (projects, services, credit treatment, etc.).
notifications_rulejsonNo—Raw notificationsRule object.

Output Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidNo—Echoed connection UUID.
project_idstringNo—Effective project id.
billing_account_idstringNo—Billing account id or billingAccounts/* name.
amount_unitsintegerNo—Specified budget amount in whole currency units.
currency_codestringNo—Currency for amount; defaults to USD.
use_last_period_amountbooleanNo—Use last period's spend as the amount instead of a fixed amount.
threshold_percentsjsonNo—List of threshold fractions, e.g. [0.5, 0.9, 1.0].
spend_basisstringNo—Threshold spend basis, e.g. CURRENT_SPEND.
budget_filterjsonNo—Raw budgetFilter object (projects, services, credit treatment, etc.).
notifications_rulejsonNo—Raw notificationsRule object.
billing_account_namestringNo—Canonical billingAccounts/* name.
budget_namestringNo—Full budget resource name billingAccounts//budgets/.
budget_idstringNo—Short budget id.
display_namestringNo—Budget display name.
createdbooleanNo—True when a new budget was created during this run.
updatedbooleanNo—True when an existing budget was updated during this run.
budgetjsonNo—Sanitized Budget response.
failure_reasonstringNo—Human-readable failure reason.
failed_stepstringNo—Failed logical step.
failed_layerjsonNo—Engine failed layer.
failed_at_statestringNo—State where failure occurred.
errorstringNo—Error message.
error_typestringNo—Error class.

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—preflight—
ensuringNoNo—complete—
preflightingNoNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingpreflightpreflighting—
preflightingexecuteensuring—
ensuringcompletecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "gcp.billing.budget.ensure",
  "initial_data": {
    "connection_uuid": "value",
    "billing_account_id": "value",
    "display_name": "value"
  }
}