[英]how to delete blob storage container azure NodeJS
I am trying to delete a whole blob storage container with Azure-storage-node 我正在尝试使用Azure-storage-node删除整个blob存储容器
But I cannot seem to find anywhere how to do this. 但是我似乎找不到任何方法。 There is a lot of information about how to do this for blobs.
有关如何对Blob执行此操作的信息很多。 But in my case I need to delete the whole container.
但就我而言,我需要删除整个容器。 I am working on a NodeJS server.
我正在使用NodeJS服务器。 Any help would be appreciated.
任何帮助,将不胜感激。
The function you would want to call is deleteContainer
or deleteContainerIfExists
. 您要调用的函数是
deleteContainer
或deleteContainerIfExists
。 This would delete an entire container. 这将删除整个容器。
var blobSvc = azure.createBlobService();
blobSvc.deleteContainerIfExists('mycontainer', function(error, result, response){
if(!error){
console.log('container deleted!')
}
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.