0
0

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: az ml environment list が効かないと思ったら、そもそもサブスク単位っていう基本を知らなかった話

Posted at

背景

Azure 触り始めたころの、今となっては懐かしい恥ずかしい思い出

実際に起きた現象

  • Azure ML の環境一覧表示コマンドが動かない。動くサブスクのもある。 :thinking:

動かない

az ml environment list --resource-group {rg-unavailable} --workspace-name {ws-unavailable}

動く

az ml environment list --resource-group {rg-available} --workspace-name {ws-available}

この当時、サブスクを超えてコマンド実行できると考えていた・・

原因

  1. コマンドの実行対象サブスクという概念がある :sweat_smile:
    • 裏を返せば、実行対象でないサブスクに対しては、はコマンド実行できない
      サブスクは課金単位なので、その境界を越えてコマンド実行は出来ない
  2. ml environment なら、--subscription オプションで指定出来たが指定していなかった。

対処

デフォルトサブスクを切り替える

  1. 一覧表示
    az account list
  2. デフォルト指定
    az account set -s {target subscription}

--subscription オプション で実行対象を指定する

あとがき

subscription - resource group という概念があったつもりだが、
scope を意識していなかった為に、resource group を指定していれば subscription を超えられる、と勝手な思い込みをしていたのが失敗だったかな、と今は思う。

以下、スコープを意識出来ていればたぶん大丈夫。

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?