Azure/CLI
提供: 初心者エンジニアの簡易メモ
インストール
macの場合
brew update && brew install azure-cli
公式:https://docs.microsoft.com/ja-jp/cli/azure/install-azure-cli
login
az login
ブラウザに飛び、ログインが成功すると、以下メッセージが帰ってくる
The default web browser has been opened at https://login.microsoftonline.com/common/oauth2/authorize. Please continue the login in the web browser. If no web browser is available or if the web browser fails to open, use device code flow with `az login --use-device-code`. You have logged in. Now let us find all the subscriptions to which you have access... The following tenants don't contain accessible subscriptions. Use 'az login --allow-no-subscriptions' to have tenant level access. 61e87b26-c760-xxxx-xxxx-xxxxxxxxxxxxx '既定のディレクトリ' f18370bf-eaa5-xxxx-xxxx-xxxxxxxxxxxxx '株式会社aaa' [ { "cloudName": "AzureCloud", "homeTenantId": "850d80c1-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "id": "63f0dcef-7f0f-4e3a-b911-xxxxxxxxxxxxx", "isDefault": true, "managedByTenants": [], "name": "dv_xxx_cloudconfig-virtual-event-service_azureplan", "state": "Enabled", "tenantId": "850d80c1-e9bd-4f94-a740-xxxxxxxxxxxx", "user": { "name": "hogehoge@example.com", "type": "user" } } ]
コンテナupload
az storage blob upload \ --account-name <storage-account> \ --container-name <container> \ --name helloworld \ --file helloworld \ --auth-mode login
公式:https://docs.microsoft.com/ja-jp/azure/storage/blobs/storage-quickstart-blobs-cli