Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

Azure Native

v1.47.0 published on Saturday, Nov 20, 2021 by Pulumi

getBudget

A budget resource. API Version: 2019-10-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)

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

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

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.AzureNative.Consumption.Outputs.CurrentSpendResponse
The current amount of cost which is being tracked for a budget.
ForecastSpend Pulumi.AzureNative.Consumption.Outputs.ForecastSpendResponse
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.AzureNative.Consumption.Outputs.BudgetTimePeriodResponse
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.AzureNative.Consumption.Outputs.BudgetFilterResponse
May be used to filter budgets by user-specified dimensions and/or tags.
Notifications Dictionary<string, Pulumi.AzureNative.Consumption.Outputs.NotificationResponse>
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 CurrentSpendResponse
The current amount of cost which is being tracked for a budget.
ForecastSpend ForecastSpendResponse
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 BudgetTimePeriodResponse
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 BudgetFilterResponse
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 CurrentSpendResponse
The current amount of cost which is being tracked for a budget.
forecastSpend ForecastSpendResponse
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 BudgetTimePeriodResponse
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 BudgetFilterResponse
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 CurrentSpendResponse
The current amount of cost which is being tracked for a budget.
forecast_spend ForecastSpendResponse
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 BudgetTimePeriodResponse
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 BudgetFilterResponse
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.

Supporting Types

BudgetComparisonExpressionResponse

Name string
The name of the column to use in comparison.
Operator string
The operator to use for comparison.
Values List<string>
Array of values to use for comparison
Name string
The name of the column to use in comparison.
Operator string
The operator to use for comparison.
Values []string
Array of values to use for comparison
name string
The name of the column to use in comparison.
operator string
The operator to use for comparison.
values string[]
Array of values to use for comparison
name str
The name of the column to use in comparison.
operator str
The operator to use for comparison.
values Sequence[str]
Array of values to use for comparison

BudgetFilterPropertiesResponse

Dimensions BudgetComparisonExpressionResponse
Has comparison expression for a dimension
Tags BudgetComparisonExpressionResponse
Has comparison expression for a tag
dimensions BudgetComparisonExpressionResponse
Has comparison expression for a dimension
tags BudgetComparisonExpressionResponse
Has comparison expression for a tag
dimensions BudgetComparisonExpressionResponse
Has comparison expression for a dimension
tags BudgetComparisonExpressionResponse
Has comparison expression for a tag

BudgetFilterResponse

And []BudgetFilterPropertiesResponse
The logical “AND” expression. Must have at least 2 items.
Dimensions BudgetComparisonExpressionResponse
Has comparison expression for a dimension
Not BudgetFilterPropertiesResponse
The logical “NOT” expression.
Tags BudgetComparisonExpressionResponse
Has comparison expression for a tag
and BudgetFilterPropertiesResponse[]
The logical “AND” expression. Must have at least 2 items.
dimensions BudgetComparisonExpressionResponse
Has comparison expression for a dimension
not BudgetFilterPropertiesResponse
The logical “NOT” expression.
tags BudgetComparisonExpressionResponse
Has comparison expression for a tag
and_ Sequence[BudgetFilterPropertiesResponse]
The logical “AND” expression. Must have at least 2 items.
dimensions BudgetComparisonExpressionResponse
Has comparison expression for a dimension
not_ BudgetFilterPropertiesResponse
The logical “NOT” expression.
tags BudgetComparisonExpressionResponse
Has comparison expression for a tag

BudgetTimePeriodResponse

StartDate string
The start date for the budget.
EndDate string
The end date for the budget. If not provided, we default this to 10 years from the start date.
StartDate string
The start date for the budget.
EndDate string
The end date for the budget. If not provided, we default this to 10 years from the start date.
startDate string
The start date for the budget.
endDate string
The end date for the budget. If not provided, we default this to 10 years from the start date.
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

Amount double
The total amount of cost which is being tracked by the budget.
Unit string
The unit of measure for the budget amount.
Amount float64
The total amount of cost which is being tracked by the budget.
Unit string
The unit of measure for the budget amount.
amount number
The total amount of cost which is being tracked by the budget.
unit string
The unit of measure for the budget amount.
amount float
The total amount of cost which is being tracked by the budget.
unit str
The unit of measure for the budget amount.

ForecastSpendResponse

Amount double
The forecasted cost for the total time period which is being tracked by the budget. This value is only provided if the budget contains a forecast alert type.
Unit string
The unit of measure for the budget amount.
Amount float64
The forecasted cost for the total time period which is being tracked by the budget. This value is only provided if the budget contains a forecast alert type.
Unit string
The unit of measure for the budget amount.
amount number
The forecasted cost for the total time period which is being tracked by the budget. This value is only provided if the budget contains a forecast alert type.
unit string
The unit of measure for the budget amount.
amount float
The forecasted cost for the total time period which is being tracked by the budget. This value is only provided if the budget contains a forecast alert type.
unit str
The unit of measure for the budget amount.

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

Package Details

Repository
https://github.com/pulumi/pulumi-azure-native
License
Apache-2.0