在 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 行的表,如下所示。
如果我使用以下代码获得 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/