azure - 使用已删除的名称创建 Azure API 管理会导致名称 "already in use"错误

标签 azure azure-api-management

我之前使用 Terraform 创建并随后删除了 Azure API 管理服务。它消失在Azure Portal中。几个小时后,当我尝试使用相同名称重新创建 API 管理时,我在 Azure 门户中收到此错误: “名称已被使用。请选择其他名称。” 在 Terraform 中也遇到类似的错误。

有人知道为什么即使我在资源组中不再看到该名称,也无法重复使用该名称吗?

最佳答案

检查您的 APIM service have been soft deleted or not 是否。如果该资源已被软删除,而您想创建一个同名的新资源,则需要清除该资源,然后重新创建。

按名称获取软删除实例:

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}?api-version=2020-06-01-preview

列出给定订阅的所有软删除实例:

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/deletedservices?api-version=2020-06-01-preview

恢复已删除的 APIM 实例:

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.ApiManagement/service/{apimServiceName}?api-version=2020-06-01-preview

清除软删除的 APIM 实例:

DELETE https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}?api-version=2020-06-01-preview

关于azure - 使用已删除的名称创建 Azure API 管理会导致名称 "already in use"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65349024/

相关文章:

c# - 在 Controller 级别将自定义属性添加到遥测请求

asp.net - azure session 和应用程序池回收

c# - 对许多表使用与 Controller 相同的类

Azure API 管理 - 如何使用带有版本控制架构 "path"和版本标识符 "v1"的 powershell 添加 API

.net - Azure API 对于包含内容的 Db 调用返回 204 No Content

azure - "Public access is disabled. Please configure private endpoint.",即使为 Azure OpenAI 服务配置专用终结点

azure - 类型或命名空间 "BlobAttribute"未找到

APIM 的 Azure 托管身份 token 版本

Azure API 管理 - 命名值

Azure 门户 : API Management check client certificates