Azure ListBudgets

Azure ListBudgets

Certified

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.

yaml
type: io.kestra.plugin.azure.billing.ListBudgets

List the budgets of a subscription and log how many there are.

yaml
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

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}.

Azure AD tenant ID (GUID)

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.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset 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.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

Client ID of the Azure AD application

Application (client) ID used for service principal authentication.

Client secret for the Azure AD application

Secret value associated with the client ID; store in a Kestra secret.

DefaultSTORE
Possible Values
STOREFETCHFETCH_ONENONE

Fetch strategy

Default STORE writes all budgets to internal storage. FETCH returns all budgets, FETCH_ONE the first one, NONE only the count.

Default10

Maximum number of pages

Stops after this many requests (following nextLink) and logs a warning if more budgets were available.

PEM-encoded certificate content for client authentication

PEM text for certificate-based auth; alternative to clientSecret.

First budget

Single budget when fetchType is FETCH_ONE.

SubTypeobject

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.

Budget count

Number of budgets returned.

Truncated

True when maxPages was reached before all budgets were read.

Formaturi

Stored data URI

Internal storage URI of an ION file with all budgets when fetchType is STORE.

Unitrows

Number of budgets fetched or stored.