问题描述
我尝试使用以下命令将名为“emp”的 redis 缓存的 enableNonSslPort 字段更新为 true,其中“group1”具有资源组。
az redis update --name 'emp' --resource-group 'group1' --enableNonSslPort 'true'
我遇到了错误, 试试这个:'az redis update --name --resource-group --vm-size '
解决方法
这是因为 az redis update cmdlet 没有启用/禁用非 SSL 端口的选项:
az redis update [--add]
[--force-string]
[--ids]
[--name]
[--remove]
[--resource-group]
[--set]
[--sku {Basic,Premium,Standard}]
[--subscription]
[--vm-size {c0,c1,c2,c3,c4,c5,c6,p1,p2,p3,p4,p5}]
您可以使用 az create 命令执行此操作(您无法使用 CLI 更新 Azure Redis 缓存的非 SSL 端口设置):
az redis create --location
--name
--resource-group
--sku {Basic,Standard}
--vm-size {c0,p5}
[--enable-non-ssl-port]
[--minimum-tls-version {1.0,1.1,1.2}]
[--redis-configuration]
[--replicas-per-master]
[--shard-count]
[--static-ip]
[--subnet-id]
[--subscription]
[--tags]
[--tenant-settings]
[--zones {1,2,3}]