使用Storage Services REST API获取存储帐户属性 [英] Getting Storage Account Properties using Storage Services REST API

查看:130
本文介绍了使用Storage Services REST API获取存储帐户属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过Storage Services中的API获取存储帐户的属性,特别是帐户类型-GPv1,GPv2或Blob存储?

Is there a way to get properties of a storage account, specifically the kind of account - GPv1, GPv2 or blob storage, through an API in Storage Services?

我遇到了 https://msdn.microsoft.com/zh-cn/library/azure/ee460802.aspx ,但如果可能的话,我想重新使用用于Blob服务API的SharedKey身份验证.

I came across https://msdn.microsoft.com/en-us/library/azure/ee460802.aspx but if possible, I would like to re-use the SharedKey authentication I use for the Blob Service APIs.

在此页面中, https://docs.microsoft.com/zh-cn/rest/api/storageservices/我发现了这一点:

In this page, https://docs.microsoft.com/en-us/rest/api/storageservices/ I found this:

对存储服务的所有访问都通过存储帐户进行.存储帐户是用于访问每个基本服务的名称空间的最高级别.它也是身份验证的基础.+ 用于存储服务的REST API将存储帐户公开为一种资源."

"All access to storage services takes place through the storage account. The storage account is the highest level of the namespace for accessing each of the fundamental services. It is also the basis for authentication.+ The REST APIs for storage services expose the storage account as a resource."

我将如何获取该资源的属性?我尝试将重新类型设置为存储帐户,类似于容器"和表",但是无法访问它.

How would I get properties of that resource? I played around with setting the restype to storage account, similar to "container" and "table", but could not access it.

推荐答案

在管理存储帐户时,有两个REST API:

When it comes to managing storage accounts, there are two REST APIs:

  1. 存储服务REST API :该API用于管理存储帐户中的数据.这利用了帐户名和访问密钥(也称为存储帐户密钥).您可以在此处找到有关此API的更多详细信息: https://docs.microsoft .com/en-us/rest/api/storageservices/.
  2. 存储资源提供程序(SRP)REST API :此API用于管理存储帐户.您可以使用此API创建,更新,删除存储帐户,重新生成帐户密钥并获取有关存储帐户本身的信息.这利用Azure AD进行身份验证和授权.您可以在此处找到有关此API的更多详细信息: https://docs.microsoft .com/en-us/rest/api/storagerp/.
  1. Storage Service REST API: This API is used to manage the data in the storage accounts. This makes use of account name and access key (also known as storage account key). You can find more details about this API here: https://docs.microsoft.com/en-us/rest/api/storageservices/.
  2. Storage Resource Provider (SRP) REST API: This API is used to manage storage accounts. You can use this API to create, update, delete storage accounts, regenerate account keys and get information about the storage account themselves. This makes use of Azure AD for authentication and authorization. You can find more details about this API here: https://docs.microsoft.com/en-us/rest/api/storagerp/.

现在问您一个问题,您实际上不能使用Storage Service REST API查找有关存储帐户类型的信息.您将需要使用Storage Resource Provider API来查找此信息.特别是,您将使用 Get Properties SRP API 来找到此信息.

Now coming to your question, you can't really use Storage Service REST API to find information about the type of storage account. You would need to use Storage Resource Provider API to find this information. In particular you will be consuming Get Properties SRP API to find this information.

这篇关于使用Storage Services REST API获取存储帐户属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