jpskill.com
💼 ビジネス コミュニティ

azure-cli

Microsoft Azureのリソースをコマンドラインから操作し、仮想マシンの作成、ストレージ管理、関数デプロイ、リソースグループ設定、Azureの自動化など、様々なAzure関連業務を効率的に実行するSkill。

📜 元の英語説明(参考)

Azure Command Line Interface for managing Microsoft Azure resources. Use when the user needs to create VMs, manage storage accounts, deploy functions, configure resource groups, and automate Azure operations from the terminal.

🇯🇵 日本人クリエイター向け解説

一言でいうと

Microsoft Azureのリソースをコマンドラインから操作し、仮想マシンの作成、ストレージ管理、関数デプロイ、リソースグループ設定、Azureの自動化など、様々なAzure関連業務を効率的に実行するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o azure-cli.zip https://jpskill.com/download/14676.zip && unzip -o azure-cli.zip && rm azure-cli.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/14676.zip -OutFile "$d\azure-cli.zip"; Expand-Archive "$d\azure-cli.zip" -DestinationPath $d -Force; ri "$d\azure-cli.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して azure-cli.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → azure-cli フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Azure CLI

Azure CLI (az) は、ターミナルから Azure リソースとサービスを管理します。

セットアップ

# Azure CLI のインストール
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

# ログインとサブスクリプションの設定
az login
az account set --subscription "My Subscription"
az account show

# デフォルトの設定
az configure --defaults location=eastus group=my-resource-group

リソースグループ

# リソースグループの管理
az group create --name my-rg --location eastus --tags Environment=production
az group list --output table
az group delete --name my-rg --yes --no-wait

仮想マシン

# VM の作成
az vm create \
  --resource-group my-rg \
  --name web-vm \
  --image Ubuntu2204 \
  --size Standard_B2s \
  --admin-username azureuser \
  --generate-ssh-keys \
  --public-ip-sku Standard \
  --vnet-name my-vnet --subnet default \
  --nsg my-nsg \
  --tags Environment=production Role=web

# VM の一覧表示
az vm list -g my-rg \
  --query "[].{Name:name,Size:hardwareProfile.vmSize,State:powerState}" -o table

# VM の状態管理
az vm stop -g my-rg -n web-vm
az vm start -g my-rg -n web-vm
az vm deallocate -g my-rg -n web-vm
az vm delete -g my-rg -n web-vm --yes

# ポートの開放
az vm open-port -g my-rg -n web-vm --port 443 --priority 100

# VM への SSH 接続
az ssh vm -g my-rg -n web-vm

ストレージ

# ストレージアカウントとコンテナーの作成
az storage account create \
  --name mystorageacct \
  --resource-group my-rg \
  --location eastus \
  --sku Standard_LRS \
  --encryption-services blob \
  --min-tls-version TLS1_2

az storage container create \
  --name mycontainer \
  --account-name mystorageacct \
  --auth-mode login

# アップロードとダウンロード
az storage blob upload \
  --account-name mystorageacct \
  --container-name mycontainer \
  --file ./data.json --name data.json

az storage blob download \
  --account-name mystorageacct \
  --container-name mycontainer \
  --name data.json --file ./downloaded.json

# BLOB の一覧表示
az storage blob list \
  --account-name mystorageacct \
  --container-name mycontainer -o table

# SAS トークンの生成
az storage blob generate-sas \
  --account-name mystorageacct \
  --container-name mycontainer \
  --name data.json \
  --permissions r --expiry 2024-12-31

Azure Functions

# Function App の作成
az functionapp create \
  --resource-group my-rg \
  --name my-func-app \
  --consumption-plan-location eastus \
  --runtime python --runtime-version 3.11 \
  --functions-version 4 \
  --storage-account mystorageacct \
  --os-type Linux

# 関数コードのデプロイ
func azure functionapp publish my-func-app

# アプリケーション設定
az functionapp config appsettings set \
  --name my-func-app -g my-rg \
  --settings "DB_HOST=mydb.postgres.database.azure.com" "ENV=production"

# ログの表示
az functionapp log tail --name my-func-app -g my-rg

AKS (Kubernetes)

# AKS クラスターの作成
az aks create \
  --resource-group my-rg \
  --name my-aks \
  --node-count 3 \
  --node-vm-size Standard_DS2_v2 \
  --enable-managed-identity \
  --generate-ssh-keys

# 資格情報の取得
az aks get-credentials -g my-rg -n my-aks

# ノードプールのスケール
az aks scale -g my-rg -n my-aks --node-count 5

# オートスケーラーの有効化
az aks update -g my-rg -n my-aks \
  --enable-cluster-autoscaler --min-count 1 --max-count 10

ネットワーク

# VNet とサブネットの作成
az network vnet create \
  --resource-group my-rg \
  --name my-vnet \
  --address-prefix 10.0.0.0/16 \
  --subnet-name default --subnet-prefix 10.0.1.0/24

