是否可以为存储帐户中的所有容器获取单一共享访问签名?

Is it possible to get single shared access signature for all the container in storage account?

正如标题所说,我正在寻找一个 shared access signature 来访问存储帐户中存在的所有容器。

目前我必须分别为每个容器获取 shared access signature,以便为我试图避免的每个容器创建单独的 EXTERNAL DATA SOURCE

这可能吗?

是的,完全可以这样做。您需要做的是获取 Account Shared Access Signature (Account SAS).

根据帐户 SAS 中授予的权限,它将适用于该存储帐户中的所有 blob 容器(和 blob)。

您可以在此处了解有关 Account SAS 的更多信息:https://docs.microsoft.com/en-us/rest/api/storageservices/delegating-access-with-a-shared-access-signature

来自上面提到的link:

An account-level SAS, introduced with version 2015-04-05. The account SAS delegates access to resources in one or more of the storage services. All of the operations available via a service SAS are also available via an account SAS. Additionally, with the account SAS, you can delegate access to operations that apply to a given service, such as Get/Set Service Properties and Get Service Stats. You can also delegate access to read, write, and delete operations on blob containers, tables, queues, and file shares that are not permitted with a service SAS. See Constructing an Account SAS for more information about account SAS.