Azure CLI reference commands for Azure Data Share

The Azure Command-Line Interface (CLI) is a set of commands used to create and manage Azure resources for many Azure services. For Azure Data Share, over 65 different commands are available, which give you the ability to work effectively with the service from a command-line.

All Azure CLI commands for Azure Data Share are currently in an extension to the Azure CLI core. The datashare extension gives you access to experimental and pre-release commands and is automatically installed the first time you run an az datashare command. For more information about Azure CLI extensions, see Use extensions with Azure CLI.

Reference list

List of Azure Data Share CLI references that can be used to manage Azure Data Share, and descriptions of each type of reference:

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.

Reference examples

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 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 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's also easy to create a data share account.

#create a data share account
az datashare account create --location westus --tags tag1=Red tag2=White --name MyAccount --resource-group MyResourceGroup

See also