Get-AzConsumptionBudget
Get a list of budgets in either a subscription or a resource group.
Syntax
Get-AzConsumptionBudget
[-DefaultProfile <IAzureContextContainer>]
[-ResourceGroupName <String>]
[-Name <String>]
[<CommonParameters>]
Description
The Get-AzConsumptionBudget cmdlet gets a list of budgets in either a subscription or a resource group.
Examples
Example 1: Get a list of budgets at subscription level
Get-AzConsumptionBudget
Amount: 60
Category: Cost
CurrentSpend: null
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-bce37d518c5d/providers/Microsoft.Consumption/budgets/PSBudget
Name: PSBudget
TimeGrain: Monthly
TimePeriod: EndDate: 11/1/2018 12:00:00 AM
StartDate: 6/1/2018 12:00:00 AM
Type: Microsoft.Consumption/budgets
Example 2: Get a list of budgets at resource group level
Get-AzConsumptionBudget -ResourceGroupName RGBudgets
Amount: 60
Category: Cost
CurrentSpend: null
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-bce37d518c5d/resourceGroups/RGBudgets/providers/Microsoft.Consumption/budgets/PSBudgetRG
Name: PSBudgetRG
TimeGrain: Monthly
TimePeriod: EndDate: 11/1/2018 12:00:00 AM
StartDate: 6/1/2018 12:00:00 AM
Type: Microsoft.Consumption/budgets
Example 3: Get a budget with the budget name at subscription level
Get-AzConsumptionBudget -Name PSBudget
Amount: 60
Category: Cost
CurrentSpend: null
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-bce37d518c5d/providers/Microsoft.Consumption/budgets/PSBudget
Name: PSBudget
TimeGrain: Monthly
TimePeriod: EndDate: 11/1/2018 12:00:00 AM
StartDate: 6/1/2018 12:00:00 AM
Type: Microsoft.Consumption/budgets
Example 4: Get a budget with the budget name at resource group level
Get-AzConsumptionBudget -ResourceGroupName RGBudgets -Name PSBudgetRG
Amount: 60
Category: Cost
CurrentSpend: null
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-bce37d518c5d/resourceGroups/RGBudgets/providers/Microsoft.Consumption/budgets/PSBudgetRG
Name: PSBudgetRG
TimeGrain: Monthly
TimePeriod: EndDate: 11/1/2018 12:00:00 AM
StartDate: 6/1/2018 12:00:00 AM
Type: Microsoft.Consumption/budgets
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Name of a budget.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Resource Group of a budget.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
Outputs
Notes
- Currently, PowerShell SDK for Consumption is only available to Enterprise Agreement customers.
- PowerShell SDK for Consumption is using an older version of Budgets API and few backwards non-compatible items like listing Budgets with filters will not work as expected.
Berkolaborasi dengan kami di GitHub
Sumber untuk konten ini dapat ditemukan di GitHub, yang juga dapat Anda gunakan untuk membuat dan meninjau masalah dan menarik permintaan. Untuk informasi selengkapnya, lihat panduan kontributor kami.
Azure PowerShell