Skip to main content
Quick start

CLI

Install the aca CLI, provision a sandbox group, launch a sandbox, run a command, and tear it all down.

Before you begin
  • An Azure subscription with permission to create resource groups.
  • Azure CLI (az) installed. aca delegates auth to az login.
  • A shell: Bash on Linux/macOS, PowerShell on Windows. (WSL and Git Bash also work.)

Install the aca CLI

curl -fsSL https://aka.ms/aca-cli-install | sh

Smoke-test the install:

aca --version
# aca 1.0.0-preview.1

Log in to Azure

Run az login once per shell. Subsequent commands reuse the same Azure CLI session.

az login

Provision the resource group and sandbox group

SUBSCRIPTION_ID=$(az account show --query id -o tsv)

az group create \
--name my-rg \
--location westus2

aca sandboxgroup create \
-g my-rg \
--name my-sandbox-group \
--location westus2 \
-s "$SUBSCRIPTION_ID" \
--set-config
note

--set-config writes the group, subscription, and region into aca config so you don't have to pass them on every subsequent command.

Verify with aca doctor

aca doctor

Create and run a sandbox

Tag the sandbox with a label at create time, then use -l (label selector) to target it from exec and delete — no need to capture the ID.

aca sandbox create \
--disk ubuntu \
--label name=my-first-sandbox

aca sandbox exec -l name=my-first-sandbox -c "echo 'Hello from ACA Sandbox.'"

aca sandbox delete -l name=my-first-sandbox --yes

Teardown (optional)

Delete the sandbox group and the resource group:

aca sandboxgroup delete -g my-rg --name my-sandbox-group --yes
az group delete --name my-rg --yes --no-wait

Next steps