az sql vm group ag-listener

Manage SQL availability group listeners.

Commands

Name Description Type Status
az sql vm group ag-listener create

Creates an availability group listener.

Core GA
az sql vm group ag-listener delete

Deletes an availability group listener.

Core GA
az sql vm group ag-listener list

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

Core GA
az sql vm group ag-listener show

Gets an availability group listener.

Core GA
az sql vm group ag-listener update

Updates an availability group listener.

Core GA

az sql vm group ag-listener create

Creates an availability group listener.

az sql vm group ag-listener create --ag-name
                                   --group-name
                                   --ip-address
                                   --load-balancer
                                   --name
                                   --probe-port
                                   --resource-group
                                   --sqlvms
                                   --subnet
                                   [--port]
                                   [--public-ip]
                                   [--vnet-name]

Examples

Create an availability group listener. Note the SQL virtual machines are in the same resource group as the SQL virtual machine group.

az sql vm group ag-listener create -n aglistenertest -g myresourcegroup --ag-name agname --group-name sqlvmgroup --ip-address 10.0.0.11 --load-balancer '/subscriptions/{yoursubscription}/resourceGroups/{yourrg}/providers/Microsoft.Network/loadBalancers/{lbname}' --probe-port 59999 --subnet '/subscriptions/{yoursubscription}/resourceGroups/{yourrg}/providers/Microsoft.Network/virtualNetworks/{vnname}/subnets/{subnetname}' --sqlvms sqlvm1 sqlvm2

Create an availability group listener. Note all resources are in the same resource group.

az sql vm group ag-listener create -n aglistenertest -g myresourcegroup --ag-name agname --group-name sqlvmgroup --ip-address 10.0.0.11 --load-balancer {lbname} --probe-port 59999 --subnet {subnetname} --vnet-name {vnname} --sqlvms sqlvm1 sqlvm2

Required Parameters

--ag-name -a
--group-name -r

Name of the SQL virtual machine group.

--ip-address -i

Private IP address bound to the availability group listener.

--load-balancer -b

Name or resource ID of the load balancer.

--name -n

Name of the availability group listener.

--probe-port -e

Probe port.

--resource-group -g

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

--sqlvms -q

Space-separated list of SQL virtual machine instance name or resource IDs that are enrolled into the availability group.

--subnet -u

The name or resource id of the subnet to include in the private IP.

Optional Parameters

--port -p

Listener port.

default value: 1433
--public-ip -c

Name or resource ID of the public IP.

--vnet-name

Name of the virtual network. Provide only if name of the subnet has been provided.

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 sql vm group ag-listener delete

Deletes an availability group listener.

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

Required Parameters

--group-name -r

Name of the SQL virtual machine group.

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 availability group listener.

--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 sql vm group ag-listener list

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

az sql vm group ag-listener list --group-name
                                 --resource-group

Required Parameters

--group-name -r

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

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 sql vm group ag-listener show

Gets an availability group listener.

az sql vm group ag-listener show --group-name
                                 [--expand {*, AssessmentSettings, AutoBackupSettings, AutoPatchingSettings, KeyVaultCredentialSettings, ServerConfigurationsManagementSettings}]
                                 [--ids]
                                 [--name]
                                 [--resource-group]
                                 [--subscription]

Required Parameters

--group-name -r

Name of the SQL virtual machine group.

Optional Parameters

--expand

Get the SQLIaaSExtension configuration settings. To view all settings, use *. To select only a few, the settings must be space-separated.

accepted values: *, AssessmentSettings, AutoBackupSettings, AutoPatchingSettings, KeyVaultCredentialSettings, ServerConfigurationsManagementSettings
--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 availability group listener.

--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 sql vm group ag-listener update

Updates an availability group listener.

az sql vm group ag-listener update --group-name
                                   [--add]
                                   [--force-string]
                                   [--ids]
                                   [--name]
                                   [--remove]
                                   [--resource-group]
                                   [--set]
                                   [--sqlvms]
                                   [--subscription]

Examples

Replace the SQL virtual machines that were in the availability group.

az sql vm group ag-listener update -n aglistenertest -g myresourcegroup --sqlvms sqlvm3 sqlvm4 --group-name mygroup

Required Parameters

--group-name -r

Name of the SQL virtual machine group.

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

default value: []
--force-string

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

default value: False
--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 availability group listener.

--remove

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

default value: []
--resource-group -g

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

--set

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

default value: []
--sqlvms -q

Space-separated list of SQL virtual machine instance name or resource IDs that are enrolled into the availability group.

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