Azure CLI for Azure Data Share
The Azure Command Line Interface (Azure CLI) is a set of commands used to create and manage Azure resources. It is available across many Azure services including Azure Data Share. There are over 65 different commands for data share! These commands give you the ability to work effectively with the service from a command line.
References for Data Share
All Azure CLI commands for Azure Data Share are currently extensions to the Azure CLI. An extension gives you access to experimental and pre-release commands. Find out more about extension references in Use extensions with Azure CLI.
|Azure CLI Reference||Description|
|az datashare||All commands to manage Azure Data Share.|
|az datashare account||Commands to manage Azure Data Share accounts.|
|az datashare consumer||Commands for consumers to manage Azure Data Share.|
|az datashare dataset||Commands for providers to manage Azure Data Share datasets.|
|az datashare invitation||Commands for consumers to manage Azure Data Share invitations.|
|az datashare provider-share-subscription||Commands for providers to manage Azure Data Share subscriptions.|
|az datashare synchronization||Commands to manage Azure Data Share synchronization.|
|az datashare synchronization-setting||Commands for providers to manage Azure Data Share synchronization settings.|
Examples are provided with every Azure CLI reference. Although you can also complete these tasks through the Azure portal, using the Azure CLI requires a single command line. Here are a few code blocks to give you an idea of how easy it is to use the Azure CLI.
To work with Azure Data Share, you'll first need a resource group. Azure resource groups are simple to create and manage with the Azure CLI.
#create a resource group az group create -location westus -name MyResourceGroup
#get a list of resource groups for a subscription az group list --subscription MySubscription --output table
It is as straightforward to create a data share account.
#create a data share account az datashare account create --location "West US 2" --tags tag1=Red tag2=White --name MyAccount --resource-group MyResourceGroup