Point unmodified Azure tools at this simulator at http://192.168.252.7:9000 — no real credentials needed.
Snippets are copy-paste ready (your live host is filled in) and mirror the conformance harness in tests/conformance/.
# Point az at the simulator's ARM endpoint, then use a throwaway login.
az cloud register -n CloudLearn \
--endpoint-resource-manager "http://192.168.252.7:9000" \
--endpoint-active-directory "http://192.168.252.7:9000" \
--endpoint-active-directory-resource-id "http://192.168.252.7:9000"
az cloud set -n CloudLearn
# The simulator ignores credentials — any login (or none) works.
export SUB="00000000-0000-0000-0000-cloudlearn01" # default subscription
export RG="cloudlearn-rg" # Every ARM call needs ?api-version=. Auth is faked.
curl -s "http://192.168.252.7:9000/subscriptions/00000000-0000-0000-0000-cloudlearn01/resourceGroups/cloudlearn-rg/providers/Microsoft.Compute/virtualMachines?api-version=2023-09-01" // com.azure.resourcemanager:azure-resourcemanager + azure-identity
TokenCredential cred = req -> Mono.just(
new AccessToken("fake", OffsetDateTime.now().plusHours(1)));
AzureEnvironment env = new AzureEnvironment(Map.of(
"resourceManagerEndpointUrl", "http://192.168.252.7:9000/",
"activeDirectoryEndpointUrl", "http://192.168.252.7:9000/",
"managementEndpointUrl", "http://192.168.252.7:9000/"));
AzureProfile profile = new AzureProfile("tenant", "00000000-0000-0000-0000-cloudlearn01", env);import ("github.com/Azure/azure-sdk-for-go/sdk/azcore"; "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm";
"github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud")
cfg := cloud.Configuration{Services: map[cloud.ServiceName]cloud.ServiceConfiguration{
cloud.ResourceManager: {Endpoint: "http://192.168.252.7:9000", Audience: "http://192.168.252.7:9000"}}}
opts := &arm.ClientOptions{ClientOptions: azcore.ClientOptions{Cloud: cfg}}
// cred: a fake azcore.TokenCredential returning any token (sim ignores it).az vm list -g $RG
az resource create -g $RG -n vm-demo --resource-type Microsoft.Compute/virtualMachines \
--api-version 2023-09-01 --properties '{"hardwareProfile":{"vmSize":"Standard_B1s"}}'ComputeManager compute = ComputeManager.authenticate(cred, profile);
compute.virtualMachines().listByResourceGroup("cloudlearn-rg")
.forEach(vm -> System.out.println(vm.name()));vmc, _ := armcompute.NewVirtualMachinesClient("00000000-0000-0000-0000-cloudlearn01", cred, opts)
pager := vmc.NewListPager("cloudlearn-rg", nil)
page, _ := pager.NextPage(ctx) // page.Value = []*VirtualMachineaz storage account list -g $RG
az resource create -g $RG -n stdemo --resource-type Microsoft.Storage/storageAccounts \
--api-version 2023-01-01 --properties '{}' --location eastusStorageManager storage = StorageManager.authenticate(cred, profile);
storage.storageAccounts().listByResourceGroup("cloudlearn-rg")
.forEach(a -> System.out.println(a.name()));sac, _ := armstorage.NewAccountsClient("00000000-0000-0000-0000-cloudlearn01", cred, opts)
pager := sac.NewListByResourceGroupPager("cloudlearn-rg", nil)az sql server list -g $RG
az resource create -g $RG -n sql-demo --resource-type Microsoft.Sql/servers \
--api-version 2023-05-01-preview --properties '{"administratorLogin":"sqladmin"}'SqlServerManager sql = SqlServerManager.authenticate(cred, profile);
sql.sqlServers().listByResourceGroup("cloudlearn-rg").forEach(s -> System.out.println(s.name()));sc, _ := armsql.NewServersClient("00000000-0000-0000-0000-cloudlearn01", cred, opts)
pager := sc.NewListByResourceGroupPager("cloudlearn-rg", nil)az servicebus namespace list -g $RG
az servicebus queue list -g $RG --namespace-name sb-cloudlearnServiceBusManager sb = ServiceBusManager.authenticate(cred, profile);
sb.namespaces().listByResourceGroup("cloudlearn-rg").forEach(n -> System.out.println(n.name()));nc, _ := armservicebus.NewNamespacesClient("00000000-0000-0000-0000-cloudlearn01", cred, opts)
pager := nc.NewListByResourceGroupPager("cloudlearn-rg", nil)az cosmosdb list -g $RG
az resource create -g $RG -n cosmos-demo --resource-type Microsoft.DocumentDB/databaseAccounts \
--api-version 2024-05-15 --properties '{"databaseAccountOfferType":"Standard"}'CosmosManager cosmos = CosmosManager.authenticate(cred, profile);
cosmos.databaseAccounts().listByResourceGroup("cloudlearn-rg").forEach(a -> System.out.println(a.name()));cc, _ := armcosmos.NewDatabaseAccountsClient("00000000-0000-0000-0000-cloudlearn01", cred, opts)
pager := cc.NewListByResourceGroupPager("cloudlearn-rg", nil)az functionapp list -g $RG
az resource create -g $RG -n fn-demo --resource-type Microsoft.Web/sites \
--api-version 2023-12-01 --properties '{}' --location eastusAppServiceManager web = AppServiceManager.authenticate(cred, profile);
web.functionApps().listByResourceGroup("cloudlearn-rg").forEach(f -> System.out.println(f.name()));wc, _ := armappservice.NewWebAppsClient("00000000-0000-0000-0000-cloudlearn01", cred, opts)
pager := wc.NewListByResourceGroupPager("cloudlearn-rg", nil)az apim list -g $RG
az resource show -g $RG -n apim-cloudlearn --resource-type Microsoft.ApiManagement/service \
--api-version 2023-05-01-previewApiManagementManager apim = ApiManagementManager.authenticate(cred, profile);
apim.apiManagementServices().listByResourceGroup("cloudlearn-rg").forEach(s -> System.out.println(s.name()));ac, _ := armapimanagement.NewServiceClient("00000000-0000-0000-0000-cloudlearn01", cred, opts)
pager := ac.NewListByResourceGroupPager("cloudlearn-rg", nil)az network vnet list -g $RG
az resource create -g $RG -n vnet-demo --resource-type Microsoft.Network/virtualNetworks \
--api-version 2023-11-01 --properties '{"addressSpace":{"addressPrefixes":["10.0.0.0/16"]}}'NetworkManager net = NetworkManager.authenticate(cred, profile);
net.networks().listByResourceGroup("cloudlearn-rg").forEach(v -> System.out.println(v.name()));vnc, _ := armnetwork.NewVirtualNetworksClient("00000000-0000-0000-0000-cloudlearn01", cred, opts)
pager := vnc.NewListPager("cloudlearn-rg", nil)az role assignment list -g $RG
az role assignment create --role Contributor --assignee [email protected] \
--scope /subscriptions/$SUB/resourceGroups/$RGAuthorizationManager authz = AuthorizationManager.authenticate(cred, profile);
authz.roleAssignments().listByResourceGroup("cloudlearn-rg").forEach(r -> System.out.println(r.name()));rac, _ := armauthorization.NewRoleAssignmentsClient("00000000-0000-0000-0000-cloudlearn01", cred, opts)
pager := rac.NewListForResourceGroupPager("cloudlearn-rg", nil)