This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi
azure-native.consumption.getBudget
Explore with Pulumi AI
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi
Gets the budget for the scope by budget name. Azure REST API version: 2023-05-01.
Other available API versions: 2023-11-01, 2024-08-01.
Using getBudget
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getBudget(args: GetBudgetArgs, opts?: InvokeOptions): Promise<GetBudgetResult>
function getBudgetOutput(args: GetBudgetOutputArgs, opts?: InvokeOptions): Output<GetBudgetResult>def get_budget(budget_name: Optional[str] = None,
               scope: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetBudgetResult
def get_budget_output(budget_name: Optional[pulumi.Input[str]] = None,
               scope: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetBudgetResult]func LookupBudget(ctx *Context, args *LookupBudgetArgs, opts ...InvokeOption) (*LookupBudgetResult, error)
func LookupBudgetOutput(ctx *Context, args *LookupBudgetOutputArgs, opts ...InvokeOption) LookupBudgetResultOutput> Note: This function is named LookupBudget in the Go SDK.
public static class GetBudget 
{
    public static Task<GetBudgetResult> InvokeAsync(GetBudgetArgs args, InvokeOptions? opts = null)
    public static Output<GetBudgetResult> Invoke(GetBudgetInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetBudgetResult> getBudget(GetBudgetArgs args, InvokeOptions options)
public static Output<GetBudgetResult> getBudget(GetBudgetArgs args, InvokeOptions options)
fn::invoke:
  function: azure-native:consumption:getBudget
  arguments:
    # arguments dictionaryThe following arguments are supported:
- BudgetName string
- Budget Name.
- Scope string
- The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope.
- BudgetName string
- Budget Name.
- Scope string
- The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope.
- budgetName String
- Budget Name.
- scope String
- The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope.
- budgetName string
- Budget Name.
- scope string
- The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope.
- budget_name str
- Budget Name.
- scope str
- The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope.
- budgetName String
- Budget Name.
- scope String
- The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope.
getBudget Result
The following output properties are available:
- Amount double
- The total amount of cost to track with the budget
- Category string
- The category of the budget, whether the budget tracks cost or usage.
- CurrentSpend Pulumi.Azure Native. Consumption. Outputs. Current Spend Response 
- The current amount of cost which is being tracked for a budget.
- ForecastSpend Pulumi.Azure Native. Consumption. Outputs. Forecast Spend Response 
- The forecasted cost which is being tracked for a budget.
- Id string
- Resource Id.
- Name string
- Resource name.
- TimeGrain string
- The time covered by a budget. Tracking of the amount will be reset based on the time grain. BillingMonth, BillingQuarter, and BillingAnnual are only supported by WD customers
- TimePeriod Pulumi.Azure Native. Consumption. Outputs. Budget Time Period Response 
- Has start and end date of the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. There are no restrictions on the end date.
- Type string
- Resource type.
- ETag string
- eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
- Filter
Pulumi.Azure Native. Consumption. Outputs. Budget Filter Response 
- May be used to filter budgets by user-specified dimensions and/or tags.
- Notifications
Dictionary<string, Pulumi.Azure Native. Consumption. Outputs. Notification Response> 
- Dictionary of notifications associated with the budget. Budget can have up to five notifications.
- Amount float64
- The total amount of cost to track with the budget
- Category string
- The category of the budget, whether the budget tracks cost or usage.
- CurrentSpend CurrentSpend Response 
- The current amount of cost which is being tracked for a budget.
- ForecastSpend ForecastSpend Response 
- The forecasted cost which is being tracked for a budget.
- Id string
- Resource Id.
- Name string
- Resource name.
- TimeGrain string
- The time covered by a budget. Tracking of the amount will be reset based on the time grain. BillingMonth, BillingQuarter, and BillingAnnual are only supported by WD customers
- TimePeriod BudgetTime Period Response 
- Has start and end date of the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. There are no restrictions on the end date.
- Type string
- Resource type.
- ETag string
- eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
- Filter
BudgetFilter Response 
- May be used to filter budgets by user-specified dimensions and/or tags.
- Notifications
map[string]NotificationResponse 
- Dictionary of notifications associated with the budget. Budget can have up to five notifications.
- amount Double
- The total amount of cost to track with the budget
- category String
- The category of the budget, whether the budget tracks cost or usage.
- currentSpend CurrentSpend Response 
- The current amount of cost which is being tracked for a budget.
- forecastSpend ForecastSpend Response 
- The forecasted cost which is being tracked for a budget.
- id String
- Resource Id.
- name String
- Resource name.
- timeGrain String
- The time covered by a budget. Tracking of the amount will be reset based on the time grain. BillingMonth, BillingQuarter, and BillingAnnual are only supported by WD customers
- timePeriod BudgetTime Period Response 
- Has start and end date of the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. There are no restrictions on the end date.
- type String
- Resource type.
- eTag String
- eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
- filter
BudgetFilter Response 
- May be used to filter budgets by user-specified dimensions and/or tags.
- notifications
Map<String,NotificationResponse> 
- Dictionary of notifications associated with the budget. Budget can have up to five notifications.
- amount number
- The total amount of cost to track with the budget
- category string
- The category of the budget, whether the budget tracks cost or usage.
- currentSpend CurrentSpend Response 
- The current amount of cost which is being tracked for a budget.
- forecastSpend ForecastSpend Response 
- The forecasted cost which is being tracked for a budget.
- id string
- Resource Id.
- name string
- Resource name.
- timeGrain string
- The time covered by a budget. Tracking of the amount will be reset based on the time grain. BillingMonth, BillingQuarter, and BillingAnnual are only supported by WD customers
- timePeriod BudgetTime Period Response 
- Has start and end date of the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. There are no restrictions on the end date.
- type string
- Resource type.
- eTag string
- eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
- filter
BudgetFilter Response 
- May be used to filter budgets by user-specified dimensions and/or tags.
- notifications
{[key: string]: NotificationResponse} 
- Dictionary of notifications associated with the budget. Budget can have up to five notifications.
- amount float
- The total amount of cost to track with the budget
- category str
- The category of the budget, whether the budget tracks cost or usage.
- current_spend CurrentSpend Response 
- The current amount of cost which is being tracked for a budget.
- forecast_spend ForecastSpend Response 
- The forecasted cost which is being tracked for a budget.
- id str
- Resource Id.
- name str
- Resource name.
- time_grain str
- The time covered by a budget. Tracking of the amount will be reset based on the time grain. BillingMonth, BillingQuarter, and BillingAnnual are only supported by WD customers
- time_period BudgetTime Period Response 
- Has start and end date of the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. There are no restrictions on the end date.
- type str
- Resource type.
- e_tag str
- eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
- filter
BudgetFilter Response 
- May be used to filter budgets by user-specified dimensions and/or tags.
- notifications
Mapping[str, NotificationResponse] 
- Dictionary of notifications associated with the budget. Budget can have up to five notifications.
- amount Number
- The total amount of cost to track with the budget
- category String
- The category of the budget, whether the budget tracks cost or usage.
- currentSpend Property Map
- The current amount of cost which is being tracked for a budget.
- forecastSpend Property Map
- The forecasted cost which is being tracked for a budget.
- id String
- Resource Id.
- name String
- Resource name.
- timeGrain String
- The time covered by a budget. Tracking of the amount will be reset based on the time grain. BillingMonth, BillingQuarter, and BillingAnnual are only supported by WD customers
- timePeriod Property Map
- Has start and end date of the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. There are no restrictions on the end date.
- type String
- Resource type.
- eTag String
- eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
- filter Property Map
- May be used to filter budgets by user-specified dimensions and/or tags.
- notifications Map<Property Map>
- Dictionary of notifications associated with the budget. Budget can have up to five notifications.
Supporting Types
BudgetComparisonExpressionResponse   
BudgetFilterPropertiesResponse   
- Dimensions
Pulumi.Azure Native. Consumption. Inputs. Budget Comparison Expression Response 
- Has comparison expression for a dimension
- 
Pulumi.Azure Native. Consumption. Inputs. Budget Comparison Expression Response 
- Has comparison expression for a tag
- Dimensions
BudgetComparison Expression Response 
- Has comparison expression for a dimension
- 
BudgetComparison Expression Response 
- Has comparison expression for a tag
- dimensions
BudgetComparison Expression Response 
- Has comparison expression for a dimension
- 
BudgetComparison Expression Response 
- Has comparison expression for a tag
- dimensions
BudgetComparison Expression Response 
- Has comparison expression for a dimension
- 
BudgetComparison Expression Response 
- Has comparison expression for a tag
- dimensions
BudgetComparison Expression Response 
- Has comparison expression for a dimension
- 
BudgetComparison Expression Response 
- Has comparison expression for a tag
- dimensions Property Map
- Has comparison expression for a dimension
- Property Map
- Has comparison expression for a tag
BudgetFilterResponse  
- And
List<Pulumi.Azure Native. Consumption. Inputs. Budget Filter Properties Response> 
- The logical "AND" expression. Must have at least 2 items.
- Dimensions
Pulumi.Azure Native. Consumption. Inputs. Budget Comparison Expression Response 
- Has comparison expression for a dimension
- 
Pulumi.Azure Native. Consumption. Inputs. Budget Comparison Expression Response 
- Has comparison expression for a tag
- And
[]BudgetFilter Properties Response 
- The logical "AND" expression. Must have at least 2 items.
- Dimensions
BudgetComparison Expression Response 
- Has comparison expression for a dimension
- 
BudgetComparison Expression Response 
- Has comparison expression for a tag
- and
List<BudgetFilter Properties Response> 
- The logical "AND" expression. Must have at least 2 items.
- dimensions
BudgetComparison Expression Response 
- Has comparison expression for a dimension
- 
BudgetComparison Expression Response 
- Has comparison expression for a tag
- and
BudgetFilter Properties Response[] 
- The logical "AND" expression. Must have at least 2 items.
- dimensions
BudgetComparison Expression Response 
- Has comparison expression for a dimension
- 
BudgetComparison Expression Response 
- Has comparison expression for a tag
- and_
Sequence[BudgetFilter Properties Response] 
- The logical "AND" expression. Must have at least 2 items.
- dimensions
BudgetComparison Expression Response 
- Has comparison expression for a dimension
- 
BudgetComparison Expression Response 
- Has comparison expression for a tag
- and List<Property Map>
- The logical "AND" expression. Must have at least 2 items.
- dimensions Property Map
- Has comparison expression for a dimension
- Property Map
- Has comparison expression for a tag
BudgetTimePeriodResponse   
- start_date str
- The start date for the budget.
- end_date str
- The end date for the budget. If not provided, we default this to 10 years from the start date.
CurrentSpendResponse  
ForecastSpendResponse  
NotificationResponse 
- ContactEmails List<string>
- Email addresses to send the budget notification to when the threshold is exceeded. Must have at least one contact email or contact group specified at the Subscription or Resource Group scopes. All other scopes must have at least one contact email specified.
- Enabled bool
- The notification is enabled or not.
- Operator string
- The comparison operator.
- Threshold double
- Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000.
- ContactGroups List<string>
- Action groups to send the budget notification to when the threshold is exceeded. Must be provided as a fully qualified Azure resource id. Only supported at Subscription or Resource Group scopes.
- ContactRoles List<string>
- Contact roles to send the budget notification to when the threshold is exceeded.
- Locale string
- Language in which the recipient will receive the notification
- ThresholdType string
- The type of threshold
- ContactEmails []string
- Email addresses to send the budget notification to when the threshold is exceeded. Must have at least one contact email or contact group specified at the Subscription or Resource Group scopes. All other scopes must have at least one contact email specified.
- Enabled bool
- The notification is enabled or not.
- Operator string
- The comparison operator.
- Threshold float64
- Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000.
- ContactGroups []string
- Action groups to send the budget notification to when the threshold is exceeded. Must be provided as a fully qualified Azure resource id. Only supported at Subscription or Resource Group scopes.
- ContactRoles []string
- Contact roles to send the budget notification to when the threshold is exceeded.
- Locale string
- Language in which the recipient will receive the notification
- ThresholdType string
- The type of threshold
- contactEmails List<String>
- Email addresses to send the budget notification to when the threshold is exceeded. Must have at least one contact email or contact group specified at the Subscription or Resource Group scopes. All other scopes must have at least one contact email specified.
- enabled Boolean
- The notification is enabled or not.
- operator String
- The comparison operator.
- threshold Double
- Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000.
- contactGroups List<String>
- Action groups to send the budget notification to when the threshold is exceeded. Must be provided as a fully qualified Azure resource id. Only supported at Subscription or Resource Group scopes.
- contactRoles List<String>
- Contact roles to send the budget notification to when the threshold is exceeded.
- locale String
- Language in which the recipient will receive the notification
- thresholdType String
- The type of threshold
- contactEmails string[]
- Email addresses to send the budget notification to when the threshold is exceeded. Must have at least one contact email or contact group specified at the Subscription or Resource Group scopes. All other scopes must have at least one contact email specified.
- enabled boolean
- The notification is enabled or not.
- operator string
- The comparison operator.
- threshold number
- Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000.
- contactGroups string[]
- Action groups to send the budget notification to when the threshold is exceeded. Must be provided as a fully qualified Azure resource id. Only supported at Subscription or Resource Group scopes.
- contactRoles string[]
- Contact roles to send the budget notification to when the threshold is exceeded.
- locale string
- Language in which the recipient will receive the notification
- thresholdType string
- The type of threshold
- contact_emails Sequence[str]
- Email addresses to send the budget notification to when the threshold is exceeded. Must have at least one contact email or contact group specified at the Subscription or Resource Group scopes. All other scopes must have at least one contact email specified.
- enabled bool
- The notification is enabled or not.
- operator str
- The comparison operator.
- threshold float
- Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000.
- contact_groups Sequence[str]
- Action groups to send the budget notification to when the threshold is exceeded. Must be provided as a fully qualified Azure resource id. Only supported at Subscription or Resource Group scopes.
- contact_roles Sequence[str]
- Contact roles to send the budget notification to when the threshold is exceeded.
- locale str
- Language in which the recipient will receive the notification
- threshold_type str
- The type of threshold
- contactEmails List<String>
- Email addresses to send the budget notification to when the threshold is exceeded. Must have at least one contact email or contact group specified at the Subscription or Resource Group scopes. All other scopes must have at least one contact email specified.
- enabled Boolean
- The notification is enabled or not.
- operator String
- The comparison operator.
- threshold Number
- Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000.
- contactGroups List<String>
- Action groups to send the budget notification to when the threshold is exceeded. Must be provided as a fully qualified Azure resource id. Only supported at Subscription or Resource Group scopes.
- contactRoles List<String>
- Contact roles to send the budget notification to when the threshold is exceeded.
- locale String
- Language in which the recipient will receive the notification
- thresholdType String
- The type of threshold
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi