【发布时间】:2020-07-26 18:17:58
【问题描述】:
有没有办法为上传到 azure blob 容器的块 blob 设置生存时间属性?我正在使用 azure 存储客户端库中的 this method 来上传 blob。
我有机会在 azure 门户上尝试 lifecycle management 选项。
我更愿意从应用程序中设置 ttl 属性,因为在更高的环境中,我可能无法访问 azure 门户。此外,我们需要根据需要动态修改 ttl。
Can this option be considered to set the ttl programmatically?我试过这个选项cloudBlockBlob.getProperties().setCacheControl("max-age=70"); // 70 seconds after upload
但它没有过期。
提前致谢!
【问题讨论】:
标签: azure azure-storage azure-blob-storage