You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/service-connector/quickstart-cli-app-service-connection.md
+21-12Lines changed: 21 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: maud-lv
5
5
ms.author: malev
6
6
ms.service: service-connector
7
7
ms.topic: quickstart
8
-
ms.date: 09/15/2022
8
+
ms.date: 04/13/2023
9
9
ms.devlang: azurecli
10
10
ms.custom: event-tier1-build-2022
11
11
---
@@ -22,18 +22,27 @@ The [Azure CLI](/cli/azure) is a set of commands used to create and manage Azure
22
22
23
23
- This quickstart assumes that you already have at least an App Service running on Azure. If you don't have an App Service, [create one](../app-service/quickstart-dotnetcore.md).
24
24
25
-
## View supported target service types
25
+
## Initial set-up
26
26
27
-
Use the Azure CLI [az webapp connection list](/cli/azure/webapp/connection#az-webapp-connection-list) command to get a list of supported target services for App Service.
27
+
1. Register the Service Connector resource provider by running the following command:
28
28
29
-
```azurecli-interactive
30
-
az provider register -n Microsoft.ServiceLinker
31
-
az webapp connection list-support-types --output table
32
-
```
29
+
```azurecli
30
+
az provider register -n Microsoft.ServiceLinker
31
+
```
32
+
33
+
> [!TIP]
34
+
> You can check if you've already registered the resource provider with the command `az provider show -n "Microsoft.ServiceLinker" --query registrationState`. If the output is `Registered`, then Service Connector has already been registered.
35
+
36
+
37
+
1. Optionally, use the Azure CLI [az webapp connection list](/cli/azure/webapp/connection#az-webapp-connection-list) command to get a list of supported target services for App Service.
33
38
39
+
```azurecli
40
+
az webapp connection list-support-types --output table
41
+
```
42
+
34
43
## Create a service connection
35
44
36
-
#### [Using Access Key](#tab/Using-access-key)
45
+
#### [Using an access key](#tab/Using-access-key)
37
46
38
47
Use the Azure CLI [az webapp connection create](/cli/azure/webapp/connection/create) command to create a service connection to an Azure Blob Storage with an access key, providing the following information:
39
48
@@ -42,14 +51,14 @@ Use the Azure CLI [az webapp connection create](/cli/azure/webapp/connection/cre
42
51
- **Target service resource group name:** the resource group name of the Blob Storage.
43
52
- **Storage account name:** the account name of your Blob Storage.
44
53
45
-
```azurecli-interactive
54
+
```azurecli
46
55
az webapp connection create storage-blob --secret
47
56
```
48
57
49
58
> [!NOTE]
50
59
> If you don't have a Blob Storage, you can run `az webapp connection create storage-blob --new --secret` to provision a new one and directly get connected to your app service.
#### [Using a managed identity](#tab/Using-Managed-Identity)
53
62
54
63
> [!IMPORTANT]
55
64
> Using Managed Identity requires you have the permission to [Azure AD role assignment](../active-directory/managed-identities-azure-resources/howto-assign-access-portal.md). If you don't have the permission, your connection creation would fail. You can ask your subscription owner for the permission or using access key to create the connection.
@@ -61,7 +70,7 @@ Use the Azure CLI [az webapp connection](/cli/azure/webapp/connection) command t
61
70
-**Target service resource group name:** the resource group name of the Blob Storage.
62
71
-**Storage account name:** the account name of your Blob Storage.
63
72
64
-
```azurecli-interactive
73
+
```azurecli
65
74
az webapp connection create storage-blob --system-identity
66
75
```
67
76
@@ -77,7 +86,7 @@ Use the Azure CLI [az webapp connection](/cli/azure/webapp/connection) command t
77
86
-**Source compute service resource group name:** the resource group name of the App Service.
78
87
-**App Service name:** the name of your App Service that connects to the target service.
79
88
80
-
```azurecli-interactive
89
+
```azurecli
81
90
az webapp connection list -g "<your-app-service-resource-group>" -n "<your-app-service-name>" --output table
0 commit comments