c# - Azure 表 GetSharedAccessSignature endPartitionKey 参数

标签 c# azure azure-table-storage azure-sdk-.net

在 Azure SDK for .NET 中,有一个 GetSharedAccessSignature返回表的共享访问签名:

public string GetSharedAccessSignature( 
  Microsoft.WindowsAzure.Storage.Table.SharedAccessTablePolicy policy, 
  string accessPolicyIdentifier, 
  string startPartitionKey, 
  string startRowKey, 
  string endPartitionKey, 
  string endRowKey);

我很好奇 endPartitionKey 参数的含义是什么?我读到,如果您不设置它,所有后续分区都会受到影响。但这些后续分区是什么?

最佳答案

Im curious about what does the endPartitionKey parameter means?

参数(startPartitionKey,startRowKey,endPartitionKey,endRowKey)允许我们指定从(start PK,start RK)到(end PK,end RK)的行范围。

例如,我有一个 6 行的表,如下所示。

enter image description here

如果我使用以下代码获得 SAS。我们可以使用这个SAS来访问PartitionKey值必须大于P3且小于P4的行。

string sas = table.GetSharedAccessSignature(policy, null, "P3", null, "P4", null);

I read about that if you not set it, all subsequent partitions are affected.

如果我们不设置end PartitionKey参数,则所有PartitionKey值大于P3的行都可以使用返回SAS来访问。

string sas = table.GetSharedAccessSignature(policy, null, "P3", null, null, null);

关于c# - Azure 表 GetSharedAccessSignature endPartitionKey 参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44026893/

相关文章:

powershell - Azure DSC - 执行 PS 脚本

azure - 如何链接 Azure 数据工厂管道

mongodb - Azure 数据工厂中的条件映射

c# - Windows 10 Iot/UWP 上的 Azure 存储库客户端?

c# - 如何辨别ListBox及其ScrollBar中的鼠标事件

C# ListView鼠标滚轮无焦点滚动

r - Azure ML无法找到时间序列函数

rest - 似乎无法找到使用 Azure Messaging 推送通知的方法

c# - 为什么我们要将 ClassInterface 属性应用于类?

C# 9 - 如何使用反射调用默认接口(interface)方法?