Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.14.0 published on Thursday, Jul 28, 2022 by Pulumi

BudgetSubscription

Manages a Subscription Consumption Budget.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var current = Output.Create(Azure.Core.GetSubscription.InvokeAsync());
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
        {
            Location = "eastus",
        });
        var exampleActionGroup = new Azure.Monitoring.ActionGroup("exampleActionGroup", new Azure.Monitoring.ActionGroupArgs
        {
            ResourceGroupName = exampleResourceGroup.Name,
            ShortName = "example",
        });
        var exampleBudgetSubscription = new Azure.Consumption.BudgetSubscription("exampleBudgetSubscription", new Azure.Consumption.BudgetSubscriptionArgs
        {
            SubscriptionId = current.Apply(current => current.Id),
            Amount = 1000,
            TimeGrain = "Monthly",
            TimePeriod = new Azure.Consumption.Inputs.BudgetSubscriptionTimePeriodArgs
            {
                StartDate = "2022-06-01T00:00:00Z",
                EndDate = "2022-07-01T00:00:00Z",
            },
            Filter = new Azure.Consumption.Inputs.BudgetSubscriptionFilterArgs
            {
                Dimensions = 
                {
                    new Azure.Consumption.Inputs.BudgetSubscriptionFilterDimensionArgs
                    {
                        Name = "ResourceGroupName",
                        Values = 
                        {
                            exampleResourceGroup.Name,
                        },
                    },
                },
                Tags = 
                {
                    new Azure.Consumption.Inputs.BudgetSubscriptionFilterTagArgs
                    {
                        Name = "foo",
                        Values = 
                        {
                            "bar",
                            "baz",
                        },
                    },
                },
            },
            Notifications = 
            {
                new Azure.Consumption.Inputs.BudgetSubscriptionNotificationArgs
                {
                    Enabled = true,
                    Threshold = 90,
                    Operator = "EqualTo",
                    ContactEmails = 
                    {
                        "foo@example.com",
                        "bar@example.com",
                    },
                    ContactGroups = 
                    {
                        exampleActionGroup.Id,
                    },
                    ContactRoles = 
                    {
                        "Owner",
                    },
                },
                new Azure.Consumption.Inputs.BudgetSubscriptionNotificationArgs
                {
                    Enabled = false,
                    Threshold = 100,
                    Operator = "GreaterThan",
                    ThresholdType = "Forecasted",
                    ContactEmails = 
                    {
                        "foo@example.com",
                        "bar@example.com",
                    },
                },
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/consumption"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/monitoring"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		current, err := core.LookupSubscription(ctx, nil, nil)
		if err != nil {
			return err
		}
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("eastus"),
		})
		if err != nil {
			return err
		}
		exampleActionGroup, err := monitoring.NewActionGroup(ctx, "exampleActionGroup", &monitoring.ActionGroupArgs{
			ResourceGroupName: exampleResourceGroup.Name,
			ShortName:         pulumi.String("example"),
		})
		if err != nil {
			return err
		}
		_, err = consumption.NewBudgetSubscription(ctx, "exampleBudgetSubscription", &consumption.BudgetSubscriptionArgs{
			SubscriptionId: pulumi.String(current.Id),
			Amount:         pulumi.Float64(1000),
			TimeGrain:      pulumi.String("Monthly"),
			TimePeriod: &consumption.BudgetSubscriptionTimePeriodArgs{
				StartDate: pulumi.String("2022-06-01T00:00:00Z"),
				EndDate:   pulumi.String("2022-07-01T00:00:00Z"),
			},
			Filter: &consumption.BudgetSubscriptionFilterArgs{
				Dimensions: consumption.BudgetSubscriptionFilterDimensionArray{
					&consumption.BudgetSubscriptionFilterDimensionArgs{
						Name: pulumi.String("ResourceGroupName"),
						Values: pulumi.StringArray{
							exampleResourceGroup.Name,
						},
					},
				},
				Tags: consumption.BudgetSubscriptionFilterTagArray{
					&consumption.BudgetSubscriptionFilterTagArgs{
						Name: pulumi.String("foo"),
						Values: pulumi.StringArray{
							pulumi.String("bar"),
							pulumi.String("baz"),
						},
					},
				},
			},
			Notifications: consumption.BudgetSubscriptionNotificationArray{
				&consumption.BudgetSubscriptionNotificationArgs{
					Enabled:   pulumi.Bool(true),
					Threshold: pulumi.Int(90),
					Operator:  pulumi.String("EqualTo"),
					ContactEmails: pulumi.StringArray{
						pulumi.String("foo@example.com"),
						pulumi.String("bar@example.com"),
					},
					ContactGroups: pulumi.StringArray{
						exampleActionGroup.ID(),
					},
					ContactRoles: pulumi.StringArray{
						pulumi.String("Owner"),
					},
				},
				&consumption.BudgetSubscriptionNotificationArgs{
					Enabled:       pulumi.Bool(false),
					Threshold:     pulumi.Int(100),
					Operator:      pulumi.String("GreaterThan"),
					ThresholdType: pulumi.String("Forecasted"),
					ContactEmails: pulumi.StringArray{
						pulumi.String("foo@example.com"),
						pulumi.String("bar@example.com"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.consumption.inputs.GetBudgetSubscriptionArgs;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.monitoring.ActionGroup;
import com.pulumi.azure.monitoring.ActionGroupArgs;
import com.pulumi.azure.consumption.BudgetSubscription;
import com.pulumi.azure.consumption.BudgetSubscriptionArgs;
import com.pulumi.azure.consumption.inputs.BudgetSubscriptionTimePeriodArgs;
import com.pulumi.azure.consumption.inputs.BudgetSubscriptionFilterArgs;
import com.pulumi.azure.consumption.inputs.BudgetSubscriptionNotificationArgs;
import java.util.List;
import java.util.ArrayList;
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) {
        final var current = CoreFunctions.getSubscription();

        var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
            .location("eastus")
            .build());

        var exampleActionGroup = new ActionGroup("exampleActionGroup", ActionGroupArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .shortName("example")
            .build());

        var exampleBudgetSubscription = new BudgetSubscription("exampleBudgetSubscription", BudgetSubscriptionArgs.builder()        
            .subscriptionId(current.applyValue(getBudgetSubscriptionResult -> getBudgetSubscriptionResult.id()))
            .amount(1000)
            .timeGrain("Monthly")
            .timePeriod(BudgetSubscriptionTimePeriodArgs.builder()
                .startDate("2022-06-01T00:00:00Z")
                .endDate("2022-07-01T00:00:00Z")
                .build())
            .filter(BudgetSubscriptionFilterArgs.builder()
                .dimensions(BudgetSubscriptionFilterDimensionArgs.builder()
                    .name("ResourceGroupName")
                    .values(exampleResourceGroup.name())
                    .build())
                .tags(BudgetSubscriptionFilterTagArgs.builder()
                    .name("foo")
                    .values(                    
                        "bar",
                        "baz")
                    .build())
                .build())
            .notifications(            
                BudgetSubscriptionNotificationArgs.builder()
                    .enabled(true)
                    .threshold(90)
                    .operator("EqualTo")
                    .contactEmails(                    
                        "foo@example.com",
                        "bar@example.com")
                    .contactGroups(exampleActionGroup.id())
                    .contactRoles("Owner")
                    .build(),
                BudgetSubscriptionNotificationArgs.builder()
                    .enabled(false)
                    .threshold(100)
                    .operator("GreaterThan")
                    .thresholdType("Forecasted")
                    .contactEmails(                    
                        "foo@example.com",
                        "bar@example.com")
                    .build())
            .build());

    }
}
import pulumi
import pulumi_azure as azure

current = azure.core.get_subscription()
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="eastus")
example_action_group = azure.monitoring.ActionGroup("exampleActionGroup",
    resource_group_name=example_resource_group.name,
    short_name="example")
example_budget_subscription = azure.consumption.BudgetSubscription("exampleBudgetSubscription",
    subscription_id=current.id,
    amount=1000,
    time_grain="Monthly",
    time_period=azure.consumption.BudgetSubscriptionTimePeriodArgs(
        start_date="2022-06-01T00:00:00Z",
        end_date="2022-07-01T00:00:00Z",
    ),
    filter=azure.consumption.BudgetSubscriptionFilterArgs(
        dimensions=[azure.consumption.BudgetSubscriptionFilterDimensionArgs(
            name="ResourceGroupName",
            values=[example_resource_group.name],
        )],
        tags=[azure.consumption.BudgetSubscriptionFilterTagArgs(
            name="foo",
            values=[
                "bar",
                "baz",
            ],
        )],
    ),
    notifications=[
        azure.consumption.BudgetSubscriptionNotificationArgs(
            enabled=True,
            threshold=90,
            operator="EqualTo",
            contact_emails=[
                "foo@example.com",
                "bar@example.com",
            ],
            contact_groups=[example_action_group.id],
            contact_roles=["Owner"],
        ),
        azure.consumption.BudgetSubscriptionNotificationArgs(
            enabled=False,
            threshold=100,
            operator="GreaterThan",
            threshold_type="Forecasted",
            contact_emails=[
                "foo@example.com",
                "bar@example.com",
            ],
        ),
    ])
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const current = azure.core.getSubscription({});
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "eastus"});
const exampleActionGroup = new azure.monitoring.ActionGroup("exampleActionGroup", {
    resourceGroupName: exampleResourceGroup.name,
    shortName: "example",
});
const exampleBudgetSubscription = new azure.consumption.BudgetSubscription("exampleBudgetSubscription", {
    subscriptionId: current.then(current => current.id),
    amount: 1000,
    timeGrain: "Monthly",
    timePeriod: {
        startDate: "2022-06-01T00:00:00Z",
        endDate: "2022-07-01T00:00:00Z",
    },
    filter: {
        dimensions: [{
            name: "ResourceGroupName",
            values: [exampleResourceGroup.name],
        }],
        tags: [{
            name: "foo",
            values: [
                "bar",
                "baz",
            ],
        }],
    },
    notifications: [
        {
            enabled: true,
            threshold: 90,
            operator: "EqualTo",
            contactEmails: [
                "foo@example.com",
                "bar@example.com",
            ],
            contactGroups: [exampleActionGroup.id],
            contactRoles: ["Owner"],
        },
        {
            enabled: false,
            threshold: 100,
            operator: "GreaterThan",
            thresholdType: "Forecasted",
            contactEmails: [
                "foo@example.com",
                "bar@example.com",
            ],
        },
    ],
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: eastus
  exampleActionGroup:
    type: azure:monitoring:ActionGroup
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      shortName: example
  exampleBudgetSubscription:
    type: azure:consumption:BudgetSubscription
    properties:
      subscriptionId: ${current.id}
      amount: 1000
      timeGrain: Monthly
      timePeriod:
        startDate: 2022-06-01T00:00:00Z
        endDate: 2022-07-01T00:00:00Z
      filter:
        dimensions:
          - name: ResourceGroupName
            values:
              - ${exampleResourceGroup.name}
        tags:
          - name: foo
            values:
              - bar
              - baz
      notifications:
        - enabled: true
          threshold: 90
          operator: EqualTo
          contactEmails:
            - foo@example.com
            - bar@example.com
          contactGroups:
            - ${exampleActionGroup.id}
          contactRoles:
            - Owner
        - enabled: false
          threshold: 100
          operator: GreaterThan
          thresholdType: Forecasted
          contactEmails:
            - foo@example.com
            - bar@example.com
variables:
  current:
    Fn::Invoke:
      Function: azure:core:getSubscription
      Arguments: {}

Create a BudgetSubscription Resource

new BudgetSubscription(name: string, args: BudgetSubscriptionArgs, opts?: CustomResourceOptions);
@overload
def BudgetSubscription(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       amount: Optional[float] = None,
                       etag: Optional[str] = None,
                       filter: Optional[BudgetSubscriptionFilterArgs] = None,
                       name: Optional[str] = None,
                       notifications: Optional[Sequence[BudgetSubscriptionNotificationArgs]] = None,
                       subscription_id: Optional[str] = None,
                       time_grain: Optional[str] = None,
                       time_period: Optional[BudgetSubscriptionTimePeriodArgs] = None)
@overload
def BudgetSubscription(resource_name: str,
                       args: BudgetSubscriptionArgs,
                       opts: Optional[ResourceOptions] = None)
func NewBudgetSubscription(ctx *Context, name string, args BudgetSubscriptionArgs, opts ...ResourceOption) (*BudgetSubscription, error)
public BudgetSubscription(string name, BudgetSubscriptionArgs args, CustomResourceOptions? opts = null)
public BudgetSubscription(String name, BudgetSubscriptionArgs args)
public BudgetSubscription(String name, BudgetSubscriptionArgs args, CustomResourceOptions options)
type: azure:consumption:BudgetSubscription
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args BudgetSubscriptionArgs
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 BudgetSubscriptionArgs
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 BudgetSubscriptionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BudgetSubscriptionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args BudgetSubscriptionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

BudgetSubscription Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The BudgetSubscription resource accepts the following input properties:

Amount double

The total amount of cost to track with the budget.

Notifications List<BudgetSubscriptionNotificationArgs>

One or more notification blocks as defined below.

SubscriptionId string

The ID of the Subscription for which to create a Consumption Budget. Changing this forces a new resource to be created.

TimePeriod BudgetSubscriptionTimePeriodArgs

A time_period block as defined below.

Etag string

The ETag of the Subscription Consumption Budget.

Filter BudgetSubscriptionFilterArgs

A filter block as defined below.

Name string

The name which should be used for this Subscription Consumption Budget. Changing this forces a new resource to be created.

TimeGrain string

The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of Monthly, Quarterly, Annually, BillingMonth, BillingQuarter, or BillingYear. Defaults to Monthly.

Amount float64

The total amount of cost to track with the budget.

Notifications []BudgetSubscriptionNotificationArgs

One or more notification blocks as defined below.

SubscriptionId string

The ID of the Subscription for which to create a Consumption Budget. Changing this forces a new resource to be created.

TimePeriod BudgetSubscriptionTimePeriodArgs

A time_period block as defined below.

Etag string

The ETag of the Subscription Consumption Budget.

Filter BudgetSubscriptionFilterArgs

A filter block as defined below.

Name string

The name which should be used for this Subscription Consumption Budget. Changing this forces a new resource to be created.

TimeGrain string

The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of Monthly, Quarterly, Annually, BillingMonth, BillingQuarter, or BillingYear. Defaults to Monthly.

amount Double

The total amount of cost to track with the budget.

notifications List<BudgetSubscriptionNotificationArgs>

One or more notification blocks as defined below.

subscriptionId String

The ID of the Subscription for which to create a Consumption Budget. Changing this forces a new resource to be created.

timePeriod BudgetSubscriptionTimePeriodArgs

A time_period block as defined below.

etag String

The ETag of the Subscription Consumption Budget.

filter BudgetSubscriptionFilterArgs

A filter block as defined below.

name String

The name which should be used for this Subscription Consumption Budget. Changing this forces a new resource to be created.

timeGrain String

The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of Monthly, Quarterly, Annually, BillingMonth, BillingQuarter, or BillingYear. Defaults to Monthly.

amount number

The total amount of cost to track with the budget.

notifications BudgetSubscriptionNotificationArgs[]

One or more notification blocks as defined below.

subscriptionId string

The ID of the Subscription for which to create a Consumption Budget. Changing this forces a new resource to be created.

timePeriod BudgetSubscriptionTimePeriodArgs

A time_period block as defined below.

etag string

The ETag of the Subscription Consumption Budget.

filter BudgetSubscriptionFilterArgs

A filter block as defined below.

name string

The name which should be used for this Subscription Consumption Budget. Changing this forces a new resource to be created.

timeGrain string

The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of Monthly, Quarterly, Annually, BillingMonth, BillingQuarter, or BillingYear. Defaults to Monthly.

amount float

The total amount of cost to track with the budget.

notifications Sequence[BudgetSubscriptionNotificationArgs]

One or more notification blocks as defined below.

subscription_id str

The ID of the Subscription for which to create a Consumption Budget. Changing this forces a new resource to be created.

time_period BudgetSubscriptionTimePeriodArgs

A time_period block as defined below.

etag str

The ETag of the Subscription Consumption Budget.

filter BudgetSubscriptionFilterArgs

A filter block as defined below.

name str

The name which should be used for this Subscription Consumption Budget. Changing this forces a new resource to be created.

time_grain str

The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of Monthly, Quarterly, Annually, BillingMonth, BillingQuarter, or BillingYear. Defaults to Monthly.

amount Number

The total amount of cost to track with the budget.

notifications List<Property Map>

One or more notification blocks as defined below.

subscriptionId String

The ID of the Subscription for which to create a Consumption Budget. Changing this forces a new resource to be created.

timePeriod Property Map

A time_period block as defined below.

etag String

The ETag of the Subscription Consumption Budget.

filter Property Map

A filter block as defined below.

name String

The name which should be used for this Subscription Consumption Budget. Changing this forces a new resource to be created.

timeGrain String

The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of Monthly, Quarterly, Annually, BillingMonth, BillingQuarter, or BillingYear. Defaults to Monthly.

Outputs

All input properties are implicitly available as output properties. Additionally, the BudgetSubscription resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing BudgetSubscription Resource

Get an existing BudgetSubscription resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: BudgetSubscriptionState, opts?: CustomResourceOptions): BudgetSubscription
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        amount: Optional[float] = None,
        etag: Optional[str] = None,
        filter: Optional[BudgetSubscriptionFilterArgs] = None,
        name: Optional[str] = None,
        notifications: Optional[Sequence[BudgetSubscriptionNotificationArgs]] = None,
        subscription_id: Optional[str] = None,
        time_grain: Optional[str] = None,
        time_period: Optional[BudgetSubscriptionTimePeriodArgs] = None) -> BudgetSubscription
func GetBudgetSubscription(ctx *Context, name string, id IDInput, state *BudgetSubscriptionState, opts ...ResourceOption) (*BudgetSubscription, error)
public static BudgetSubscription Get(string name, Input<string> id, BudgetSubscriptionState? state, CustomResourceOptions? opts = null)
public static BudgetSubscription get(String name, Output<String> id, BudgetSubscriptionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Amount double

The total amount of cost to track with the budget.

Etag string

The ETag of the Subscription Consumption Budget.

Filter BudgetSubscriptionFilterArgs

A filter block as defined below.

Name string

The name which should be used for this Subscription Consumption Budget. Changing this forces a new resource to be created.

Notifications List<BudgetSubscriptionNotificationArgs>

One or more notification blocks as defined below.

SubscriptionId string

The ID of the Subscription for which to create a Consumption Budget. Changing this forces a new resource to be created.

TimeGrain string

The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of Monthly, Quarterly, Annually, BillingMonth, BillingQuarter, or BillingYear. Defaults to Monthly.

TimePeriod BudgetSubscriptionTimePeriodArgs

A time_period block as defined below.

Amount float64

The total amount of cost to track with the budget.

Etag string

The ETag of the Subscription Consumption Budget.

Filter BudgetSubscriptionFilterArgs

A filter block as defined below.

Name string

The name which should be used for this Subscription Consumption Budget. Changing this forces a new resource to be created.

Notifications []BudgetSubscriptionNotificationArgs

One or more notification blocks as defined below.

SubscriptionId string

The ID of the Subscription for which to create a Consumption Budget. Changing this forces a new resource to be created.

TimeGrain string

The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of Monthly, Quarterly, Annually, BillingMonth, BillingQuarter, or BillingYear. Defaults to Monthly.

TimePeriod BudgetSubscriptionTimePeriodArgs

A time_period block as defined below.

amount Double

The total amount of cost to track with the budget.

etag String

The ETag of the Subscription Consumption Budget.

filter BudgetSubscriptionFilterArgs

A filter block as defined below.

name String

The name which should be used for this Subscription Consumption Budget. Changing this forces a new resource to be created.

notifications List<BudgetSubscriptionNotificationArgs>

One or more notification blocks as defined below.

subscriptionId String

The ID of the Subscription for which to create a Consumption Budget. Changing this forces a new resource to be created.

timeGrain String

The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of Monthly, Quarterly, Annually, BillingMonth, BillingQuarter, or BillingYear. Defaults to Monthly.

timePeriod BudgetSubscriptionTimePeriodArgs

A time_period block as defined below.

amount number

The total amount of cost to track with the budget.

etag string

The ETag of the Subscription Consumption Budget.

filter BudgetSubscriptionFilterArgs

A filter block as defined below.

name string

The name which should be used for this Subscription Consumption Budget. Changing this forces a new resource to be created.

notifications BudgetSubscriptionNotificationArgs[]

One or more notification blocks as defined below.

subscriptionId string

The ID of the Subscription for which to create a Consumption Budget. Changing this forces a new resource to be created.

timeGrain string

The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of Monthly, Quarterly, Annually, BillingMonth, BillingQuarter, or BillingYear. Defaults to Monthly.

timePeriod BudgetSubscriptionTimePeriodArgs

A time_period block as defined below.

amount float

The total amount of cost to track with the budget.

etag str

The ETag of the Subscription Consumption Budget.

filter BudgetSubscriptionFilterArgs

A filter block as defined below.

name str

The name which should be used for this Subscription Consumption Budget. Changing this forces a new resource to be created.

notifications Sequence[BudgetSubscriptionNotificationArgs]

One or more notification blocks as defined below.

subscription_id str

The ID of the Subscription for which to create a Consumption Budget. Changing this forces a new resource to be created.

time_grain str

The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of Monthly, Quarterly, Annually, BillingMonth, BillingQuarter, or BillingYear. Defaults to Monthly.

time_period BudgetSubscriptionTimePeriodArgs

A time_period block as defined below.

amount Number

The total amount of cost to track with the budget.

etag String

The ETag of the Subscription Consumption Budget.

filter Property Map

A filter block as defined below.

name String

The name which should be used for this Subscription Consumption Budget. Changing this forces a new resource to be created.

notifications List<Property Map>

One or more notification blocks as defined below.

subscriptionId String

The ID of the Subscription for which to create a Consumption Budget. Changing this forces a new resource to be created.

timeGrain String

The time covered by a budget. Tracking of the amount will be reset based on the time grain. Must be one of Monthly, Quarterly, Annually, BillingMonth, BillingQuarter, or BillingYear. Defaults to Monthly.

timePeriod Property Map

A time_period block as defined below.

Supporting Types

BudgetSubscriptionFilter

Dimensions List<BudgetSubscriptionFilterDimension>

One or more dimension blocks as defined below to filter the budget on.

Not BudgetSubscriptionFilterNot

A not block as defined below to filter the budget on.

Tags List<BudgetSubscriptionFilterTag>

One or more tag blocks as defined below to filter the budget on.

Dimensions []BudgetSubscriptionFilterDimension

One or more dimension blocks as defined below to filter the budget on.

Not BudgetSubscriptionFilterNot

A not block as defined below to filter the budget on.

Tags []BudgetSubscriptionFilterTag

One or more tag blocks as defined below to filter the budget on.

dimensions List<BudgetSubscriptionFilterDimension>

One or more dimension blocks as defined below to filter the budget on.

not BudgetSubscriptionFilterNot

A not block as defined below to filter the budget on.

tags List<BudgetSubscriptionFilterTag>

One or more tag blocks as defined below to filter the budget on.

dimensions BudgetSubscriptionFilterDimension[]

One or more dimension blocks as defined below to filter the budget on.

not BudgetSubscriptionFilterNot

A not block as defined below to filter the budget on.

tags BudgetSubscriptionFilterTag[]

One or more tag blocks as defined below to filter the budget on.

dimensions Sequence[BudgetSubscriptionFilterDimension]

One or more dimension blocks as defined below to filter the budget on.

not_ BudgetSubscriptionFilterNot

A not block as defined below to filter the budget on.

tags Sequence[BudgetSubscriptionFilterTag]

One or more tag blocks as defined below to filter the budget on.

dimensions List<Property Map>

One or more dimension blocks as defined below to filter the budget on.

not Property Map

A not block as defined below to filter the budget on.

tags List<Property Map>

One or more tag blocks as defined below to filter the budget on.

BudgetSubscriptionFilterDimension

Name string

The name of the column to use for the filter. The allowed values are ChargeType, Frequency, InvoiceId, Meter, MeterCategory, MeterSubCategory, PartNumber, PricingModel, Product, ProductOrderId, ProductOrderName, PublisherType, ReservationId, ReservationName, ResourceGroupName, ResourceGuid, ResourceId, ResourceLocation, ResourceType, ServiceFamily, ServiceName, SubscriptionID, SubscriptionName, UnitOfMeasure.

Values List<string>

Specifies a list of values for the column.

Operator string

The operator to use for comparison. The allowed values are In.

Name string

The name of the column to use for the filter. The allowed values are ChargeType, Frequency, InvoiceId, Meter, MeterCategory, MeterSubCategory, PartNumber, PricingModel, Product, ProductOrderId, ProductOrderName, PublisherType, ReservationId, ReservationName, ResourceGroupName, ResourceGuid, ResourceId, ResourceLocation, ResourceType, ServiceFamily, ServiceName, SubscriptionID, SubscriptionName, UnitOfMeasure.

Values []string

Specifies a list of values for the column.

Operator string

The operator to use for comparison. The allowed values are In.

name String

The name of the column to use for the filter. The allowed values are ChargeType, Frequency, InvoiceId, Meter, MeterCategory, MeterSubCategory, PartNumber, PricingModel, Product, ProductOrderId, ProductOrderName, PublisherType, ReservationId, ReservationName, ResourceGroupName, ResourceGuid, ResourceId, ResourceLocation, ResourceType, ServiceFamily, ServiceName, SubscriptionID, SubscriptionName, UnitOfMeasure.

values List<String>

Specifies a list of values for the column.

operator String

The operator to use for comparison. The allowed values are In.

name string

The name of the column to use for the filter. The allowed values are ChargeType, Frequency, InvoiceId, Meter, MeterCategory, MeterSubCategory, PartNumber, PricingModel, Product, ProductOrderId, ProductOrderName, PublisherType, ReservationId, ReservationName, ResourceGroupName, ResourceGuid, ResourceId, ResourceLocation, ResourceType, ServiceFamily, ServiceName, SubscriptionID, SubscriptionName, UnitOfMeasure.

values string[]

Specifies a list of values for the column.

operator string

The operator to use for comparison. The allowed values are In.

name str

The name of the column to use for the filter. The allowed values are ChargeType, Frequency, InvoiceId, Meter, MeterCategory, MeterSubCategory, PartNumber, PricingModel, Product, ProductOrderId, ProductOrderName, PublisherType, ReservationId, ReservationName, ResourceGroupName, ResourceGuid, ResourceId, ResourceLocation, ResourceType, ServiceFamily, ServiceName, SubscriptionID, SubscriptionName, UnitOfMeasure.

values Sequence[str]

Specifies a list of values for the column.

operator str

The operator to use for comparison. The allowed values are In.

name String

The name of the column to use for the filter. The allowed values are ChargeType, Frequency, InvoiceId, Meter, MeterCategory, MeterSubCategory, PartNumber, PricingModel, Product, ProductOrderId, ProductOrderName, PublisherType, ReservationId, ReservationName, ResourceGroupName, ResourceGuid, ResourceId, ResourceLocation, ResourceType, ServiceFamily, ServiceName, SubscriptionID, SubscriptionName, UnitOfMeasure.

values List<String>

Specifies a list of values for the column.

operator String

The operator to use for comparison. The allowed values are In.

BudgetSubscriptionFilterNot

Dimension BudgetSubscriptionFilterNotDimension

One dimension block as defined below to filter the budget on. Conflicts with tag.

Tag BudgetSubscriptionFilterNotTag

One tag block as defined below to filter the budget on. Conflicts with dimension.

Dimension BudgetSubscriptionFilterNotDimension

One dimension block as defined below to filter the budget on. Conflicts with tag.

Tag BudgetSubscriptionFilterNotTag

One tag block as defined below to filter the budget on. Conflicts with dimension.

dimension BudgetSubscriptionFilterNotDimension

One dimension block as defined below to filter the budget on. Conflicts with tag.

tag BudgetSubscriptionFilterNotTag

One tag block as defined below to filter the budget on. Conflicts with dimension.

dimension BudgetSubscriptionFilterNotDimension

One dimension block as defined below to filter the budget on. Conflicts with tag.

tag BudgetSubscriptionFilterNotTag

One tag block as defined below to filter the budget on. Conflicts with dimension.

dimension BudgetSubscriptionFilterNotDimension

One dimension block as defined below to filter the budget on. Conflicts with tag.

tag BudgetSubscriptionFilterNotTag

One tag block as defined below to filter the budget on. Conflicts with dimension.

dimension Property Map

One dimension block as defined below to filter the budget on. Conflicts with tag.

tag Property Map

One tag block as defined below to filter the budget on. Conflicts with dimension.

BudgetSubscriptionFilterNotDimension

Name string

The name of the column to use for the filter. The allowed values are ChargeType, Frequency, InvoiceId, Meter, MeterCategory, MeterSubCategory, PartNumber, PricingModel, Product, ProductOrderId, ProductOrderName, PublisherType, ReservationId, ReservationName, ResourceGroupName, ResourceGuid, ResourceId, ResourceLocation, ResourceType, ServiceFamily, ServiceName, SubscriptionID, SubscriptionName, UnitOfMeasure.

Values List<string>

Specifies a list of values for the column.

Operator string

The operator to use for comparison. The allowed values are In.

Name string

The name of the column to use for the filter. The allowed values are ChargeType, Frequency, InvoiceId, Meter, MeterCategory, MeterSubCategory, PartNumber, PricingModel, Product, ProductOrderId, ProductOrderName, PublisherType, ReservationId, ReservationName, ResourceGroupName, ResourceGuid, ResourceId, ResourceLocation, ResourceType, ServiceFamily, ServiceName, SubscriptionID, SubscriptionName, UnitOfMeasure.

Values []string

Specifies a list of values for the column.

Operator string

The operator to use for comparison. The allowed values are In.

name String

The name of the column to use for the filter. The allowed values are ChargeType, Frequency, InvoiceId, Meter, MeterCategory, MeterSubCategory, PartNumber, PricingModel, Product, ProductOrderId, ProductOrderName, PublisherType, ReservationId, ReservationName, ResourceGroupName, ResourceGuid, ResourceId, ResourceLocation, ResourceType, ServiceFamily, ServiceName, SubscriptionID, SubscriptionName, UnitOfMeasure.

values List<String>

Specifies a list of values for the column.

operator String

The operator to use for comparison. The allowed values are In.

name string

The name of the column to use for the filter. The allowed values are ChargeType, Frequency, InvoiceId, Meter, MeterCategory, MeterSubCategory, PartNumber, PricingModel, Product, ProductOrderId, ProductOrderName, PublisherType, ReservationId, ReservationName, ResourceGroupName, ResourceGuid, ResourceId, ResourceLocation, ResourceType, ServiceFamily, ServiceName, SubscriptionID, SubscriptionName, UnitOfMeasure.

values string[]

Specifies a list of values for the column.

operator string

The operator to use for comparison. The allowed values are In.

name str

The name of the column to use for the filter. The allowed values are ChargeType, Frequency, InvoiceId, Meter, MeterCategory, MeterSubCategory, PartNumber, PricingModel, Product, ProductOrderId, ProductOrderName, PublisherType, ReservationId, ReservationName, ResourceGroupName, ResourceGuid, ResourceId, ResourceLocation, ResourceType, ServiceFamily, ServiceName, SubscriptionID, SubscriptionName, UnitOfMeasure.

values Sequence[str]

Specifies a list of values for the column.

operator str

The operator to use for comparison. The allowed values are In.

name String

The name of the column to use for the filter. The allowed values are ChargeType, Frequency, InvoiceId, Meter, MeterCategory, MeterSubCategory, PartNumber, PricingModel, Product, ProductOrderId, ProductOrderName, PublisherType, ReservationId, ReservationName, ResourceGroupName, ResourceGuid, ResourceId, ResourceLocation, ResourceType, ServiceFamily, ServiceName, SubscriptionID, SubscriptionName, UnitOfMeasure.

values List<String>

Specifies a list of values for the column.

operator String

The operator to use for comparison. The allowed values are In.

BudgetSubscriptionFilterNotTag

Name string

The name of the tag to use for the filter.

Values List<string>

Specifies a list of values for the tag.

Operator string

The operator to use for comparison. The allowed values are In.

Name string

The name of the tag to use for the filter.

Values []string

Specifies a list of values for the tag.

Operator string

The operator to use for comparison. The allowed values are In.

name String

The name of the tag to use for the filter.

values List<String>

Specifies a list of values for the tag.

operator String

The operator to use for comparison. The allowed values are In.

name string

The name of the tag to use for the filter.

values string[]

Specifies a list of values for the tag.

operator string

The operator to use for comparison. The allowed values are In.

name str

The name of the tag to use for the filter.

values Sequence[str]

Specifies a list of values for the tag.

operator str

The operator to use for comparison. The allowed values are In.

name String

The name of the tag to use for the filter.

values List<String>

Specifies a list of values for the tag.

operator String

The operator to use for comparison. The allowed values are In.

BudgetSubscriptionFilterTag

Name string

The name of the tag to use for the filter.

Values List<string>

Specifies a list of values for the tag.

Operator string

The operator to use for comparison. The allowed values are In.

Name string

The name of the tag to use for the filter.

Values []string

Specifies a list of values for the tag.

Operator string

The operator to use for comparison. The allowed values are In.

name String

The name of the tag to use for the filter.

values List<String>

Specifies a list of values for the tag.

operator String

The operator to use for comparison. The allowed values are In.

name string

The name of the tag to use for the filter.

values string[]

Specifies a list of values for the tag.

operator string

The operator to use for comparison. The allowed values are In.

name str

The name of the tag to use for the filter.

values Sequence[str]

Specifies a list of values for the tag.

operator str

The operator to use for comparison. The allowed values are In.

name String

The name of the tag to use for the filter.

values List<String>

Specifies a list of values for the tag.

operator String

The operator to use for comparison. The allowed values are In.

BudgetSubscriptionNotification

Operator string

The comparison operator for the notification. Must be one of EqualTo, GreaterThan, or GreaterThanOrEqualTo.

Threshold int

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.

ContactEmails List<string>

Specifies a list of email addresses to send the budget notification to when the threshold is exceeded.

ContactGroups List<string>

Specifies a list of Action Group IDs to send the budget notification to when the threshold is exceeded.

ContactRoles List<string>

Specifies a list of contact roles to send the budget notification to when the threshold is exceeded.

Enabled bool

Should the notification be enabled?

ThresholdType string

The type of threshold for the notification. This determines whether the notification is triggered by forecasted costs or actual costs. The allowed values are Actual and Forecasted. Default is Actual. Changing this forces a new resource to be created.

Operator string

The comparison operator for the notification. Must be one of EqualTo, GreaterThan, or GreaterThanOrEqualTo.

Threshold int

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.

ContactEmails []string

Specifies a list of email addresses to send the budget notification to when the threshold is exceeded.

ContactGroups []string

Specifies a list of Action Group IDs to send the budget notification to when the threshold is exceeded.

ContactRoles []string

Specifies a list of contact roles to send the budget notification to when the threshold is exceeded.

Enabled bool

Should the notification be enabled?

ThresholdType string

The type of threshold for the notification. This determines whether the notification is triggered by forecasted costs or actual costs. The allowed values are Actual and Forecasted. Default is Actual. Changing this forces a new resource to be created.

operator String

The comparison operator for the notification. Must be one of EqualTo, GreaterThan, or GreaterThanOrEqualTo.

threshold Integer

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.

contactEmails List<String>

Specifies a list of email addresses to send the budget notification to when the threshold is exceeded.

contactGroups List<String>

Specifies a list of Action Group IDs to send the budget notification to when the threshold is exceeded.

contactRoles List<String>

Specifies a list of contact roles to send the budget notification to when the threshold is exceeded.

enabled Boolean

Should the notification be enabled?

thresholdType String

The type of threshold for the notification. This determines whether the notification is triggered by forecasted costs or actual costs. The allowed values are Actual and Forecasted. Default is Actual. Changing this forces a new resource to be created.

operator string

The comparison operator for the notification. Must be one of EqualTo, GreaterThan, or GreaterThanOrEqualTo.

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.

contactEmails string[]

Specifies a list of email addresses to send the budget notification to when the threshold is exceeded.

contactGroups string[]

Specifies a list of Action Group IDs to send the budget notification to when the threshold is exceeded.

contactRoles string[]

Specifies a list of contact roles to send the budget notification to when the threshold is exceeded.

enabled boolean

Should the notification be enabled?

thresholdType string

The type of threshold for the notification. This determines whether the notification is triggered by forecasted costs or actual costs. The allowed values are Actual and Forecasted. Default is Actual. Changing this forces a new resource to be created.

operator str

The comparison operator for the notification. Must be one of EqualTo, GreaterThan, or GreaterThanOrEqualTo.

threshold int

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_emails Sequence[str]

Specifies a list of email addresses to send the budget notification to when the threshold is exceeded.

contact_groups Sequence[str]

Specifies a list of Action Group IDs to send the budget notification to when the threshold is exceeded.

contact_roles Sequence[str]

Specifies a list of contact roles to send the budget notification to when the threshold is exceeded.

enabled bool

Should the notification be enabled?

threshold_type str

The type of threshold for the notification. This determines whether the notification is triggered by forecasted costs or actual costs. The allowed values are Actual and Forecasted. Default is Actual. Changing this forces a new resource to be created.

operator String

The comparison operator for the notification. Must be one of EqualTo, GreaterThan, or GreaterThanOrEqualTo.

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.

contactEmails List<String>

Specifies a list of email addresses to send the budget notification to when the threshold is exceeded.

contactGroups List<String>

Specifies a list of Action Group IDs to send the budget notification to when the threshold is exceeded.

contactRoles List<String>

Specifies a list of contact roles to send the budget notification to when the threshold is exceeded.

enabled Boolean

Should the notification be enabled?

thresholdType String

The type of threshold for the notification. This determines whether the notification is triggered by forecasted costs or actual costs. The allowed values are Actual and Forecasted. Default is Actual. Changing this forces a new resource to be created.

BudgetSubscriptionTimePeriod

StartDate string

The start date for 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. Changing this forces a new Subscription Consumption Budget to be created.

EndDate string

The end date for the budget. If not set this will be 10 years after the start date.

StartDate string

The start date for 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. Changing this forces a new Subscription Consumption Budget to be created.

EndDate string

The end date for the budget. If not set this will be 10 years after the start date.

startDate String

The start date for 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. Changing this forces a new Subscription Consumption Budget to be created.

endDate String

The end date for the budget. If not set this will be 10 years after the start date.

startDate string

The start date for 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. Changing this forces a new Subscription Consumption Budget to be created.

endDate string

The end date for the budget. If not set this will be 10 years after the start date.

start_date str

The start date for 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. Changing this forces a new Subscription Consumption Budget to be created.

end_date str

The end date for the budget. If not set this will be 10 years after the start date.

startDate String

The start date for 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. Changing this forces a new Subscription Consumption Budget to be created.

endDate String

The end date for the budget. If not set this will be 10 years after the start date.

Import

Subscription Consumption Budgets can be imported using the resource id, e.g.

 $ pulumi import azure:consumption/budgetSubscription:BudgetSubscription example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/budgets/subscription1

Package Details

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

This Pulumi package is based on the azurerm Terraform Provider.