Skip to content

Microsoft.Network/privateDnsZones etag should be marked readOnly #36543

@ms-henglu

Description

@ms-henglu

Service: Private DNS
Resource type: Microsoft.Network/privateDnsZones (definition: PrivateZone)
API versions: 2024-06-01 (also 2020-06-01)

Problem
etag is server-generated and used via If-Match/If-None-Match headers for concurrency. In swagger it is not marked readOnly, which can mislead clients and SDKs into treating it as writable.

Evidence
File: specification/privatedns/resource-manager/Microsoft.Network/stable/2024-06-01/privatedns.json
Path: definitions.PrivateZone.properties.etag
Current:
"etag": {
"type": "string",
"description": "The ETag of the zone."
}
Expected:
"etag": {
"type": "string",
"description": "The ETag of the zone.",
"readOnly": true
}

Related
For consistency, apply the same to:

  • definitions.VirtualNetworkLink.properties.etag
  • definitions.RecordSet.properties.etag

Proposal

  • Mark etag as readOnly for PrivateZone, VirtualNetworkLink, and RecordSet across affected API versions.
  • Optionally reflect in TypeSpec (add read-only visibility for etag).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions