Does the Azure Network API support If-Match/ETag concurrency control for NIC public IP associations and Load Balancer backend pool updates?

文弟 魏 0 Reputation points
2026-10-27T00:31:10.6966667+00:00

可以直接粘贴以下英文内容:


I’m implementing controlled Azure network operations for a multi-cloud operations platform. I need to prevent our updates from overwriting changes made concurrently by the Azure portal, Terraform, or other clients.

The operations are:

  1. NIC public IP association: Associate or disassociate an existing Public IP with a specific IP configuration on an existing network interface.
  2. Load Balancer backend membership: Add or remove one address in an existing IP-address-based backend address pool, while preserving all other backend addresses and pool settings.

I reviewed the 2024-05-01 and 2026-03-01 Network API specifications. The resource models expose read-only etag properties, but I could not find an explicit If-Match request-header contract for:

  • NetworkInterfaces_CreateOrUpdate
  • LoadBalancerBackendAddressPools_CreateOrUpdate

The NIC IP configuration operations I found are GET/List operations. Updating an association appears to require a parent NIC PUT, while updating an address-based backend pool appears to require submitting the pool’s address collection.

Could the Azure Networking team clarify the following?

  1. Do these two PUT operations enforce If-Match against the current resource ETag? If a client supplies the header manually, is it guaranteed to be enforced, or could it be ignored?
  2. Which API versions support this behavior, and which ETag should be supplied—for example, the NIC ETag, IP configuration ETag, backend pool ETag, or parent Load Balancer ETag?
  3. If another client modifies the resource after our GET, will a PUT with the stale ETag fail without applying any changes? What response status and error code should we expect?
  4. Are there documented atomic member/association APIs that avoid replacing the parent NIC configuration or the complete backend address collection?
  5. If conditional writes are unsupported for these operations, what is the supported approach for preventing lost updates from independent clients?

The required behavior is:

Client A reads resource with ETag E1.
Client B updates the resource.
Client A submits its update with If-Match: E1.
Client A's stale update is rejected without changing the resource.

This is an API contract clarification; I have not performed production write tests. An official documentation link or written confirmation from the Networking team would help us implement these operations correctly.

Relevant official specifications:

  • Load Balancer — 2026-03-01
  • Virtual Network / Network Interfaces — 2026-03-01可以直接粘贴以下英文内容: I’m implementing controlled Azure network operations for a multi-cloud operations platform. I need to prevent our updates from overwriting changes made concurrently by the Azure portal, Terraform, or other clients. The operations are:
    1. NIC public IP association: Associate or disassociate an existing Public IP with a specific IP configuration on an existing network interface.
    2. Load Balancer backend membership: Add or remove one address in an existing IP-address-based backend address pool, while preserving all other backend addresses and pool settings.
    I reviewed the 2024-05-01 and 2026-03-01 Network API specifications. The resource models expose read-only etag properties, but I could not find an explicit If-Match request-header contract for:
    • NetworkInterfaces_CreateOrUpdate
    • LoadBalancerBackendAddressPools_CreateOrUpdate
    The NIC IP configuration operations I found are GET/List operations. Updating an association appears to require a parent NIC PUT, while updating an address-based backend pool appears to require submitting the pool’s address collection. Could the Azure Networking team clarify the following?
    1. Do these two PUT operations enforce If-Match against the current resource ETag? If a client supplies the header manually, is it guaranteed to be enforced, or could it be ignored?
    2. Which API versions support this behavior, and which ETag should be supplied—for example, the NIC ETag, IP configuration ETag, backend pool ETag, or parent Load Balancer ETag?
    3. If another client modifies the resource after our GET, will a PUT with the stale ETag fail without applying any changes? What response status and error code should we expect?
    4. Are there documented atomic member/association APIs that avoid replacing the parent NIC configuration or the complete backend address collection?
    5. If conditional writes are unsupported for these operations, what is the supported approach for preventing lost updates from independent clients?
    The required behavior is:
      Client A reads resource with ETag E1.
    

Client B updates the resource. Client A submits its update with If-Match: E1. Client A's stale update is rejected without changing the resource.

  
  This is an API contract clarification; I have not performed production write tests. An official documentation link or written confirmation from the Networking team would help us implement these operations correctly.
  
  Relevant official specifications:
  
  - [Load Balancer — 2026-03-01](https://github.com/Azure/azure-rest-api-specs/blob/027ab5119530474357499359aad241962f7108cc/specification/network/resource-manager/Microsoft.Network/Network/stable/2026-03-01/loadBalancer.json)
  
  - [Virtual Network / Network Interfaces — 2026-03-01](https://github.com/Azure/azure-rest-api-specs/blob/027ab5119530474357499359aad241962f7108cc/specification/network/resource-manager/Microsoft.Network/Network/stable/2026-03-01/virtualNetwork.json)
  
Azure Load Balancer
Azure Load Balancer

An Azure service that delivers high availability and network performance to applications.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Hemant Bharadwaj 385 Reputation points Microsoft Employee
    2026-10-27T04:59:12.3333333+00:00

    Short answer: for the two operations you listed, the current public REST contracts do not document an If-Match request header, so there is no documented conditional-write guarantee for those specific PUTs today.

    From the 2026-03-01 network specs you referenced:

    1. NIC update uses parent resource PUT (networkInterfaces/{networkInterfaceName}) and the operation contract lists path/query/body parameters only (no If-Match parameter).
    2. Backend pool update (loadBalancers/{lb}/backendAddressPools/{pool}) is also a parent/subresource PUT without documented If-Match in that operation contract.
    3. For NIC IP configuration paths in that spec, the exposed operations are GET/list (no member-level PUT/PATCH for association writes).
    4. For load balancer backend pools, writes are on the pool resource PUT (replace/update of pool payload), not an atomic single-address add/remove API.

    What this means for your questions:

    1. Is If-Match guaranteed for these two PUTs?
      • Confirmed from current docs/spec: not documented for these operations.
      • So you should not rely on a formal If-Match contract here unless Microsoft publishes it for these operations.
    2. Which ETag should be supplied?
      • Since If-Match is not documented for these two operations, there is no documented ETag input contract to rely on for them.
    3. Stale-write rejection behavior
      • Azure Resource Manager documents concurrent update conflicts as 409 Conflict when two operations update the same resource at the same time.
      • A specific 412 Precondition Failed expectation is typically tied to operations that explicitly expose precondition headers; these two operations currently don’t document that header contract.
    4. Atomic member APIs
      • For the exact two scenarios you listed, the current documented pattern is whole-resource/subresource update payloads (NIC or backend pool object), not an atomic “single member add/remove” write endpoint.
    5. Supported safe pattern (recommended)
      1. Read latest resource state just before write.
      2. Apply minimal merge to intended fields only.
      3. Submit PUT.
      4. If write fails with conflict, re-read and retry with backoff.
      5. Enforce single-writer serialization per resource ID in your platform (lock/queue), especially when Terraform + portal + custom automation can all write.

    Validation checks you can run:

    1. Compare the operation parameter lists for these two REST operations and confirm no documented If-Match header in the contract.
    2. Run controlled concurrent writes and capture status/error body + correlation IDs.
    3. Track 409 conflict frequency and verify retry logic converges without lost intended state.

    References:

    “If you find this answer helpful, please upvote it. If this resolves your issue, please mark it as the accepted answer so that it can help others in the community.”

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.