We recommend using Azure Native.
azure.consumption.getBudgetResourceGroup
Explore with Pulumi AI
Use this data source to access information about an existing Consumption Budget for a specific resource group.
Example Usage
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 = azurerm_resource_group.Example.Id,
});
return new Dictionary<string, object?>
{
["id"] = example.Apply(getBudgetResourceGroupResult => getBudgetResourceGroupResult.Id),
};
});
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 {
example, err := consumption.LookupBudgetResourceGroup(ctx, &consumption.LookupBudgetResourceGroupArgs{
Name: "existing",
ResourceGroupId: azurerm_resource_group.Example.Id,
}, nil)
if err != nil {
return err
}
ctx.Export("id", example.Id)
return nil
})
}
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(azurerm_resource_group.example().id())
.build());
ctx.export("id", example.applyValue(getBudgetResourceGroupResult -> getBudgetResourceGroupResult.id()));
}
}
import pulumi
import pulumi_azure as azure
example = azure.consumption.get_budget_resource_group(name="existing",
resource_group_id=azurerm_resource_group["example"]["id"])
pulumi.export("id", example.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.consumption.getBudgetResourceGroup({
name: "existing",
resourceGroupId: azurerm_resource_group.example.id,
});
export const id = example.then(example => example.id);
variables:
example:
fn::invoke:
Function: azure:consumption:getBudgetResourceGroup
Arguments:
name: existing
resourceGroupId: ${azurerm_resource_group.example.id}
outputs:
id: ${example.id}
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>
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]
func LookupBudgetResourceGroup(ctx *Context, args *LookupBudgetResourceGroupArgs, opts ...InvokeOption) (*LookupBudgetResourceGroupResult, error)
func LookupBudgetResourceGroupOutput(ctx *Context, args *LookupBudgetResourceGroupOutputArgs, opts ...InvokeOption) LookupBudgetResourceGroupResultOutput
> 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)
}
public static CompletableFuture<GetBudgetResourceGroupResult> getBudgetResourceGroup(GetBudgetResourceGroupArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:consumption/getBudgetResourceGroup:getBudgetResourceGroup
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
The name of this Consumption Budget.
- Resource
Group stringId The ID of the subscription.
- Name string
The name of this Consumption Budget.
- Resource
Group stringId The ID of the subscription.
- name String
The name of this Consumption Budget.
- resource
Group StringId The ID of the subscription.
- name string
The name of this Consumption Budget.
- resource
Group stringId The ID of the subscription.
- name str
The name of this Consumption Budget.
- resource_
group_ strid The ID of the subscription.
- name String
The name of this Consumption Budget.
- resource
Group StringId 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<Get
Budget Resource Group Filter> 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<Get
Budget Resource Group Notification> A
notification
block as defined below.- Resource
Group stringId - Time
Grain string The time covered by a budget.
- Time
Periods List<GetBudget Resource Group Time Period> A
time_period
block as defined below.
- Amount float64
The total amount of cost to track with the budget.
- Filters
[]Get
Budget Resource Group Filter 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
[]Get
Budget Resource Group Notification A
notification
block as defined below.- Resource
Group stringId - Time
Grain string The time covered by a budget.
- Time
Periods []GetBudget Resource Group Time Period A
time_period
block as defined below.
- amount Double
The total amount of cost to track with the budget.
- filters
List<Get
Budget Resource Group Filter> 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<Get
Budget Resource Group Notification> A
notification
block as defined below.- resource
Group StringId - time
Grain String The time covered by a budget.
- time
Periods List<GetBudget Resource Group Time Period> A
time_period
block as defined below.
- amount number
The total amount of cost to track with the budget.
- filters
Get
Budget Resource Group Filter[] 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
Get
Budget Resource Group Notification[] A
notification
block as defined below.- resource
Group stringId - time
Grain string The time covered by a budget.
- time
Periods GetBudget Resource Group Time Period[] A
time_period
block as defined below.
- amount float
The total amount of cost to track with the budget.
- filters
Sequence[Get
Budget Resource Group Filter] 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[Get
Budget Resource Group Notification] A
notification
block as defined below.- resource_
group_ strid - time_
grain str The time covered by a budget.
- time_
periods Sequence[GetBudget Resource Group Time Period] 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.- resource
Group StringId - time
Grain String The time covered by a budget.
- time
Periods List<Property Map> A
time_period
block as defined below.
Supporting Types
GetBudgetResourceGroupFilter
- Dimensions
List<Get
Budget Resource Group Filter Dimension> A
dimension
block as defined below.- Nots
List<Get
Budget Resource Group Filter Not> A
not
block as defined below.- List<Get
Budget Resource Group Filter Tag> A
tag
block as defined below.
- Dimensions
[]Get
Budget Resource Group Filter Dimension A
dimension
block as defined below.- Nots
[]Get
Budget Resource Group Filter Not A
not
block as defined below.- []Get
Budget Resource Group Filter Tag A
tag
block as defined below.
- dimensions
List<Get
Budget Resource Group Filter Dimension> A
dimension
block as defined below.- nots
List<Get
Budget Resource Group Filter Not> A
not
block as defined below.- List<Get
Budget Resource Group Filter Tag> A
tag
block as defined below.
- dimensions
Get
Budget Resource Group Filter Dimension[] A
dimension
block as defined below.- nots
Get
Budget Resource Group Filter Not[] A
not
block as defined below.- Get
Budget Resource Group Filter Tag[] A
tag
block as defined below.
- dimensions
Sequence[Get
Budget Resource Group Filter Dimension] A
dimension
block as defined below.- nots
Sequence[Get
Budget Resource Group Filter Not] A
not
block as defined below.- Sequence[Get
Budget Resource Group Filter Tag] A
tag
block as defined below.
- dimensions List<Property Map>
A
dimension
block as defined below.- nots List<Property Map>
A
not
block as defined below.- List<Property Map>
A
tag
block as defined below.
GetBudgetResourceGroupFilterDimension
GetBudgetResourceGroupFilterNot
- Dimensions
List<Get
Budget Resource Group Filter Not Dimension> A
dimension
block as defined below.- List<Get
Budget Resource Group Filter Not Tag> A
tag
block as defined below.
- Dimensions
[]Get
Budget Resource Group Filter Not Dimension A
dimension
block as defined below.- []Get
Budget Resource Group Filter Not Tag A
tag
block as defined below.
- dimensions
List<Get
Budget Resource Group Filter Not Dimension> A
dimension
block as defined below.- List<Get
Budget Resource Group Filter Not Tag> A
tag
block as defined below.
- dimensions
Get
Budget Resource Group Filter Not Dimension[] A
dimension
block as defined below.- Get
Budget Resource Group Filter Not Tag[] A
tag
block as defined below.
- dimensions
Sequence[Get
Budget Resource Group Filter Not Dimension] A
dimension
block as defined below.- Sequence[Get
Budget Resource Group Filter Not Tag] A
tag
block as defined below.
- dimensions List<Property Map>
A
dimension
block as defined below.- List<Property Map>
A
tag
block as defined below.
GetBudgetResourceGroupFilterNotDimension
GetBudgetResourceGroupFilterNotTag
GetBudgetResourceGroupFilterTag
GetBudgetResourceGroupNotification
- Contact
Emails List<string> A list of email addresses to send the budget notification to when the threshold is exceeded.
- Contact
Groups List<string> A list of Action Group IDs to send the budget notification to when the threshold is exceeded.
- Contact
Roles 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 used for comparison.
- Threshold int
Threshold value associated with the notification.
- Threshold
Type string
- Contact
Emails []string A list of email addresses to send the budget notification to when the threshold is exceeded.
- Contact
Groups []string A list of Action Group IDs to send the budget notification to when the threshold is exceeded.
- Contact
Roles []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 used for comparison.
- Threshold int
Threshold value associated with the notification.
- Threshold
Type string
- contact
Emails List<String> A list of email addresses to send the budget notification to when the threshold is exceeded.
- contact
Groups List<String> A list of Action Group IDs to send the budget notification to when the threshold is exceeded.
- contact
Roles List<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 used for comparison.
- threshold Integer
Threshold value associated with the notification.
- threshold
Type String
- contact
Emails string[] A list of email addresses to send the budget notification to when the threshold is exceeded.
- contact
Groups string[] A list of Action Group IDs to send the budget notification to when the threshold is exceeded.
- contact
Roles 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 used for comparison.
- threshold number
Threshold value associated with the notification.
- threshold
Type 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 used for comparison.
- threshold int
Threshold value associated with the notification.
- threshold_
type str
- contact
Emails List<String> A list of email addresses to send the budget notification to when the threshold is exceeded.
- contact
Groups List<String> A list of Action Group IDs to send the budget notification to when the threshold is exceeded.
- contact
Roles List<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 used for comparison.
- threshold Number
Threshold value associated with the notification.
- threshold
Type String
GetBudgetResourceGroupTimePeriod
- end_
date str The end date for the budget.
- start_
date str 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.