[英]run azure cli against a specific storage account
我正在尝试运行以下az storage cli命令来添加CORS设置:
az storage cors --account-name mystorage --origins '*' --methods GET,POST,PUT --allowed-headers 'Accept-Ranges,Content-Encoding,Content-Length,Content-Type,Range,Authorization,x-ms-blob-content-type,x-ms-blob-type,x-ms-version' --exposed-headers 'Accept-Ranges,Content-Range,Content-Encoding,Content-Length,Content-Type' --max-age 86400 --services blob
但是我得到以下错误:
az storage cors:'mystorage'不在'az storage cors'命令组中。 请参阅“ az storage cors --help”。
您忘记了包括操作类型(在这种情况下add
)。 请尝试以下操作:
az storage cors add --account-name my storage --origins '*' --methods GET POST PUT --allowed-headers 'Accept-Ranges,Content-Encoding,Content-Length,Content-Type,Range,Authorization,x-ms-blob-content-type,x-ms-blob-type,x-ms-version' --exposed-headers 'Accept-Ranges,Content-Range,Content-Encoding,Content-Length,Content-Type' --max-age 86400 --services b
我在您的命令中注意到了两点:
--methods GET POST PUT
而不是method GET,POST,PUT
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.