az sql vm group

Manage SQL virtual machine groups.

Commands

az sql vm group ag-listener

Manage SQL availability group listeners.

az sql vm group ag-listener create

Creates an availability group listener.

az sql vm group ag-listener delete

Deletes an availability group listener.

az sql vm group ag-listener list

Lists all availability group listeners in a SQL virtual machine group.

az sql vm group ag-listener show

Gets an availability group listener.

az sql vm group ag-listener update

Updates an availability group listener.

az sql vm group create

Creates a SQL virtual machine group.

az sql vm group delete

Deletes a SQL virtual machine group.

az sql vm group list

Lists all SQL virtual machine groups in a resource group or subscription.

az sql vm group show

Gets a SQL virtual machine group.

az sql vm group update

Updates a SQL virtual machine group if there are not SQL virtual machines attached to the group.

az sql vm group create

Creates a SQL virtual machine group.

az sql vm group create --domain-fqdn
                       --image-offer
                       --image-sku {Developer, Enterprise}
                       --name
                       --operator-acc
                       --resource-group
                       --service-acc
                       --storage-account
                       [--bootstrap-acc]
                       [--fsw-path]
                       [--location]
                       [--ou-path]
                       [--sa-key]
                       [--subscription]
                       [--tags]

Examples

Create a SQL virtual machine group for SQL2016-WS2016 Enterprise virtual machines.

az sql vm group create -n sqlvmgroup -l eastus -g myresourcegroup --image-offer SQL2016-WS2016 --image-sku Enterprise --domain-fqdn Domain.com --operator-acc testop --service-acc testservice --sa-key {PublicKey} --storage-account 'https://storacc.blob.core.windows.net/'

Required Parameters

--domain-fqdn -f

Fully qualified name of the domain.

--image-offer -i

SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016.

--image-sku -s

SQL image sku.

accepted values: Developer, Enterprise
--name -n

Name of the SQL virtual machine group.

--operator-acc -p

Account name used for operating cluster i.e. will be part of administrators group on all the participating virtual machines in the cluster.

--resource-group -g

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

--service-acc -e

Account name under which SQL service will run on all participating SQL virtual machines in the cluster.

--storage-account -u

Storage account url of the witness storage account.

Optional Parameters

--bootstrap-acc

Account name used for creating cluster (at minimum needs permissions to 'Create Computer Objects' in domain).

--fsw-path

Optional path for fileshare witness.

--location -l

Location. If not provided, group will be created in the same reosurce group location.You can configure the default location using az configure --defaults location=<location>.

--ou-path

Organizational Unit path in which the nodes and cluster will be present. Example: OU=WSCluster,DC=testdomain,DC=com.

--sa-key -k

Primary key of the witness storage account.

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

az sql vm group delete

Deletes a SQL virtual machine group.

az sql vm group delete [--ids]
                       [--name]
                       [--resource-group]
                       [--subscription]
                       [--yes]

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

Name of the SQL virtual machine group.

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

az sql vm group list

Lists all SQL virtual machine groups in a resource group or subscription.

az sql vm group list [--query-examples]
                     [--resource-group]
                     [--subscription]

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

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

az sql vm group show

Gets a SQL virtual machine group.

az sql vm group show [--ids]
                     [--name]
                     [--query-examples]
                     [--resource-group]
                     [--subscription]

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

Name of the SQL virtual machine group.

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

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

az sql vm group update

Updates a SQL virtual machine group if there are not SQL virtual machines attached to the group.

az sql vm group update [--add]
                       [--bootstrap-acc]
                       [--domain-fqdn]
                       [--force-string]
                       [--fsw-path]
                       [--ids]
                       [--name]
                       [--operator-acc]
                       [--ou-path]
                       [--remove]
                       [--resource-group]
                       [--sa-key]
                       [--service-acc]
                       [--set]
                       [--storage-account]
                       [--subscription]
                       [--tags]

Examples

Update an empty SQL virtual machine group operator account.

az sql vm group update -n sqlvmgroup -g myresourcegroup --operator-acc testop

Update an empty SQL virtual machine group storage account and key.

az sql vm group update -n sqlvmgroup -g myresourcegroup --sa-key {PublicKey} --storage-account 'https://newstoracc.blob.core.windows.net/'

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--bootstrap-acc

Account name used for creating cluster (at minimum needs permissions to 'Create Computer Objects' in domain).

--domain-fqdn -f

Fully qualified name of the domain.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

--fsw-path

Optional path for fileshare witness.

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

Name of the SQL virtual machine group.

--operator-acc -p

Account name used for operating cluster i.e. will be part of administrators group on all the participating virtual machines in the cluster.

--ou-path

Organizational Unit path in which the nodes and cluster will be present. Example: OU=WSCluster,DC=testdomain,DC=com.

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--resource-group -g

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

--sa-key -k

Primary key of the witness storage account.

--service-acc -e

Account name under which SQL service will run on all participating SQL virtual machines in the cluster.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--storage-account -u

Storage account url of the witness storage account.

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