LinuxCommandLibrary

az-provider

Manage Azure resource providers

TLDR

Register a provider

$ az provider register [[-n|--namespace]] [Microsoft.PolicyInsights]
copy

Unregister a provider
$ az provider unregister [[-n|--namespace]] [Microsoft.Automation]
copy

List all providers for a subscription
$ az provider list
copy

Show information about a specific provider
$ az provider show [[-n|--namespace]] [Microsoft.Storage]
copy

List all resource types for a specific provider
$ az provider list --query "[?namespace=='[Microsoft.Network]'].resourceTypes[].resourceType"
copy

SYNOPSIS

az provider subcommand [--options]

Common Subcommands:

az provider register --namespace NAME
az provider unregister --namespace NAME
az provider show --namespace NAME [--expand-registrations | --query-resource-types]
az provider list [--query-resource-types]
az provider operation list --namespace NAME

PARAMETERS

subcommand
    One of the available commands: register, unregister, show, list, operation (with list).

--namespace NAME
    The namespace of the resource provider (e.g., Microsoft.Compute, Microsoft.Network). Required for register, unregister, show, and operation list.

--expand-registrations
    An optional flag for the show subcommand. When used, it displays detailed registration information for the resource provider.

--query-resource-types
    An optional flag for the show and list subcommands. When used, it includes a list of resource types supported by the provider, along with their locations and API versions.

--output FORMAT
    Specifies the output format (e.g., json, table, tsv, yaml). This is a common Azure CLI global option.

--query JMESPATH_EXPRESSION
    JMESPath query string. Use to filter or transform the command output. This is a common Azure CLI global option.

DESCRIPTION

The az provider command is a crucial component of the Azure Command-Line Interface (CLI), designed for managing Azure resource providers. In Azure, a resource provider is a service that supplies specific Azure resources, such as virtual machines (Microsoft.Compute), networking components (Microsoft.Network), or storage accounts (Microsoft.Storage). Before you can deploy a resource of a certain type, its corresponding resource provider must often be registered within your Azure subscription.

This command allows you to:

Register: Enable a resource provider for your subscription, making its resource types available for creation.
List: View all available and registered resource providers in your subscription.
Show: Get detailed information about a specific resource provider, including its registration status and supported resource types and locations.
Unregister: Disable a resource provider for your subscription.

Effectively, az provider ensures that your Azure subscription is configured correctly to deploy and manage various cloud resources by enabling the necessary underlying services.

CAVEATS

The command az-provider is not a standalone Linux executable. It refers to the provider subcommand within the Azure Command-Line Interface (CLI). Therefore, it requires the Azure CLI to be installed and configured on your system.
To perform operations like registering or unregistering resource providers, your Azure identity must have sufficient permissions (e.g., Contributor or Owner role on the subscription, or specific Microsoft.Authorization/*/write permissions).
Resource provider registration can take several minutes to complete.

UNDERSTANDING RESOURCE PROVIDERS

In Azure, a Resource Provider is a service that exposes Azure resources to users and applications. For instance, Microsoft.Compute is the resource provider for Virtual Machines, Microsoft.Storage for storage accounts, and Microsoft.Network for virtual networks and other networking components. When you want to deploy a resource of a specific type (e.g., a Virtual Machine), the corresponding resource provider must be registered within the Azure subscription where you intend to deploy it.
Registration ensures that your subscription is enabled to use the services offered by that provider. While many common resource providers are automatically registered for new subscriptions, some less frequently used ones might require explicit registration via az provider register before their resources can be created. The status of a resource provider (Registered, Unregistered, Registering) indicates its availability for resource deployment within your subscription.

HISTORY

The concept of resource providers has been fundamental to the Azure Resource Manager (ARM) deployment model since its inception. The az CLI itself was introduced to provide a more consistent and cross-platform command-line experience for Azure management, replacing the older azure CLI (which was Node.js-based).
The az provider subcommand has been a core part of the az CLI from early versions, evolving alongside the expanding set of Azure services and their corresponding resource providers. Its functionality reflects the underlying API capabilities for managing resource provider registrations, which are critical for any resource deployment in Azure.

SEE ALSO

az(1), az group(1), az vm(1), az network(1), az account(1)

Copied to clipboard