In Azure, there are several types of quotas that are applicable to subscriptions, including resource quotas and spending quotas. With Azure resource quotas (or limits), Azure adminis- trators can view the current consumption and usage of resources within an Azure subscription and understand how that consumption can be affected by Azure resource limits. Administra- tors can also request quota increases for certain resource types. For instance, in most subscrip- tion types, the number of cores available for virtual machines is limited to 20 per region by default. This limit can be increased by submitting a request to Microsoft support. Some quota requests are automatically approved in the Azure portal, and other requests require a support ticket with justification and manual approval.
You can also configure spending limits for your Azure subscription. Spending quotas allow administrators to set alerts or budgets within an Azure subscription to inform the business when their Azure spending has hit a certain threshold. While a resource limit can stop resources from being created (for example, there are not enough cores available to the subscription in the desired region), a spending quota acts as an alerting mechanism and does not stop resources from being created or consumed. While an alert can be generated from a spending quota, resources can still be created and consumed which could cause the spending quota to be exceeded.
Tags in Azure Resource Manager allow consumers of Azure to logically categorize Azure resource groups and Azure resources. As resources are tagged, they can be queried and tracked based on the associated tags. Tags are a crucial component to implement chargeback within an Azure subscription. For example, in organizations where an Azure subscription is shared by multiple business units or departments, there might be a need to understand how resources are used for individual departments and show the cost associated with each depart- ment, either to bill that department for their Azure consumption (chargeback) or to help that department understand their spend in Azure (showback).
Configure resource quotas
To view the existing resource quotas (or service limits) for your Azure subscription, browse to the Azure subscription in the Azure portal and select the Usage + Quotas blade. From this blade, you can view existing quotas by service, resource provider, and location. You also filter the list by resource types you have deployed.
To increase a quota, click New Quota Request, as shown in Figure 1-56.
FIGURE 1-56 Azure subscription resource quotas
Clicking Request Increase begins the process to open a new support request. As a part of the request, you must select the quota type (for example, Compute/VM cores or Machine Learning service) and provide a description of your request.
The consumption of resources within a subscription against a resource quota can also be viewed with PowerShell. There are multiple cmdlets available in the Az (formerly AzureRm) PowerShell module for querying per-service quota usage. For example, to view the current usage of vCPU quotas, use Get-AzVMUsage, and to view the current resource usage for the storage service, use Get-AzStorageUsage.
EXAM TIP
In this chapter and throughout the remaining reference, PowerShell cmdlets are referenced using the Az module. See https://learn.microsoft.com/en-us/powershell/module/az.accounts/ enable-azurermalias?view=azps-11.2.0&viewFallbackFrom=azps-10.2.0 for more detail.