az synapse workspace

Manage Synapse workspaces.

Commands

Name Description Type Status
az synapse workspace activate

Activates a workspace and change it's state from pending to success state when the workspace is first being provisioned and double encryption is enabled.

Core GA
az synapse workspace check-name

Check if a Synapse workspace name is available or not.

Core GA
az synapse workspace create

Create a Synapse workspace.

Core GA
az synapse workspace delete

Delete a Synapse workspace.

Core GA
az synapse workspace firewall-rule

Manage a workspace's firewall rules.

Core GA
az synapse workspace firewall-rule create

Create a firewall rule.

Core GA
az synapse workspace firewall-rule delete

Delete a firewall rule.

Core GA
az synapse workspace firewall-rule list

List all firewall rules.

Core GA
az synapse workspace firewall-rule show

Get a firewall rule.

Core GA
az synapse workspace firewall-rule update

Update a firewall rule.

Core GA
az synapse workspace firewall-rule wait

Place the CLI in a waiting state until a condition of a firewall rule is met.

Core GA
az synapse workspace key

Manage workspace's keys.

Core GA
az synapse workspace key create

Create a workspace's key.

Core GA
az synapse workspace key delete

Delete a workspace's key. The key at active status can't be deleted.

Core GA
az synapse workspace key list

List keys under specified workspace.

Core GA
az synapse workspace key show

Show a workspace's key by name.

Core GA
az synapse workspace key wait

Place the CLI in a waiting state until a condition of a workspace key is met.

Core GA
az synapse workspace list

List all Synapse workspaces.

Core GA
az synapse workspace managed-identity

Manage workspace's managed-identity.

Core GA
az synapse workspace managed-identity grant-sql-access

Grant workspace's sql-access to managed-identity.

Core GA
az synapse workspace managed-identity revoke-sql-access

Revoke workspace's sql-access to managed-identity.

Core GA
az synapse workspace managed-identity show-sql-access

Show workspace's sql-access state to managed-identity.

Core GA
az synapse workspace managed-identity wait

Place the CLI in a waiting state until a condition of sql-access state to managed-identity is met.

Core GA
az synapse workspace show

Get a Synapse workspace.

Core GA
az synapse workspace update

Update a Synapse workspace.

Core GA
az synapse workspace wait

Place the CLI in a waiting state until a condition of the workspace is met.

Core GA

az synapse workspace activate

Activates a workspace and change it's state from pending to success state when the workspace is first being provisioned and double encryption is enabled.

When creating an Azure Synapse Analytics workspace, you can choose to encrypt all data at rest in the workspace with a customer-managed key which will provide double encryption to the workspace.You may need to set up the encryption environment firstly, such as to create a key vault with purge protection enable and specify Access Polices to the key vault. Then use this cmdlet to activate the new Azure Synapse Analytics workspace which double encryption is enabled using a customer-managed key.

az synapse workspace activate --key-identifier
                              [--ids]
                              [--name]
                              [--no-wait]
                              [--resource-group]
                              [--subscription]
                              [--workspace-name]

Examples

activate a workspace.

az synapse workspace activate --name newkey --workspace-name testsynapseworkspace \
--resource-group rg --key-identifier https://{keyvaultname}.vault.azure.net/keys/{keyname}

Required Parameters

--key-identifier

The Key Vault Url of the workspace encryption key. should be in the format of: https://{keyvaultname}.vault.azure.net/keys/{keyname}.

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

The workspace customer-managed key display name. All existing keys can be found using /"az synapse workspace key list/" cmdlet.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--workspace-name

The workspace name.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az synapse workspace check-name

Check if a Synapse workspace name is available or not.

az synapse workspace check-name --name

Examples

Check if a Synapse workspace name is available or not.

az synapse workspace check-name --name testsynapseworkspace

Required Parameters

--name -n

The name you wanted to check.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az synapse workspace create

Create a Synapse workspace.

az synapse workspace create --file-system
                            --name
                            --resource-group
                            --sql-admin-login-password
                            --sql-admin-login-user
                            --storage-account
                            [--account-name]
                            [--allowed-tenant-ids]
                            [--cmk]
                            [--collaboration-branch]
                            [--enable-managed-virtual-network {false, true}]
                            [--host-name]
                            [--key-name]
                            [--last-commit-id]
                            [--location]
                            [--managed-rg-name]
                            [--no-wait]
                            [--prevent-data-exfiltration {false, true}]
                            [--project-name]
                            [--repository-name]
                            [--repository-type {AzureDevOpsGit, GitHub}]
                            [--root-folder]
                            [--tags]
                            [--tenant-id]
                            [--uami-id]
                            [--uami-id-in-encrypt]
                            [--use-sami-in-encrypt]

