azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

How to set expiry of a blob?

Open anandchugh opened this issue 6 years ago • 6 comments

We have a requirement to delete the blobs after certain time interval(lets say 2 days). I am not able to see any settings like this. In azure queue we use similar functionality by setting time_to_live while pushing an item in queue. Is there a way to perform similare operation while uploading a blob or set time to live for all blobs at container level.

anandchugh avatar May 28 '20 06:05 anandchugh

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

ghost avatar May 28 '20 15:05 ghost

Hi @anandchugh, Deletion (part of lifecycle management) is supported through management plane operations, https://docs.microsoft.com/en-us/rest/api/storagerp/managementpolicies/delete is the REST API for it. @vinjiang are you aware of any management plane SDK for it?

amishra-dev avatar May 29 '20 04:05 amishra-dev

Hi @anandchugh, Deletion (part of lifecycle management) is supported through management plane operations, https://docs.microsoft.com/en-us/rest/api/storagerp/managementpolicies/delete is the REST API for it. @vinjiang are you aware of any management plane SDK for it?

Is it possible to add policy while creating container vis sdk?

anandchugh avatar May 29 '20 06:05 anandchugh

Hi @anandchugh

Currently it's impossible to add the policy via SDK, while we will discuss with service side to see if they can enable this in the future

xiafu-msft avatar Jun 08 '20 22:06 xiafu-msft

Hi @anandchugh. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

ghost avatar Dec 15 '21 08:12 ghost

Hi @anandchugh, since you haven’t asked that we “/unresolve” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve” to reopen the issue.

ghost avatar Dec 22 '21 10:12 ghost