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://learn.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.
Property | Value |
---|---|
Parameter group: | Load Balancer Configuration Arguments |
Name or resource ID of the load balancer.
Property | Value |
---|---|
Parameter group: | Load Balancer Configuration Arguments |
Name of the availability group listener.
Probe port.
Property | Value |
---|---|
Parameter group: | Load Balancer Configuration Arguments |
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.
Property | Value |
---|---|
Parameter group: | Load Balancer Configuration Arguments |
The name or resource id of the subnet to include in the private IP.
Property | Value |
---|---|
Parameter group: | Load Balancer Configuration Arguments |
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Listener port.
Property | Value |
---|---|
Parameter group: | SQL Connectivity Update Settings Arguments |
Default value: | 1433 |
Name or resource ID of the public IP.
Property | Value |
---|---|
Parameter group: | Load Balancer Configuration Arguments |
Name of the virtual network. Provide only if name of the subnet has been provided.
Property | Value |
---|---|
Parameter group: | Load Balancer Configuration Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of the availability group listener.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Do not prompt for confirmation.
Property | Value |
---|---|
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
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.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Get the SQLIaaSExtension configuration settings. To view all settings, use *. To select only a few, the settings must be space-separated.
Property | Value |
---|---|
Accepted values: | *, AssessmentSettings, AutoBackupSettings, AutoPatchingSettings, KeyVaultCredentialSettings, ServerConfigurationsManagementSettings |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of the availability group listener.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | [] |
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | False |
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of the availability group listener.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | [] |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Default value: | [] |
Space-separated list of SQL virtual machine instance name or resource IDs that are enrolled into the availability group.
Property | Value |
---|---|
Parameter group: | Load Balancer Configuration Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |