azure - Azure 存储 blob - ConditionNotMet
问题描述
我试图从 azure storage (az cli) 下载 blob,但我有这个。有人可以知道如何解决吗?
ErrorCode: ConditionNotMet
<?xml version="1.0" encoding="utf-8"?><Error><Code>ConditionNotMet</Code><Message>The condition specified using HTTP conditional header(s) is not met.
RequestId:8nnpca91-201e-011p-7n9e-b1a77b000900
Time:2020-11-23T11:48:11.4500961Z</Message></Error>
解决方案
在不知道您尝试运行的确切命令的情况下,我无法重现您的问题,但这里是az storage blob download命令的基本语法以及一个有效的示例:
az storage blob download --container-name <storage-account-container-name> --file <file-path-to-write-out-to> --name <blob-name> --account-name <storage-account-name> --account-key <storage-account-access-key>
例子:
$ az storage blob download --container-name testbkp --file backup1.log --name backup1.log --account-name myStorageAccount --account-key r+nHfm5ZZxf9r4TueZ7bmkVFwO8cBi+wmq/9g==
Finished[#############################################################] 100.0000%
{
"content": null,
"deleted": false,
"metadata": {},
"name": "backup1.log",
"properties": {
"appendBlobCommittedBlockCount": null,
"blobTier": null,
"blobTierChangeTime": null,
"blobTierInferred": false,
"blobType": "BlockBlob",
"contentLength": 503,
"contentRange": "bytes 0-502/503",
"contentSettings": {
"cacheControl": null,
"contentDisposition": null,
"contentEncoding": null,
"contentLanguage": null,
"contentMd5": "b8Lzmr+LfkdoZaPujOqVlg==",
"contentType": "application/octet-stream"
},
"copy": {
"completionTime": null,
"id": null,
"progress": null,
"source": null,
"status": null,
"statusDescription": null
},
"creationTime": "2020-10-11T16:23:35+00:00",
"deletedTime": null,
"etag": "\"0x8D86E0100F405DC\"",
"lastModified": "2020-10-11T16:23:35+00:00",
"lease": {
"duration": null,
"state": "available",
"status": "unlocked"
},
"pageBlobSequenceNumber": null,
"remainingRetentionDays": null,
"serverEncrypted": true
},
"snapshot": null
}
请注意,您传递给帐户的参数名称区分大小写。如果您使用最新版本的 Azure CLI(截至今天为2.15.1 )仍然遇到问题,您也可以从Azure Cloud Shell尝试一下。
推荐阅读
- c# - chrome混合内容和ERR_TOO_MANY_REDIRECTS错误
- node.js - 错误 [ERR_REQUIRE_ESM] - Husky,lint-staged,eslint - nodeJS:
- javascript - 如何在反应中使用 axios 发出 POST 请求?
- reactjs - React Navigation:TypeError:未定义不是对象(评估'navigation.navigate')问题
- node.js - 当我尝试发送输出数据时,Node.Js 代码返回 [object Promise]
- cpanel - 云共享 Linux 托管的最佳限制是什么?
- inheritance - 如何将属性和行为添加到已编写的类
- python - 文件对话框选择图像路径并使用 python 文件 .py 使用该路径运行
- php - 来自 Postman 或应用程序的 API 调用的 502 Bad gateway 问题
- c - 参数如何在 C 中工作 - 以字符串作为参数运行函数