az mysql flexible-server firewall-rule
管理服务器的防火墙规则。
命令
名称 | 说明 | 类型 | Status |
---|---|---|---|
az mysql flexible-server firewall-rule create |
为灵活服务器创建新的防火墙规则。 |
Core | GA |
az mysql flexible-server firewall-rule delete |
删除防火墙规则。 |
Core | GA |
az mysql flexible-server firewall-rule list |
列出灵活服务器的所有防火墙规则。 |
Core | GA |
az mysql flexible-server firewall-rule show |
获取防火墙规则的详细信息。 |
Core | GA |
az mysql flexible-server firewall-rule update |
更新防火墙规则。 |
Core | GA |
az mysql flexible-server firewall-rule create
为灵活服务器创建新的防火墙规则。
az mysql flexible-server firewall-rule create --name
--resource-group
[--end-ip-address]
[--rule-name]
[--start-ip-address]
示例
创建允许来自特定 IP 地址的连接的防火墙规则。
az mysql flexible-server firewall-rule create --resource-group testGroup --name testserver --rule-name allowip --start-ip-address 107.46.14.221
创建允许来自 IP 地址范围的连接的防火墙规则。
az mysql flexible-server firewall-rule create --resource-group testGroup --name testserver --rule-name allowiprange --start-ip-address 107.46.14.0 --end-ip-address 107.46.14.221
创建允许连接到所有 Azure 服务的防火墙规则
az mysql flexible-server firewall-rule create --resource-group testGroup --name testserver --start-ip-address 0.0.0.0
必需参数
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
防火墙规则的结束 IP 地址。 必须是 IPv4 格式。 使用值“0.0.0.0”来表示所有 Azure 内部 IP 地址。
防火墙规则的名称。 如果省略名称,将为防火墙名称选择默认名称。 防火墙规则名称只能包含 0-9、a-z、A-Z、“-”和“_”。 此外,防火墙规则的名称必须至少为 1 个字符,长度不超过 80 个字符。
防火墙规则的起始 IP 地址。 必须是 IPv4 格式。 使用值“0.0.0.0”来表示所有 Azure 内部 IP 地址。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql flexible-server firewall-rule delete
删除防火墙规则。
az mysql flexible-server firewall-rule delete [--ids]
[--name]
[--resource-group]
[--rule-name]
[--subscription]
[--yes]
示例
删除防火墙规则。
az mysql flexible-server firewall-rule delete --rule-name testRule --resource-group testGroup --name testserver
在不确认的情况下删除防火墙规则。
az mysql flexible-server firewall-rule delete --rule-name testRule --resource-group testGroup --name testserver --yes
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
防火墙规则的名称。 如果省略名称,将为防火墙名称选择默认名称。 防火墙规则名称只能包含 0-9、a-z、A-Z、“-”和“_”。 此外,防火墙规则的名称必须至少为 1 个字符,长度不超过 80 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
不要提示确认。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql flexible-server firewall-rule list
列出灵活服务器的所有防火墙规则。
az mysql flexible-server firewall-rule list --name
--resource-group
示例
列出灵活服务器的所有防火墙规则。
az mysql flexible-server firewall-rule list --resource-group testGroup --name testserver
以表格式列出灵活服务器的所有防火墙规则。
az mysql flexible-server firewall-rule list --resource-group testGroup --name testserver --output table
必需参数
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql flexible-server firewall-rule show
获取防火墙规则的详细信息。
az mysql flexible-server firewall-rule show [--ids]
[--name]
[--resource-group]
[--rule-name]
[--subscription]
示例
获取防火墙规则的详细信息。
az mysql flexible-server firewall-rule show --rule-name testRule --resource-group testGroup --name testserver
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
防火墙规则的名称。 如果省略名称,将为防火墙名称选择默认名称。 防火墙规则名称只能包含 0-9、a-z、A-Z、“-”和“_”。 此外,防火墙规则的名称必须至少为 1 个字符,长度不超过 80 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql flexible-server firewall-rule update
更新防火墙规则。
az mysql flexible-server firewall-rule update [--add]
[--end-ip-address]
[--force-string]
[--ids]
[--name]
[--remove]
[--resource-group]
[--rule-name]
[--set]
[--start-ip-address]
[--subscription]
示例
更新防火墙规则的起始 IP 地址。
az mysql flexible-server firewall-rule update --resource-group testGroup --name testserver \ --rule-name allowiprange --start-ip-address 107.46.14.1
更新防火墙规则的开始和结束 IP 地址。
az mysql flexible-server firewall-rule update --resource-group testGroup --name testserver \ --rule-name allowiprange --start-ip-address 107.46.14.2 --end-ip-address 107.46.14.218
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>
。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
防火墙规则的结束 IP 地址。 必须是 IPv4 格式。 使用值“0.0.0.0”来表示所有 Azure 内部 IP 地址。
使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | False |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
从列表中删除属性或元素。 示例: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
防火墙规则的名称。 如果省略名称,将为防火墙名称选择默认名称。 防火墙规则名称只能包含 0-9、a-z、A-Z、“-”和“_”。 此外,防火墙规则的名称必须至少为 1 个字符,长度不超过 80 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>
。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
防火墙规则的起始 IP 地址。 必须是 IPv4 格式。 使用值“0.0.0.0”来表示所有 Azure 内部 IP 地址。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |