Skip to content

Commit e01b908

Browse files
committed
build feedback edits
1 parent 458258c commit e01b908

File tree

1 file changed

+45
-47
lines changed

1 file changed

+45
-47
lines changed

articles/azure-resource-manager/troubleshooting/error-register-resource-provider.md

Lines changed: 45 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Resource provider registration errors
3-
description: Describes how to resolve Azure resource provider registration errors when resources are deployed with Azure Resource Manager.
3+
description: Describes how to resolve Azure resource provider registration errors for resources deployed with Azure Resource Manager.
44
ms.topic: troubleshooting
55
ms.date: 11/18/2021
66
ms.custom: devx-track-azurepowershell
@@ -10,8 +10,6 @@ ms.custom: devx-track-azurepowershell
1010

1111
This article describes the errors that might occur when you use a resource provider that you haven't previously used in your subscription.
1212

13-
[!INCLUDE [updated-for-az](../../../includes/updated-for-az.md)]
14-
1513
## Symptom
1614

1715
When a resource is deployed, you might receive the following error code and message:
@@ -50,94 +48,94 @@ You receive these errors for one of these reasons:
5048

5149
## Solution
5250

53-
# [PowerShell](#tab/azure-powershell)
51+
# [Azure CLI](#tab/azure-cli)
5452

55-
You can use Azure PowerShell to get information about a resource provider's registration status and
53+
You can use Azure CLI to get information about a resource provider's registration status and
5654
register a resource provider.
5755

