我可以对Azure存储进行API调用以告诉我是否已删除我的容器吗? [英] Is there an API call I can make to Azure Storage to tell if my container has been deleted?
问题描述
我想清除一个存储帐户,然后使用AzCopy将其恢复"到该帐户.
I want to clear a storage account then "restore" to it using AzCopy.
我清除了昨晚使用的存储空间
I clear last nights storage using
$ctx = New-AzureStorageContext -StorageAccountName $storage -StorageAccountKey $key
Get-AzureStorageContainer a* -Context $ctx | Remove-AzureStorageContainer -Force
$ctx = New-AzureStorageContext -StorageAccountName $storage -StorageAccountKey $key
Get-AzureStorageContainer a* -Context $ctx | Remove-AzureStorageContainer -Force
然后使用AzCopy但得到;
And then use AzCopy but get;
The remote server returned an error: (409) Conflict.
The specified container is being deleted. Try operation later.
The remote server returned an error: (409) Conflict.
The specified container is being deleted. Try operation later.
我不想循环,尝试再次创建存储.如何等待删除操作完成?
I don't want to loop, trying to create the storage again. How can I wait for the Remove operation to complete?
是否存在Get-AzureStorageContainer状态? 正在删除?"
Is there a Get-AzureStorageContainer status? "Deleting?"
推荐答案
错误消息不足以给您相同的行为.您可以自己编写该API.还是我想念什么?
Isn't the error message enough to give you the same behavior. You can write that API yourself. Or I'm missing something?
正在删除指定的容器.请稍后尝试操作."
"The specified container is being deleted. Try operation later."
这篇关于我可以对Azure存储进行API调用以告诉我是否已删除我的容器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!