@pulumi/azure-native
Version:
[](https://slack.pulumi.com) [](https://npmjs.com/package/@pulumi/azure-native) [ • 10.1 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as enums from "../types/enums";
/**
* A budget resource.
*
* Uses Azure REST API version 2024-08-01. In version 2.x of the Azure Native provider, it used API version 2023-04-01-preview.
*
* Other available API versions: 2019-04-01-preview, 2023-04-01-preview, 2023-08-01, 2023-09-01, 2023-11-01, 2024-10-01-preview, 2025-03-01. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native costmanagement [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details.
*/
export declare class Budget extends pulumi.CustomResource {
/**
* Get an existing Budget resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Budget;
/**
* Returns true if the given object is an instance of Budget. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Budget;
/**
* The total amount of cost to track with the budget.
*
* Supported for CategoryType(s): Cost.
*
* Required for CategoryType(s): Cost.
*/
readonly amount: pulumi.Output<number | undefined>;
/**
* The Azure API version of the resource.
*/
readonly azureApiVersion: pulumi.Output<string>;
/**
* The category of the budget.
* - 'Cost' defines a Budget.
* - 'ReservationUtilization' defines a Reservation Utilization Alert Rule.
*/
readonly category: pulumi.Output<string>;
/**
* The current amount of cost which is being tracked for a budget.
*
* Supported for CategoryType(s): Cost.
*/
readonly currentSpend: pulumi.Output<outputs.costmanagement.CurrentSpendResponse>;
/**
* 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.
*/
readonly eTag: pulumi.Output<string | undefined>;
/**
* May be used to filter budgets by user-specified dimensions and/or tags.
*
* Supported for CategoryType(s): Cost, ReservationUtilization.
*/
readonly filter: pulumi.Output<outputs.costmanagement.BudgetFilterResponse | undefined>;
/**
* The forecasted cost which is being tracked for a budget.
*
* Supported for CategoryType(s): Cost.
*/
readonly forecastSpend: pulumi.Output<outputs.costmanagement.ForecastSpendResponse>;
/**
* Resource name.
*/
readonly name: pulumi.Output<string>;
/**
* Dictionary of notifications associated with the budget.
*
* Supported for CategoryType(s): Cost, ReservationUtilization.
*
* - Constraints for **CategoryType: Cost** - Budget can have up to 5 notifications with thresholdType: Actual and 5 notifications with thresholdType: Forecasted.
* - Constraints for **CategoryType: ReservationUtilization** - Only one notification allowed. thresholdType is not applicable.
*/
readonly notifications: pulumi.Output<{
[key: string]: outputs.costmanagement.NotificationResponse;
} | undefined>;
/**
* The time covered by a budget. Tracking of the amount will be reset based on the time grain.
*
* Supported for CategoryType(s): Cost, ReservationUtilization.
*
* Supported timeGrainTypes for **CategoryType: Cost**
*
* - Monthly
* - Quarterly
* - Annually
* - BillingMonth*
* - BillingQuarter*
* - BillingAnnual*
*
* *only supported for Web Direct customers.
*
* Supported timeGrainTypes for **CategoryType: ReservationUtilization**
* - Last7Days
* - Last30Days
*
* Required for CategoryType(s): Cost, ReservationUtilization.
*/
readonly timeGrain: pulumi.Output<string>;
/**
* The time period that defines the active period of the budget. The budget will evaluate data on or after the startDate and will expire on the endDate.
*
* Supported for CategoryType(s): Cost, ReservationUtilization.
*
* Required for CategoryType(s): Cost, ReservationUtilization.
*/
readonly timePeriod: pulumi.Output<outputs.costmanagement.BudgetTimePeriodResponse>;
/**
* Resource type.
*/
readonly type: pulumi.Output<string>;
/**
* Create a Budget resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: BudgetArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* The set of arguments for constructing a Budget resource.
*/
export interface BudgetArgs {
/**
* The total amount of cost to track with the budget.
*
* Supported for CategoryType(s): Cost.
*
* Required for CategoryType(s): Cost.
*/
amount?: pulumi.Input<number>;
/**
* Budget Name.
*/
budgetName?: pulumi.Input<string>;
/**
* The category of the budget.
* - 'Cost' defines a Budget.
* - 'ReservationUtilization' defines a Reservation Utilization Alert Rule.
*/
category: pulumi.Input<string | enums.costmanagement.CategoryType>;
/**
* 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.
*/
eTag?: pulumi.Input<string>;
/**
* May be used to filter budgets by user-specified dimensions and/or tags.
*
* Supported for CategoryType(s): Cost, ReservationUtilization.
*/
filter?: pulumi.Input<inputs.costmanagement.BudgetFilterArgs>;
/**
* Dictionary of notifications associated with the budget.
*
* Supported for CategoryType(s): Cost, ReservationUtilization.
*
* - Constraints for **CategoryType: Cost** - Budget can have up to 5 notifications with thresholdType: Actual and 5 notifications with thresholdType: Forecasted.
* - Constraints for **CategoryType: ReservationUtilization** - Only one notification allowed. thresholdType is not applicable.
*/
notifications?: pulumi.Input<{
[key: string]: pulumi.Input<inputs.costmanagement.NotificationArgs>;
}>;
/**
* The scope associated with budget operations.
*
* Supported scopes for **CategoryType: Cost**
*
* Azure RBAC Scopes:
* - '/subscriptions/{subscriptionId}/' for subscription scope
* - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope
* - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope
*
* EA (Enterprise Agreement) Scopes:
*
* - '/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
*
* MCA (Modern Customer Agreement) Scopes:
* - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope
* - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope
* - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope
* - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for customer scope (CSP only)
*
* Supported scopes for **CategoryType: ReservationUtilization**
*
* EA (Enterprise Agreement) Scopes:
* - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account Scope
*
* MCA (Modern Customer Agreement) Scopes:
* - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope (non-CSP only)
* - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' for customer scope (CSP only)
*/
scope: pulumi.Input<string>;
/**
* The time covered by a budget. Tracking of the amount will be reset based on the time grain.
*
* Supported for CategoryType(s): Cost, ReservationUtilization.
*
* Supported timeGrainTypes for **CategoryType: Cost**
*
* - Monthly
* - Quarterly
* - Annually
* - BillingMonth*
* - BillingQuarter*
* - BillingAnnual*
*
* *only supported for Web Direct customers.
*
* Supported timeGrainTypes for **CategoryType: ReservationUtilization**
* - Last7Days
* - Last30Days
*
* Required for CategoryType(s): Cost, ReservationUtilization.
*/
timeGrain: pulumi.Input<string | enums.costmanagement.TimeGrainType>;
/**
* The time period that defines the active period of the budget. The budget will evaluate data on or after the startDate and will expire on the endDate.
*
* Supported for CategoryType(s): Cost, ReservationUtilization.
*
* Required for CategoryType(s): Cost, ReservationUtilization.
*/
timePeriod: pulumi.Input<inputs.costmanagement.BudgetTimePeriodArgs>;
}