az sql server firewall-rule
Manage a server's firewall rules.
Commands
Name | Description | Type | Status |
---|---|---|---|
az sql server firewall-rule create |
Create a firewall rule. |
Core | GA |
az sql server firewall-rule delete |
Deletes a firewall rule. |
Core | GA |
az sql server firewall-rule list |
List a server's firewall rules. |
Core | GA |
az sql server firewall-rule show |
Shows the details for a firewall rule. |
Core | GA |
az sql server firewall-rule update |
Update a firewall rule. |
Core | GA |
az sql server firewall-rule create
Create a firewall rule.
az sql server firewall-rule create --name
--resource-group
--server
[--end-ip-address]
[--start-ip-address]
Examples
Create a firewall rule
az sql server firewall-rule create -g mygroup -s myserver -n myrule --start-ip-address 1.2.3.4 --end-ip-address 5.6.7.8
Create a firewall rule that allows access from Azure services
az sql server firewall-rule create -g mygroup -s myserver -n myrule --start-ip-address 0.0.0.0 --end-ip-address 0.0.0.0
Required Parameters
The name of the firewall rule.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure SQL Server. You can configure the default using az configure --defaults sql-server=<name>
.
Optional Parameters
The end IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' to represent all Azure-internal IP addresses.
The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' to represent all Azure-internal IP addresses.
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 server firewall-rule delete
Deletes a firewall rule.
az sql server firewall-rule delete [--ids]
[--name]
[--resource-group]
[--server]
[--subscription]
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.
The name of the firewall rule.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure SQL Server. You can configure the default using az configure --defaults sql-server=<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 server firewall-rule list
List a server's firewall rules.
az sql server firewall-rule list [--ids]
[--resource-group]
[--server]
[--subscription]
Examples
List a server's firewall rules
az sql server firewall-rule list -g mygroup -s myserver
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 resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure SQL Server. You can configure the default using az configure --defaults sql-server=<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 server firewall-rule show
Shows the details for a firewall rule.
az sql server firewall-rule show [--ids]
[--name]
[--resource-group]
[--server]
[--subscription]
Examples
Show a firewall rule
az sql server firewall-rule show -g mygroup -s myserver -n myrule
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.
The name of the firewall rule.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure SQL Server. You can configure the default using az configure --defaults sql-server=<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 server firewall-rule update
Update a firewall rule.
az sql server firewall-rule update [--end-ip-address]
[--ids]
[--name]
[--resource-group]
[--server]
[--start-ip-address]
[--subscription]
Examples
Update a firewall rule
az sql server firewall-rule update -g mygroup -s myserver -n myrule --start-ip-address 5.4.3.2 --end-ip-address 9.8.7.6
Optional Parameters
The end IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' to represent all Azure-internal IP addresses.
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.
The name of the firewall rule.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure SQL Server. You can configure the default using az configure --defaults sql-server=<name>
.
The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' to represent all Azure-internal IP addresses.
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.