Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.6.0 published on Friday, May 20, 2022 by Pulumi

getBudgetSubscription

Use this data source to access information about an existing Consumption Budget for a specific subscription.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.Consumption.GetBudgetSubscription.InvokeAsync(new Azure.Consumption.GetBudgetSubscriptionArgs
        {
            Name = "existing",
            SubscriptionId = "/subscriptions/00000000-0000-0000-0000-000000000000/",
        }));
        this.Id = data.Azurerm_consumption_budget.Example.Id;
    }

    [Output("id")]
    public Output<string> Id { get; set; }
}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := consumption.LookupBudgetSubscription(ctx, &consumption.LookupBudgetSubscriptionArgs{
			Name:           "existing",
			SubscriptionId: "/subscriptions/00000000-0000-0000-0000-000000000000/",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("id", data.Azurerm_consumption_budget.Example.Id)
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(ConsumptionFunctions.getBudgetSubscription(GetBudgetSubscriptionArgs.builder()
            .name("existing")
            .subscriptionId("/subscriptions/00000000-0000-0000-0000-000000000000/")
            .build()));

        ctx.export("id", data.getAzurerm_consumption_budget().getExample().getId());
        }
}
import pulumi
import pulumi_azure as azure

example = azure.consumption.get_budget_subscription(name="existing",
    subscription_id="/subscriptions/00000000-0000-0000-0000-000000000000/")
