将标记与 Azure 存储列表 Blob 结合使用

Using marker with Azure Storage List Blobs

基于此处提到的 List Blobs for Azure 存储的文档:- https://msdn.microsoft.com/en-us/library/azure/dd135734.aspx

我正在尝试使用 Accessing Azure blob storage using bash, curl

中提到的 shell 脚本列出容器中的 blob

shell 脚本工作正常,因为它生成了正确的签名。

但是,如果 blob 太多而无法列出,则响应包含 NextMarker 元素。

REST API 文档提到标记值可用于后续调用以请求下一组列表项。

此标记是否需要包含在 string_to_sign 中,或者仅将其包含在 URL 中是否可以正常工作?

Does this marker needs to be included in the string_to_sign or would it work fine by just including it in the URL ?

是的,此标记需要包含在 string_to_sign 中。

来自 Authentication for the Azure Storage Services(部分:Constructing the Canonicalized Resource String):

Retrieve all query parameters on the resource URI, including the comp parameter if it exists.

Convert all parameter names to lowercase. Sort the query parameters lexicographically by parameter name, in ascending order.

URL-decode each query parameter name and value. Append each query parameter name and value to the string in the following format, making sure to include the colon (:) between the name and the value:

由于此 next_marker 参数作为查询字符串参数传递,因此它也必须包含在签名计算中。