# ネットワークセキュリティグループ
az network nsg create -g my-rg -n my-nsg
az network nsg rule create -g my-rg --nsg-name my-nsg \
  -n allow-https --priority 100 \
  --destination-port-ranges 443 --access Allow --protocol Tcp

役立つパターン

# JMESPath を使用したクエリ
az vm list -g my-rg --query "[?powerState=='VM running'].name" -o tsv

# 既存のリソースから ARM テンプレートをエクスポート
az group export -g my-rg > template.json

# コスト分析
az consumption usage list --start-date 2024-01-01 --end-date 2024-01-31

# モニターとアラート
az monitor metrics list --resource /subscriptions/.../my-vm \
  --metric "Percentage CPU" --interval PT1H
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Azure CLI

The Azure CLI (az) manages Azure resources and services from the terminal.

Setup

# Install Azure CLI
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

# Login and set subscription
az login
az account set --subscription "My Subscription"
az account show

# Configure defaults
az configure --defaults location=eastus group=my-resource-group

Resource Groups

# Resource group management
az group create --name my-rg --location eastus --tags Environment=production
az group list --output table
az group delete --name my-rg --yes --no-wait

Virtual Machines

# Create a VM
az vm create \
  --resource-group my-rg \
  --name web-vm \
  --image Ubuntu2204 \
  --size Standard_B2s \
  --admin-username azureuser \
  --generate-ssh-keys \
  --public-ip-sku Standard \
  --vnet-name my-vnet --subnet default \
  --nsg my-nsg \
  --tags Environment=production Role=web

# List VMs
az vm list -g my-rg \
  --query "[].{Name:name,Size:hardwareProfile.vmSize,State:powerState}" -o table

# Manage VM state
az vm stop -g my-rg -n web-vm
az vm start -g my-rg -n web-vm
az vm deallocate -g my-rg -n web-vm
az vm delete -g my-rg -n web-vm --yes

# Open port
az vm open-port -g my-rg -n web-vm --port 443 --priority 100

# SSH into VM
az ssh vm -g my-rg -n web-vm

Storage

# Create storage account and container
az storage account create \
  --name mystorageacct \
  --resource-group my-rg \
  --location eastus \
  --sku Standard_LRS \
  --encryption-services blob \
  --min-tls-version TLS1_2

az storage container create \
  --name mycontainer \
  --account-name mystorageacct \
  --auth-mode login

# Upload and download
az storage blob upload \
  --account-name mystorageacct \
  --container-name mycontainer \
  --file ./data.json --name data.json

az storage blob download \
  --account-name mystorageacct \
  --container-name mycontainer \
  --name data.json --file ./downloaded.json

# List blobs
az storage blob list \
  --account-name mystorageacct \
  --container-name mycontainer -o table

# Generate SAS token
az storage blob generate-sas \
  --account-name mystorageacct \
  --container-name mycontainer \
  --name data.json \
  --permissions r --expiry 2024-12-31

Azure Functions

# Create Function App
az functionapp create \
  --resource-group my-rg \
  --name my-func-app \
  --consumption-plan-location eastus \
  --runtime python --runtime-version 3.11 \
  --functions-version 4 \
  --storage-account mystorageacct \
  --os-type Linux

# Deploy function code
func azure functionapp publish my-func-app

# App settings
az functionapp config appsettings set \
  --name my-func-app -g my-rg \
  --settings "DB_HOST=mydb.postgres.database.azure.com" "ENV=production"

# View logs
az functionapp log tail --name my-func-app -g my-rg

AKS (Kubernetes)

# Create AKS cluster
az aks create \
  --resource-group my-rg \
  --name my-aks \
  --node-count 3 \
  --node-vm-size Standard_DS2_v2 \
  --enable-managed-identity \
  --generate-ssh-keys

# Get credentials
az aks get-credentials -g my-rg -n my-aks

# Scale node pool
az aks scale -g my-rg -n my-aks --node-count 5

# Enable autoscaler
az aks update -g my-rg -n my-aks \
  --enable-cluster-autoscaler --min-count 1 --max-count 10

Networking

# Create VNet and subnet
az network vnet create \
  --resource-group my-rg \
  --name my-vnet \
  --address-prefix 10.0.0.0/16 \
  --subnet-name default --subnet-prefix 10.0.1.0/24

# Network Security Group
az network nsg create -g my-rg -n my-nsg
az network nsg rule create -g my-rg --nsg-name my-nsg \
  -n allow-https --priority 100 \
  --destination-port-ranges 443 --access Allow --protocol Tcp

Useful Patterns

# Query with JMESPath
az vm list -g my-rg --query "[?powerState=='VM running'].name" -o tsv

# Export ARM template from existing resources
az group export -g my-rg > template.json

# Cost analysis
az consumption usage list --start-date 2024-01-01 --end-date 2024-01-31

# Monitor and alerts
az monitor metrics list --resource /subscriptions/.../my-vm \
  --metric "Percentage CPU" --interval PT1H