Get-AzQuotaUsage

Get the current usage of a resource.

Syntax

Get-AzQuotaUsage
   -Scope <String>
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzQuotaUsage
   -Scope <String>
   -Name <String>
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]

Description

Get the current usage of a resource.

Examples

Example 1: List the currents usage of a resource

Get-AzQuotaUsage -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus"

Name              NameLocalizedValue  UsageUsagesType UsageValue ETag
----              ------------------  --------------- ---------- ----
VirtualNetworks   Virtual Networks    Individual      2
CustomIpPrefixes  Custom Ip Prefixes  Individual      0
PublicIpPrefixes  Public Ip Prefixes  Individual      0
PublicIPAddresses Public IP Addresses Individual      4
......

This command lists the currents usage of a resource

Example 2: Get the current usage of a resource

Get-AzQuotaUsage -Scope "subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.Network/locations/eastus" -Name "MinPublicIpInterNetworkPrefixLength"

Name                                NameLocalizedValue        UsageUsagesType UsageValue ETag
----                                ------------------        --------------- ---------- ----
MinPublicIpInterNetworkPrefixLength Public IPv4 Prefix Length Individual      0

This command lists the currents usage of a resource.

Parameters

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Resource name for a given resource provider. For example:

  • SKU name for Microsoft.Compute
  • SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Scope

The target Azure resource URI. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/. This is the target Azure resource URI for the List GET operation. If a {resourceName} is added after /quotas, then it's the target Azure resource URI in the GET operation for the specific resource.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Outputs

ICurrentUsagesBase