pulumi.export("id", data["azurerm_consumption_budget"]["example"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.consumption.getBudgetSubscription({
    name: "existing",
    subscriptionId: "/subscriptions/00000000-0000-0000-0000-000000000000/",
});
export const id = data.azurerm_consumption_budget.example.id;
variables:
  example:
    Fn::Invoke:
      Function: azure:consumption:getBudgetSubscription
      Arguments:
        name: existing
        subscriptionId: /subscriptions/00000000-0000-0000-0000-000000000000/
outputs:
  id: ${data.azurerm_consumption_budget.example.id}

Using getBudgetSubscription

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getBudgetSubscription(args: GetBudgetSubscriptionArgs, opts?: InvokeOptions): Promise<GetBudgetSubscriptionResult>
function getBudgetSubscriptionOutput(args: GetBudgetSubscriptionOutputArgs, opts?: InvokeOptions): Output<GetBudgetSubscriptionResult>
def get_budget_subscription(name: Optional[str] = None,
                            subscription_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetBudgetSubscriptionResult
def get_budget_subscription_output(name: Optional[pulumi.Input[str]] = None,
                            subscription_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetBudgetSubscriptionResult]
func LookupBudgetSubscription(ctx *Context, args *LookupBudgetSubscriptionArgs, opts ...InvokeOption) (*LookupBudgetSubscriptionResult, error)
func LookupBudgetSubscriptionOutput(ctx *Context, args *LookupBudgetSubscriptionOutputArgs, opts ...InvokeOption) LookupBudgetSubscriptionResultOutput

> Note: This function is named LookupBudgetSubscription in the Go SDK.

public static class GetBudgetSubscription 
{
    public static Task<GetBudgetSubscriptionResult> InvokeAsync(GetBudgetSubscriptionArgs args, InvokeOptions? opts = null)
    public static Output<GetBudgetSubscriptionResult> Invoke(GetBudgetSubscriptionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetBudgetSubscriptionResult> getBudgetSubscription(GetBudgetSubscriptionArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: azure:consumption/getBudgetSubscription:getBudgetSubscription
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string

The name of this Consumption Budget.

SubscriptionId string

The ID of the subscription.

Name string

The name of this Consumption Budget.

SubscriptionId string

The ID of the subscription.

name String

The name of this Consumption Budget.

subscriptionId String

The ID of the subscription.

name string

The name of this Consumption Budget.

subscriptionId string

The ID of the subscription.

name str

The name of this Consumption Budget.

subscription_id str

The ID of the subscription.

name String

The name of this Consumption Budget.

subscriptionId String

The ID of the subscription.

getBudgetSubscription Result

The following output properties are available:

Amount double

The total amount of cost to track with the budget.

Filters List<GetBudgetSubscriptionFilter>

A filter block as defined below.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the tag to use for the filter.

Notifications List<GetBudgetSubscriptionNotification>

A notification block as defined below.

SubscriptionId string
TimeGrain string

The time covered by a budget.

TimePeriods List<GetBudgetSubscriptionTimePeriod>

A time_period block as defined below.

Amount float64

The total amount of cost to track with the budget.

Filters []GetBudgetSubscriptionFilter

A filter block as defined below.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the tag to use for the filter.

Notifications []GetBudgetSubscriptionNotification

A notification block as defined below.

SubscriptionId string
TimeGrain string

The time covered by a budget.

TimePeriods []GetBudgetSubscriptionTimePeriod

A time_period block as defined below.

amount Double

The total amount of cost to track with the budget.

filters ListBudgetSubscriptionFilter>

A filter block as defined below.

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the tag to use for the filter.

notifications ListBudgetSubscriptionNotification>

A notification block as defined below.

subscriptionId String
timeGrain String

The time covered by a budget.

timePeriods ListBudgetSubscriptionTimePeriod>

A time_period block as defined below.

amount number

The total amount of cost to track with the budget.

filters GetBudgetSubscriptionFilter[]

A filter block as defined below.

id string

The provider-assigned unique ID for this managed resource.

name string

The name of the tag to use for the filter.

notifications GetBudgetSubscriptionNotification[]

A notification block as defined below.

subscriptionId string
timeGrain string

The time covered by a budget.

timePeriods GetBudgetSubscriptionTimePeriod[]

A time_period block as defined below.

amount float

The total amount of cost to track with the budget.

filters Sequence[GetBudgetSubscriptionFilter]

A filter block as defined below.

id str

The provider-assigned unique ID for this managed resource.

name str

The name of the tag to use for the filter.

notifications Sequence[GetBudgetSubscriptionNotification]

A notification block as defined below.

subscription_id str
time_grain str

The time covered by a budget.

time_periods Sequence[GetBudgetSubscriptionTimePeriod]

A time_period block as defined below.

amount Number

The total amount of cost to track with the budget.

filters List

A filter block as defined below.

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the tag to use for the filter.

notifications List

A notification block as defined below.

subscriptionId String
timeGrain String

The time covered by a budget.

timePeriods List

A time_period block as defined below.

Supporting Types

GetBudgetSubscriptionFilter

Dimensions List<GetBudgetSubscriptionFilterDimension>

A dimension block as defined above.

Nots List<GetBudgetSubscriptionFilterNot>

A not block as defined below.

Tags List<GetBudgetSubscriptionFilterTag>

A tag block as defined below.

Dimensions []GetBudgetSubscriptionFilterDimension

A dimension block as defined above.

Nots []GetBudgetSubscriptionFilterNot

A not block as defined below.

Tags []GetBudgetSubscriptionFilterTag

A tag block as defined below.

dimensions ListBudgetSubscriptionFilterDimension>

A dimension block as defined above.

nots ListBudgetSubscriptionFilterNot>

A not block as defined below.

tags ListBudgetSubscriptionFilterTag>

A tag block as defined below.

dimensions GetBudgetSubscriptionFilterDimension[]

A dimension block as defined above.

nots GetBudgetSubscriptionFilterNot[]

A not block as defined below.

tags GetBudgetSubscriptionFilterTag[]

A tag block as defined below.

dimensions Sequence[GetBudgetSubscriptionFilterDimension]

A dimension block as defined above.

nots Sequence[GetBudgetSubscriptionFilterNot]

A not block as defined below.

tags Sequence[GetBudgetSubscriptionFilterTag]

A tag block as defined below.

dimensions List

A dimension block as defined above.

nots List

A not block as defined below.

tags List

A tag block as defined below.

GetBudgetSubscriptionFilterDimension

Name string

The name of this Consumption Budget.

Operator string

The operator to used for comparison.

Values List<string>

A list of values for the tag.

Name string

The name of this Consumption Budget.

Operator string

The operator to used for comparison.

Values []string

A list of values for the tag.

name String

The name of this Consumption Budget.

operator String

The operator to used for comparison.

values List

A list of values for the tag.

name string

The name of this Consumption Budget.

operator string

The operator to used for comparison.

values string[]

A list of values for the tag.

name str

The name of this Consumption Budget.

operator str

The operator to used for comparison.

values Sequence[str]

A list of values for the tag.

name String

The name of this Consumption Budget.

operator String

The operator to used for comparison.

values List

A list of values for the tag.

GetBudgetSubscriptionFilterNot

Dimensions List<GetBudgetSubscriptionFilterNotDimension>

A dimension block as defined above.

Tags List<GetBudgetSubscriptionFilterNotTag>

A tag block as defined below.

Dimensions []GetBudgetSubscriptionFilterNotDimension

A dimension block as defined above.

Tags []GetBudgetSubscriptionFilterNotTag

A tag block as defined below.

dimensions ListBudgetSubscriptionFilterNotDimension>

A dimension block as defined above.

tags ListBudgetSubscriptionFilterNotTag>

A tag block as defined below.

dimensions GetBudgetSubscriptionFilterNotDimension[]

A dimension block as defined above.

tags GetBudgetSubscriptionFilterNotTag[]

A tag block as defined below.

dimensions List

A dimension block as defined above.

tags List

A tag block as defined below.

GetBudgetSubscriptionFilterNotDimension

Name string

The name of this Consumption Budget.

Operator string

The operator to used for comparison.

Values List<string>

A list of values for the tag.

Name string

The name of this Consumption Budget.

Operator string

The operator to used for comparison.

Values []string

A list of values for the tag.

name String

The name of this Consumption Budget.

operator String

The operator to used for comparison.

values List

A list of values for the tag.

name string

The name of this Consumption Budget.

operator string

The operator to used for comparison.

values string[]

A list of values for the tag.

name str

The name of this Consumption Budget.

operator str

The operator to used for comparison.

values Sequence[str]

A list of values for the tag.

name String

The name of this Consumption Budget.

operator String

The operator to used for comparison.

values List

A list of values for the tag.

GetBudgetSubscriptionFilterNotTag

Name string

The name of this Consumption Budget.

Operator string

The operator to used for comparison.

Values List<string>

A list of values for the tag.

Name string

The name of this Consumption Budget.

Operator string

The operator to used for comparison.

Values []string

A list of values for the tag.

name String

The name of this Consumption Budget.

operator String

The operator to used for comparison.

values List

A list of values for the tag.

name string

The name of this Consumption Budget.

operator string

The operator to used for comparison.

values string[]

A list of values for the tag.

name str

The name of this Consumption Budget.

operator str

The operator to used for comparison.

values Sequence[str]

A list of values for the tag.

name String

The name of this Consumption Budget.

operator String

The operator to used for comparison.

values List

A list of values for the tag.

GetBudgetSubscriptionFilterTag

Name string

The name of this Consumption Budget.

Operator string

The operator to used for comparison.

Values List<string>

A list of values for the tag.

Name string

The name of this Consumption Budget.

Operator string

The operator to used for comparison.

Values []string

A list of values for the tag.

name String

The name of this Consumption Budget.

operator String

The operator to used for comparison.

values List

A list of values for the tag.

name string

The name of this Consumption Budget.

operator string

The operator to used for comparison.

values string[]

A list of values for the tag.

name str

The name of this Consumption Budget.

operator str

The operator to used for comparison.

values Sequence[str]

A list of values for the tag.

name String

The name of this Consumption Budget.

operator String

The operator to used for comparison.

values List

A list of values for the tag.

GetBudgetSubscriptionNotification

ContactEmails List<string>

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

ContactGroups List<string>

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

ContactRoles List<string>

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

Enabled bool

Whether the notification is enabled.

Operator string

The operator to used for comparison.

Threshold int

Threshold value associated with the notification.

ThresholdType string
ContactEmails []string

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

ContactGroups []string

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

ContactRoles []string

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

Enabled bool

Whether the notification is enabled.

Operator string

The operator to used for comparison.

Threshold int

Threshold value associated with the notification.

ThresholdType string
contactEmails List

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

contactGroups List

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

contactRoles List

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

enabled Boolean

Whether the notification is enabled.

operator String

The operator to used for comparison.

threshold Integer

Threshold value associated with the notification.

thresholdType String
contactEmails string[]

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

contactGroups string[]

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

contactRoles string[]

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

enabled boolean

Whether the notification is enabled.

operator string

The operator to used for comparison.

threshold number

Threshold value associated with the notification.

thresholdType string
contact_emails Sequence[str]

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

contact_groups Sequence[str]

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

contact_roles Sequence[str]

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

enabled bool

Whether the notification is enabled.

operator str

The operator to used for comparison.

threshold int

Threshold value associated with the notification.

threshold_type str
contactEmails List

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

contactGroups List

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

contactRoles List

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

enabled Boolean

Whether the notification is enabled.

operator String

The operator to used for comparison.

threshold Number

Threshold value associated with the notification.

thresholdType String

GetBudgetSubscriptionTimePeriod

EndDate string

The end date for the budget.

StartDate string

The start date for the budget.

EndDate string

The end date for the budget.

StartDate string

The start date for the budget.

endDate String

The end date for the budget.

startDate String

The start date for the budget.

endDate string

The end date for the budget.

startDate string

The start date for the budget.

end_date str

The end date for the budget.

start_date str

The start date for the budget.

endDate String

The end date for the budget.

startDate String

The start date for the budget.

Package Details

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

This Pulumi package is based on the azurerm Terraform Provider.