azure - 如何获取 Azure 存储加密状态
问题描述
我正在尝试从命令行或以编程方式获取 Azure 存储的加密状态,但找不到任何相关的 cmdlet(https://docs.microsoft.com/en-us/powershell/module/azure.storage/get-azurestorageserviceproperty?view= azurermps-6.13.0)。我可以像这样从门户网站手动检查
是否可以通过任何命令行进行检查,或者我们只能通过门户进行检查?
解决方案
你可以使用下面的命令,确保你已经安装了Az
模块。
(Get-AzResource -ResourceGroupName <group-name> -ResourceType Microsoft.Storage/storageAccounts -Name <storageaccount-name>).Properties.encryption | ConvertTo-Json
如果Encryption type
是Microsoft-managed keys
,keySource
将是Microsoft.Storage
。
如果Encryption type
is Customer-managed keys
,keySource
will be Microsoft.Keyvault
,keyvaultproperties
将包括您配置的 keyvault 密钥的属性。
推荐阅读
- deserialization - 如何使用 Spring Cloud Stream 编写通用反序列化器?(Batch-Consumer)
- google-apps-script - 是否可以使用 Google Apps 脚本将文档另存为 epub?
- codenameone - 调查 Codename One iOS 应用程序上的 Java.Lang.NullPointerException
- android - 应用程序意外关闭 - Kotlin
- html - HTML 数据列表数组
- javascript - 如何在 ReactJS 中使用 clearInteval 让计时器自行清除?
- api - 如何在 asp.net core 和 javascript 中使用 API
- java - glassfish 4.1 类 org.springframework.beans.factory.BeanCreationException
- node.js - 纱线添加命令返回 http 405
- hyperledger-fabric - ERRO 001 无法运行对等体,因为无法初始化加密