
Azure GetBudget
CertifiedGet one Azure Consumption budget
Azure GetBudget
Get one Azure Consumption budget
Calls the Consumption Budgets - Get API and returns the budget with its amount, current spend and forecasted spend.
type: io.kestra.plugin.azure.billing.GetBudgetExamples
Fail the flow when a budget's current spend is above its amount.
id: azure_check_budget
namespace: company.finops
tasks:
- id: budget
type: io.kestra.plugin.azure.billing.GetBudget
scope: "/subscriptions/{{ secret('AZURE_SUBSCRIPTION_ID') }}"
budgetName: monthly-total
- id: check
type: io.kestra.plugin.core.execution.Fail
condition: "{{ (outputs.budget.budget.currentSpendAmount ?? 0) > outputs.budget.budget.amount }}"
errorMessage: "Budget monthly-total exceeded: {{ outputs.budget.budget.currentSpendAmount }} {{ outputs.budget.budget.currentSpendUnit }}"
pluginDefaults:
- type: io.kestra.plugin.azure
values:
tenantId: "{{ secret('AZURE_TENANT_ID') }}"
clientId: "{{ secret('AZURE_CLIENT_ID') }}"
clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
Properties
budgetName *string
Budget name
Name of the budget to get. Letters, digits, ., _ and - only.
scope *string
Scope
Azure scope the costs or budgets belong to, for example /subscriptions/{subscriptionId},
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName},
/providers/Microsoft.Management/managementGroups/{managementGroupId} or
/providers/Microsoft.Billing/billingAccounts/{billingAccountId}.
tenantId *string
Azure AD tenant ID (GUID)
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150clientId string
Client ID of the Azure AD application
Application (client) ID used for service principal authentication.
clientSecret string
Client secret for the Azure AD application
Secret value associated with the client ID; store in a Kestra secret.
pemCertificate string
PEM-encoded certificate content for client authentication
PEM text for certificate-based auth; alternative to clientSecret.
Outputs
budget object
Budget
The budget with name, id, category, amount, timeGrain, startDate/endDate, currentSpendAmount/currentSpendUnit, forecastSpendAmount/forecastSpendUnit, and notifications, each with name, enabled, operator, threshold, thresholdType, contactEmails, contactRoles and contactGroups.