如何使用 azure cli 更新 redis 缓存的“enableNonSslPort”字段?

问题描述

我尝试使用以下命令将名为“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}]

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...