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
Name of the availability group. Please refer to https://docs.microsoft.com/sql/database-engine/availability-groups/windows/use-the-availability-group-wizard-sql-server-management-studio?view=sql-server-2017 to create and availability group.
Name of the SQL virtual machine group.
Private IP address bound to the availability group listener.
Name or resource ID of the load balancer.
Name of the availability group listener.
Probe port.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Space-separated list of SQL virtual machine instance name or resource IDs that are enrolled into the availability group.
The name or resource id of the subnet to include in the private IP.
Optional Parameters
Listener port.
Name or resource ID of the public IP.
Name of the virtual network. Provide only if name of the subnet has been provided.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
Name of the SQL virtual machine group.
Optional Parameters
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 of the availability group listener.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
Name of the SQL virtual machine group.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
Name of the SQL virtual machine group.
Optional Parameters
Get the SQLIaaSExtension configuration settings. To view all settings, use *. To select only a few, the settings must be space-separated.
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 of the availability group listener.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
Name of the SQL virtual machine group.
Optional Parameters
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>
.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
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 of the availability group listener.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Space-separated list of SQL virtual machine instance name or resource IDs that are enrolled into the availability group.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.