简体   繁体   English

需要将 Azure 存储帐户容器和 blob 访问级别更改为私有

[英]Need to change Azure Storage account containers and blob access levels to private

I need to change storage account container and blob access level to private.我需要将存储帐户容器和 blob 访问级别更改为私有。 I have more than 200 storage accounts and more than 1000 containers in my subscription.我的订阅中有 200 多个存储帐户和 1000 多个容器。

Please suggest quick solution to do the same.请建议快速解决方案来做同样的事情。

Thanks in advance提前致谢

The easiest way would be to loop over all containers using powershell and set the permission to off.最简单的方法是使用 powershell 遍历所有容器并将权限设置为关闭。

$ctx = New-AzureStorageContext -StorageAccountName <name> -StorageAccountKey <key>

Get-AzureStorageContainer -Context $ctx | Set-AzureStorageContainerAcl -Permission Off -PassThru

More info:更多信息:

https://docs.microsoft.com/en-us/powershell/module/azure.storage/set-azurestoragecontaineracl?view=azurermps-6.13.0#example-2--set-azure-storage-container-acl-by-using-the-pipeline https://docs.microsoft.com/en-us/powershell/module/azure.storage/set-azurestoragecontaineracl?view=azurermps-6.13.0#example-2--set-azure-storage-container-acl-by -使用管道

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 用于容器的 Azure webapp,无法将 azure blob 存储帐户附加到容器 - Azure webapp for containers,cant attach azure blob storage account to container 用于访问 Azure 存储中的私有 blob 的 URL - URL to access private blob in Azure Storage Azure如何将高级Blob存储更改为标准Blob存储帐户? - Azure how to change premium blob storage to standard blob storage account? 如何检查 Azure blob 是否存在于多个容器的存储帐户中的任何位置? - How to check if Azure blob exists anywhere in storage account in multiple containers? Azure blob存储:多个容器的共享访问签名? - Azure blob storage: Shared access signature for multiple containers? 使用在 PCF 中运行的容器的托管标识来访问 Azure Blob 存储 - Using Managed Identities for containers running in PCF to access Azure Blob Storage 使用新的 Azure.Storage.Blobs 时如何计算存储帐户中 Blob 存储容器的总大小 - How to calculate the total size of Blob storage containers in an storage account when using the new Azure.Storage.Blobs 从Azure数据工厂访问Azure Blob存储帐户 - Access Azure Blob storage account from azure data factory 需要在电子邮件中提供 azure 存储帐户中 blob 的链接 - Need to provide link of a blob in azure storage account in an email 如何从应用程序访问私有 azure blob 存储文件? - How to access private azure blob storage file from application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM