1. Packages
  2. Azure Classic
  3. API Docs
  4. consumption
  5. getBudgetResourceGroup

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.consumption.getBudgetResourceGroup

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

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

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.consumption.getBudgetResourceGroup({
    name: "existing",
    resourceGroupId: exampleAzurermResourceGroup.id,
});
export const id = example.then(example => example.id);
Copy
import pulumi
import pulumi_azure as azure

example = azure.consumption.get_budget_resource_group(name="existing",
    resource_group_id=example_azurerm_resource_group["id"])
pulumi.export("id", example.id)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := consumption.LookupBudgetResourceGroup(ctx, &consumption.LookupBudgetResourceGroupArgs{
			Name:            "existing",
			ResourceGroupId: exampleAzurermResourceGroup.Id,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("id", example.Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = Azure.Consumption.GetBudgetResourceGroup.Invoke(new()
    {
        Name = "existing",
        ResourceGroupId = exampleAzurermResourceGroup.Id,
    });

    return new Dictionary<string, object?>
    {
        ["id"] = example.Apply(getBudgetResourceGroupResult => getBudgetResourceGroupResult.Id),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.consumption.ConsumptionFunctions;
import com.pulumi.azure.consumption.inputs.GetBudgetResourceGroupArgs;
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 example = ConsumptionFunctions.getBudgetResourceGroup(GetBudgetResourceGroupArgs.builder()
            .name("existing")
            .resourceGroupId(exampleAzurermResourceGroup.id())
            .build());

        ctx.export("id", example.applyValue(getBudgetResourceGroupResult -> getBudgetResourceGroupResult.id()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azure:consumption:getBudgetResourceGroup
      arguments:
        name: existing
        resourceGroupId: ${exampleAzurermResourceGroup.id}
outputs:
  id: ${example.id}
Copy

Using getBudgetResourceGroup

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 getBudgetResourceGroup(args: GetBudgetResourceGroupArgs, opts?: InvokeOptions): Promise<GetBudgetResourceGroupResult>
function getBudgetResourceGroupOutput(args: GetBudgetResourceGroupOutputArgs, opts?: InvokeOptions): Output<GetBudgetResourceGroupResult>
Copy
def get_budget_resource_group(name: Optional[str] = None,
                              resource_group_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetBudgetResourceGroupResult
def get_budget_resource_group_output(name: Optional[pulumi.Input[str]] = None,
                              resource_group_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetBudgetResourceGroupResult]
Copy
func LookupBudgetResourceGroup(ctx *Context, args *LookupBudgetResourceGroupArgs, opts ...InvokeOption) (*LookupBudgetResourceGroupResult, error)
func LookupBudgetResourceGroupOutput(ctx *Context, args *LookupBudgetResourceGroupOutputArgs, opts ...InvokeOption) LookupBudgetResourceGroupResultOutput
Copy

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

public static class GetBudgetResourceGroup 
{
    public static Task<GetBudgetResourceGroupResult> InvokeAsync(GetBudgetResourceGroupArgs args, InvokeOptions? opts = null)
    public static Output<GetBudgetResourceGroupResult> Invoke(GetBudgetResourceGroupInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetBudgetResourceGroupResult> getBudgetResourceGroup(GetBudgetResourceGroupArgs args, InvokeOptions options)
public static Output<GetBudgetResourceGroupResult> getBudgetResourceGroup(GetBudgetResourceGroupArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:consumption/getBudgetResourceGroup:getBudgetResourceGroup
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of this Consumption Budget.
ResourceGroupId This property is required. string
The ID of the subscription.
Name This property is required. string
The name of this Consumption Budget.
ResourceGroupId This property is required. string
The ID of the subscription.
name This property is required. String
The name of this Consumption Budget.
resourceGroupId This property is required. String
The ID of the subscription.
name This property is required. string
The name of this Consumption Budget.
resourceGroupId This property is required. string
The ID of the subscription.
name This property is required. str
The name of this Consumption Budget.
resource_group_id This property is required. str
The ID of the subscription.
name This property is required. String
The name of this Consumption Budget.
resourceGroupId This property is required. String
The ID of the subscription.

getBudgetResourceGroup Result

The following output properties are available:

Amount double
The total amount of cost to track with the budget.
Filters List<GetBudgetResourceGroupFilter>
A filter block as defined below.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the tag used for the filter.
Notifications List<GetBudgetResourceGroupNotification>
A notification block as defined below.
ResourceGroupId string
TimeGrain string
The time covered by a budget.
TimePeriods List<GetBudgetResourceGroupTimePeriod>
A time_period block as defined below.
Amount float64
The total amount of cost to track with the budget.
Filters []GetBudgetResourceGroupFilter
A filter block as defined below.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the tag used for the filter.
Notifications []GetBudgetResourceGroupNotification
A notification block as defined below.
ResourceGroupId string
TimeGrain string
The time covered by a budget.
TimePeriods []GetBudgetResourceGroupTimePeriod
A time_period block as defined below.
amount Double
The total amount of cost to track with the budget.
filters List<GetBudgetResourceGroupFilter>
A filter block as defined below.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the tag used for the filter.
notifications List<GetBudgetResourceGroupNotification>
A notification block as defined below.
resourceGroupId String
timeGrain String
The time covered by a budget.
timePeriods List<GetBudgetResourceGroupTimePeriod>
A time_period block as defined below.
amount number
The total amount of cost to track with the budget.
filters GetBudgetResourceGroupFilter[]
A filter block as defined below.
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the tag used for the filter.
notifications GetBudgetResourceGroupNotification[]
A notification block as defined below.
resourceGroupId string
timeGrain string
The time covered by a budget.
timePeriods GetBudgetResourceGroupTimePeriod[]
A time_period block as defined below.
amount float
The total amount of cost to track with the budget.
filters Sequence[GetBudgetResourceGroupFilter]
A filter block as defined below.
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the tag used for the filter.
notifications Sequence[GetBudgetResourceGroupNotification]
A notification block as defined below.
resource_group_id str
time_grain str
The time covered by a budget.
time_periods Sequence[GetBudgetResourceGroupTimePeriod]
A time_period block as defined below.
amount Number
The total amount of cost to track with the budget.
filters List<Property Map>
A filter block as defined below.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the tag used for the filter.
notifications List<Property Map>
A notification block as defined below.
resourceGroupId String
timeGrain String
The time covered by a budget.
timePeriods List<Property Map>
A time_period block as defined below.

Supporting Types

GetBudgetResourceGroupFilter

Dimensions This property is required. List<GetBudgetResourceGroupFilterDimension>
A dimension block as defined below.
Nots This property is required. List<GetBudgetResourceGroupFilterNot>
A not block as defined below.
Tags This property is required. List<GetBudgetResourceGroupFilterTag>
A tag block as defined below.
Dimensions This property is required. []GetBudgetResourceGroupFilterDimension
A dimension block as defined below.
Nots This property is required. []GetBudgetResourceGroupFilterNot
A not block as defined below.
Tags This property is required. []GetBudgetResourceGroupFilterTag
A tag block as defined below.
dimensions This property is required. List<GetBudgetResourceGroupFilterDimension>
A dimension block as defined below.
nots This property is required. List<GetBudgetResourceGroupFilterNot>
A not block as defined below.
tags This property is required. List<GetBudgetResourceGroupFilterTag>
A tag block as defined below.
dimensions This property is required. GetBudgetResourceGroupFilterDimension[]
A dimension block as defined below.
nots This property is required. GetBudgetResourceGroupFilterNot[]
A not block as defined below.
tags This property is required. GetBudgetResourceGroupFilterTag[]
A tag block as defined below.
dimensions This property is required. Sequence[GetBudgetResourceGroupFilterDimension]
A dimension block as defined below.
nots This property is required. Sequence[GetBudgetResourceGroupFilterNot]
A not block as defined below.
tags This property is required. Sequence[GetBudgetResourceGroupFilterTag]
A tag block as defined below.
dimensions This property is required. List<Property Map>
A dimension block as defined below.
nots This property is required. List<Property Map>
A not block as defined below.
tags This property is required. List<Property Map>
A tag block as defined below.

GetBudgetResourceGroupFilterDimension

Name This property is required. string
The name of this Consumption Budget.
Operator This property is required. string
The operator used for comparison.
Values This property is required. List<string>
A list of values for the tag.
Name This property is required. string
The name of this Consumption Budget.
Operator This property is required. string
The operator used for comparison.
Values This property is required. []string
A list of values for the tag.
name This property is required. String
The name of this Consumption Budget.
operator This property is required. String
The operator used for comparison.
values This property is required. List<String>
A list of values for the tag.
name This property is required. string
The name of this Consumption Budget.
operator This property is required. string
The operator used for comparison.
values This property is required. string[]
A list of values for the tag.
name This property is required. str
The name of this Consumption Budget.
operator This property is required. str
The operator used for comparison.
values This property is required. Sequence[str]
A list of values for the tag.
name This property is required. String
The name of this Consumption Budget.
operator This property is required. String
The operator used for comparison.
values This property is required. List<String>
A list of values for the tag.

GetBudgetResourceGroupFilterNot

Dimensions This property is required. List<GetBudgetResourceGroupFilterNotDimension>
A dimension block as defined below.
Tags This property is required. List<GetBudgetResourceGroupFilterNotTag>
A tag block as defined below.
Dimensions This property is required. []GetBudgetResourceGroupFilterNotDimension
A dimension block as defined below.
Tags This property is required. []GetBudgetResourceGroupFilterNotTag
A tag block as defined below.
dimensions This property is required. List<GetBudgetResourceGroupFilterNotDimension>
A dimension block as defined below.
tags This property is required. List<GetBudgetResourceGroupFilterNotTag>
A tag block as defined below.
dimensions This property is required. GetBudgetResourceGroupFilterNotDimension[]
A dimension block as defined below.
tags This property is required. GetBudgetResourceGroupFilterNotTag[]
A tag block as defined below.
dimensions This property is required. Sequence[GetBudgetResourceGroupFilterNotDimension]
A dimension block as defined below.
tags This property is required. Sequence[GetBudgetResourceGroupFilterNotTag]
A tag block as defined below.
dimensions This property is required. List<Property Map>
A dimension block as defined below.
tags This property is required. List<Property Map>
A tag block as defined below.

GetBudgetResourceGroupFilterNotDimension

Name This property is required. string
The name of this Consumption Budget.
Operator This property is required. string
The operator used for comparison.
Values This property is required. List<string>
A list of values for the tag.
Name This property is required. string
The name of this Consumption Budget.
Operator This property is required. string
The operator used for comparison.
Values This property is required. []string
A list of values for the tag.
name This property is required. String
The name of this Consumption Budget.
operator This property is required. String
The operator used for comparison.
values This property is required. List<String>
A list of values for the tag.
name This property is required. string
The name of this Consumption Budget.
operator This property is required. string
The operator used for comparison.
values This property is required. string[]
A list of values for the tag.
name This property is required. str
The name of this Consumption Budget.
operator This property is required. str
The operator used for comparison.
values This property is required. Sequence[str]
A list of values for the tag.
name This property is required. String
The name of this Consumption Budget.
operator This property is required. String
The operator used for comparison.
values This property is required. List<String>
A list of values for the tag.

GetBudgetResourceGroupFilterNotTag

Name This property is required. string
The name of this Consumption Budget.
Operator This property is required. string
The operator used for comparison.
Values This property is required. List<string>
A list of values for the tag.
Name This property is required. string
The name of this Consumption Budget.
Operator This property is required. string
The operator used for comparison.
Values This property is required. []string
A list of values for the tag.
name This property is required. String
The name of this Consumption Budget.
operator This property is required. String
The operator used for comparison.
values This property is required. List<String>
A list of values for the tag.
name This property is required. string
The name of this Consumption Budget.
operator This property is required. string
The operator used for comparison.
values This property is required. string[]
A list of values for the tag.
name This property is required. str
The name of this Consumption Budget.
operator This property is required. str
The operator used for comparison.
values This property is required. Sequence[str]
A list of values for the tag.
name This property is required. String
The name of this Consumption Budget.
operator This property is required. String
The operator used for comparison.
values This property is required. List<String>
A list of values for the tag.

GetBudgetResourceGroupFilterTag

Name This property is required. string
The name of this Consumption Budget.
Operator This property is required. string
The operator used for comparison.
Values This property is required. List<string>
A list of values for the tag.
Name This property is required. string
The name of this Consumption Budget.
Operator This property is required. string
The operator used for comparison.
Values This property is required. []string
A list of values for the tag.
name This property is required. String
The name of this Consumption Budget.
operator This property is required. String
The operator used for comparison.
values This property is required. List<String>
A list of values for the tag.
name This property is required. string
The name of this Consumption Budget.
operator This property is required. string
The operator used for comparison.
values This property is required. string[]
A list of values for the tag.
name This property is required. str
The name of this Consumption Budget.
operator This property is required. str
The operator used for comparison.
values This property is required. Sequence[str]
A list of values for the tag.
name This property is required. String
The name of this Consumption Budget.
operator This property is required. String
The operator used for comparison.
values This property is required. List<String>
A list of values for the tag.

GetBudgetResourceGroupNotification

ContactEmails This property is required. List<string>
A list of email addresses to send the budget notification to when the threshold is exceeded.
ContactGroups This property is required. List<string>
A list of Action Group IDs to send the budget notification to when the threshold is exceeded.
ContactRoles This property is required. List<string>
A list of contact roles to send the budget notification to when the threshold is exceeded.
Enabled This property is required. bool
Whether the notification is enabled.
Operator This property is required. string
The operator used for comparison.
Threshold This property is required. int
Threshold value associated with the notification.
ThresholdType This property is required. string
ContactEmails This property is required. []string
A list of email addresses to send the budget notification to when the threshold is exceeded.
ContactGroups This property is required. []string
A list of Action Group IDs to send the budget notification to when the threshold is exceeded.
ContactRoles This property is required. []string
A list of contact roles to send the budget notification to when the threshold is exceeded.
Enabled This property is required. bool
Whether the notification is enabled.
Operator This property is required. string
The operator used for comparison.
Threshold This property is required. int
Threshold value associated with the notification.
ThresholdType This property is required. string
contactEmails This property is required. List<String>
A list of email addresses to send the budget notification to when the threshold is exceeded.
contactGroups This property is required. List<String>
A list of Action Group IDs to send the budget notification to when the threshold is exceeded.
contactRoles This property is required. List<String>
A list of contact roles to send the budget notification to when the threshold is exceeded.
enabled This property is required. Boolean
Whether the notification is enabled.
operator This property is required. String
The operator used for comparison.
threshold This property is required. Integer
Threshold value associated with the notification.
thresholdType This property is required. String
contactEmails This property is required. string[]
A list of email addresses to send the budget notification to when the threshold is exceeded.
contactGroups This property is required. string[]
A list of Action Group IDs to send the budget notification to when the threshold is exceeded.
contactRoles This property is required. string[]
A list of contact roles to send the budget notification to when the threshold is exceeded.
enabled This property is required. boolean
Whether the notification is enabled.
operator This property is required. string
The operator used for comparison.
threshold This property is required. number
Threshold value associated with the notification.
thresholdType This property is required. string
contact_emails This property is required. Sequence[str]
A list of email addresses to send the budget notification to when the threshold is exceeded.
contact_groups This property is required. Sequence[str]
A list of Action Group IDs to send the budget notification to when the threshold is exceeded.
contact_roles This property is required. Sequence[str]
A list of contact roles to send the budget notification to when the threshold is exceeded.
enabled This property is required. bool
Whether the notification is enabled.
operator This property is required. str
The operator used for comparison.
threshold This property is required. int
Threshold value associated with the notification.
threshold_type This property is required. str
contactEmails This property is required. List<String>
A list of email addresses to send the budget notification to when the threshold is exceeded.
contactGroups This property is required. List<String>
A list of Action Group IDs to send the budget notification to when the threshold is exceeded.
contactRoles This property is required. List<String>
A list of contact roles to send the budget notification to when the threshold is exceeded.
enabled This property is required. Boolean
Whether the notification is enabled.
operator This property is required. String
The operator used for comparison.
threshold This property is required. Number
Threshold value associated with the notification.
thresholdType This property is required. String

GetBudgetResourceGroupTimePeriod

EndDate This property is required. string
The end date for the budget.
StartDate This property is required. string
The start date for the budget.
EndDate This property is required. string
The end date for the budget.
StartDate This property is required. string
The start date for the budget.
endDate This property is required. String
The end date for the budget.
startDate This property is required. String
The start date for the budget.
endDate This property is required. string
The end date for the budget.
startDate This property is required. string
The start date for the budget.
end_date This property is required. str
The end date for the budget.
start_date This property is required. str
The start date for the budget.
endDate This property is required. String
The end date for the budget.
startDate This property is required. String
The start date for the budget.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi