← Back to CLIs
Melvynx

az

Azure CLI - manage VMs, web apps, functions, storage, AKS, and other Azure services. Use when user mentions 'az', 'azure', or wants to interact with Microsoft Azure.

Install

$ npx api2cli install az

Details

Skill type: Official CLI
Auth type: bearer
Version: 1.0.0
Author: Melvynx
Views: 0

README

az

Setup

brew install azure-cli

Verify installation:

az --version

Use -o json for machine-readable output.

Authentication

az login

Resources

Account and Subscription

CommandDescription
az account showShow current subscription details
az account listList all subscriptions
az account set --subscription <id>Switch active subscription

Resource Groups

CommandDescription
az group listList all resource groups
az group create --name <name> --location eastusCreate a resource group
az group delete --name <name>Delete a resource group
az group show --name <name>Show resource group details

Virtual Machines

CommandDescription
az vm listList all VMs
az vm list -dList VMs with details (IPs, power state)
az vm create --resource-group <rg> --name <name> --image Ubuntu2204Create a VM
az vm start --resource-group <rg> --name <name>Start a VM
az vm stop --resource-group <rg> --name <name>Stop a VM
az vm delete --resource-group <rg> --name <name>Delete a VM
az vm show --resource-group <rg> --name <name>Show VM details

Web Apps

CommandDescription
az webapp listList all web apps
az webapp create --resource-group <rg> --plan <plan> --name <name> --runtime "NODE:20-lts"Create a web app
az webapp deploy --resource-group <rg> --name <name> --src-path <file>Deploy to a web app
az webapp show --resource-group <rg> --name <name>Show web app details
az webapp log tail --resource-group <rg> --name <name>Tail web app logs
az webapp delete --resource-group <rg> --name <name>Delete a web app

Function Apps

CommandDescription
az functionapp listList all function apps
az functionapp create --resource-group <rg> --consumption-plan-location eastus --runtime node --name <name> --storage-account <sa>Create a function app
az functionapp show --resource-group <rg> --name <name>Show function app details
az functionapp delete --resource-group <rg> --name <name>Delete a function app

Storage

CommandDescription
az storage account listList all storage accounts
az storage account create --name <name> --resource-group <rg> --sku Standard_LRSCreate a storage account
az storage container list --account-name <name>List blob containers
az storage blob upload --account-name <name> --container-name <c> --file <file> --name <blob>Upload a blob

AKS (Kubernetes)

CommandDescription
az aks listList all AKS clusters
az aks create --resource-group <rg> --name <name> --node-count 3Create an AKS cluster
az aks get-credentials --resource-group <rg> --name <name>Get cluster credentials for kubectl
az aks show --resource-group <rg> --name <name>Show cluster details
az aks delete --resource-group <rg> --name <name>Delete an AKS cluster

Global Flags

FlagDescription
-o jsonOutput as JSON
-o tableOutput as table
-o tsvOutput as tab-separated values
--query <expression>JMESPath query for filtering output
--subscription <id>Override active subscription
--verboseEnable verbose output
--debugEnable debug output
Sponsors