58-
Use [Get-AzResourceProvider](/powershell/module/az.resources/get-azresourceprovider) to display the registration status for your subscription's resource providers.
56+
Use [az provider list](/cli/azure/provider#az_provider_list) to display the registration status for your subscription's resource providers. The examples use the `--output table` parameter to filter the output for readability. You can omit the parameter to see all properties.
5957

6058
The following command lists all the subscription's resource providers and whether they're `Registered` or `NotRegistered`.
6159

62-
```azurepowershell-interactive
63-
Get-AzResourceProvider -ListAvailable
60+
```azurecli-interactive
61+
az provider list --output table
6462
```
6563

66-
To list only `Registered` resource providers, omit the `ListAvailable` parameter. You can also filter the output by registration state. Replace the value with `Registered` or `NotRegistered`.
64+
You can filter the output by registration state. Replace the query value with `Registered` or `NotRegistered`.
6765

68-
```azurepowershell-interactive
69-
Get-AzResourceProvider -ListAvailable |
70-
Where-Object -Property RegistrationState -EQ -Value "Registered"
66+
```azurecli-interactive
67+
az provider list --query "[?registrationState=='Registered']" --output table
7168
```
7269

73-
To get the registration status for a specific resource provider:
70+
Get the registration status for a specific resource provider:
7471

75-
```azurepowershell-interactive
76-
Get-AzResourceProvider -ListAvailable |
77-
Where-Object -Property ProviderNamespace -Like -Value "Microsoft.Compute"
72+
```azurecli-interactive
73+
az provider list --query "[?namespace=='Microsoft.Compute']" --output table
7874
```
7975

80-
To register a provider, use [Register-AzResourceProvider](/powershell/module/az.resources/register-azresourceprovider) and provide the resource provider's name.
76+
To register a resource provider, use the [az provider register](/cli/azure/provider#az_provider_register) command, and specify the _namespace_ to register.
8177

82-
```azurepowershell-interactive
83-
Register-AzResourceProvider -ProviderNamespace "Microsoft.Cdn"
78+
```azurecli-interactive
79+
az provider register --namespace Microsoft.Cdn
8480
```
8581

86-
To get a resource type's supported locations:
82+
To get a resource type's supported locations, use [az provider show](/cli/azure/provider#az_provider_show):
8783

88-
```azurepowershell-interactive
89-
((Get-AzResourceProvider -ProviderNamespace Microsoft.Web).ResourceTypes |
90-
Where-Object -Property ResourceTypeName -EQ -Value "sites").Locations
84+
```azurecli-interactive
85+
az provider show --namespace Microsoft.Web --query "resourceTypes[?resourceType=='sites'].locations"
9186
```
9287

93-
To get a resource type's supported API versions:
88+
Get a resource type's supported API versions:
9489

95-
```azurepowershell-interactive
96-
((Get-AzResourceProvider -ProviderNamespace Microsoft.Web).ResourceTypes |
97-
Where-Object -Property ResourceTypeName -EQ -Value "sites").ApiVersions
90+
```azurecli-interactive
91+
az provider show --namespace Microsoft.Web --query "resourceTypes[?resourceType=='sites'].apiVersions"
9892
```
9993

100-
# [Azure CLI](#tab/azure-cli)
94+
# [PowerShell](#tab/azure-powershell)
10195

102-
You can use Azure CLI to get information about a resource provider's registration status and
96+
You can use Azure PowerShell to get information about a resource provider's registration status and
10397
register a resource provider.
10498

105-
Use [az provider list](/cli/azure/provider#az_provider_list) to display the registration status for your subscription's resource providers. The examples use the `--output table` parameter to filter the output for readability. You can omit the parameter to see all properties.
99+
Use [Get-AzResourceProvider](/powershell/module/az.resources/get-azresourceprovider) to display the registration status for your subscription's resource providers.
106100

107101
The following command lists all the subscription's resource providers and whether they're `Registered` or `NotRegistered`.
108102

109-
```azurecli-interactive
110-
az provider list --output table
103+
```azurepowershell-interactive
104+
Get-AzResourceProvider -ListAvailable
111105
```
112106

113-
You can filter the output by registration state. Replace the query value with `Registered` or `NotRegistered`.
107+
To list only `Registered` resource providers, omit the `ListAvailable` parameter. You can also filter the output by registration state. Replace the value with `Registered` or `NotRegistered`.
114108

115-
```azurecli-interactive
116-
az provider list --query "[?registrationState=='Registered']" --output table
109+
```azurepowershell-interactive
110+
Get-AzResourceProvider -ListAvailable |
111+
Where-Object -Property RegistrationState -EQ -Value "Registered"
117112
```
118113

119-
To get the registration status for a specific resource provider:
114+
Get the registration status for a specific resource provider:
120115

121-
```azurecli-interactive
122-
az provider list --query "[?namespace=='Microsoft.Compute']" --output table
116+
```azurepowershell-interactive
117+
Get-AzResourceProvider -ListAvailable |
118+
Where-Object -Property ProviderNamespace -Like -Value "Microsoft.Compute"
123119
```
124120

125-
To register a resource provider, use the [az provider register](/cli/azure/provider#az_provider_register) command, and specify the _namespace_ to register.
121+
To register a provider, use [Register-AzResourceProvider](/powershell/module/az.resources/register-azresourceprovider) and provide the resource provider's name.
126122

127-
```azurecli-interactive
128-
az provider register --namespace Microsoft.Cdn
123+
```azurepowershell-interactive
124+
Register-AzResourceProvider -ProviderNamespace "Microsoft.Cdn"
129125
```
130126

131-
To get a resource type's supported locations, use [az provider show](/cli/azure/provider#az_provider_show):
127+
Get a resource type's supported locations:
132128

133-
```azurecli-interactive
134-
az provider show --namespace Microsoft.Web --query "resourceTypes[?resourceType=='sites'].locations"
129+
```azurepowershell-interactive
130+
((Get-AzResourceProvider -ProviderNamespace Microsoft.Web).ResourceTypes |
131+
Where-Object -Property ResourceTypeName -EQ -Value "sites").Locations
135132
```
136133

137-
To get a resource type's supported API versions:
134+
Get a resource type's supported API versions:
138135

139-
```azurecli-interactive
140-
az provider show --namespace Microsoft.Web --query "resourceTypes[?resourceType=='sites'].apiVersions"
136+
```azurepowershell-interactive
137+
((Get-AzResourceProvider -ProviderNamespace Microsoft.Web).ResourceTypes |
138+
Where-Object -Property ResourceTypeName -EQ -Value "sites").ApiVersions
141139
```
142140

143141
# [Portal](#tab/azure-portal)

0 commit comments

Comments
 (0)