From 88aeac08cb6946e7967b8e8246dd43b5c5e6b0f3 Mon Sep 17 00:00:00 2001 From: Neeraja Akula Date: Sun, 27 Nov 2022 22:14:44 -0800 Subject: [PATCH 1/5] Fix s360 alerts for properties being returned in GET but not exising in PUT requests --- .../preview/2021-04-01-preview/managedHsm.json | 15 ++++++++++----- .../preview/2021-06-01-preview/managedHsm.json | 15 ++++++++++----- .../preview/2021-11-01-preview/managedHsm.json | 15 ++++++++++----- .../stable/2021-10-01/managedHsm.json | 15 ++++++++++----- .../stable/2022-07-01/managedHsm.json | 8 +++++++- 5 files changed, 47 insertions(+), 21 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json index 7bf3581a7e20..ca8316e32e15 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json @@ -873,7 +873,8 @@ "description": "Create a new managed HSM pool. This is the default option." } ] - } + }, + "x-ms-mutability": ["create", "update"] }, "statusMessage": { "readOnly": true, @@ -1177,7 +1178,8 @@ "x-ms-enum": { "name": "NetworkRuleBypassOptions", "modelAsString": true - } + }, + "default": "AzureServices" }, "defaultAction": { "type": "string", @@ -1189,21 +1191,24 @@ "x-ms-enum": { "name": "NetworkRuleAction", "modelAsString": true - } + }, + "default": "Allow" }, "ipRules": { "type": "array", "items": { "$ref": "#/definitions/MHSMIPRule" }, - "description": "The list of IP address rules." + "description": "The list of IP address rules.", + "default": [] }, "virtualNetworkRules": { "type": "array", "items": { "$ref": "#/definitions/MHSMVirtualNetworkRule" }, - "description": "The list of virtual network rules." + "description": "The list of virtual network rules.", + "default": [] } }, "description": "A set of rules governing the network accessibility of a managed hsm pool." diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json index 51040a1c1d23..b4bc7ebdf7e8 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json @@ -873,7 +873,8 @@ "description": "Create a new managed HSM pool. This is the default option." } ] - } + }, + "x-ms-mutability": ["create", "update"] }, "statusMessage": { "readOnly": true, @@ -1177,7 +1178,8 @@ "x-ms-enum": { "name": "NetworkRuleBypassOptions", "modelAsString": true - } + }, + "default": "AzureServices" }, "defaultAction": { "type": "string", @@ -1189,21 +1191,24 @@ "x-ms-enum": { "name": "NetworkRuleAction", "modelAsString": true - } + }, + "default": "Allow" }, "ipRules": { "type": "array", "items": { "$ref": "#/definitions/MHSMIPRule" }, - "description": "The list of IP address rules." + "description": "The list of IP address rules.", + "default": [] }, "virtualNetworkRules": { "type": "array", "items": { "$ref": "#/definitions/MHSMVirtualNetworkRule" }, - "description": "The list of virtual network rules." + "description": "The list of virtual network rules.", + "default": [] } }, "description": "A set of rules governing the network accessibility of a managed hsm pool." diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json index 1c82fed4abde..d5683440d2ce 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json @@ -873,7 +873,8 @@ "description": "Create a new managed HSM pool. This is the default option." } ] - } + }, + "x-ms-mutability": ["create", "update"] }, "statusMessage": { "readOnly": true, @@ -1177,7 +1178,8 @@ "x-ms-enum": { "name": "NetworkRuleBypassOptions", "modelAsString": true - } + }, + "default": "AzureServices" }, "defaultAction": { "type": "string", @@ -1189,21 +1191,24 @@ "x-ms-enum": { "name": "NetworkRuleAction", "modelAsString": true - } + }, + "default": "Allow" }, "ipRules": { "type": "array", "items": { "$ref": "#/definitions/MHSMIPRule" }, - "description": "The list of IP address rules." + "description": "The list of IP address rules.", + "default": [] }, "virtualNetworkRules": { "type": "array", "items": { "$ref": "#/definitions/MHSMVirtualNetworkRule" }, - "description": "The list of virtual network rules." + "description": "The list of virtual network rules.", + "default": [] } }, "description": "A set of rules governing the network accessibility of a managed hsm pool." diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json index 12a347590ecd..a28227f7cdc2 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json @@ -874,7 +874,8 @@ "description": "Create a new managed HSM pool. This is the default option." } ] - } + }, + "x-ms-mutability": ["create", "update"] }, "statusMessage": { "readOnly": true, @@ -1188,7 +1189,8 @@ "x-ms-enum": { "name": "NetworkRuleBypassOptions", "modelAsString": true - } + }, + "default": "AzureServices" }, "defaultAction": { "type": "string", @@ -1200,21 +1202,24 @@ "x-ms-enum": { "name": "NetworkRuleAction", "modelAsString": true - } + }, + "default": "Allow" }, "ipRules": { "type": "array", "items": { "$ref": "#/definitions/MHSMIPRule" }, - "description": "The list of IP address rules." + "description": "The list of IP address rules.", + "default": [] }, "virtualNetworkRules": { "type": "array", "items": { "$ref": "#/definitions/MHSMVirtualNetworkRule" }, - "description": "The list of virtual network rules." + "description": "The list of virtual network rules.", + "default": [] } }, "description": "A set of rules governing the network accessibility of a managed hsm pool.", diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-07-01/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-07-01/managedHsm.json index a0e36eff6ed2..41aed2ba5d8f 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-07-01/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-07-01/managedHsm.json @@ -932,7 +932,8 @@ "description": "Create a new managed HSM pool. This is the default option." } ] - } + }, + "x-ms-mutability": ["create", "update"] }, "statusMessage": { "readOnly": true, @@ -1021,6 +1022,11 @@ "type": "string", "format": "date-time", "description": "The scheduled purge date in UTC." + }, + "securityDomainProperties": { + "readOnly": true, + "$ref": "#/definitions/ManagedHSMSecurityDomainProperties", + "description": "Managed HSM security domain properties." } }, "description": "Properties of the managed HSM Pool", From 37b8cf80d677e3231bfffa68788d11b4c09a82fd Mon Sep 17 00:00:00 2001 From: Neeraja Akula Date: Mon, 28 Nov 2022 09:33:22 -0800 Subject: [PATCH 2/5] Prettier fix --- .../preview/2021-04-01-preview/managedHsm.json | 5 ++++- .../preview/2021-06-01-preview/managedHsm.json | 5 ++++- .../preview/2021-11-01-preview/managedHsm.json | 5 ++++- .../Microsoft.KeyVault/stable/2021-10-01/managedHsm.json | 5 ++++- .../Microsoft.KeyVault/stable/2022-07-01/managedHsm.json | 5 ++++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json index ca8316e32e15..9ffc84e80169 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json @@ -874,7 +874,10 @@ } ] }, - "x-ms-mutability": ["create", "update"] + "x-ms-mutability": [ + "create", + "update" + ] }, "statusMessage": { "readOnly": true, diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json index b4bc7ebdf7e8..39eabbca1d9e 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json @@ -874,7 +874,10 @@ } ] }, - "x-ms-mutability": ["create", "update"] + "x-ms-mutability": [ + "create", + "update" + ] }, "statusMessage": { "readOnly": true, diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json index d5683440d2ce..dfb7906b74e4 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json @@ -874,7 +874,10 @@ } ] }, - "x-ms-mutability": ["create", "update"] + "x-ms-mutability": [ + "create", + "update" + ] }, "statusMessage": { "readOnly": true, diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json index a28227f7cdc2..1ac3434e2d5c 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json @@ -875,7 +875,10 @@ } ] }, - "x-ms-mutability": ["create", "update"] + "x-ms-mutability": [ + "create", + "update" + ] }, "statusMessage": { "readOnly": true, diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-07-01/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-07-01/managedHsm.json index 41aed2ba5d8f..e325666fa24e 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-07-01/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2022-07-01/managedHsm.json @@ -933,7 +933,10 @@ } ] }, - "x-ms-mutability": ["create", "update"] + "x-ms-mutability": [ + "create", + "update" + ] }, "statusMessage": { "readOnly": true, From e6a71bc181327c7d696f937f8d9073e9296d6509 Mon Sep 17 00:00:00 2001 From: Neeraja Akula Date: Mon, 28 Nov 2022 10:43:03 -0800 Subject: [PATCH 3/5] Fix model validation error for long running operation response missing location header --- .../examples/DeletedManagedHsm_Purge.json | 6 +++++- .../examples/ManagedHsm_CreateOrUpdate.json | 3 +++ .../examples/ManagedHsm_Delete.json | 6 +++++- .../preview/2021-04-01-preview/managedHsm.json | 16 ++++++++++++++-- .../examples/DeletedManagedHsm_Purge.json | 6 +++++- .../examples/ManagedHsm_CreateOrUpdate.json | 3 +++ .../examples/ManagedHsm_Delete.json | 6 +++++- .../preview/2021-06-01-preview/managedHsm.json | 16 ++++++++++++++-- .../examples/DeletedManagedHsm_Purge.json | 6 +++++- .../examples/ManagedHsm_CreateOrUpdate.json | 3 +++ .../examples/ManagedHsm_Delete.json | 6 +++++- .../preview/2021-11-01-preview/managedHsm.json | 16 ++++++++++++++-- .../examples/DeletedManagedHsm_Purge.json | 6 +++++- .../examples/ManagedHsm_CreateOrUpdate.json | 3 +++ .../2021-10-01/examples/ManagedHsm_Delete.json | 6 +++++- .../stable/2021-10-01/managedHsm.json | 16 ++++++++++++++-- 16 files changed, 108 insertions(+), 16 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/examples/DeletedManagedHsm_Purge.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/examples/DeletedManagedHsm_Purge.json index ea4b3fe0d2da..aa0c770123d7 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/examples/DeletedManagedHsm_Purge.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/examples/DeletedManagedHsm_Purge.json @@ -6,6 +6,10 @@ "api-version": "2021-04-01-preview" }, "responses": { - "202": {} + "202": { + "headers": { + "Location": "https://some.endpoint.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1?api-version=2022-07-01&kv-operation=abJjb2RkIjoiAGVsZXRlTWFuYWdlZEhzbUFzeW5jYm9" + } + } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/examples/ManagedHsm_CreateOrUpdate.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/examples/ManagedHsm_CreateOrUpdate.json index 2c5b075c07c1..8dcd2ea80a17 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/examples/ManagedHsm_CreateOrUpdate.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/examples/ManagedHsm_CreateOrUpdate.json @@ -27,6 +27,9 @@ }, "responses": { "202": { + "headers": { + "Location": "https://some.endpoint.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1?api-version=2022-07-01&kv-operation=abJjb2RkIjoiAGVsZXRlTWFuYWdlZEhzbUFzeW5jYm9" + }, "body": { "properties": { "tenantId": "00000000-0000-0000-0000-000000000000", diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/examples/ManagedHsm_Delete.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/examples/ManagedHsm_Delete.json index 5e05d05cfee1..00976bf529fa 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/examples/ManagedHsm_Delete.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/examples/ManagedHsm_Delete.json @@ -7,7 +7,11 @@ }, "responses": { "200": {}, - "202": {}, + "202": { + "headers": { + "Location": "https://some.endpoint.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1?api-version=2022-07-01&kv-operation=abJjb2RkIjoiAGVsZXRlTWFuYWdlZEhzbUFzeW5jYm9" + } + }, "204": {} } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json index 9ffc84e80169..61ba09ad80b9 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json @@ -190,7 +190,13 @@ "description": "Request successful. Resource does not exist." }, "202": { - "description": "Accepted and the operation will complete asynchronously." + "description": "Accepted and the operation will complete asynchronously.", + "headers": { + "Location": { + "description": "The URI to poll for completion status.", + "type": "string" + } + } }, "200": { "description": "Delete successful." @@ -524,7 +530,13 @@ ], "responses": { "202": { - "description": "Accepted and the operation will complete asynchronously." + "description": "Accepted and the operation will complete asynchronously.", + "headers": { + "Location": { + "description": "The URI to poll for completion status.", + "type": "string" + } + } }, "default": { "description": "The error response describing why the operation failed.", diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/DeletedManagedHsm_Purge.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/DeletedManagedHsm_Purge.json index 78fb0cc8e1ba..62caaba645cc 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/DeletedManagedHsm_Purge.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/DeletedManagedHsm_Purge.json @@ -6,6 +6,10 @@ "api-version": "2021-06-01-preview" }, "responses": { - "202": {} + "202": { + "headers": { + "Location": "https://some.endpoint.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1?api-version=2022-07-01&kv-operation=abJjb2RkIjoiAGVsZXRlTWFuYWdlZEhzbUFzeW5jYm9" + } + } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/ManagedHsm_CreateOrUpdate.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/ManagedHsm_CreateOrUpdate.json index 4a274071cf20..c05058ecf56b 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/ManagedHsm_CreateOrUpdate.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/ManagedHsm_CreateOrUpdate.json @@ -27,6 +27,9 @@ }, "responses": { "202": { + "headers": { + "Location": "https://some.endpoint.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1?api-version=2022-07-01&kv-operation=abJjb2RkIjoiAGVsZXRlTWFuYWdlZEhzbUFzeW5jYm9" + }, "body": { "properties": { "tenantId": "00000000-0000-0000-0000-000000000000", diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/ManagedHsm_Delete.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/ManagedHsm_Delete.json index caea168ce0a7..dbeca98ac3cc 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/ManagedHsm_Delete.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/examples/ManagedHsm_Delete.json @@ -7,7 +7,11 @@ }, "responses": { "200": {}, - "202": {}, + "202": { + "headers": { + "Location": "https://some.endpoint.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1?api-version=2022-07-01&kv-operation=abJjb2RkIjoiAGVsZXRlTWFuYWdlZEhzbUFzeW5jYm9" + } + }, "204": {} } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json index 39eabbca1d9e..6a745d36caf5 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json @@ -190,7 +190,13 @@ "description": "Request successful. Resource does not exist." }, "202": { - "description": "Accepted and the operation will complete asynchronously." + "description": "Accepted and the operation will complete asynchronously.", + "headers": { + "Location": { + "description": "The URI to poll for completion status.", + "type": "string" + } + } }, "200": { "description": "Delete successful." @@ -524,7 +530,13 @@ ], "responses": { "202": { - "description": "Accepted and the operation will complete asynchronously." + "description": "Accepted and the operation will complete asynchronously.", + "headers": { + "Location": { + "description": "The URI to poll for completion status.", + "type": "string" + } + } }, "default": { "description": "The error response describing why the operation failed.", diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/examples/DeletedManagedHsm_Purge.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/examples/DeletedManagedHsm_Purge.json index 6a96545ca1a5..63eb9edf5395 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/examples/DeletedManagedHsm_Purge.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/examples/DeletedManagedHsm_Purge.json @@ -6,6 +6,10 @@ "api-version": "2021-11-01-preview" }, "responses": { - "202": {} + "202": { + "headers": { + "Location": "https://some.endpoint.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1?api-version=2022-07-01&kv-operation=abJjb2RkIjoiAGVsZXRlTWFuYWdlZEhzbUFzeW5jYm9" + } + } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/examples/ManagedHsm_CreateOrUpdate.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/examples/ManagedHsm_CreateOrUpdate.json index 4bfa8d3fc0c9..70d1d9af1915 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/examples/ManagedHsm_CreateOrUpdate.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/examples/ManagedHsm_CreateOrUpdate.json @@ -27,6 +27,9 @@ }, "responses": { "202": { + "headers": { + "Location": "https://some.endpoint.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1?api-version=2022-07-01&kv-operation=abJjb2RkIjoiAGVsZXRlTWFuYWdlZEhzbUFzeW5jYm9" + }, "body": { "properties": { "tenantId": "00000000-0000-0000-0000-000000000000", diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/examples/ManagedHsm_Delete.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/examples/ManagedHsm_Delete.json index 39a55f849349..0bc0719601b3 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/examples/ManagedHsm_Delete.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/examples/ManagedHsm_Delete.json @@ -7,7 +7,11 @@ }, "responses": { "200": {}, - "202": {}, + "202": { + "headers": { + "Location": "https://some.endpoint.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1?api-version=2022-07-01&kv-operation=abJjb2RkIjoiAGVsZXRlTWFuYWdlZEhzbUFzeW5jYm9" + } + }, "204": {} } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json index dfb7906b74e4..45be1100f61b 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json @@ -190,7 +190,13 @@ "description": "Request successful. Resource does not exist." }, "202": { - "description": "Accepted and the operation will complete asynchronously." + "description": "Accepted and the operation will complete asynchronously.", + "headers": { + "Location": { + "description": "The URI to poll for completion status.", + "type": "string" + } + } }, "200": { "description": "Delete successful." @@ -524,7 +530,13 @@ ], "responses": { "202": { - "description": "Accepted and the operation will complete asynchronously." + "description": "Accepted and the operation will complete asynchronously.", + "headers": { + "Location": { + "description": "The URI to poll for completion status.", + "type": "string" + } + } }, "default": { "description": "The error response describing why the operation failed.", diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/examples/DeletedManagedHsm_Purge.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/examples/DeletedManagedHsm_Purge.json index 8a24f3996e32..ea15e91cf1df 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/examples/DeletedManagedHsm_Purge.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/examples/DeletedManagedHsm_Purge.json @@ -6,6 +6,10 @@ "api-version": "2021-10-01" }, "responses": { - "202": {} + "202": { + "headers": { + "Location": "https://some.endpoint.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1?api-version=2022-07-01&kv-operation=abJjb2RkIjoiAGVsZXRlTWFuYWdlZEhzbUFzeW5jYm9" + } + } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/examples/ManagedHsm_CreateOrUpdate.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/examples/ManagedHsm_CreateOrUpdate.json index f23af81e1da8..42ddc6a9a5a0 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/examples/ManagedHsm_CreateOrUpdate.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/examples/ManagedHsm_CreateOrUpdate.json @@ -27,6 +27,9 @@ }, "responses": { "202": { + "headers": { + "Location": "https://some.endpoint.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1?api-version=2022-07-01&kv-operation=abJjb2RkIjoiAGVsZXRlTWFuYWdlZEhzbUFzeW5jYm9" + }, "body": { "properties": { "tenantId": "00000000-0000-0000-0000-000000000000", diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/examples/ManagedHsm_Delete.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/examples/ManagedHsm_Delete.json index 19b5347c475b..99ca2a6bada3 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/examples/ManagedHsm_Delete.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/examples/ManagedHsm_Delete.json @@ -7,7 +7,11 @@ }, "responses": { "200": {}, - "202": {}, + "202": { + "headers": { + "Location": "https://some.endpoint.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.KeyVault/managedHSMs/hsm1?api-version=2022-07-01&kv-operation=abJjb2RkIjoiAGVsZXRlTWFuYWdlZEhzbUFzeW5jYm9" + } + }, "204": {} } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json index 1ac3434e2d5c..da16f6313688 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json @@ -190,7 +190,13 @@ "description": "Request successful. Resource does not exist." }, "202": { - "description": "Accepted and the operation will complete asynchronously." + "description": "Accepted and the operation will complete asynchronously.", + "headers": { + "Location": { + "description": "The URI to poll for completion status.", + "type": "string" + } + } }, "200": { "description": "Delete successful." @@ -524,7 +530,13 @@ ], "responses": { "202": { - "description": "Accepted and the operation will complete asynchronously." + "description": "Accepted and the operation will complete asynchronously.", + "headers": { + "Location": { + "description": "The URI to poll for completion status.", + "type": "string" + } + } }, "default": { "description": "The error response describing why the operation failed.", From 805f2c3029bebaafc342b93c4a8888fd07e3fb2e Mon Sep 17 00:00:00 2001 From: Neeraja Akula Date: Wed, 21 Dec 2022 10:10:33 -0800 Subject: [PATCH 4/5] removed default value for array as it breaks the arm template schema creation --- .../preview/2021-04-01-preview/managedHsm.json | 3 +-- .../preview/2021-06-01-preview/managedHsm.json | 3 +-- .../preview/2021-11-01-preview/managedHsm.json | 3 +-- .../Microsoft.KeyVault/stable/2021-10-01/managedHsm.json | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json index 61ba09ad80b9..e079c71522a5 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json @@ -1214,8 +1214,7 @@ "items": { "$ref": "#/definitions/MHSMIPRule" }, - "description": "The list of IP address rules.", - "default": [] + "description": "The list of IP address rules." }, "virtualNetworkRules": { "type": "array", diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json index 6a745d36caf5..f6b8d50c7c5f 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json @@ -1214,8 +1214,7 @@ "items": { "$ref": "#/definitions/MHSMIPRule" }, - "description": "The list of IP address rules.", - "default": [] + "description": "The list of IP address rules." }, "virtualNetworkRules": { "type": "array", diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json index 45be1100f61b..a1c40e48ff16 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json @@ -1214,8 +1214,7 @@ "items": { "$ref": "#/definitions/MHSMIPRule" }, - "description": "The list of IP address rules.", - "default": [] + "description": "The list of IP address rules." }, "virtualNetworkRules": { "type": "array", diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json index da16f6313688..64f3c979c648 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json @@ -1225,8 +1225,7 @@ "items": { "$ref": "#/definitions/MHSMIPRule" }, - "description": "The list of IP address rules.", - "default": [] + "description": "The list of IP address rules." }, "virtualNetworkRules": { "type": "array", From 42e9e42c7e6f14609e31f348e88dda4b93258f06 Mon Sep 17 00:00:00 2001 From: Neeraja Akula Date: Wed, 21 Dec 2022 10:26:12 -0800 Subject: [PATCH 5/5] removed default value for array for managed hsm virtual network rule as it breaks the arm template schema creation --- .../preview/2021-04-01-preview/managedHsm.json | 3 +-- .../preview/2021-06-01-preview/managedHsm.json | 3 +-- .../preview/2021-11-01-preview/managedHsm.json | 3 +-- .../Microsoft.KeyVault/stable/2021-10-01/managedHsm.json | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json index e079c71522a5..e822e4e16cff 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-04-01-preview/managedHsm.json @@ -1221,8 +1221,7 @@ "items": { "$ref": "#/definitions/MHSMVirtualNetworkRule" }, - "description": "The list of virtual network rules.", - "default": [] + "description": "The list of virtual network rules." } }, "description": "A set of rules governing the network accessibility of a managed hsm pool." diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json index f6b8d50c7c5f..0bbc65e4968d 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-06-01-preview/managedHsm.json @@ -1221,8 +1221,7 @@ "items": { "$ref": "#/definitions/MHSMVirtualNetworkRule" }, - "description": "The list of virtual network rules.", - "default": [] + "description": "The list of virtual network rules." } }, "description": "A set of rules governing the network accessibility of a managed hsm pool." diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json index a1c40e48ff16..0744dade1dde 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/preview/2021-11-01-preview/managedHsm.json @@ -1221,8 +1221,7 @@ "items": { "$ref": "#/definitions/MHSMVirtualNetworkRule" }, - "description": "The list of virtual network rules.", - "default": [] + "description": "The list of virtual network rules." } }, "description": "A set of rules governing the network accessibility of a managed hsm pool." diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json index 64f3c979c648..dbd0ead843cd 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2021-10-01/managedHsm.json @@ -1232,8 +1232,7 @@ "items": { "$ref": "#/definitions/MHSMVirtualNetworkRule" }, - "description": "The list of virtual network rules.", - "default": [] + "description": "The list of virtual network rules." } }, "description": "A set of rules governing the network accessibility of a managed hsm pool.",