Get list of Azure accounts
az account list --output table
az account set --subscription-id < SUBSCRIPTION-ID>
az account get-access-token --query accessToken --output tsv
Execute REST command against resource
token=$( az account get-access-token --query accessToken --output tsv)
az rest --method get --url < RESOURCE URL> --headers " {\" Authorization\" : \" Bearer $token \" }" -o json
az vm create --name < NAMEOFVM> --resource-group < NAMEOFRESOURCEGROUP> --admin-username < ADMINUSERNAME> --ssh-key-values < PATHTOPUBSSHKEY> --image MicrosoftCBLMariner:cbl-mariner:cbl-mariner-2:latest --os-disk-size-gb < OSDISKSIZE>
az networkcloud baremetalmachine run-read-command --commands arguments=< ARGUMENT> command=< COMMAND> --ids < RESOURCEID> --limit-time-seconds=60 --verbose --debug
az networkcloud baremetalmachine run-command --ids < RESOURCEID> --limit-time-seconds=60 --verbose --debug --script < BASE64ENCODEDSCRIPT>
Get OAM IP Addresses of Nexus Baremetal Machines
az networkcloud baremetalmachine list --resource-group < RESOURCEGROUP> | jq -r ' .[] | {machineName: .machineName, oamip: .oamIpv4Address}'
Get Latest Extension Version (Requires extension registration in active subscription)
az k8s-extension extension-types list-versions-by-location --location < REGION> --extension-type < EXTENSIONNAME> --show-latest 2> /dev/null | jq -r ' .[0].properties.version'