由于 Azure 存储帐户上的静态网站功能不再处于预览模式,是否可以通过编程方式设置此选项(通过 Powershell Az 命令/Azure CLI)?
目前我能看到的唯一方法是在 UI 中手动执行此操作:
最佳答案
根据文档:
https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website
您可以使用 CLI
az storage blob service-properties update --account-name <ACCOUNT_NAME> --static-website --404-document <ERROR_DOCUMENT_NAME> --index-document <INDEX_DOCUMENT_NAME>
关于azure - 以编程方式在 Azure 存储上启用静态网站,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54824398/