From ebd3a21bbf6944526d77048fb0ec0ff5df6258d1 Mon Sep 17 00:00:00 2001 From: Wenming Liu Date: Tue, 8 Jul 2025 10:18:31 +0800 Subject: [PATCH] Mark storageTarget as read-only in VolumeProperties Added @visibility(Lifecycle.Read) to the storageTarget property in the TSP model and set 'readOnly: true' in the ARM JSON schema. This clarifies that the storageTarget property is read-only for clients. reference: https://tspwebsitepr.z22.web.core.windows.net/typespec-azure/prs/2700/docs/migrate-swagger/faq/mustread/#handling-readonly-in-model-schemas --- specification/elasticsan/ElasticSan.Management/models.tsp | 1 + .../preview/2024-07-01-preview/elasticsan.json | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/specification/elasticsan/ElasticSan.Management/models.tsp b/specification/elasticsan/ElasticSan.Management/models.tsp index ea4528a43218..1d231707013d 100644 --- a/specification/elasticsan/ElasticSan.Management/models.tsp +++ b/specification/elasticsan/ElasticSan.Management/models.tsp @@ -836,6 +836,7 @@ model VolumeProperties { /** * Storage target information */ + @visibility(Lifecycle.Read) storageTarget?: IscsiTargetInfo; /** diff --git a/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/elasticsan.json b/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/elasticsan.json index a8ba28cecadf..60e38726ec8a 100644 --- a/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/elasticsan.json +++ b/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/elasticsan.json @@ -3774,7 +3774,8 @@ }, "storageTarget": { "$ref": "#/definitions/IscsiTargetInfo", - "description": "Storage target information" + "description": "Storage target information", + "readOnly": true }, "managedBy": { "$ref": "#/definitions/ManagedByInfo",