Quickstart: Create a service connection in App Service with the Azure CLI

The Azure CLI is a set of commands used to create and manage Azure resources. The Azure CLI is available across Azure services and is designed to get you working quickly with Azure, with an emphasis on automation. This quickstart shows you the options to create Azure Web PubSub instance with the Azure CLI.

If you don't have an Azure subscription, create an Azure free account before you begin.

Prerequisites

  • This quickstart requires version 2.30.0 or higher of the Azure CLI. If using Azure Cloud Shell, the latest version is already installed.

  • 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.

View supported target service types

Use the Azure CLI az webapp connection list command to get a list of supported target services for App Service.

az provider register -n Microsoft.ServiceLinker
az webapp connection list-support-types --output table

Create a service connection

Use the Azure CLI az webapp connection create command to create a service connection to an Azure Blob Storage with an access key, providing the following information:

  • Source compute service resource group name: the resource group name of the App Service.
  • App Service name: the name of your App Service that connects to the target service.
  • Target service resource group name: the resource group name of the Blob Storage.
  • Storage account name: the account name of your Blob Storage.
az webapp connection create storage-blob --secret

Note

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.

View connections

Use the Azure CLI az webapp connection command to list connections to your App Service, providing the following information:

  • Source compute service resource group name: the resource group name of the App Service.
  • App Service name: the name of your App Service that connects to the target service.
az webapp connection list -g "<your-app-service-resource-group>" -n "<your-app-service-name>" --output table

Next steps

Follow the tutorials listed below to start building your own application with Service Connector.