简体   繁体   English

如何使用SDK检测Azure存储类型?

[英]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.

相关问题 如何使用 .NET 存储 SDK 列出 Azure 文件存储中根目录中的所有目录或文件? - How to list all the Directories or Files, from a root Directory, in Azure File Storage -and- using the .NET Storage SDK? 如何使用.net SDK(C#)创建Azure搜索索引器以从Azure Blob存储中提取数据 - How to create an Azure Search Indexer using .net SDK (c#) to pull data from Azure blob storage 如何使用 Azure.Storage v12 SDK 从 Azure Blob 中删除元数据? - How can I remove metadata from an Azure Blob using Azure.Storage v12 SDK? How to get Azure Storage Account Key (connectionString) using azure .net sdk or fluent API? - How to get Azure Storage Account Key (connectionString) using azure .net sdk or fluent API? 如何使用 Azure 存储 SDK 将 Azure 文件存储上的文件从一个子文件夹移动到另一个子文件夹? - How to move a file on Azure File Storage from one sub folder to another sub folder using the Azure Storage SDK? 如何使用新的 Azure 存储 SDK v12 打开可写 ZF7B44CFFAFD5C52223D5498196C8A2E7BZ 到新 Blob? - How can I open a writeable stream to a new Blob using the new Azure Storage SDK v12? 使用Python SDK通过RowKey和StartsWith筛选Azure表存储 - Filter Azure Table Storage by RowKey and StartsWith using the Python SDK 使用 C# SDK 定期刷新 Azure 存储帐户密钥 - Refresh Azure Storage Account Key Periodically using C# SDK 使用.NET SDK获取Azure Blob存储区域? - Get Azure Blob storage region using .NET SDK? 如何检测 azure 图表 SDK 中是否存在帐户? - How can I detect the existence of an account in azure Graph SDK?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM