Azure resource providers and types

09/01/2020

5 minutes to read





In this article

When deploying resources, you frequently need to retrieve information about the resource providers and types. For example, if you want to store keys and secrets, you work with the Microsoft.KeyVault resource provider. This resource provider offers a resource type called vaults for creating the key vault.

The name of a resource type is in the format: {resource-provider}/{resource-type}. The resource type for a key vault is Microsoft.KeyVault/vaults.

In this article, you learn how to:

View all resource providers in Azure

Check registration status of a resource provider

Register a resource provider

View resource types for a resource provider

View valid locations for a resource type

View valid API versions for a resource type

You can do these steps through the Azure portal, Azure PowerShell, or Azure CLI.

For a list that maps resource providers to Azure services, see Resource providers for Azure services.

Register resource provider

Before using a resource provider, you must register the resource provider for your Azure subscription. This step configures your subscription to work with the resource provider. The scope for registration is always the subscription. By default, many resource providers are automatically registered. However, you may need to manually register some resource providers.

This article shows you how to check the registration status of a resource provider, and register it as needed. You must have permission to do the /register/action operation for the resource provider. The permission is included in the Contributor and Owner roles.

Your application code shouldn't block the creation of resources for a resource provider that is in the registering state. When you register the resource provider, the operation is done individually for each supported region. To create resources in a region, the registration only needs to be completed in that region. By not blocking resource provider in the registering state, your application can continue much sooner than waiting for all regions to complete.

You can't unregister a resource provider when you still have resource types from that resource provider in your subscription.

Azure portal

To see all resource providers, and the registration status for your subscription:

Sign in to the Azure portal. On the Azure portal menu, select All services. In the All services box, enter subscription, and then select Subscriptions. Select the subscription from the subscription list to view. Select Resource providers and view the list of available resource providers. To register a resource provider, select Register. In the previous screenshot, the Register link is highlighted for Microsoft.Blueprint.

To see information for a particular resource provider:

Sign in to the Azure portal. On the Azure portal menu, select All services. In the All services box, enter resource explorer, and then select Resource Explorer. Expand Providers by selecting the right arrow. Expand a resource provider and resource type that you want to view. Resource Manager is supported in all regions, but the resources you deploy might not be supported in all regions. Also, there may be limitations on your subscription that prevent you from using some regions that support the resource. The resource explorer displays valid locations for the resource type. The API version corresponds to a version of REST API operations that are released by the resource provider. As a resource provider enables new features, it releases a new version of the REST API. The resource explorer displays valid API versions for the resource type.

Azure PowerShell

Note This article has been updated to use the new Azure PowerShell Az module. You can still use the AzureRM module, which will continue to receive bug fixes until at least December 2020. To learn more about the new Az module and AzureRM compatibility, see Introducing the new Azure PowerShell Az module. For Az module installation instructions, see Install Azure PowerShell.

To see all resource providers in Azure, and the registration status for your subscription, use:

Get-AzResourceProvider -ListAvailable | Select-Object ProviderNamespace, RegistrationState

Which returns results similar to:

ProviderNamespace RegistrationState -------------------------------- ------------------ Microsoft.ClassicCompute Registered Microsoft.ClassicNetwork Registered Microsoft.ClassicStorage Registered Microsoft.CognitiveServices Registered ...

To register a resource provider, use:

Register-AzResourceProvider -ProviderNamespace Microsoft.Batch

Which returns results similar to:

ProviderNamespace : Microsoft.Batch RegistrationState : Registering ResourceTypes : {batchAccounts, operations, locations, locations/quotas} Locations : {West Europe, East US, East US 2, West US...}

To see information for a particular resource provider, use:

Get-AzResourceProvider -ProviderNamespace Microsoft.Batch

Which returns results similar to:

{ProviderNamespace : Microsoft.Batch RegistrationState : Registered ResourceTypes : {batchAccounts} Locations : {West Europe, East US, East US 2, West US...} ...

To see the resource types for a resource provider, use:

(Get-AzResourceProvider -ProviderNamespace Microsoft.Batch).ResourceTypes.ResourceTypeName

Which returns:

batchAccounts operations locations locations/quotas

The API version corresponds to a version of REST API operations that are released by the resource provider. As a resource provider enables new features, it releases a new version of the REST API.

To get the available API versions for a resource type, use:

((Get-AzResourceProvider -ProviderNamespace Microsoft.Batch).ResourceTypes | Where-Object ResourceTypeName -eq batchAccounts).ApiVersions

Which returns:

2017-05-01 2017-01-01 2015-12-01 2015-09-01 2015-07-01

Resource Manager is supported in all regions, but the resources you deploy might not be supported in all regions. Also, there may be limitations on your subscription that prevent you from using some regions that support the resource.

To get the supported locations for a resource type, use.

((Get-AzResourceProvider -ProviderNamespace Microsoft.Batch).ResourceTypes | Where-Object ResourceTypeName -eq batchAccounts).Locations

Which returns:

West Europe East US East US 2 West US ...

Azure CLI

To see all resource providers in Azure, and the registration status for your subscription, use:

az provider list --query "[].{Provider:namespace, Status:registrationState}" --out table

Which returns results similar to:

Provider Status -------------------------------- ---------------- Microsoft.ClassicCompute Registered Microsoft.ClassicNetwork Registered Microsoft.ClassicStorage Registered Microsoft.CognitiveServices Registered ...

To register a resource provider, use:

az provider register --namespace Microsoft.Batch

Which returns a message that registration is on-going.

To see information for a particular resource provider, use:

az provider show --namespace Microsoft.Batch

Which returns results similar to:

{ "id": "/subscriptions/####-####/providers/Microsoft.Batch", "namespace": "Microsoft.Batch", "registrationsState": "Registering", "resourceTypes:" [ ... ] }

To see the resource types for a resource provider, use:

az provider show --namespace Microsoft.Batch --query "resourceTypes[*].resourceType" --out table

Which returns:

Result --------------- batchAccounts operations locations locations/quotas

The API version corresponds to a version of REST API operations that are released by the resource provider. As a resource provider enables new features, it releases a new version of the REST API.

To get the available API versions for a resource type, use:

az provider show --namespace Microsoft.Batch --query "resourceTypes[?resourceType=='batchAccounts'].apiVersions | [0]" --out table

Which returns:

Result --------------- 2017-05-01 2017-01-01 2015-12-01 2015-09-01 2015-07-01

Resource Manager is supported in all regions, but the resources you deploy might not be supported in all regions. Also, there may be limitations on your subscription that prevent you from using some regions that support the resource.

To get the supported locations for a resource type, use.

az provider show --namespace Microsoft.Batch --query "resourceTypes[?resourceType=='batchAccounts'].locations | [0]" --out table

Which returns:

Result --------------- West Europe East US East US 2 West US ...

Next steps