| author | probableprime |
|---|---|
| ms.service | azure-communication-services |
| ms.custom | devx-track-azurecli |
| ms.topic | include |
| ms.date | 06/30/2021 |
| ms.author | rifox |
- An Azure account with an active subscription. Create an account for free.
- Install Azure CLI.
If you're planning on using phone numbers, you can't use the free trial account. Check that your subscription meets all the requirements if you plan to purchase phone numbers before creating your resource.
To create an Azure Communication Services resource, sign in to Azure CLI. You can sign in running the az login command from the terminal and provide your credentials.
To create the resource, run the following command:
az communication create --name "<acsResourceName>" --location "Global" --data-location "United States" --resource-group "<resourceGroup>"
If you would like to select a specific subscription, you can also specify the --subscription flag and provide the subscription ID.
az communication create --name "<acsResourceName>" --location "Global" --data-location "United States" --resource-group "<resourceGroup>" --subscription "<subscriptionId>"
You can configure your Communication Services resource with the following options:
- The resource group
- The name of the Communication Services resource
- The geography associated with the resource
In the next step, you can assign tags to the resource. You can use tags to organize your Azure resources. For more information about tags, see Use tags to organize your Azure resources and management hierarchy.
To add tags to your Communication Services resource, run the following commands. You can target a specific subscription as well.
az communication update --name "<communicationName>" --tags newTag="newVal1" --resource-group "<resourceGroup>"
az communication update --name "<communicationName>" --tags newTag="newVal2" --resource-group "<resourceGroup>" --subscription "<subscriptionId>"
az communication show --name "<communicationName>" --resource-group "<resourceGroup>"
az communication show --name "<communicationName>" --resource-group "<resourceGroup>" --subscription "<subscriptionId>"
For information on other commands, see Azure Communication CLI.