Examples

Create a Synapse workspace

az synapse workspace create --name testworkspace --resource-group rg \
  --storage-account testadlsgen2 --file-system testfilesystem \
  --sql-admin-login-user cliuser1 --sql-admin-login-password Password123! --location "East US"

Create a Synapse workspace with storage resource id

az synapse workspace create --name testworkspace --resource-group rg \
  --storage-account /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/testadlsgen2 --file-system testfilesystem \
  --sql-admin-login-user cliuser1 --sql-admin-login-password Password123! --location "East US"

Create a Synapse workspace using customer-managed key

az synapse workspace create --name testworkspace --resource-group rg \
  --storage-account testadlsgen2 --file-system testfilesystem \
  --sql-admin-login-user cliuser1 --sql-admin-login-password Password123! --location "East US" \
  --key-identifier https://{keyvaultname}.vault.azure.net/keys/{keyname} --key-name testcmk \
  --use-sami-in-encrypt True

Create a Synapse workspace connecting to azure devops

az synapse workspace create --name testworkspace --resource-group rg \
  --storage-account testadlsgen2 --file-system testfilesystem \
  --sql-admin-login-user cliuser1 --sql-admin-login-password Password123! --location "East US" \
  --repository-type AzureDevOpsGit --account-name testuser --project-name testprj \
  --repository-name testrepo --collaboration-branch main --last-commit-id 000000

Create a Synapse workspace with managed resource group

az synapse workspace create --name testworkspace --resource-group rg \
  --managed-rg-name managedrg \
  --storage-account testadlsgen2 --file-system testfilesystem \
  --sql-admin-login-user cliuser1 --sql-admin-login-password Password123! --location "East US"

Create a Synapse workspace with user assigned managed identity

az synapse workspace create --name testworkspace --resource-group rg \
  --storage-account testadlsgen2 --file-system testfilesystem \
  --sql-admin-login-user cliuser1 --sql-admin-login-password Password123! --location "East US" \
  --uami-id "{your-first-uami-resourceid}" "{your-second-uami-resourceid}"

Required Parameters

--file-system

The file system of the data lake storage account.

--name -n

The workspace name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--sql-admin-login-password -p

The sql administrator login password.

--sql-admin-login-user -u

The sql administrator login user name.

--storage-account

The data lake storage account name or resource id.

Optional Parameters

--account-name

GitHub account name used for the repository or Azure devops organization name.

--allowed-tenant-ids

The approved Azure AD tenants which outbound data traffic allowed to. The Azure AD tenant of the current user will be included by default. Use ('' in PowerShell) to disable all allowed tenant ids.

--cmk --key-identifier

The customer-managed key used to encrypt all data at rest in the workspace. Key identifier should be in the format of: https://{keyvaultname}.vault.azure.net/keys/{keyname}.

--collaboration-branch

The branch name where you will collaborate with others and from which you will publish.

--enable-managed-virtual-network --enable-managed-vnet

The flag indicates whether enable managed virtual network.

accepted values: false, true
--host-name

If using github Enterprise Server, provide sever URL like https://github.mydomain.com.Do not use this option with GitHub Enterprise Cloud.

--key-name

The workspace customer-managed key display name. All existing keys can be found using "az synapse workspace key list" cmdlet.

default value: default
--last-commit-id

The last commit ID.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--managed-rg-name

Workspace managed resource group. The resource group name uniquely identifies the resource group within the user subscriptionId.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--prevent-data-exfiltration --prevent-exfiltration

The flag indicates whether enable data exfiltration.

accepted values: false, true
--project-name

The project name to which you are connecting.

--repository-name

The name of the repository to which you are connecting.

--repository-type

The repository configuration type.

accepted values: AzureDevOpsGit, GitHub
--root-folder

The name of the folder to the location of your Azure synapse JSON resources are imported. Default is /.

default value: /
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--tenant-id

The tenant id used to connect Azure devops.

--uami-id

The list of User-assigned Managed Identity Id for workspace.

--uami-id-in-encrypt

User assigned identity resource Id used in Workspace Encryption.

--use-sami-in-encrypt

Whether use System assigned identity in Workspace Encryption. If use uami, please set True.If not, set False.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az synapse workspace delete

Delete a Synapse workspace.

az synapse workspace delete [--ids]
                            [--name]
                            [--no-wait]
                            [--resource-group]
                            [--subscription]
                            [--yes]

Examples

Delete a Synapse workspace.

az synapse workspace delete --name testsynapseworkspace --resource-group rg

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

