
Azure ListBudgets
CertifiedList Azure Consumption budgets of a scope
Azure ListBudgets
List Azure Consumption budgets of a scope
Calls the Consumption Budgets - List API and returns each budget with its amount, current spend and forecasted spend.
type: io.kestra.plugin.azure.billing.ListBudgetsExamples
List the budgets of a subscription and log how many there are.
id: azure_list_budgets
namespace: company.finops
tasks:
- id: budgets
type: io.kestra.plugin.azure.billing.ListBudgets
scope: "/subscriptions/{{ secret('AZURE_SUBSCRIPTION_ID') }}"
fetchType: FETCH
- id: log_budgets
type: io.kestra.plugin.core.log.Log
message: "{{ outputs.budgets.size }} budgets found"
pluginDefaults:
- type: io.kestra.plugin.azure
values:
tenantId: "{{ secret('AZURE_TENANT_ID') }}"
clientId: "{{ secret('AZURE_CLIENT_ID') }}"
clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
Properties
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.
fetchType string
STORESTOREFETCHFETCH_ONENONEFetch strategy
Default STORE writes all budgets to internal storage. FETCH returns all budgets, FETCH_ONE the first one, NONE only the count.
maxPages integerstring
10Maximum number of pages
Stops after this many requests (following nextLink) and logs a warning if more budgets were available.
pemCertificate string
PEM-encoded certificate content for client authentication
PEM text for certificate-based auth; alternative to clientSecret.
Outputs
row object
First budget
Single budget when fetchType is FETCH_ONE.
rows array
Budgets
All budgets when fetchType is FETCH, each 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.
size integer
Budget count
Number of budgets returned.
truncated boolean
Truncated
True when maxPages was reached before all budgets were read.
uri string
uriStored data URI
Internal storage URI of an ION file with all budgets when fetchType is STORE.
Metrics
fetch.rows counter
rowsNumber of budgets fetched or stored.