{
  "id": "cloud/azure-storage-blob-lease-expired-reason",
  "signature": "There is currently a lease on the blob and no lease ID was specified in the request.",
  "signature_zh": "Blob 上当前存在租约，且请求中未指定租约 ID。",
  "regex": "There is currently a lease on the blob and no lease ID was specified in the request",
  "domain": "cloud",
  "category": "protocol_error",
  "subcategory": null,
  "root_cause": "An operation (e.g., delete or overwrite) was attempted on an Azure Storage blob that has an active lease, but the request did not include the required lease ID header.",
  "root_cause_type": "generic",
  "root_cause_zh": "尝试对具有活动租约的 Azure 存储 Blob 执行操作（例如删除或覆盖），但请求未包含所需的租约 ID 标头。",
  "versions": [
    {
      "version": "Azure Storage REST API 2021-02-12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Azure SDK for .NET 12.18.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "AzCopy 10.21.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Breaking a lease requires knowing the lease ID or using a break period; another process may renew it.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The release action also requires the lease ID.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Include the lease ID in the request header: x-ms-lease-id: <lease-id>. Example using Azure CLI: az storage blob delete --account-name mystorageaccount --container-name mycontainer --name myblob --lease-id \"<lease-id>\"",
      "success_rate": 0.9,
      "how": "Include the lease ID in the request header: x-ms-lease-id: <lease-id>. Example using Azure CLI: az storage blob delete --account-name mystorageaccount --container-name mycontainer --name myblob --lease-id \"<lease-id>\"",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the lease ID is unknown, first break the lease without specifying a lease ID by using a break period of 0 seconds: az storage blob lease break --account-name mystorageaccount --container-name mycontainer --name myblob --lease-break-period 0",
      "success_rate": 0.85,
      "how": "If the lease ID is unknown, first break the lease without specifying a lease ID by using a break period of 0 seconds: az storage blob lease break --account-name mystorageaccount --container-name mycontainer --name myblob --lease-break-period 0",
      "condition": "",
      "sources": []
    },
    {
      "action": "For automated workflows, acquire a new lease before performing the operation: az storage blob lease acquire --lease-duration 60 --account-name mystorageaccount --container-name mycontainer --name myblob",
      "success_rate": 0.8,
      "how": "For automated workflows, acquire a new lease before performing the operation: az storage blob lease acquire --lease-duration 60 --account-name mystorageaccount --container-name mycontainer --name myblob",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在请求标头中包含租约 ID：x-ms-lease-id: <lease-id>。使用 Azure CLI 的示例：az storage blob delete --account-name mystorageaccount --container-name mycontainer --name myblob --lease-id \"<lease-id>\"",
    "如果租约 ID 未知，请先通过使用 0 秒的租约中断期来中断租约，而无需指定租约 ID：az storage blob lease break --account-name mystorageaccount --container-name mycontainer --name myblob --lease-break-period 0",
    "对于自动化工作流，在执行操作前获取新租约：az storage blob lease acquire --lease-duration 60 --account-name mystorageaccount --container-name mycontainer --name myblob"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob",
  "official_doc_section": null,
  "error_code": "409 Conflict",
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.88,
  "resolvable": "true",
  "first_seen": "2023-04-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}