The workspace name.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az synapse workspace list

List all Synapse workspaces.

az synapse workspace list [--resource-group]

Examples

List all Synapse workspaces under a subscription

az synapse workspace list

List all Synapse workspaces under a specific resource group

az synapse workspace list --resource-group rg

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az synapse workspace show

Get a Synapse workspace.

az synapse workspace show [--ids]
                          [--name]
                          [--resource-group]
                          [--subscription]

Examples

Get a Synapse workspace.

az synapse workspace show --name testsynapseworkspace --resource-group rg

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

The workspace name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az synapse workspace update

Update a Synapse workspace.

az synapse workspace update [--account-name]
                            [--allowed-tenant-ids]
                            [--collaboration-branch]
                            [--host-name]
                            [--ids]
                            [--key-name]
                            [--last-commit-id]
                            [--name]
                            [--no-wait]
                            [--project-name]
                            [--repository-name]
                            [--repository-type {AzureDevOpsGit, GitHub}]
                            [--resource-group]
                            [--root-folder]
                            [--sql-admin-login-password]
                            [--subscription]
                            [--tags]
                            [--tenant-id]
                            [--uami-action {Add, Remove, Set}]
                            [--uami-id]
                            [--uami-id-in-encrypt]
                            [--use-sami-in-encrypt]

Examples

Update a Synapse workspace

az synapse workspace update --name fromcli4 --resource-group rg \
  --tags key1=value1

Update a Synapse workspace, add user assigned managed identity

az synapse workspace update --name fromcli4 --resource-group rg \
--uami-action Add --uami-id "{your-first-uami-resourceid}" "{your-second-uami-resourceid}"

Update a Synapse workspace, remove user assigned managed identity

az synapse workspace update --name fromcli4 --resource-group rg \
--uami-action Remove --uami-id "{your-first-uami-resourceid}" "{your-second-uami-resourceid}"

Update a Synapse workspace, rewrite user assigned managed identity

az synapse workspace update --name fromcli4 --resource-group rg \
--uami-action Set --uami-id "{your-first-uami-resourceid}" "{your-second-uami-resourceid}"

Update a Synapse workspace, set workspace encryption uami

az synapse workspace update --name fromcli4 --resource-group rg \
--uami-id-in-encrypt "{your-encrytion-uami-resourceid}" --use-sami-in-encrypt False

Optional Parameters

--account-name

GitHub account name used for the repository or Azure devops organization name.

--allowed-tenant-ids

The approved Azure AD tenants which outbound data traffic allowed to. The Azure AD tenant of the current user will be included by default. Use ('' in PowerShell) to disable all allowed tenant ids.

--collaboration-branch

The branch name where you will collaborate with others and from which you will publish.

--host-name

If using github Enterprise Server, provide sever URL like https://github.mydomain.com.Do not use this option with GitHub Enterprise Cloud.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--key-name

The workspace customer-managed key display name. All existing keys can be found using "az synapse workspace key list" cmdlet.

--last-commit-id

The last commit ID.

--name -n

The workspace name.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--project-name

The project name to which you are connecting.

--repository-name

The name of the repository to which you are connecting.

--repository-type

The repository configuration type.

accepted values: AzureDevOpsGit, GitHub
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--root-folder

The name of the folder to the location of your Azure synapse JSON resources are imported. Default is /.

--sql-admin-login-password -p

The sql administrator login password.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--tenant-id

The tenant id used to connect Azure devops.

--uami-action

Action must be specified when you add/remove/set user assigned managed identities for workspace.The supported actions are:Add,Remove,Set.Add means to add user assigned managed identities for workspace, Remove means to remove user assigned managed identities from workspace, Set can be used when you want to add and remove user assigned managed identities at the same time, current identities will be coverd by specified ones.

accepted values: Add, Remove, Set
--uami-id

The list of User-assigned Managed Identity Id for workspace.

--uami-id-in-encrypt

User assigned identity resource Id used in Workspace Encryption.

--use-sami-in-encrypt

Whether use System assigned identity in Workspace Encryption. If use uami, please set True.If not, set False.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az synapse workspace wait

Place the CLI in a waiting state until a condition of the workspace is met.

az synapse workspace wait --resource-group
                          --workspace-name
                          [--created]
                          [--custom]
                          [--deleted]
                          [--exists]
                          [--interval]
                          [--timeout]
                          [--updated]

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--workspace-name

The name of the workspace.

Optional Parameters

--created

Wait until created with 'provisioningState' at 'Succeeded'.

default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

default value: False
--exists

Wait until the resource exists.

default value: False
--interval

Polling interval in seconds.

default value: 30
--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.