[英]How to detect Azure Storage type using SDK?
I need to be able to detect the type of storage that a certain account offers. 我需要能够检测某个帐户提供的存储类型。 For example, if a user gives me their Storage Account and Key, I need to be able to detect whether or not it is a Premium LRS type of storage.
例如,如果用户向我提供了他们的存储帐户和密钥,我需要能够检测它是否是高级LRS类型的存储。 I have looked at the CloudStorageAccount class without any luck.
我没有运气就看过CloudStorageAccount类。 Does anyone know how I can detect this programatically?
有谁知道我如何以编程方式检测到这个?
You need to use Azure Management API's for this. 您需要使用Azure Management API。 Initialize StorageManagementClient object and "Get" a storage account from it.
初始化StorageManagementClient对象并从中“获取”存储帐户。 storageAccount.Properties.AccountType contains if the account is "Premium" or other
storageAccount.Properties.AccountType包含帐户是“Premium”还是其他帐户
Storage Nuget package for Management API is: Microsoft.WindowsAzure.Management.Storage (classic) or Microsoft.Azure.Management.Storage (v2/ARM) Management API的Storage Nuget包是: Microsoft.WindowsAzure.Management.Storage (经典)或Microsoft.Azure.Management.Storage (v2 / ARM)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.