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-05-01.
Other available API versions: 2023-05-01, 2023-11-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native consumption [ApiVersion]. See the version guide for details.
Example Usage
CreateOrUpdateBudget
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var budget = new AzureNative.Consumption.Budget("budget", new()
{
Amount = 100.65,
BudgetName = "TestBudget",
Category = AzureNative.Consumption.CategoryType.Cost,
ETag = "\"1d34d016a593709\"",
Filter = new AzureNative.Consumption.Inputs.BudgetFilterArgs
{
And = new[]
{
new AzureNative.Consumption.Inputs.BudgetFilterPropertiesArgs
{
Dimensions = new AzureNative.Consumption.Inputs.BudgetComparisonExpressionArgs
{
Name = "ResourceId",
Operator = AzureNative.Consumption.BudgetOperatorType.In,
Values = new[]
{
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MSVM2",
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1",
},
},
},
new AzureNative.Consumption.Inputs.BudgetFilterPropertiesArgs
{
Tags = new AzureNative.Consumption.Inputs.BudgetComparisonExpressionArgs
{
Name = "category",
Operator = AzureNative.Consumption.BudgetOperatorType.In,
Values = new[]
{
"Dev",
"Prod",
},
},
},
new AzureNative.Consumption.Inputs.BudgetFilterPropertiesArgs
{
Tags = new AzureNative.Consumption.Inputs.BudgetComparisonExpressionArgs
{
Name = "department",
Operator = AzureNative.Consumption.BudgetOperatorType.In,
Values = new[]
{
"engineering",
"sales",
},
},
},
},
},
Notifications =
{
{ "Actual_GreaterThan_80_Percent", new AzureNative.Consumption.Inputs.NotificationArgs
{
ContactEmails = new[]
{
"johndoe@contoso.com",
"janesmith@contoso.com",
},
ContactGroups = new[]
{
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup",
},
ContactRoles = new[]
{
"Contributor",
"Reader",
},
Enabled = true,
Locale = AzureNative.Consumption.CultureCode.En_us,
Operator = AzureNative.Consumption.OperatorType.GreaterThan,
Threshold = 80.0,
ThresholdType = AzureNative.Consumption.ThresholdType.Actual,
} },
},
Scope = "subscriptions/00000000-0000-0000-0000-000000000000",
TimeGrain = AzureNative.Consumption.TimeGrainType.Monthly,
TimePeriod = new AzureNative.Consumption.Inputs.BudgetTimePeriodArgs
{
EndDate = "2018-10-31T00:00:00Z",
StartDate = "2017-10-01T00:00:00Z",
},
});
});
package main
import (
consumption "github.com/pulumi/pulumi-azure-native-sdk/consumption/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := consumption.NewBudget(ctx, "budget", &consumption.BudgetArgs{
Amount: pulumi.Float64(100.65),
BudgetName: pulumi.String("TestBudget"),
Category: pulumi.String(consumption.CategoryTypeCost),
ETag: pulumi.String("\"1d34d016a593709\""),
Filter: &consumption.BudgetFilterArgs{
And: consumption.BudgetFilterPropertiesArray{
&consumption.BudgetFilterPropertiesArgs{
Dimensions: &consumption.BudgetComparisonExpressionArgs{
Name: pulumi.String("ResourceId"),
Operator: pulumi.String(consumption.BudgetOperatorTypeIn),
Values: pulumi.StringArray{
pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MSVM2"),
pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1"),
},
},
},
&consumption.BudgetFilterPropertiesArgs{
Tags: &consumption.BudgetComparisonExpressionArgs{
Name: pulumi.String("category"),
Operator: pulumi.String(consumption.BudgetOperatorTypeIn),
Values: pulumi.StringArray{
pulumi.String("Dev"),
pulumi.String("Prod"),
},
},
},
&consumption.BudgetFilterPropertiesArgs{
Tags: &consumption.BudgetComparisonExpressionArgs{
Name: pulumi.String("department"),
Operator: pulumi.String(consumption.BudgetOperatorTypeIn),
Values: pulumi.StringArray{
pulumi.String("engineering"),
pulumi.String("sales"),
},
},
},
},
},
Notifications: consumption.NotificationMap{
"Actual_GreaterThan_80_Percent": &consumption.NotificationArgs{
ContactEmails: pulumi.StringArray{
pulumi.String("johndoe@contoso.com"),
pulumi.String("janesmith@contoso.com"),
},
ContactGroups: pulumi.StringArray{
pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup"),
},
ContactRoles: pulumi.StringArray{
pulumi.String("Contributor"),
pulumi.String("Reader"),
},
Enabled: pulumi.Bool(true),
Locale: pulumi.String(consumption.CultureCode_En_Us),
Operator: pulumi.String(consumption.OperatorTypeGreaterThan),
Threshold: pulumi.Float64(80),
ThresholdType: pulumi.String(consumption.ThresholdTypeActual),
},
},
Scope: pulumi.String("subscriptions/00000000-0000-0000-0000-000000000000"),
TimeGrain: pulumi.String(consumption.TimeGrainTypeMonthly),
TimePeriod: &consumption.BudgetTimePeriodArgs{
EndDate: pulumi.String("2018-10-31T00:00:00Z"),
StartDate: pulumi.String("2017-10-01T00:00:00Z"),
},
})
if err != nil {
return err
}
return nil
})
}
terraform {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_consumption_budget" "budget" {
lifecycle {
create_before_destroy = true
}
amount = 100.65
budget_name = "TestBudget"
category = "Cost"
e_tag = "\"1d34d016a593709\""
filter = {
and = [{
dimensions = {
name = "ResourceId"
operator = "In"
values = ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MSVM2", "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1"]
}
}, {
tags = {
name = "category"
operator = "In"
values = ["Dev", "Prod"]
}
}, {
tags = {
name = "department"
operator = "In"
values = ["engineering", "sales"]
}
}]
}
notifications = {
"Actual_GreaterThan_80_Percent" = {
contact_emails = ["johndoe@contoso.com", "janesmith@contoso.com"]
contact_groups = ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup"]
contact_roles = ["Contributor", "Reader"]
enabled = true
locale = "en-us"
operator = "GreaterThan"
threshold = 80
threshold_type = "Actual"
}
}
scope = "subscriptions/00000000-0000-0000-0000-000000000000"
time_grain = "Monthly"
time_period = {
end_date = "2018-10-31T00:00:00Z"
start_date = "2017-10-01T00:00:00Z"
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.consumption.Budget;
import com.pulumi.azurenative.consumption.BudgetArgs;
import com.pulumi.azurenative.consumption.inputs.BudgetFilterArgs;
import com.pulumi.azurenative.consumption.inputs.BudgetFilterPropertiesArgs;
import com.pulumi.azurenative.consumption.inputs.BudgetComparisonExpressionArgs;
import com.pulumi.azurenative.consumption.inputs.NotificationArgs;
import com.pulumi.azurenative.consumption.inputs.BudgetTimePeriodArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var budget = new Budget("budget", BudgetArgs.builder()
.amount(100.65)
.budgetName("TestBudget")
.category("Cost")
.eTag("\"1d34d016a593709\"")
.filter(BudgetFilterArgs.builder()
.and(
BudgetFilterPropertiesArgs.builder()
.dimensions(BudgetComparisonExpressionArgs.builder()
.name("ResourceId")
.operator("In")
.values(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MSVM2",
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1")
.build())
.build(),
BudgetFilterPropertiesArgs.builder()
.tags(BudgetComparisonExpressionArgs.builder()
.name("category")
.operator("In")
.values(
"Dev",
"Prod")
.build())
.build(),
BudgetFilterPropertiesArgs.builder()
.tags(BudgetComparisonExpressionArgs.builder()
.name("department")
.operator("In")
.values(
"engineering",
"sales")
.build())
.build())
.build())
.notifications(Map.of("Actual_GreaterThan_80_Percent", NotificationArgs.builder()
.contactEmails(
"johndoe@contoso.com",
"janesmith@contoso.com")
.contactGroups("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup")
.contactRoles(
"Contributor",
"Reader")
.enabled(true)
.locale("en-us")
.operator("GreaterThan")
.threshold(80.0)
.thresholdType("Actual")
.build()))
.scope("subscriptions/00000000-0000-0000-0000-000000000000")
.timeGrain("Monthly")
.timePeriod(BudgetTimePeriodArgs.builder()
.endDate("2018-10-31T00:00:00Z")
.startDate("2017-10-01T00:00:00Z")
.build())
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const budget = new azure_native.consumption.Budget("budget", {
amount: 100.65,
budgetName: "TestBudget",
category: azure_native.consumption.CategoryType.Cost,
eTag: "\"1d34d016a593709\"",
filter: {
and: [
{
dimensions: {
name: "ResourceId",
operator: azure_native.consumption.BudgetOperatorType.In,
values: [
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MSVM2",
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1",
],
},
},
{
tags: {
name: "category",
operator: azure_native.consumption.BudgetOperatorType.In,
values: [
"Dev",
"Prod",
],
},
},
{
tags: {
name: "department",
operator: azure_native.consumption.BudgetOperatorType.In,
values: [
"engineering",
"sales",
],
},
},
],
},
notifications: {
Actual_GreaterThan_80_Percent: {
contactEmails: [
"johndoe@contoso.com",
"janesmith@contoso.com",
],
contactGroups: ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup"],
contactRoles: [
"Contributor",
"Reader",
],
enabled: true,
locale: azure_native.consumption.CultureCode.En_us,
operator: azure_native.consumption.OperatorType.GreaterThan,
threshold: 80,
thresholdType: azure_native.consumption.ThresholdType.Actual,
},
},
scope: "subscriptions/00000000-0000-0000-0000-000000000000",
timeGrain: azure_native.consumption.TimeGrainType.Monthly,
timePeriod: {
endDate: "2018-10-31T00:00:00Z",
startDate: "2017-10-01T00:00:00Z",
},
});
import pulumi
import pulumi_azure_native as azure_native
budget = azure_native.consumption.Budget("budget",
amount=100.65,
budget_name="TestBudget",
category=azure_native.consumption.CategoryType.COST,
e_tag="\"1d34d016a593709\"",
filter={
"and_": [
{
"dimensions": {
"name": "ResourceId",
"operator": azure_native.consumption.BudgetOperatorType.IN_,
"values": [
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MSVM2",
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1",
],
},
},
{
"tags": {
"name": "category",
"operator": azure_native.consumption.BudgetOperatorType.IN_,
"values": [
"Dev",
"Prod",
],
},
},
{
"tags": {
"name": "department",
"operator": azure_native.consumption.BudgetOperatorType.IN_,
"values": [
"engineering",
"sales",
],
},
},
],
},
notifications={
"Actual_GreaterThan_80_Percent": {
"contact_emails": [
"johndoe@contoso.com",
"janesmith@contoso.com",
],
"contact_groups": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup"],
"contact_roles": [
"Contributor",
"Reader",
],
"enabled": True,
"locale": azure_native.consumption.CultureCode.EN_US,
"operator": azure_native.consumption.OperatorType.GREATER_THAN,
"threshold": float(80),
"threshold_type": azure_native.consumption.ThresholdType.ACTUAL,
},
},
scope="subscriptions/00000000-0000-0000-0000-000000000000",
time_grain=azure_native.consumption.TimeGrainType.MONTHLY,
time_period={
"end_date": "2018-10-31T00:00:00Z",
"start_date": "2017-10-01T00:00:00Z",
})
resources:
budget:
type: azure-native:consumption:Budget
properties:
amount: 100.65
budgetName: TestBudget
category: Cost
eTag: '"1d34d016a593709"'
filter:
and:
- dimensions:
name: ResourceId
operator: In
values:
- /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/MSVM2
- /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Compute/virtualMachines/platformcloudplatformGeneric1
- tags:
name: category
operator: In
values:
- Dev
- Prod
- tags:
name: department
operator: In
values:
- engineering
- sales
notifications:
Actual_GreaterThan_80_Percent:
contactEmails:
- johndoe@contoso.com
- janesmith@contoso.com
contactGroups:
- /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/microsoft.insights/actionGroups/SampleActionGroup
contactRoles:
- Contributor
- Reader
enabled: true
locale: en-us
operator: GreaterThan
threshold: 80
thresholdType: Actual
scope: subscriptions/00000000-0000-0000-0000-000000000000
timeGrain: Monthly
timePeriod:
endDate: 2018-10-31T00:00:00Z
startDate: 2017-10-01T00:00:00Z
Create Budget Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
@overload
def Budget(resource_name: str,
args: BudgetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Budget(resource_name: str,
opts: Optional[ResourceOptions] = None,
amount: Optional[float] = None,
category: Optional[Union[str, CategoryType]] = None,
scope: Optional[str] = None,
time_grain: Optional[Union[str, TimeGrainType]] = None,
time_period: Optional[BudgetTimePeriodArgs] = None,
budget_name: Optional[str] = None,
e_tag: Optional[str] = None,
filter: Optional[BudgetFilterArgs] = None,
notifications: Optional[Mapping[str, NotificationArgs]] = None)
public Budget(String name, BudgetArgs args)
public Budget(String name, BudgetArgs args, CustomResourceOptions options)
type: azure-native:consumption:Budget
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "azure-native_consumption_budget" "name" {
# resource properties
}
Parameters
- name
string
- The unique name of the resource.
- args
BudgetArgs
- The arguments to resource properties.
- opts
CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
str
- The unique name of the resource.
- args
BudgetArgs
- The arguments to resource properties.
- opts
ResourceOptions
- Bag of options to control resource's behavior.
- ctx
Context
- Context object for the current deployment.
- name
string
- The unique name of the resource.
- args
BudgetArgs
- The arguments to resource properties.
- opts
ResourceOption
- Bag of options to control resource's behavior.
- name
string
- The unique name of the resource.
- args
BudgetArgs
- The arguments to resource properties.
- opts
CustomResourceOptions
- Bag of options to control resource's behavior.
- name
String
- The unique name of the resource.
- args
BudgetArgs
- The arguments to resource properties.
- options
CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var budgetResource = new AzureNative.Consumption.Budget("budgetResource", new()
{
Amount = 0.0,
Category = "string",
Scope = "string",
TimeGrain = "string",
TimePeriod = new AzureNative.Consumption.Inputs.BudgetTimePeriodArgs
{
StartDate = "string",
EndDate = "string",
},
BudgetName = "string",
ETag = "string",
Filter = new AzureNative.Consumption.Inputs.BudgetFilterArgs
{
And = new[]
{
new AzureNative.Consumption.Inputs.BudgetFilterPropertiesArgs
{
Dimensions = new AzureNative.Consumption.Inputs.BudgetComparisonExpressionArgs
{
Name = "string",
Operator = "string",
Values = new[]
{
"string",
},
},
Tags = new AzureNative.Consumption.Inputs.BudgetComparisonExpressionArgs
{
Name = "string",
Operator = "string",
Values = new[]
{
"string",
},
},
},
},
Dimensions = new AzureNative.Consumption.Inputs.BudgetComparisonExpressionArgs
{
Name = "string",
Operator = "string",
Values = new[]
{
"string",
},
},
Tags = new AzureNative.Consumption.Inputs.BudgetComparisonExpressionArgs
{
Name = "string",
Operator = "string",
Values = new[]
{
"string",
},
},
},
Notifications =
{
{ "string", new AzureNative.Consumption.Inputs.NotificationArgs
{
ContactEmails = new[]
{
"string",
},
Enabled = false,
Operator = "string",
Threshold = 0.0,
ContactGroups = new[]
{
"string",
},
ContactRoles = new[]
{
"string",
},
Locale = "string",
ThresholdType = "string",
} },
},
});
example, err := consumption.NewBudget(ctx, "budgetResource", &consumption.BudgetArgs{
Amount: pulumi.Float64(0),
Category: pulumi.String("string"),
Scope: pulumi.String("string"),
TimeGrain: pulumi.String("string"),
TimePeriod: &consumption.BudgetTimePeriodArgs{
StartDate: pulumi.String("string"),
EndDate: pulumi.String("string"),
},
BudgetName: pulumi.String("string"),
ETag: pulumi.String("string"),
Filter: &consumption.BudgetFilterArgs{
And: consumption.BudgetFilterPropertiesArray{
&consumption.BudgetFilterPropertiesArgs{
Dimensions: &consumption.BudgetComparisonExpressionArgs{
Name: pulumi.String("string"),
Operator: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
Tags: &consumption.BudgetComparisonExpressionArgs{
Name: pulumi.String("string"),
Operator: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
},
},
Dimensions: &consumption.BudgetComparisonExpressionArgs{
Name: pulumi.String("string"),
Operator: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
Tags: &consumption.BudgetComparisonExpressionArgs{
Name: pulumi.String("string"),
Operator: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
},
Notifications: consumption.NotificationMap{
"string": &consumption.NotificationArgs{
ContactEmails: pulumi.StringArray{
pulumi.String("string"),
},
Enabled: pulumi.Bool(false),
Operator: pulumi.String("string"),
Threshold: pulumi.Float64(0),
ContactGroups: pulumi.StringArray{
pulumi.String("string"),
},
ContactRoles: pulumi.StringArray{
pulumi.String("string"),
},
Locale: pulumi.String("string"),
ThresholdType: pulumi.String("string"),
},
},
})
resource "azure-native_consumption_budget" "budgetResource" {
lifecycle {
create_before_destroy = true
}
amount = 0
category = "string"
scope = "string"
time_grain = "string"
time_period = {
start_date = "string"
end_date = "string"
}
budget_name = "string"
e_tag = "string"
filter = {
and = [{
dimensions = {
name = "string"
operator = "string"
values = ["string"]
}
tags = {
name = "string"
operator = "string"
values = ["string"]
}
}]
dimensions = {
name = "string"
operator = "string"
values = ["string"]
}
tags = {
name = "string"
operator = "string"
values = ["string"]
}
}
notifications = {
"string" = {
contact_emails = ["string"]
enabled = false
operator = "string"
threshold = 0
contact_groups = ["string"]
contact_roles = ["string"]
locale = "string"
threshold_type = "string"
}
}
}
var budgetResource = new com.pulumi.azurenative.consumption.Budget("budgetResource", com.pulumi.azurenative.consumption.BudgetArgs.builder()
.amount(0.0)
.category("string")
.scope("string")
.timeGrain("string")
.timePeriod(com.pulumi.azurenative.consumption.inputs.BudgetTimePeriodArgs.builder()
.startDate("string")
.endDate("string")
.build())
.budgetName("string")
.eTag("string")
.filter(com.pulumi.azurenative.consumption.inputs.BudgetFilterArgs.builder()
.and(com.pulumi.azurenative.consumption.inputs.BudgetFilterPropertiesArgs.builder()
.dimensions(com.pulumi.azurenative.consumption.inputs.BudgetComparisonExpressionArgs.builder()
.name("string")
.operator("string")
.values("string")
.build())
.tags(com.pulumi.azurenative.consumption.inputs.BudgetComparisonExpressionArgs.builder()
.name("string")
.operator("string")
.values("string")
.build())
.build())
.dimensions(com.pulumi.azurenative.consumption.inputs.BudgetComparisonExpressionArgs.builder()
.name("string")
.operator("string")
.values("string")
.build())
.tags(com.pulumi.azurenative.consumption.inputs.BudgetComparisonExpressionArgs.builder()
.name("string")
.operator("string")
.values("string")
.build())
.build())
.notifications(Map.of("string", com.pulumi.azurenative.consumption.inputs.NotificationArgs.builder()
.contactEmails("string")
.enabled(false)
.operator("string")
.threshold(0.0)
.contactGroups("string")
.contactRoles("string")
.locale("string")
.thresholdType("string")
.build()))
.build());
budget_resource = azure_native.consumption.Budget("budgetResource",
amount=float(0),
category="string",
scope="string",
time_grain="string",
time_period={
"start_date": "string",
"end_date": "string",
},
budget_name="string",
e_tag="string",
filter={
"and_": [{
"dimensions": {
"name": "string",
"operator": "string",
"values": ["string"],
},
"tags": {
"name": "string",
"operator": "string",
"values": ["string"],
},
}],
"dimensions": {
"name": "string",
"operator": "string",
"values": ["string"],
},
"tags": {
"name": "string",
"operator": "string",
"values": ["string"],
},
},
notifications={
"string": {
"contact_emails": ["string"],
"enabled": False,
"operator": "string",
"threshold": float(0),
"contact_groups": ["string"],
"contact_roles": ["string"],
"locale": "string",
"threshold_type": "string",
},
})
const budgetResource = new azure_native.consumption.Budget("budgetResource", {
amount: 0,
category: "string",
scope: "string",
timeGrain: "string",
timePeriod: {
startDate: "string",
endDate: "string",
},
budgetName: "string",
eTag: "string",
filter: {
and: [{
dimensions: {
name: "string",
operator: "string",
values: ["string"],
},
tags: {
name: "string",
operator: "string",
values: ["string"],
},
}],
dimensions: {
name: "string",
operator: "string",
values: ["string"],
},
tags: {
name: "string",
operator: "string",
values: ["string"],
},
},
notifications: {
string: {
contactEmails: ["string"],
enabled: false,
operator: "string",
threshold: 0,
contactGroups: ["string"],
contactRoles: ["string"],
locale: "string",
thresholdType: "string",
},
},
});
type: azure-native:consumption:Budget
properties:
amount: 0
budgetName: string
category: string
eTag: string
filter:
and:
- dimensions:
name: string
operator: string
values:
- string
tags:
name: string
operator: string
values:
- string
dimensions:
name: string
operator: string
values:
- string
tags:
name: string
operator: string
values:
- string
notifications:
string:
contactEmails:
- string
contactGroups:
- string
contactRoles:
- string
enabled: false
locale: string
operator: string
threshold: 0
thresholdType: string
scope: string
timeGrain: string
timePeriod:
endDate: string
startDate: string
Budget Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Budget resource accepts the following input properties:
- Amount
double
- The total amount of cost to track with the budget
- Category
string | Pulumi.AzureNative.Consumption.CategoryType
- The category of the budget, whether the budget tracks cost or usage.
- Scope
string
- The fully qualified Azure Resource manager identifier of the resource.
- TimeGrain
string | Pulumi.AzureNative.Consumption.TimeGrainType
- 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.Inputs.BudgetTimePeriod
- 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.
- BudgetName
string
- Budget Name.
- 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.Inputs.BudgetFilter
- May be used to filter budgets by user-specified dimensions and/or tags.
- Notifications
Dictionary<string, Pulumi.AzureNative.Consumption.Inputs.NotificationArgs>
- 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 | CategoryType
- The category of the budget, whether the budget tracks cost or usage.
- Scope
string
- The fully qualified Azure Resource manager identifier of the resource.
- TimeGrain
string | TimeGrainType
- 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
BudgetTimePeriodArgs
- 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.
- BudgetName
string
- Budget Name.
- 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
BudgetFilterArgs
- May be used to filter budgets by user-specified dimensions and/or tags.
- Notifications
map[string]NotificationArgs
- 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 | "Cost"
- The category of the budget, whether the budget tracks cost or usage.
- scope
string
- The fully qualified Azure Resource manager identifier of the resource.
- time_grain
string | "Monthly" | "Quarterly" | "Annually" | "BillingMonth" | "BillingQuarter" | "BillingAnnual"
- 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
object
- 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.
- budget_name
string
- Budget Name.
- e_tag
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
object
- May be used to filter budgets by user-specified dimensions and/or tags.
- notifications
map(object)
- 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 | CategoryType
- The category of the budget, whether the budget tracks cost or usage.
- scope
String
- The fully qualified Azure Resource manager identifier of the resource.
- timeGrain
String | TimeGrainType
- 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
BudgetTimePeriod
- 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.
- budgetName
String
- Budget Name.
- 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
- May be used to filter budgets by user-specified dimensions and/or tags.
- notifications
Map<String,NotificationArgs>
- 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 | CategoryType
- The category of the budget, whether the budget tracks cost or usage.
- scope
string
- The fully qualified Azure Resource manager identifier of the resource.
- timeGrain
string | TimeGrainType
- 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
BudgetTimePeriod
- 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.
- budgetName
string
- Budget Name.
- 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
- May be used to filter budgets by user-specified dimensions and/or tags.
- notifications
{[key: string]: NotificationArgs}
- 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 | CategoryType
- The category of the budget, whether the budget tracks cost or usage.
- scope
str
- The fully qualified Azure Resource manager identifier of the resource.
- time_grain
str | TimeGrainType
- 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
BudgetTimePeriodArgs
- 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.
- budget_name
str
- Budget Name.
- 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
BudgetFilterArgs
- May be used to filter budgets by user-specified dimensions and/or tags.
- notifications
Mapping[str, NotificationArgs]
- 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 | "Cost"
- The category of the budget, whether the budget tracks cost or usage.
- scope
String
- The fully qualified Azure Resource manager identifier of the resource.
- timeGrain
String | "Monthly" | "Quarterly" | "Annually" | "BillingMonth" | "BillingQuarter" | "BillingAnnual"
- 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.
- budgetName
String
- Budget Name.
- 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the Budget resource produces the following output properties:
- azure_api_version
string
- The Azure API version of the resource.
- current_spend
object
- The current amount of cost which is being tracked for a budget.
- forecast_spend
object
- The forecasted cost which is being tracked for a budget.
- id
string
- The provider-assigned unique ID for this managed resource.
- name
string
- The name of the resource
- system_data
object
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type
string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azureApiVersion
String
- The Azure API version of the resource.
- 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
- The provider-assigned unique ID for this managed resource.
- name
String
- The name of the resource
- systemData
Property Map
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type
String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Look up Existing Budget Resource
Get an existing Budget resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static Budget get(String name, Output<String> id, CustomResourceOptions options)
resources: existingBudget: type: azure-native:consumption:Budget get: id: ${id}
import {
to = azure-native_consumption_budget.example
id = "${id}"
}
- name
string
- The unique name of the resulting resource.
- id
Input<ID>
- The unique provider ID of the resource to look up.
- opts
CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
str
- The unique name of the resulting resource.
- id
str
- The unique provider ID of the resource to look up.
- opts
ResourceOptions
- Bag of options to control resource's behavior.
- ctx
Context
- Context object for the current deployment.
- name
string
- The unique name of the resulting resource.
- id
IDInput
- The unique provider ID of the resource to look up.
- state
BudgetState
- Pass nil. This resource has no state arguments.
- opts
ResourceOption
- Bag of options to control resource's behavior.
- name
string
- The unique name of the resulting resource.
- id
Input<string>
- The unique provider ID of the resource to look up.
- opts
CustomResourceOptions
- Bag of options to control resource's behavior.
- name
String
- The unique name of the resulting resource.
- id
Output<String>
- The unique provider ID of the resource to look up.
- options
CustomResourceOptions
- Bag of options to control resource's behavior.
Supporting Types
BudgetComparisonExpression, BudgetComparisonExpressionArgs
The comparison expression to be used in the budgets.- name
string
- The name of the column to use in comparison.
- operator
string | "In"
- 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 | BudgetOperatorType
- 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 | "In"
- The operator to use for comparison.
- values
List<String>
- Array of values to use for comparison
BudgetComparisonExpressionResponse, BudgetComparisonExpressionResponseArgs
The comparison expression to be used in the budgets.- 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
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
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
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
- 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
BudgetFilter, BudgetFilterArgs
May be used to filter budgets by resource group, resource, or meter.BudgetFilterProperties, BudgetFilterPropertiesArgs
The Dimensions or Tags to filter a budget by.BudgetFilterPropertiesResponse, BudgetFilterPropertiesResponseArgs
The Dimensions or Tags to filter a budget by.BudgetFilterResponse, BudgetFilterResponseArgs
May be used to filter budgets by resource group, resource, or meter.BudgetOperatorType, BudgetOperatorTypeArgs
The operator to use for comparison.| Name | Value |
|---|
| BudgetOperatorTypeIn | In |
BudgetTimePeriod, BudgetTimePeriodArgs
The start and end date for a budget.- 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
string
- The start date for the budget.
- end_date
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.
- 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.
BudgetTimePeriodResponse, BudgetTimePeriodResponseArgs
The start and end date for a budget.- 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
string
- The start date for the budget.
- end_date
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.
- 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.
CategoryType, CategoryTypeArgs
The category of the budget, whether the budget tracks cost or usage.| Name | Value |
|---|
| CategoryTypeCost | Cost |
CultureCode, CultureCodeArgs
Language in which the recipient will receive the notification| Name | Value |
|---|
| En_us | en-us |
| Ja_jp | ja-jp |
| Zh_cn | zh-cn |
| De_de | de-de |
| Es_es | es-es |
| Fr_fr | fr-fr |
| It_it | it-it |
| Ko_kr | ko-kr |
| Pt_br | pt-br |
| Ru_ru | ru-ru |
| Zh_tw | zh-tw |
| Cs_cz | cs-cz |
| Pl_pl | pl-pl |
| Tr_tr | tr-tr |
| Da_dk | da-dk |
| En_gb | en-gb |
| Hu_hu | hu-hu |
| Nb_no | nb-no |
| Nl_nl | nl-nl |
| Pt_pt | pt-pt |
| Sv_se | sv-se |
| Name | Value |
|---|
| CultureCode_En_Us | en-us |
| CultureCode_Ja_Jp | ja-jp |
| CultureCode_Zh_Cn | zh-cn |
| CultureCode_De_De | de-de |
| CultureCode_Es_Es | es-es |
| CultureCode_Fr_Fr | fr-fr |
| CultureCode_It_It | it-it |
| CultureCode_Ko_Kr | ko-kr |
| CultureCode_Pt_Br | pt-br |
| CultureCode_Ru_Ru | ru-ru |
| CultureCode_Zh_Tw | zh-tw |
| CultureCode_Cs_Cz | cs-cz |
| CultureCode_Pl_Pl | pl-pl |
| CultureCode_Tr_Tr | tr-tr |
| CultureCode_Da_Dk | da-dk |
| CultureCode_En_Gb | en-gb |
| CultureCode_Hu_Hu | hu-hu |
| CultureCode_Nb_No | nb-no |
| CultureCode_Nl_Nl | nl-nl |
| CultureCode_Pt_Pt | pt-pt |
| CultureCode_Sv_Se | sv-se |
| Value |
|---|
en-us |
ja-jp |
zh-cn |
de-de |
es-es |
fr-fr |
it-it |
ko-kr |
pt-br |
ru-ru |
zh-tw |
cs-cz |
pl-pl |
tr-tr |
da-dk |
en-gb |
hu-hu |
nb-no |
nl-nl |
pt-pt |
sv-se |
| Name | Value |
|---|
| Enus | en-us |
| Jajp | ja-jp |
| Zhcn | zh-cn |
| Dede | de-de |
| Eses | es-es |
| Frfr | fr-fr |
| Itit | it-it |
| Kokr | ko-kr |
| Ptbr | pt-br |
| Ruru | ru-ru |
| Zhtw | zh-tw |
| Cscz | cs-cz |
| Plpl | pl-pl |
| Trtr | tr-tr |
| Dadk | da-dk |
| Engb | en-gb |
| Huhu | hu-hu |
| Nbno | nb-no |
| Nlnl | nl-nl |
| Ptpt | pt-pt |
| Svse | sv-se |
| Name | Value |
|---|
| En_us | en-us |
| Ja_jp | ja-jp |
| Zh_cn | zh-cn |
| De_de | de-de |
| Es_es | es-es |
| Fr_fr | fr-fr |
| It_it | it-it |
| Ko_kr | ko-kr |
| Pt_br | pt-br |
| Ru_ru | ru-ru |
| Zh_tw | zh-tw |
| Cs_cz | cs-cz |
| Pl_pl | pl-pl |
| Tr_tr | tr-tr |
| Da_dk | da-dk |
| En_gb | en-gb |
| Hu_hu | hu-hu |
| Nb_no | nb-no |
| Nl_nl | nl-nl |
| Pt_pt | pt-pt |
| Sv_se | sv-se |
| Name | Value |
|---|
| EN_US | en-us |
| JA_JP | ja-jp |
| ZH_CN | zh-cn |
| DE_DE | de-de |
| ES_ES | es-es |
| FR_FR | fr-fr |
| IT_IT | it-it |
| KO_KR | ko-kr |
| PT_BR | pt-br |
| RU_RU | ru-ru |
| ZH_TW | zh-tw |
| CS_CZ | cs-cz |
| PL_PL | pl-pl |
| TR_TR | tr-tr |
| DA_DK | da-dk |
| EN_GB | en-gb |
| HU_HU | hu-hu |
| NB_NO | nb-no |
| NL_NL | nl-nl |
| PT_PT | pt-pt |
| SV_SE | sv-se |
| Value |
|---|
en-us |
ja-jp |
zh-cn |
de-de |
es-es |
fr-fr |
it-it |
ko-kr |
pt-br |
ru-ru |
zh-tw |
cs-cz |
pl-pl |
tr-tr |
da-dk |
en-gb |
hu-hu |
nb-no |
nl-nl |
pt-pt |
sv-se |
CurrentSpendResponse, CurrentSpendResponseArgs
The current amount of cost which is being tracked for a budget.- 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
Double
- 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.
- amount
Number
- The total amount of cost which is being tracked by the budget.
- unit
String
- The unit of measure for the budget amount.
ForecastSpendResponse, ForecastSpendResponseArgs
The forecasted cost which is being tracked for a budget.- 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
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
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.
- 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.
Notification, NotificationArgs
The notification associated with a budget.- 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 | Pulumi.AzureNative.Consumption.OperatorType
- 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 | Pulumi.AzureNative.Consumption.CultureCode
- Language in which the recipient will receive the notification
- ThresholdType
string | Pulumi.AzureNative.Consumption.ThresholdType
- 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 | OperatorType
- 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 | CultureCode
- Language in which the recipient will receive the notification
- ThresholdType
string | ThresholdType
- 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 | OperatorType
- 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 | CultureCode
- Language in which the recipient will receive the notification
- thresholdType
String | ThresholdType
- 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 | OperatorType
- 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 | CultureCode
- Language in which the recipient will receive the notification
- thresholdType
string | ThresholdType
- 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 | OperatorType
- 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 | CultureCode
- Language in which the recipient will receive the notification
- threshold_type
str | ThresholdType
- The type of threshold
NotificationResponse, NotificationResponseArgs
The notification associated with a budget.- 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
- contact_emails
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
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.
- contact_groups
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.
- contact_roles
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
- threshold_type
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
OperatorType, OperatorTypeArgs
The comparison operator.| Name | Value | Description |
|---|
| EqualTo | EqualTo | Alert will be triggered if the evaluated cost is the same as threshold value. Note: It’s not recommended to use this OperatorType as there’s low chance of cost being exactly the same as threshold value, leading to missing of your alert. This OperatorType will be deprecated in future. |
| GreaterThan | GreaterThan | Alert will be triggered if the evaluated cost is greater than the threshold value. Note: This is the recommended OperatorType while configuring Budget Alert. |
| GreaterThanOrEqualTo | GreaterThanOrEqualTo | Alert will be triggered if the evaluated cost is greater than or equal to the threshold value. |
| Name | Value | Description |
|---|
| OperatorTypeEqualTo | EqualTo | Alert will be triggered if the evaluated cost is the same as threshold value. Note: It’s not recommended to use this OperatorType as there’s low chance of cost being exactly the same as threshold value, leading to missing of your alert. This OperatorType will be deprecated in future. |
| OperatorTypeGreaterThan | GreaterThan | Alert will be triggered if the evaluated cost is greater than the threshold value. Note: This is the recommended OperatorType while configuring Budget Alert. |
| OperatorTypeGreaterThanOrEqualTo | GreaterThanOrEqualTo | Alert will be triggered if the evaluated cost is greater than or equal to the threshold value. |
| Value | Description |
|---|
EqualTo | Alert will be triggered if the evaluated cost is the same as threshold value. Note: It’s not recommended to use this OperatorType as there’s low chance of cost being exactly the same as threshold value, leading to missing of your alert. This OperatorType will be deprecated in future. |
GreaterThan | Alert will be triggered if the evaluated cost is greater than the threshold value. Note: This is the recommended OperatorType while configuring Budget Alert. |
GreaterThanOrEqualTo | Alert will be triggered if the evaluated cost is greater than or equal to the threshold value. |
| Name | Value | Description |
|---|
| EqualTo | EqualTo | Alert will be triggered if the evaluated cost is the same as threshold value. Note: It’s not recommended to use this OperatorType as there’s low chance of cost being exactly the same as threshold value, leading to missing of your alert. This OperatorType will be deprecated in future. |
| GreaterThan | GreaterThan | Alert will be triggered if the evaluated cost is greater than the threshold value. Note: This is the recommended OperatorType while configuring Budget Alert. |
| GreaterThanOrEqualTo | GreaterThanOrEqualTo | Alert will be triggered if the evaluated cost is greater than or equal to the threshold value. |
| Name | Value | Description |
|---|
| EqualTo | EqualTo | Alert will be triggered if the evaluated cost is the same as threshold value. Note: It’s not recommended to use this OperatorType as there’s low chance of cost being exactly the same as threshold value, leading to missing of your alert. This OperatorType will be deprecated in future. |
| GreaterThan | GreaterThan | Alert will be triggered if the evaluated cost is greater than the threshold value. Note: This is the recommended OperatorType while configuring Budget Alert. |
| GreaterThanOrEqualTo | GreaterThanOrEqualTo | Alert will be triggered if the evaluated cost is greater than or equal to the threshold value. |
| Name | Value | Description |
|---|
| EQUAL_TO | EqualTo | Alert will be triggered if the evaluated cost is the same as threshold value. Note: It’s not recommended to use this OperatorType as there’s low chance of cost being exactly the same as threshold value, leading to missing of your alert. This OperatorType will be deprecated in future. |
| GREATER_THAN | GreaterThan | Alert will be triggered if the evaluated cost is greater than the threshold value. Note: This is the recommended OperatorType while configuring Budget Alert. |
| GREATER_THAN_OR_EQUAL_TO | GreaterThanOrEqualTo | Alert will be triggered if the evaluated cost is greater than or equal to the threshold value. |
| Value | Description |
|---|
EqualTo | Alert will be triggered if the evaluated cost is the same as threshold value. Note: It’s not recommended to use this OperatorType as there’s low chance of cost being exactly the same as threshold value, leading to missing of your alert. This OperatorType will be deprecated in future. |
GreaterThan | Alert will be triggered if the evaluated cost is greater than the threshold value. Note: This is the recommended OperatorType while configuring Budget Alert. |
GreaterThanOrEqualTo | Alert will be triggered if the evaluated cost is greater than or equal to the threshold value. |
SystemDataResponse, SystemDataResponseArgs
Metadata pertaining to creation and last modification of the resource.- CreatedAt
string
- The timestamp of resource creation (UTC).
- CreatedBy
string
- The identity that created the resource.
- CreatedByType
string
- The type of identity that created the resource.
- LastModifiedAt
string
- The timestamp of resource last modification (UTC)
- LastModifiedBy
string
- The identity that last modified the resource.
- LastModifiedByType
string
- The type of identity that last modified the resource.
- CreatedAt
string
- The timestamp of resource creation (UTC).
- CreatedBy
string
- The identity that created the resource.
- CreatedByType
string
- The type of identity that created the resource.
- LastModifiedAt
string
- The timestamp of resource last modification (UTC)
- LastModifiedBy
string
- The identity that last modified the resource.
- LastModifiedByType
string
- The type of identity that last modified the resource.
- createdAt
String
- The timestamp of resource creation (UTC).
- createdBy
String
- The identity that created the resource.
- createdByType
String
- The type of identity that created the resource.
- lastModifiedAt
String
- The timestamp of resource last modification (UTC)
- lastModifiedBy
String
- The identity that last modified the resource.
- lastModifiedByType
String
- The type of identity that last modified the resource.
- createdAt
string
- The timestamp of resource creation (UTC).
- createdBy
string
- The identity that created the resource.
- createdByType
string
- The type of identity that created the resource.
- lastModifiedAt
string
- The timestamp of resource last modification (UTC)
- lastModifiedBy
string
- The identity that last modified the resource.
- lastModifiedByType
string
- The type of identity that last modified the resource.
- createdAt
String
- The timestamp of resource creation (UTC).
- createdBy
String
- The identity that created the resource.
- createdByType
String
- The type of identity that created the resource.
- lastModifiedAt
String
- The timestamp of resource last modification (UTC)
- lastModifiedBy
String
- The identity that last modified the resource.
- lastModifiedByType
String
- The type of identity that last modified the resource.
ThresholdType, ThresholdTypeArgs
The type of threshold| Name | Value | Description |
|---|
| Actual | Actual | Actual costs budget alerts notify when the actual accrued cost exceeds the allocated budget . |
| Forecasted | Forecasted | Forecasted costs budget alerts provide advanced notification that your spending trends are likely to exceed your allocated budget, as it relies on forecasted cost predictions. |
| Name | Value | Description |
|---|
| ThresholdTypeActual | Actual | Actual costs budget alerts notify when the actual accrued cost exceeds the allocated budget . |
| ThresholdTypeForecasted | Forecasted | Forecasted costs budget alerts provide advanced notification that your spending trends are likely to exceed your allocated budget, as it relies on forecasted cost predictions. |
| Value | Description |
|---|
Actual | Actual costs budget alerts notify when the actual accrued cost exceeds the allocated budget . |
Forecasted | Forecasted costs budget alerts provide advanced notification that your spending trends are likely to exceed your allocated budget, as it relies on forecasted cost predictions. |
| Name | Value | Description |
|---|
| Actual | Actual | Actual costs budget alerts notify when the actual accrued cost exceeds the allocated budget . |
| Forecasted | Forecasted | Forecasted costs budget alerts provide advanced notification that your spending trends are likely to exceed your allocated budget, as it relies on forecasted cost predictions. |
| Name | Value | Description |
|---|
| Actual | Actual | Actual costs budget alerts notify when the actual accrued cost exceeds the allocated budget . |
| Forecasted | Forecasted | Forecasted costs budget alerts provide advanced notification that your spending trends are likely to exceed your allocated budget, as it relies on forecasted cost predictions. |
| Name | Value | Description |
|---|
| ACTUAL | Actual | Actual costs budget alerts notify when the actual accrued cost exceeds the allocated budget . |
| FORECASTED | Forecasted | Forecasted costs budget alerts provide advanced notification that your spending trends are likely to exceed your allocated budget, as it relies on forecasted cost predictions. |
| Value | Description |
|---|
Actual | Actual costs budget alerts notify when the actual accrued cost exceeds the allocated budget . |
Forecasted | Forecasted costs budget alerts provide advanced notification that your spending trends are likely to exceed your allocated budget, as it relies on forecasted cost predictions. |
TimeGrainType, TimeGrainTypeArgs
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| Name | Value |
|---|
| Monthly | Monthly |
| Quarterly | Quarterly |
| Annually | Annually |
| BillingMonth | BillingMonth |
| BillingQuarter | BillingQuarter |
| BillingAnnual | BillingAnnual |
| Name | Value |
|---|
| TimeGrainTypeMonthly | Monthly |
| TimeGrainTypeQuarterly | Quarterly |
| TimeGrainTypeAnnually | Annually |
| TimeGrainTypeBillingMonth | BillingMonth |
| TimeGrainTypeBillingQuarter | BillingQuarter |
| TimeGrainTypeBillingAnnual | BillingAnnual |
| Value |
|---|
Monthly |
Quarterly |
Annually |
BillingMonth |
BillingQuarter |
BillingAnnual |
| Name | Value |
|---|
| Monthly | Monthly |
| Quarterly | Quarterly |
| Annually | Annually |
| BillingMonth | BillingMonth |
| BillingQuarter | BillingQuarter |
| BillingAnnual | BillingAnnual |
| Name | Value |
|---|
| Monthly | Monthly |
| Quarterly | Quarterly |
| Annually | Annually |
| BillingMonth | BillingMonth |
| BillingQuarter | BillingQuarter |
| BillingAnnual | BillingAnnual |
| Name | Value |
|---|
| MONTHLY | Monthly |
| QUARTERLY | Quarterly |
| ANNUALLY | Annually |
| BILLING_MONTH | BillingMonth |
| BILLING_QUARTER | BillingQuarter |
| BILLING_ANNUAL | BillingAnnual |
| Value |
|---|
Monthly |
Quarterly |
Annually |
BillingMonth |
BillingQuarter |
BillingAnnual |
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:consumption:Budget TestBudget /{scope}/providers/Microsoft.Consumption/budgets/{budgetName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0