Skip to content
Back to main site

Azure Load Balancer

Create a load balancer with a frontend, backend pool, health probe and rule, then read and delete it.

Plan: Free31 of 31 operations implemented across its API

A load balancer is stored configuration: no listening socket, traffic forwarding or health probe was established.

Example checked on Vera 1.2.2, 8 November 2026. Each coverage note names its own evidence and date.

Start Vera as in Get started. Then open Bash in a terminal of its own (on macOS, whose terminal starts zsh, type bash first), go to an empty scratch directory and run this; it needs curl and Python 3. It fetches the emulator's own certificate, so every request checks TLS, and defines arm, which this page's commands use. The bearer token vera-local is a dummy local credential, not your license key.

Terminal window
export VERA_CA_CERT="$PWD/vera-ca.pem"
curl --fail --silent --show-error --noproxy '*' --insecure \
https://localhost:8543/_vera/ca.pem --output "$VERA_CA_CERT"
curl --fail --silent --show-error --noproxy '*' \
--cacert "$VERA_CA_CERT" https://localhost:8543/_vera/health; echo
export AZ_BASE='https://localhost:8543'
export SUB='00000000-0000-0000-0000-000000000001'
export TENANT='00000000-0000-0000-0000-0000000000a1'
export TOKEN='vera-local'
62 more lines: show the full setup
# arm METHOD /path API_VERSION [body.json]
# Prints the response body once any operation it started has finished, or,
# if that response had no body, the finished operation's response, such as
# a RunCommand result. A finished operation can hold a failed result: read it.
arm() (
set -eu
method=$1; path=$2; version=$3
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT
case "$path" in /*) ;; *) printf 'Expected a relative /path\n' >&2; exit 1;; esac
case "$AZ_BASE" in https://localhost:8543|https://127.0.0.1:8543) ;; *) printf 'This recipe requires the local emulator\n' >&2; exit 1;; esac
args=(--fail-with-body --silent --show-error --noproxy '*' --max-time 20
--cacert "$VERA_CA_CERT" -H "Authorization: Bearer $TOKEN"
-H 'Content-Type: application/json')
body=()
if [ "$#" -ge 4 ]; then body=(--data-binary "@$4"); fi
code=$(curl "${args[@]}" -X "$method" ${body[@]+"${body[@]}"} -D "$work/headers" \
-o "$work/body" -w '%{http_code}' "$AZ_BASE$path?api-version=$version") || {
cat "$work/body" >&2; exit 1;
}
poll_url=$(python3 - "$work/headers" "$AZ_BASE" <<'PY'
import sys,urllib.parse
headers={}
for line in open(sys.argv[1]):
if ':' in line:
key,value=line.split(':',1); headers[key.lower()]=value.strip()
url=headers.get('azure-asyncoperation') or headers.get('operation-location') or headers.get('location') or ''
if url:
url=urllib.parse.urljoin(sys.argv[2],url); p=urllib.parse.urlsplit(url)
if p.scheme!='https' or p.hostname not in ('localhost','127.0.0.1') or p.port!=8543:
raise SystemExit('Refusing a non-local operation URL')
print(url)
PY
) || exit 1
if [ -n "$poll_url" ] && [ "$method" != GET ] && [ "$method" != HEAD ]; then
done_ok=false
for attempt in $(seq 1 30); do
code=$(curl "${args[@]}" -D "$work/poll-headers" -o "$work/poll-body" -w '%{http_code}' "$poll_url") || {
cat "$work/poll-body" >&2; exit 1;
}
state=$(python3 - "$work/poll-body" "$code" <<'PY'
import sys,json
raw=open(sys.argv[1]).read(); code=int(sys.argv[2]); value=json.loads(raw) if raw.strip() else {}
status=str(value.get('status') or value.get('properties',{}).get('provisioningState') or '').lower()
if status in ('failed','canceled','cancelled') or value.get('error'):
print(raw,file=sys.stderr);raise SystemExit('Operation failed')
if status in ('succeeded','completed') or (not status and code in (200,204)):
print('done')
else: print('pending')
PY
) || exit 1
if [ "$state" = done ]; then done_ok=true; break; fi
sleep 1
done
if [ "$done_ok" != true ]; then printf 'Operation polling timed out\n' >&2; exit 1; fi
if [ -s "$work/poll-body" ] && ! grep -q '[^[:space:]]' "$work/body" 2>/dev/null; then
cp "$work/poll-body" "$work/body"
fi
fi
cat "$work/body"
printf '\n'
)

The health check answers {"cloud": "azure", "generation_status": "generated", "status": "ok"}. Requests go only to the emulator at https://localhost:8543: the helper refuses any other address, including the Azure-looking URLs some responses hold. When you've finished, close the terminal and delete the scratch directory; that removes only these local files, not what you created in the emulator.

Load balancers are Microsoft.Network resources. The example uses API version 2026-03-01 for the load balancer and its virtual network, and 2025-04-01 for the resource group, the versions tested with this build. Keep those versions: others weren’t tested.

Create a resource group for the example and a virtual network with one subnet. The load balancer’s frontend goes on that subnet. arm waits for each change’s operation to finish before it returns.

Terminal window
RG="docs-azure-load-balancer"
RGID="/subscriptions/$SUB/resourceGroups/$RG"
VNET="$RGID/providers/Microsoft.Network/virtualNetworks/docs-vnet"
cat > resource-group.json <<'JSON'
{"location": "eastus"}
JSON
arm PUT "$RGID" 2025-04-01 resource-group.json
cat > vnet.json <<'JSON'
{
"location": "eastus",
"properties": {
"addressSpace": { "addressPrefixes": ["10.20.0.0/16"] },
"subnets": [
{ "name": "default", "properties": { "addressPrefix": "10.20.1.0/24" } }
]
}
}
JSON
arm PUT "$VNET" 2026-03-01 vnet.json

Create a Standard internal load balancer in one request: a private frontend, front, a backend pool, back, a TCP probe on port 80, health, and a TCP rule, http, from port 80 to port 80. The rule refers to the other three by ID, so the body is written with an unquoted heredoc that fills in $VNET and $LB.

Terminal window
LB="$RGID/providers/Microsoft.Network/loadBalancers/docs-lb"
cat > lb.json <<JSON
{
"location": "eastus",
"sku": { "name": "Standard" },
"properties": {
"frontendIPConfigurations": [
{
"name": "front",
"properties": {
"subnet": { "id": "$VNET/subnets/default" },
"privateIPAllocationMethod": "Dynamic"
}
}
],
"backendAddressPools": [{ "name": "back" }],
"probes": [
{
"name": "health",
"properties": {
"protocol": "Tcp",
"port": 80,
"intervalInSeconds": 5,
"numberOfProbes": 2
}
}
],
"loadBalancingRules": [
{
"name": "http",
"properties": {
"frontendIPConfiguration": { "id": "$LB/frontendIPConfigurations/front" },
"backendAddressPool": { "id": "$LB/backendAddressPools/back" },
"probe": { "id": "$LB/probes/health" },
"protocol": "Tcp",
"frontendPort": 80,
"backendPort": 80,
"enableFloatingIP": false,
"idleTimeoutInMinutes": 4
}
}
]
}
}
JSON
arm PUT "$LB" 2026-03-01 lb.json
arm GET "$LB" 2026-03-01

The read returns the frontend, backend pool, probe and rule, and the rule keeps its references to the other three. These are selected fields:

Output (selected fields)
{
"properties": {
"frontendIPConfigurations": [{ "name": "front" }],
"backendAddressPools": [{ "name": "back" }],
"probes": [{ "name": "health" }],
"loadBalancingRules": [{ "name": "http" }]
}
}

To clean up, delete the load balancer, then the virtual network. The virtual network can be deleted only once the load balancer’s delete has finished, which arm waits for.

Terminal window
arm DELETE "$LB" 2026-03-01
arm DELETE "$VNET" 2026-03-01

The resource group stays, because deleting resource groups fails in Vera 1.2.2. A fresh emulator starts without it.

  • Standard internal load balancers with a private frontend on a subnet, a backend pool, a TCP health probe and a TCP rule, created in one request, read back and deleted, each change’s operation polled to completion.
  • References between parts. The rule refers to the frontend, backend pool and probe by ID, and the read returns those references.
  • Dependency-aware deletion. The load balancer’s virtual network could be deleted once the load balancer’s delete operation had finished.

The main limits are below. A few more apply to every service, and the API coverage notes cover smaller differences.

  • No traffic is balanced. No listening socket, TCP or UDP forwarding, outbound SNAT, failover or health-probe execution was observed. A Succeeded state means the configuration was stored, not that it serves traffic.
  • One configuration was tested. Only the internal load balancer above was created, read and deleted. Public frontends, listing, tag updates, inbound NAT rules, outbound rules, and changing a pool, probe or rule on its own weren’t run as examples. The API coverage marks them from a review of Vera 1.2.0’s source, with their limits in the notes.

Every operation of the API on this page, from its pinned public definition, and whether Vera 1.2.0 implements it. Only the API surfaces in this release are listed, and each operation once. Implementation availability was reviewed against the Vera 1.2.0 source on 6 November 2026. Source inspection identifies a local implementation and its known limits; it doesn't mean every operation or API version was tested with a request. Each note names its evidence: a Local observation without a build or date is from Vera 1.2.0 preview, on 5 November 2026, and one from a later build, such as Vera 1.2.0-rc.3 or Vera 1.2.2, names that build and its date. No response was compared with Azure's. What the statuses mean

InboundNatRules

4 of 4 implemented
OperationStatusNotes
InboundNatRules_CreateOrUpdateImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.
InboundNatRules_DeleteImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.
InboundNatRules_GetImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.
InboundNatRules_ListImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.

LoadBalancerBackendAddressPools

4 of 4 implemented
OperationStatusNotes
LoadBalancerBackendAddressPools_CreateOrUpdateImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.
LoadBalancerBackendAddressPools_DeleteImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.
LoadBalancerBackendAddressPools_GetImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.
LoadBalancerBackendAddressPools_ListImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.

LoadBalancerFrontendIPConfigurations

2 of 2 implemented
OperationStatusNotes
LoadBalancerFrontendIPConfigurations_GetImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.
LoadBalancerFrontendIPConfigurations_ListImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.

LoadBalancerLoadBalancingRules

3 of 3 implemented
OperationStatusNotes
LoadBalancerLoadBalancingRules_GetImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.
LoadBalancerLoadBalancingRules_HealthImplementedSource inspection: Runs as a local action; an external engine running it isn't established. Local network configuration; packet forwarding and probes aren't established.
LoadBalancerLoadBalancingRules_ListImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.

LoadBalancerNetworkInterfaces

1 of 1 implemented
OperationStatusNotes
LoadBalancerNetworkInterfaces_ListImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.

LoadBalancerOutboundRules

2 of 2 implemented
OperationStatusNotes
LoadBalancerOutboundRules_GetImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.
LoadBalancerOutboundRules_ListImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.

LoadBalancerProbes

2 of 2 implemented
OperationStatusNotes
LoadBalancerProbes_GetImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.
LoadBalancerProbes_ListImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.

LoadBalancers

9 of 9 implemented
OperationStatusNotes
LoadBalancers_CreateOrUpdateImplementedLocal observation: A PUT for a Standard internal load balancer with a private frontend, a backend pool, a TCP probe and a TCP port 80 rule answered HTTP 201, and the operation succeeded.
LoadBalancers_DeleteImplementedLocal observation: Answered HTTP 202, and the operation ended with HTTP 200. Its virtual network could be deleted only after that.
LoadBalancers_GetImplementedLocal observation: Answered HTTP 200 with the frontend, backend pool, probe and rule, and the rule's references to the other three.
LoadBalancers_ListImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.
LoadBalancers_ListAllImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.
LoadBalancers_ListInboundNatRulePortMappingsImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.
LoadBalancers_MigrateToIpBasedImplementedSource inspection: Runs as a local action; an external engine running it isn't established. Local network configuration; packet forwarding and probes aren't established.
LoadBalancers_SwapPublicIpAddressesImplementedSource inspection: Runs as a local action; an external engine running it isn't established. Local network configuration; packet forwarding and probes aren't established.
LoadBalancers_UpdateTagsImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.

NetworkInterfaceLoadBalancers

1 of 1 implemented
OperationStatusNotes
NetworkInterfaceLoadBalancers_ListImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.

VipSwap

3 of 3 implemented
OperationStatusNotes
VipSwap_CreateImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.
VipSwap_GetImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.
VipSwap_ListImplementedSource inspection: Local network configuration; packet forwarding and probes aren't established.