0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Azure AI Services リソースを即座に削除する

Last updated at Posted at 2025-05-14

Azure AI Services が削除できなくて詰まったので、その対処方法のまとめ

Azure AI Services のリソース名の制約

少し本題から外れるが、先に Azure AI Services のリソース名の制約について書く。

Azure AI Services (Azure Cognitive Services) は、Microsoft Azure における AI 系サービスの総称である。

Azure CLI を使うとその一覧が確認できる。(Azure Portal 上では Azure AI Search なども Azure AI Services の一種という扱いになっているが、このリストには入っていないようだ。そのへんはよくわからない。)

$ az cognitiveservices account list-kinds
[
  "AIServices",
  "AnomalyDetector",
  "CognitiveServices",
  "ComputerVision",
  "ContentModerator",
  "ContentSafety",
  "ConversationalLanguageUnderstanding",
  "CustomVision.Prediction",
  "CustomVision.Training",
  "Face",
  "FormRecognizer",
  "HealthInsights",
  "ImmersiveReader",
  "Internal.AllInOne",
  "LUIS.Authoring",
  "LanguageAuthoring",
  "MetricsAdvisor",
  "OpenAI",
  "Personalizer",
  "QnAMaker.v2",
  "SpeechServices",
  "TextAnalytics",
  "TextTranslation"
]

Azure AI Services には厄介な成約があって、同一リソースグループ内では Azure AI Services リソース名は重複できない。

例えば、既に myproject という名前で Computer Vision リソースが作成されている場合、myproject という名前の Azure OpenAI リソースを新規作成することができない。作成しようとしても 指定された名前が既に使用されています。別の名前を選択してください。 (UpdateKindNotAllowed) It's not allowed to update kind of API account. などとエラーが出る。

そのため、同一リソースグループで複数の Azure AI Services リソースを作成したい場合は cv-myproject aoai-myproject のようにリソース名を分ける必要がある。

リソース削除後の制約

何らかの事情で、どうしても myproject という名前で Computer Vision リソースを作成したいが、既に同名の Azure OpenAI リソースが存在していて困っているとする。この場合は既存の Azure OpenAI リソース myproject を削除すれば同名の Computer Vision リソースが作成できるようになる。

ただし削除してから48時間待つ必要がある。 どうやら Azure AI Services での削除はあくまで論理削除であって、48時間の猶予のあとで物理削除されるらしい。

48時間を待たずに物理削除する方法

論理削除したあと、リソースの purge を行うと48時間を待たずして物理削除することができる。1

Azure Portal だと「削除されたリソースの管理」から purge できる。

image.png

また、Azure CLI でも purge できる。

$ az cognitiveservices account purge \
    --subscription aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa \
    --resource-group myproject \
    --name myproject \
    --location japaneast
  1. 削除された Azure AI サービス リソースの復旧または消去 - Azure AI services | Microsoft Learn

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?