【问题标题】:After a acquire a lease for a azure blob where do I find the release ID so I can release it?在获得 azure blob 的租约后,我在哪里可以找到发布 ID,以便我可以发布它?
【发布时间】:2020-04-07 13:30:55
【问题描述】:

按照 azure CLI 使用来自 Azure CLI doc 的文档,我可以获得我的 azure blob 文件的租约。 但是,要释放 blob,我需要租用 blob 的发布 ID。在哪里可以从 CLI 获取此 ID?

【问题讨论】:

    标签: azure locking azure-blob-storage


    【解决方案1】:

    在哪里可以从 CLI 获取此 ID?

    很遗憾,事后您无法获得租约 ID。租约 ID 不存储在系统中的任何位置。租约获取者有责任存储租约 ID。

    考虑到您没有租约 ID,因此您将无法释放租约。但是您可以做的是break the lease,这与释放租约相同,并且不需要租约ID。

    az storage blob lease break --blob-name
                                --container-name
                                [--account-key]
                                [--account-name]
                                [--auth-mode {key, login}]
                                [--connection-string]
                                [--if-match]
                                [--if-modified-since]
                                [--if-none-match]
                                [--if-unmodified-since]
                                [--lease-break-period]
                                [--only-show-errors]
                                [--sas-token]
                                [--subscription]
                                [--timeout]
    

    【讨论】:

    • 当您说存储租约 ID 是租约收购方的责任。我在哪里可以得到它以便存放它?
    • 获取租约时,应取回租约ID。
    猜你喜欢
    • 1970-01-01
    • 2020-12-11
    • 1970-01-01
    • 2014-07-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-06-15
    • 2013-09-03
    相关资源
    最近更新 更多