az synapse workspace

Manage Synapse workspaces.

Commands

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.

az synapse workspace check-name

Check if a Synapse workspace name is available or not.

az synapse workspace create

Create a Synapse workspace.

az synapse workspace delete

Delete a Synapse workspace.

az synapse workspace firewall-rule

Manage a workspace's firewall rules.

az synapse workspace firewall-rule create

Create a firewall rule.

az synapse workspace firewall-rule delete

Delete a firewall rule.

az synapse workspace firewall-rule list

List all firewall rules.

az synapse workspace firewall-rule show

Get a firewall rule.

az synapse workspace firewall-rule update

Update a firewall rule.

az synapse workspace firewall-rule wait

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

az synapse workspace key

Manage workspace's keys.

az synapse workspace key create

Create a workspace's key.

az synapse workspace key delete

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

az synapse workspace key list

List keys under specified workspace.

az synapse workspace key show

Show a workspace's key by name.

az synapse workspace key wait

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

az synapse workspace list

List all Synapse workspaces.

az synapse workspace managed-identity

Manage workspace's managed-identity.

az synapse workspace managed-identity grant-sql-access

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

az synapse workspace managed-identity revoke-sql-access

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

az synapse workspace managed-identity show-sql-access

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

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.

az synapse workspace show

Get a Synapse workspace.

az synapse workspace update

Update a Synapse workspace.

az synapse workspace wait

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

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]
                              [--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.

--resource-group -g

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

--workspace-name

The workspace name.

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.

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]
                            [--location]
                            [--no-wait]
                            [--prevent-data-exfiltration {false, true}]
                            [--project-name]
                            [--repository-name]
                            [--repository-type {AzureDevOpsGit, GitHub}]
                            [--root-folder]
                            [--tags]
                            [--tenant-id]

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

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

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
--location -l

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

--no-wait

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

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

az synapse workspace delete

Delete a Synapse workspace.

az synapse workspace delete [--ids]
                            [--name]
                            [--no-wait]
                            [--resource-group]
                            [--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.

--resource-group -g

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

--yes -y

Do not prompt for confirmation.

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

az synapse workspace show

Get a Synapse workspace.

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

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

az synapse workspace update

Update a Synapse workspace.

az synapse workspace update [--account-name]
                            [--allowed-tenant-ids]
                            [--collaboration-branch]
                            [--host-name]
                            [--ids]
                            [--key-name]
                            [--name]
                            [--no-wait]
                            [--project-name]
                            [--repository-name]
                            [--repository-type {AzureDevOpsGit, GitHub}]
                            [--resource-group]
                            [--root-folder]
                            [--sql-admin-login-password]
                            [--tags]
                            [--tenant-id]

Examples

Update a Synapse workspace

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

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.

--name -n

The workspace name.

--no-wait

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

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

--tags

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

--tenant-id

The tenant id used to connect Azure devops.

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

--custom

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

--deleted

Wait until deleted.

--exists

Wait until the resource exists.

--interval

Polling interval in seconds.

default value: 30
--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.