From c17088c975e4813369ea0fc881e3f5310d817f25 Mon Sep 17 00:00:00 2001 From: Jiacheng Liu Date: Mon, 9 Nov 2020 15:30:31 +0800 Subject: [PATCH 1/9] Add missing response error codes in keyvault 2019-09-01 --- .../2019-09-01/examples/createSecret.json | 27 ++++++ .../2019-09-01/examples/createVault.json | 18 ++++ .../examples/createVaultWithNetworkAcls.json | 18 ++++ .../2019-09-01/examples/deleteVault.json | 9 ++ .../2019-09-01/examples/getDeletedVault.json | 9 ++ .../getPrivateEndpointConnection.json | 5 +- .../stable/2019-09-01/examples/getSecret.json | 9 ++ .../stable/2019-09-01/examples/getVault.json | 9 ++ .../examples/listDeletedVaults.json | 18 ++++ .../examples/purgeDeletedVault.json | 18 ++++ .../putPrivateEndpointConnection.json | 2 +- .../examples/updateAccessPoliciesAdd.json | 27 ++++++ .../2019-09-01/examples/updateSecret.json | 27 ++++++ .../2019-09-01/examples/updateVault.json | 18 ++++ .../stable/2019-09-01/keyvault.json | 89 ++++++++++++++++++- .../stable/2019-09-01/secrets.json | 60 +++++++++++++ 16 files changed, 360 insertions(+), 3 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createSecret.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createSecret.json index 0d4d906f43dd..5e5f856f9d5d 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createSecret.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createSecret.json @@ -45,6 +45,33 @@ "secretUriWithVersion": "https:/sample-vault.vault.azure.net/secrets/secret-name/baf6de32c4774c7c81345f6476cf90a4" } } + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } + }, + "404": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } + }, + "409": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json index 3fc271c1e345..387ff246d9c5 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json @@ -214,6 +214,24 @@ "vaultUri": "https://sample-vault.vault.azure.net" } } + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } + }, + "409": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVaultWithNetworkAcls.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVaultWithNetworkAcls.json index 4ec2fd01f791..25836d5d730a 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVaultWithNetworkAcls.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVaultWithNetworkAcls.json @@ -109,6 +109,24 @@ "vaultUri": "https://sample-vault.vault.azure.net" } } + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } + }, + "409": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/deleteVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/deleteVault.json index bf878ab72f09..d55bfca42cbc 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/deleteVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/deleteVault.json @@ -11,6 +11,15 @@ }, "204": { "headers": {} + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getDeletedVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getDeletedVault.json index 93c41753d287..0b7145d5388f 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getDeletedVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getDeletedVault.json @@ -20,6 +20,15 @@ "scheduledPurgeDate": "2017-04-01T00:00:59Z" } } + }, + "404": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getPrivateEndpointConnection.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getPrivateEndpointConnection.json index 2fb84a554652..ae1ecab0f116 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getPrivateEndpointConnection.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getPrivateEndpointConnection.json @@ -20,10 +20,13 @@ "privateLinkServiceConnectionState": { "status": "Approved", "description": "This was automatically approved by user1234@contoso.com", - "actionRequired": "None" + "actionsRequired": "None" } } } + }, + "204": { + "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getSecret.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getSecret.json index 983e9142ebdc..2b95a4ab45ec 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getSecret.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getSecret.json @@ -23,6 +23,15 @@ "secretUriWithVersion": "https://sample-vault.vault.azure.net/secrets/secret-name/77445834f7de41bab81d0723bf996860" } } + }, + "404": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getVault.json index 995d00bc660a..5f99b8903b74 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getVault.json @@ -77,6 +77,15 @@ "vaultUri": "https://sample-vault.vault.azure.net" } } + }, + "404": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listDeletedVaults.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listDeletedVaults.json index 25d46f0016f8..140ed84523e3 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listDeletedVaults.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listDeletedVaults.json @@ -23,6 +23,24 @@ ], "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3RaoMwAEX%2fRcbeYhJrnRXKYNWOuqpME0sfNcYui0Yxade19N8ne7hcDlzOvVuKX81eKKmt4G4dooLQwgqsL2NGHUDYV6o68Z4rY1e388RtNvRQn2vNJjEaMSgNvcbneMUcsKg8BFwft8DndQ0w9hu2QOiFLRs4TsNFNHzSMBFsGvTQGvuD%2f5bVuTOw4R03vPkH%2fVqNAlzm5SxfOwh7ACOA8POTlvPjILlaU1ke8jImOc23JCppQVfZnna0DXc4ISc3vSVuRo5zJE6%2bj25C3vwk2v2kEV2mMn7PyOc1DbtNGkonnzuLym1G400uI5QRZj0efw%3d%3d" } + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } + }, + "404": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/purgeDeletedVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/purgeDeletedVault.json index 77be8c8de649..fc69d562bb0d 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/purgeDeletedVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/purgeDeletedVault.json @@ -11,6 +11,24 @@ }, "202": { "headers": {} + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } + }, + "404": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/putPrivateEndpointConnection.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/putPrivateEndpointConnection.json index 2e37409c6098..6f2437db6840 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/putPrivateEndpointConnection.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/putPrivateEndpointConnection.json @@ -28,7 +28,7 @@ "privateLinkServiceConnectionState": { "status": "Approved", "description": "My name is Joe and I'm approving this.", - "actionRequired": "None" + "actionsRequired": "None" } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateAccessPoliciesAdd.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateAccessPoliciesAdd.json index 139a8e1e5cf4..4a851d1b1477 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateAccessPoliciesAdd.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateAccessPoliciesAdd.json @@ -77,6 +77,33 @@ ] } } + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } + }, + "404": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } + }, + "409": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateSecret.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateSecret.json index 436c344e0142..1b603211c0be 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateSecret.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateSecret.json @@ -45,6 +45,33 @@ "secretUriWithVersion": "https://sample-vault.vault.azure.net/secrets/secret-name/b8c802f549764f2d97885d152f92ee9d" } } + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } + }, + "404": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } + }, + "409": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json index 6b6618511a8d..257d59675b32 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json @@ -213,6 +213,24 @@ "vaultUri": "https://sample-vault.vault.azure.net" } } + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } + }, + "409": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json index 03580e76e435..131e916fda5d 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json @@ -62,6 +62,18 @@ "schema": { "$ref": "#/definitions/Vault" } + }, + "400": { + "description": "Bad request.", + "schema": { + "$ref": "#/definitions/CloudError" + } + }, + "409": { + "description": "A conflict occurred to prevent the operation from completing.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-examples": { @@ -129,6 +141,18 @@ "schema": { "$ref": "#/definitions/Vault" } + }, + "400": { + "description": "Bad request.", + "schema": { + "$ref": "#/definitions/CloudError" + } + }, + "409": { + "description": "A conflict occurred to prevent the operation from completing.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-examples": { @@ -177,6 +201,12 @@ }, "204": { "description": "No Content." + }, + "400": { + "description": "Bad request.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-examples": { @@ -225,6 +255,12 @@ "schema": { "$ref": "#/definitions/Vault" } + }, + "404": { + "description": "The specified resource does not exist.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-examples": { @@ -307,6 +343,24 @@ "schema": { "$ref": "#/definitions/VaultAccessPolicyParameters" } + }, + "400": { + "description": "Bad request.", + "schema": { + "$ref": "#/definitions/CloudError" + } + }, + "404": { + "description": "The specified resource does not exist.", + "schema": { + "$ref": "#/definitions/CloudError" + } + }, + "409": { + "description": "A conflict occurred to prevent the operation from completing.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-examples": { @@ -442,6 +496,18 @@ "schema": { "$ref": "#/definitions/DeletedVaultListResult" } + }, + "400": { + "description": "Bad request.", + "schema": { + "$ref": "#/definitions/CloudError" + } + }, + "404": { + "description": "The specified resource does not exist.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-pageable": { @@ -495,6 +561,12 @@ "schema": { "$ref": "#/definitions/DeletedVault" } + }, + "404": { + "description": "The specified resource does not exist.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-examples": { @@ -546,6 +618,18 @@ }, "202": { "description": "Vault is being purged." + }, + "400": { + "description": "Bad request.", + "schema": { + "$ref": "#/definitions/CloudError" + } + }, + "404": { + "description": "The specified resource does not exist.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-examples": { @@ -706,6 +790,9 @@ "$ref": "#/definitions/PrivateEndpointConnection" } }, + "204": { + "description": "The private endpoint connection does not exist." + }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -1695,7 +1782,7 @@ "type": "string", "description": "The reason for approval or rejection." }, - "actionRequired": { + "actionsRequired": { "type": "string", "description": "A message indicating if changes on the service provider require any updates on the consumer." } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json index 986ea6b7bfc0..4ad88155812e 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json @@ -69,6 +69,24 @@ "schema": { "$ref": "#/definitions/Secret" } + }, + "400": { + "description": "Bad request.", + "schema": { + "$ref": "#/definitions/CloudError" + } + }, + "404": { + "description": "The specified resource does not exist.", + "schema": { + "$ref": "#/definitions/CloudError" + } + }, + "409": { + "description": "A conflict occurred to prevent the operation from completing.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-examples": { @@ -141,6 +159,24 @@ "schema": { "$ref": "#/definitions/Secret" } + }, + "400": { + "description": "Bad request.", + "schema": { + "$ref": "#/definitions/CloudError" + } + }, + "404": { + "description": "The specified resource does not exist.", + "schema": { + "$ref": "#/definitions/CloudError" + } + }, + "409": { + "description": "A conflict occurred to prevent the operation from completing.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-examples": { @@ -196,6 +232,12 @@ "schema": { "$ref": "#/definitions/Secret" } + }, + "404": { + "description": "The specified resource does not exist.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-examples": { @@ -306,6 +348,24 @@ }, "description": "The object attributes managed by the KeyVault service." }, + "SecretCloudError": { + "description": "An error response from Key Vault resource provider", + "properties": { + "error": { + "description": "An error response from Key Vault resource provider", + "properties": { + "code": { + "type": "string", + "description": "Error code. This is a mnemonic that can be consumed programmatically." + }, + "message": { + "type": "string", + "description": "User friendly error message. The message is typically localized and may vary with service version." + } + } + } + } + }, "SecretProperties": { "properties": { "value": { From 557326d1cca09ca11561582ef8e3a5da743c502e Mon Sep 17 00:00:00 2001 From: Jiacheng Liu Date: Mon, 9 Nov 2020 15:59:25 +0800 Subject: [PATCH 2/9] Fix copy/paste error --- .../stable/2019-09-01/secrets.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json index 4ad88155812e..97871e527218 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json @@ -73,19 +73,19 @@ "400": { "description": "Bad request.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "#/definitions/SecretCloudError" } }, "404": { "description": "The specified resource does not exist.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "#/definitions/SecretCloudError" } }, "409": { "description": "A conflict occurred to prevent the operation from completing.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "#/definitions/SecretCloudError" } } }, @@ -163,19 +163,19 @@ "400": { "description": "Bad request.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "#/definitions/SecretCloudError" } }, "404": { "description": "The specified resource does not exist.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "#/definitions/SecretCloudError" } }, "409": { "description": "A conflict occurred to prevent the operation from completing.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "#/definitions/SecretCloudError" } } }, @@ -236,7 +236,7 @@ "404": { "description": "The specified resource does not exist.", "schema": { - "$ref": "#/definitions/CloudError" + "$ref": "#/definitions/SecretCloudError" } } }, From a7dbe974794a420dcbf501d3aab0ae66bd1cb1ee Mon Sep 17 00:00:00 2001 From: Jiacheng Liu Date: Mon, 9 Nov 2020 17:56:26 +0800 Subject: [PATCH 3/9] Fix missing properties definition in KeyVault 2019-09-01 --- .../2019-09-01/examples/createVault.json | 6 +- .../2019-09-01/examples/getDeletedVault.json | 3 +- .../getPrivateEndpointConnection.json | 1 + .../stable/2019-09-01/examples/getVault.json | 3 +- .../examples/listDeletedVaults.json | 3 +- .../2019-09-01/examples/listOperations.json | 68 +++++++++++++------ .../examples/listVaultByResourceGroup.json | 3 +- .../examples/listVaultBySubscription.json | 3 +- .../2019-09-01/examples/updateVault.json | 6 +- .../stable/2019-09-01/keyvault.json | 13 ++++ .../stable/2019-09-01/providers.json | 4 ++ 11 files changed, 82 insertions(+), 31 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json index 387ff246d9c5..e30f2dc68e70 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json @@ -139,7 +139,8 @@ "enabledForDeployment": true, "enabledForDiskEncryption": true, "enabledForTemplateDeployment": true, - "vaultUri": "https://sample-vault.vault.azure.net" + "vaultUri": "https://sample-vault.vault.azure.net", + "provisioningState": "Succeeded" } } }, @@ -211,7 +212,8 @@ "enabledForDeployment": true, "enabledForDiskEncryption": true, "enabledForTemplateDeployment": true, - "vaultUri": "https://sample-vault.vault.azure.net" + "vaultUri": "https://sample-vault.vault.azure.net", + "provisioningState": "Succeeded" } } }, diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getDeletedVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getDeletedVault.json index 0b7145d5388f..6cca55dce8fa 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getDeletedVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getDeletedVault.json @@ -17,7 +17,8 @@ "location": "westus", "tags": {}, "deletionDate": "2017-01-01T00:00:59Z", - "scheduledPurgeDate": "2017-04-01T00:00:59Z" + "scheduledPurgeDate": "2017-04-01T00:00:59Z", + "purgeProtectionEnabled": true } } }, diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getPrivateEndpointConnection.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getPrivateEndpointConnection.json index ae1ecab0f116..287caee88a94 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getPrivateEndpointConnection.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getPrivateEndpointConnection.json @@ -12,6 +12,7 @@ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.KeyVault/vaults/sample-vault/privateEndpointConnections/sample-pec", "name": "sample-pec", "type": "Microsoft.KeyVault/vaults/privateEndpointConnections", + "etag": "", "properties": { "provisioningState": "Succeeded", "privateEndpoint": { diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getVault.json index 5f99b8903b74..f20073b722a2 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getVault.json @@ -74,7 +74,8 @@ "enabledForDeployment": true, "enabledForDiskEncryption": true, "enabledForTemplateDeployment": true, - "vaultUri": "https://sample-vault.vault.azure.net" + "vaultUri": "https://sample-vault.vault.azure.net", + "provisioningState": "Succeeded" } } }, diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listDeletedVaults.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listDeletedVaults.json index 140ed84523e3..cd55e805f4d3 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listDeletedVaults.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listDeletedVaults.json @@ -17,7 +17,8 @@ "location": "westus", "tags": {}, "deletionDate": "2017-01-01T00:00:59Z", - "scheduledPurgeDate": "2017-04-01T00:00:59Z" + "scheduledPurgeDate": "2017-04-01T00:00:59Z", + "purgeProtectionEnabled": true } } ], diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listOperations.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listOperations.json index e7dba2c4690f..be106ba931ad 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listOperations.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listOperations.json @@ -13,7 +13,8 @@ "resource": "Key Vault", "operation": "View Key Vault", "description": "View the properties of a key vault" - } + }, + "isDataAction": false }, { "name": "Microsoft.KeyVault/vaults/write", @@ -22,7 +23,8 @@ "resource": "Key Vault", "operation": "Update Key Vault", "description": "Create a new key vault or update the properties of an existing key vault" - } + }, + "isDataAction": false }, { "name": "Microsoft.KeyVault/vaults/delete", @@ -31,7 +33,8 @@ "resource": "Key Vault", "operation": "Delete Key Vault", "description": "Delete a key vault" - } + }, + "isDataAction": false }, { "name": "Microsoft.KeyVault/vaults/deploy/action", @@ -40,7 +43,8 @@ "resource": "Key Vault", "operation": "Use Vault for Azure Deployments", "description": "Enables access to secrets in a key vault when deploying Azure resources" - } + }, + "isDataAction": false }, { "name": "Microsoft.KeyVault/vaults/secrets/read", @@ -49,7 +53,8 @@ "resource": "Secret", "operation": "View Secret Properties", "description": "View the properties of a secret, but not its value" - } + }, + "isDataAction": false }, { "name": "Microsoft.KeyVault/vaults/secrets/write", @@ -58,7 +63,8 @@ "resource": "Secret", "operation": "Update Secret", "description": "Create a new secret or update the value of an existing secret" - } + }, + "isDataAction": false }, { "name": "Microsoft.KeyVault/vaults/accessPolicies/write", @@ -67,7 +73,8 @@ "resource": "Access Policy", "operation": "Update Access Policy", "description": "Update an existing access policy by merging or replacing, or add a new access policy to a vault." - } + }, + "isDataAction": false }, { "origin": "system", @@ -78,6 +85,7 @@ "operation": "Read log definition", "description": "Gets the available logs for a key vault" }, + "isDataAction": false, "properties": { "serviceSpecification": { "logSpecifications": [ @@ -98,7 +106,8 @@ "resource": "Key Vault Diagnostic Settings", "operation": "Read diagnostic setting", "description": "Gets the diagnostic setting for the resource" - } + }, + "isDataAction": false }, { "origin": "system", @@ -108,7 +117,8 @@ "resource": "Key Vault Diagnostic Settings", "operation": "Write diagnostic setting", "description": "Creates or updates the diagnostic setting for the resource" - } + }, + "isDataAction": false }, { "name": "Microsoft.KeyVault/register/action", @@ -117,7 +127,8 @@ "resource": "Subscription", "operation": "Register Subscription", "description": "Registers a subscription" - } + }, + "isDataAction": false }, { "name": "Microsoft.KeyVault/unregister/action", @@ -126,7 +137,8 @@ "resource": "Subscription", "operation": "Unregister Subscription", "description": "Unregisters a subscription" - } + }, + "isDataAction": false }, { "name": "Microsoft.KeyVault/operations/read", @@ -135,7 +147,8 @@ "resource": "Operations", "operation": "Available Key Vault Operations", "description": "Lists operations available on Microsoft.KeyVault resource provider" - } + }, + "isDataAction": false }, { "name": "Microsoft.KeyVault/checkNameAvailability/read", @@ -144,7 +157,8 @@ "resource": "Name Availability", "operation": "Check Name Availability", "description": "Checks that a key vault name is valid and is not in use" - } + }, + "isDataAction": false }, { "name": "Microsoft.KeyVault/deletedVaults/read", @@ -153,7 +167,8 @@ "resource": "Soft Deleted Key Vault", "operation": "View Soft Deleted Vaults", "description": "View the properties of soft deleted key vaults" - } + }, + "isDataAction": false }, { "name": "Microsoft.KeyVault/locations/deletedVaults/read", @@ -162,7 +177,8 @@ "resource": "Soft Deleted Key Vault", "operation": "View Soft Deleted Key Vault", "description": "View the properties of a soft deleted key vault" - } + }, + "isDataAction": false }, { "name": "Microsoft.KeyVault/locations/deletedVaults/purge/action", @@ -171,7 +187,8 @@ "resource": "Soft Deleted Key Vault", "operation": "Purge Soft Deleted Key Vault", "description": "Purge a soft deleted key vault" - } + }, + "isDataAction": false }, { "name": "Microsoft.KeyVault/locations/operationResults/read", @@ -180,7 +197,8 @@ "resource": "Long Run Operation Result", "operation": "Check Operation Result", "description": "Check the result of a long run operation" - } + }, + "isDataAction": false }, { "name": "Microsoft.KeyVault/hsmPools/read", @@ -189,7 +207,8 @@ "resource": "HSM pool", "operation": "View HSM pool", "description": "View the properties of an HSM pool" - } + }, + "isDataAction": false }, { "name": "Microsoft.KeyVault/hsmPools/write", @@ -198,7 +217,8 @@ "resource": "HSM pool", "operation": "Create or Update HSM pool", "description": "Create a new HSM pool of update the properties of an existing HSM pool" - } + }, + "isDataAction": false }, { "name": "Microsoft.KeyVault/hsmPools/delete", @@ -207,7 +227,8 @@ "resource": "HSM pool", "operation": "Delete HSM pool", "description": "Delete an HSM pool" - } + }, + "isDataAction": false }, { "name": "Microsoft.KeyVault/hsmPools/joinVault/action", @@ -216,7 +237,8 @@ "resource": "HSM pool", "operation": "Join KeyVault to HSM pool", "description": "Join a key vault to an HSM pool" - } + }, + "isDataAction": false }, { "origin": "system", @@ -227,6 +249,7 @@ "operation": "Read metric definition", "description": "Gets the available metrics for a key vault" }, + "isDataAction": false, "properties": { "serviceSpecification": {} } @@ -239,7 +262,8 @@ "resource": "Location", "operation": "Modify Network ACLs containing the deleted Vitual Network or Subnet ", "description": "Notifies Microsoft.KeyVault that a virtual network or subnet is being deleted" - } + }, + "isDataAction": false } ] } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listVaultByResourceGroup.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listVaultByResourceGroup.json index a5b7f68d5bff..7d268a9e9f88 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listVaultByResourceGroup.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listVaultByResourceGroup.json @@ -77,7 +77,8 @@ "enabledForDiskEncryption": true, "enabledForTemplateDeployment": true, "enableSoftDelete": true, - "vaultUri": "https://sample-vault.vault.azure.net/" + "vaultUri": "https://sample-vault.vault.azure.net/", + "provisioningState": "Succeeded" } } ], diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listVaultBySubscription.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listVaultBySubscription.json index ca44a615c810..5dbc66d540e1 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listVaultBySubscription.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listVaultBySubscription.json @@ -76,7 +76,8 @@ "enabledForDiskEncryption": true, "enabledForTemplateDeployment": true, "enableSoftDelete": true, - "vaultUri": "https://sample-vault.vault.azure.net/" + "vaultUri": "https://sample-vault.vault.azure.net/", + "provisioningState": "Succeeded" } } ], diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json index 257d59675b32..8ca879358c90 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json @@ -138,7 +138,8 @@ "enabledForDeployment": true, "enabledForDiskEncryption": true, "enabledForTemplateDeployment": true, - "vaultUri": "https://sample-vault.vault.azure.net" + "vaultUri": "https://sample-vault.vault.azure.net", + "provisioningState": "Succeeded" } } }, @@ -210,7 +211,8 @@ "enabledForDeployment": true, "enabledForDiskEncryption": true, "enabledForTemplateDeployment": true, - "vaultUri": "https://sample-vault.vault.azure.net" + "vaultUri": "https://sample-vault.vault.azure.net", + "provisioningState": "Succeeded" } } }, diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json index 131e916fda5d..86c6468a89fa 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json @@ -1249,6 +1249,10 @@ "$ref": "#/definitions/NetworkRuleSet", "description": "Rules governing the accessibility of the key vault from specific network locations." }, + "provisioningState": { + "type": "string", + "description": "Provisioning state of the vault." + }, "privateEndpointConnections": { "readOnly": true, "type": "array", @@ -1376,6 +1380,11 @@ "type": "string" }, "description": "Tags of the original vault." + }, + "purgeProtectionEnabled": { + "readOnly": true, + "type": "boolean", + "description": "Purge protection status of the original vault." } }, "description": "Properties of the deleted vault." @@ -1735,6 +1744,10 @@ "$ref": "#/definitions/PrivateEndpointConnectionProperties", "x-ms-client-flatten": true, "description": "Resource properties." + }, + "etag": { + "type": "string", + "description": "Modified whenever the user or NRP changes the state of PE connection." } }, "allOf": [ diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/providers.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/providers.json index 57042ef41eeb..d1f28d8f5599 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/providers.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/providers.json @@ -108,6 +108,10 @@ "x-ms-client-flatten": true, "x-ms-client-name": "OperationProperties", "$ref": "#/definitions/OperationProperties" + }, + "isDataAction": { + "type": "boolean", + "description": "Property to specify whether the action is a data action." } } }, From cdecb282c8ffa4d82b64990b47daa6cdff0a6970 Mon Sep 17 00:00:00 2001 From: Jiacheng Liu Date: Tue, 10 Nov 2020 11:36:18 +0800 Subject: [PATCH 4/9] Remove x-ms-pageable to fix Go SDK Generation issue --- .../stable/2019-09-01/keyvault.json | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json index 86c6468a89fa..38d9a3e49bd7 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json @@ -413,9 +413,6 @@ } } }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, "x-ms-examples": { "List vaults in the specified resource group": { "$ref": "./examples/listVaultByResourceGroup.json" @@ -459,9 +456,6 @@ } } }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, "x-ms-examples": { "List vaults in the specified subscription": { "$ref": "./examples/listVaultBySubscription.json" @@ -510,9 +504,6 @@ } } }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, "x-ms-examples": { "List deleted vaults in the specified subscription": { "$ref": "./examples/listDeletedVaults.json" @@ -693,9 +684,6 @@ } } }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, "x-ms-examples": { "List vaults in the specified subscription": { "$ref": "./examples/listVault.json" From 7c65784a8b7054657040612b3555f0a1ab4dc293 Mon Sep 17 00:00:00 2001 From: Jiacheng Liu Date: Wed, 11 Nov 2020 12:10:26 +0800 Subject: [PATCH 5/9] Revert "Remove x-ms-pageable to fix Go SDK Generation issue" This reverts commit cdecb282c8ffa4d82b64990b47daa6cdff0a6970. Remove response code changes in ListDeleted operation --- .../examples/listDeletedVaults.json | 18 -------------- .../stable/2019-09-01/keyvault.json | 24 +++++++++---------- 2 files changed, 12 insertions(+), 30 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listDeletedVaults.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listDeletedVaults.json index cd55e805f4d3..fccc87aa51de 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listDeletedVaults.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/listDeletedVaults.json @@ -24,24 +24,6 @@ ], "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3RaoMwAEX%2fRcbeYhJrnRXKYNWOuqpME0sfNcYui0Yxade19N8ne7hcDlzOvVuKX81eKKmt4G4dooLQwgqsL2NGHUDYV6o68Z4rY1e388RtNvRQn2vNJjEaMSgNvcbneMUcsKg8BFwft8DndQ0w9hu2QOiFLRs4TsNFNHzSMBFsGvTQGvuD%2f5bVuTOw4R03vPkH%2fVqNAlzm5SxfOwh7ACOA8POTlvPjILlaU1ke8jImOc23JCppQVfZnna0DXc4ISc3vSVuRo5zJE6%2bj25C3vwk2v2kEV2mMn7PyOc1DbtNGkonnzuLym1G400uI5QRZj0efw%3d%3d" } - }, - "400": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } - }, - "404": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json index 38d9a3e49bd7..362dfaf71191 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json @@ -413,6 +413,9 @@ } } }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, "x-ms-examples": { "List vaults in the specified resource group": { "$ref": "./examples/listVaultByResourceGroup.json" @@ -456,6 +459,9 @@ } } }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, "x-ms-examples": { "List vaults in the specified subscription": { "$ref": "./examples/listVaultBySubscription.json" @@ -490,20 +496,11 @@ "schema": { "$ref": "#/definitions/DeletedVaultListResult" } - }, - "400": { - "description": "Bad request.", - "schema": { - "$ref": "#/definitions/CloudError" - } - }, - "404": { - "description": "The specified resource does not exist.", - "schema": { - "$ref": "#/definitions/CloudError" - } } }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, "x-ms-examples": { "List deleted vaults in the specified subscription": { "$ref": "./examples/listDeletedVaults.json" @@ -684,6 +681,9 @@ } } }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, "x-ms-examples": { "List vaults in the specified subscription": { "$ref": "./examples/listVault.json" From cef4fbfb0f4963e2c0bf198e963be896763ba2f2 Mon Sep 17 00:00:00 2001 From: Jiacheng Liu Date: Wed, 11 Nov 2020 17:34:11 +0800 Subject: [PATCH 6/9] Remove error response schema as it would change the current result type --- .../2019-09-01/examples/createSecret.json | 24 +------- .../2019-09-01/examples/createVault.json | 16 +---- .../examples/createVaultWithNetworkAcls.json | 16 +---- .../2019-09-01/examples/deleteVault.json | 8 +-- .../2019-09-01/examples/getDeletedVault.json | 8 +-- .../stable/2019-09-01/examples/getSecret.json | 8 +-- .../stable/2019-09-01/examples/getVault.json | 8 +-- .../examples/purgeDeletedVault.json | 16 +---- .../examples/updateAccessPoliciesAdd.json | 24 +------- .../2019-09-01/examples/updateSecret.json | 24 +------- .../2019-09-01/examples/updateVault.json | 16 +---- .../stable/2019-09-01/keyvault.json | 60 ++++--------------- .../stable/2019-09-01/secrets.json | 53 +++------------- 13 files changed, 40 insertions(+), 241 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createSecret.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createSecret.json index 5e5f856f9d5d..946db9cd1b28 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createSecret.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createSecret.json @@ -47,31 +47,13 @@ } }, "400": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} }, "404": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} }, "409": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json index e30f2dc68e70..30dc8468897c 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json @@ -218,22 +218,10 @@ } }, "400": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} }, "409": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVaultWithNetworkAcls.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVaultWithNetworkAcls.json index 25836d5d730a..048edc80a801 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVaultWithNetworkAcls.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVaultWithNetworkAcls.json @@ -111,22 +111,10 @@ } }, "400": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} }, "409": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/deleteVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/deleteVault.json index d55bfca42cbc..9f05b246398e 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/deleteVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/deleteVault.json @@ -13,13 +13,7 @@ "headers": {} }, "400": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getDeletedVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getDeletedVault.json index 6cca55dce8fa..516d6127f2e5 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getDeletedVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getDeletedVault.json @@ -23,13 +23,7 @@ } }, "404": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getSecret.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getSecret.json index 2b95a4ab45ec..33075d3c1202 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getSecret.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getSecret.json @@ -25,13 +25,7 @@ } }, "404": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getVault.json index f20073b722a2..d1afdf9fb923 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getVault.json @@ -80,13 +80,7 @@ } }, "404": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/purgeDeletedVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/purgeDeletedVault.json index fc69d562bb0d..425477b60762 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/purgeDeletedVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/purgeDeletedVault.json @@ -13,22 +13,10 @@ "headers": {} }, "400": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} }, "404": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateAccessPoliciesAdd.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateAccessPoliciesAdd.json index 4a851d1b1477..2bc5457a4642 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateAccessPoliciesAdd.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateAccessPoliciesAdd.json @@ -79,31 +79,13 @@ } }, "400": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} }, "404": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} }, "409": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateSecret.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateSecret.json index 1b603211c0be..5bc22b81c4ae 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateSecret.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateSecret.json @@ -47,31 +47,13 @@ } }, "400": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} }, "404": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} }, "409": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json index 8ca879358c90..60ef8634cf89 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json @@ -217,22 +217,10 @@ } }, "400": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} }, "409": { - "headers": {}, - "body": { - "error": { - "code": "", - "message": "" - } - } + "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json index 362dfaf71191..b098edf0023c 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json @@ -64,16 +64,10 @@ } }, "400": { - "description": "Bad request.", - "schema": { - "$ref": "#/definitions/CloudError" - } + "description": "Bad request." }, "409": { - "description": "A conflict occurred to prevent the operation from completing.", - "schema": { - "$ref": "#/definitions/CloudError" - } + "description": "A conflict occurred to prevent the operation from completing." } }, "x-ms-examples": { @@ -143,16 +137,10 @@ } }, "400": { - "description": "Bad request.", - "schema": { - "$ref": "#/definitions/CloudError" - } + "description": "Bad request." }, "409": { - "description": "A conflict occurred to prevent the operation from completing.", - "schema": { - "$ref": "#/definitions/CloudError" - } + "description": "A conflict occurred to prevent the operation from completing." } }, "x-ms-examples": { @@ -203,10 +191,7 @@ "description": "No Content." }, "400": { - "description": "Bad request.", - "schema": { - "$ref": "#/definitions/CloudError" - } + "description": "Bad request." } }, "x-ms-examples": { @@ -257,10 +242,7 @@ } }, "404": { - "description": "The specified resource does not exist.", - "schema": { - "$ref": "#/definitions/CloudError" - } + "description": "The specified resource does not exist." } }, "x-ms-examples": { @@ -345,22 +327,13 @@ } }, "400": { - "description": "Bad request.", - "schema": { - "$ref": "#/definitions/CloudError" - } + "description": "Bad request." }, "404": { - "description": "The specified resource does not exist.", - "schema": { - "$ref": "#/definitions/CloudError" - } + "description": "The specified resource does not exist." }, "409": { - "description": "A conflict occurred to prevent the operation from completing.", - "schema": { - "$ref": "#/definitions/CloudError" - } + "description": "A conflict occurred to prevent the operation from completing." } }, "x-ms-examples": { @@ -551,10 +524,7 @@ } }, "404": { - "description": "The specified resource does not exist.", - "schema": { - "$ref": "#/definitions/CloudError" - } + "description": "The specified resource does not exist." } }, "x-ms-examples": { @@ -608,16 +578,10 @@ "description": "Vault is being purged." }, "400": { - "description": "Bad request.", - "schema": { - "$ref": "#/definitions/CloudError" - } + "description": "Bad request." }, "404": { - "description": "The specified resource does not exist.", - "schema": { - "$ref": "#/definitions/CloudError" - } + "description": "The specified resource does not exist." } }, "x-ms-examples": { diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json index 97871e527218..b5d37c6e274a 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json @@ -71,22 +71,13 @@ } }, "400": { - "description": "Bad request.", - "schema": { - "$ref": "#/definitions/SecretCloudError" - } + "description": "Bad request." }, "404": { - "description": "The specified resource does not exist.", - "schema": { - "$ref": "#/definitions/SecretCloudError" - } + "description": "The specified resource does not exist." }, "409": { - "description": "A conflict occurred to prevent the operation from completing.", - "schema": { - "$ref": "#/definitions/SecretCloudError" - } + "description": "A conflict occurred to prevent the operation from completing." } }, "x-ms-examples": { @@ -161,22 +152,13 @@ } }, "400": { - "description": "Bad request.", - "schema": { - "$ref": "#/definitions/SecretCloudError" - } + "description": "Bad request." }, "404": { - "description": "The specified resource does not exist.", - "schema": { - "$ref": "#/definitions/SecretCloudError" - } + "description": "The specified resource does not exist." }, "409": { - "description": "A conflict occurred to prevent the operation from completing.", - "schema": { - "$ref": "#/definitions/SecretCloudError" - } + "description": "A conflict occurred to prevent the operation from completing." } }, "x-ms-examples": { @@ -234,10 +216,7 @@ } }, "404": { - "description": "The specified resource does not exist.", - "schema": { - "$ref": "#/definitions/SecretCloudError" - } + "description": "The specified resource does not exist." } }, "x-ms-examples": { @@ -348,24 +327,6 @@ }, "description": "The object attributes managed by the KeyVault service." }, - "SecretCloudError": { - "description": "An error response from Key Vault resource provider", - "properties": { - "error": { - "description": "An error response from Key Vault resource provider", - "properties": { - "code": { - "type": "string", - "description": "Error code. This is a mnemonic that can be consumed programmatically." - }, - "message": { - "type": "string", - "description": "User friendly error message. The message is typically localized and may vary with service version." - } - } - } - } - }, "SecretProperties": { "properties": { "value": { From 4fbe2ecf6a86314210fbcc29e178417278ee5099 Mon Sep 17 00:00:00 2001 From: Jiacheng Liu Date: Fri, 4 Dec 2020 16:49:41 +0800 Subject: [PATCH 7/9] Address comment to change the error code to default --- .../2019-09-01/examples/createSecret.json | 9 --- .../2019-09-01/examples/createVault.json | 6 -- .../examples/createVaultWithNetworkAcls.json | 6 -- .../2019-09-01/examples/deleteVault.json | 3 - .../2019-09-01/examples/getDeletedVault.json | 3 - .../stable/2019-09-01/examples/getSecret.json | 3 - .../stable/2019-09-01/examples/getVault.json | 3 - .../examples/purgeDeletedVault.json | 6 -- .../examples/updateAccessPoliciesAdd.json | 9 --- .../2019-09-01/examples/updateSecret.json | 9 --- .../2019-09-01/examples/updateVault.json | 6 -- .../stable/2019-09-01/keyvault.json | 64 ++++++++++--------- .../stable/2019-09-01/secrets.json | 52 +++++++++------ 13 files changed, 69 insertions(+), 110 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createSecret.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createSecret.json index 946db9cd1b28..0d4d906f43dd 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createSecret.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createSecret.json @@ -45,15 +45,6 @@ "secretUriWithVersion": "https:/sample-vault.vault.azure.net/secrets/secret-name/baf6de32c4774c7c81345f6476cf90a4" } } - }, - "400": { - "headers": {} - }, - "404": { - "headers": {} - }, - "409": { - "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json index 30dc8468897c..2a7343f1dd92 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json @@ -216,12 +216,6 @@ "provisioningState": "Succeeded" } } - }, - "400": { - "headers": {} - }, - "409": { - "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVaultWithNetworkAcls.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVaultWithNetworkAcls.json index 048edc80a801..4ec2fd01f791 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVaultWithNetworkAcls.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVaultWithNetworkAcls.json @@ -109,12 +109,6 @@ "vaultUri": "https://sample-vault.vault.azure.net" } } - }, - "400": { - "headers": {} - }, - "409": { - "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/deleteVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/deleteVault.json index 9f05b246398e..bf878ab72f09 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/deleteVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/deleteVault.json @@ -11,9 +11,6 @@ }, "204": { "headers": {} - }, - "400": { - "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getDeletedVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getDeletedVault.json index 516d6127f2e5..a155370fb141 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getDeletedVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getDeletedVault.json @@ -21,9 +21,6 @@ "purgeProtectionEnabled": true } } - }, - "404": { - "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getSecret.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getSecret.json index 33075d3c1202..983e9142ebdc 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getSecret.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getSecret.json @@ -23,9 +23,6 @@ "secretUriWithVersion": "https://sample-vault.vault.azure.net/secrets/secret-name/77445834f7de41bab81d0723bf996860" } } - }, - "404": { - "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getVault.json index d1afdf9fb923..9f67314260e5 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/getVault.json @@ -78,9 +78,6 @@ "provisioningState": "Succeeded" } } - }, - "404": { - "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/purgeDeletedVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/purgeDeletedVault.json index 425477b60762..77be8c8de649 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/purgeDeletedVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/purgeDeletedVault.json @@ -11,12 +11,6 @@ }, "202": { "headers": {} - }, - "400": { - "headers": {} - }, - "404": { - "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateAccessPoliciesAdd.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateAccessPoliciesAdd.json index 2bc5457a4642..139a8e1e5cf4 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateAccessPoliciesAdd.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateAccessPoliciesAdd.json @@ -77,15 +77,6 @@ ] } } - }, - "400": { - "headers": {} - }, - "404": { - "headers": {} - }, - "409": { - "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateSecret.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateSecret.json index 5bc22b81c4ae..436c344e0142 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateSecret.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateSecret.json @@ -45,15 +45,6 @@ "secretUriWithVersion": "https://sample-vault.vault.azure.net/secrets/secret-name/b8c802f549764f2d97885d152f92ee9d" } } - }, - "400": { - "headers": {} - }, - "404": { - "headers": {} - }, - "409": { - "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json index 60ef8634cf89..ab5ddd1dd782 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json @@ -215,12 +215,6 @@ "provisioningState": "Succeeded" } } - }, - "400": { - "headers": {} - }, - "409": { - "headers": {} } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json index b098edf0023c..a80c323d2d61 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json @@ -63,11 +63,11 @@ "$ref": "#/definitions/Vault" } }, - "400": { - "description": "Bad request." - }, - "409": { - "description": "A conflict occurred to prevent the operation from completing." + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-examples": { @@ -136,11 +136,11 @@ "$ref": "#/definitions/Vault" } }, - "400": { - "description": "Bad request." - }, - "409": { - "description": "A conflict occurred to prevent the operation from completing." + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-examples": { @@ -190,8 +190,11 @@ "204": { "description": "No Content." }, - "400": { - "description": "Bad request." + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-examples": { @@ -241,8 +244,11 @@ "$ref": "#/definitions/Vault" } }, - "404": { - "description": "The specified resource does not exist." + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-examples": { @@ -326,14 +332,11 @@ "$ref": "#/definitions/VaultAccessPolicyParameters" } }, - "400": { - "description": "Bad request." - }, - "404": { - "description": "The specified resource does not exist." - }, - "409": { - "description": "A conflict occurred to prevent the operation from completing." + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-examples": { @@ -523,8 +526,11 @@ "$ref": "#/definitions/DeletedVault" } }, - "404": { - "description": "The specified resource does not exist." + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-examples": { @@ -577,11 +583,11 @@ "202": { "description": "Vault is being purged." }, - "400": { - "description": "Bad request." - }, - "404": { - "description": "The specified resource does not exist." + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } } }, "x-ms-examples": { diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json index b5d37c6e274a..7bdb6f60cb15 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json @@ -70,14 +70,11 @@ "$ref": "#/definitions/Secret" } }, - "400": { - "description": "Bad request." - }, - "404": { - "description": "The specified resource does not exist." - }, - "409": { - "description": "A conflict occurred to prevent the operation from completing." + "default": { + "description": "Bad request.", + "schema": { + "$ref": "#/definitions/ResponseError" + } } }, "x-ms-examples": { @@ -151,14 +148,11 @@ "$ref": "#/definitions/Secret" } }, - "400": { - "description": "Bad request." - }, - "404": { - "description": "The specified resource does not exist." - }, - "409": { - "description": "A conflict occurred to prevent the operation from completing." + "default": { + "description": "Bad request.", + "schema": { + "$ref": "#/definitions/ResponseError" + } } }, "x-ms-examples": { @@ -215,8 +209,11 @@ "$ref": "#/definitions/Secret" } }, - "404": { - "description": "The specified resource does not exist." + "default": { + "description": "Bad request.", + "schema": { + "$ref": "#/definitions/ResponseError" + } } }, "x-ms-examples": { @@ -294,6 +291,25 @@ } }, "definitions": { + "ResponseError": { + "description": "An error response from Key Vault resource provider", + "properties": { + "error": { + "description": "An error response from Key Vault resource provider", + "properties": { + "code": { + "type": "string", + "description": "Error code. This is a mnemonic that can be consumed programmatically." + }, + "message": { + "type": "string", + "description": "User friendly error message. The message is typically localized and may vary with service version." + } + } + } + }, + "x-ms-external": true + }, "Attributes": { "properties": { "enabled": { From 2dc3e9fd3a13496c343dd930c0f96dbaa104eb9d Mon Sep 17 00:00:00 2001 From: Jiacheng Liu Date: Mon, 7 Dec 2020 13:21:09 +0800 Subject: [PATCH 8/9] Update description --- .../Microsoft.KeyVault/stable/2019-09-01/secrets.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json index 7bdb6f60cb15..69bd1c38e79a 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/secrets.json @@ -71,7 +71,7 @@ } }, "default": { - "description": "Bad request.", + "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ResponseError" } @@ -149,7 +149,7 @@ } }, "default": { - "description": "Bad request.", + "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ResponseError" } @@ -210,7 +210,7 @@ } }, "default": { - "description": "Bad request.", + "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/ResponseError" } From 3316dfbf7c4fb07c0df93247f7c3f7a32cbc7232 Mon Sep 17 00:00:00 2001 From: Jiacheng Liu Date: Sun, 10 Jan 2021 00:10:12 +0800 Subject: [PATCH 9/9] Add back the response code Add missing integer format --- .../2019-09-01/examples/createVault.json | 18 ++++ .../examples/createVaultWithNetworkAcls.json | 18 ++++ .../2019-09-01/examples/deleteVault.json | 9 ++ .../examples/purgeDeletedVault.json | 18 ++++ .../examples/updateAccessPoliciesAdd.json | 27 ++++++ .../2019-09-01/examples/updateVault.json | 18 ++++ .../stable/2019-09-01/keyvault.json | 88 ++++++++++++++++++- 7 files changed, 192 insertions(+), 4 deletions(-) diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json index 2a7343f1dd92..e30f2dc68e70 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVault.json @@ -216,6 +216,24 @@ "provisioningState": "Succeeded" } } + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } + }, + "409": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVaultWithNetworkAcls.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVaultWithNetworkAcls.json index 4ec2fd01f791..25836d5d730a 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVaultWithNetworkAcls.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/createVaultWithNetworkAcls.json @@ -109,6 +109,24 @@ "vaultUri": "https://sample-vault.vault.azure.net" } } + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } + }, + "409": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/deleteVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/deleteVault.json index bf878ab72f09..d55bfca42cbc 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/deleteVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/deleteVault.json @@ -11,6 +11,15 @@ }, "204": { "headers": {} + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/purgeDeletedVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/purgeDeletedVault.json index 77be8c8de649..fc69d562bb0d 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/purgeDeletedVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/purgeDeletedVault.json @@ -11,6 +11,24 @@ }, "202": { "headers": {} + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } + }, + "404": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateAccessPoliciesAdd.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateAccessPoliciesAdd.json index 139a8e1e5cf4..4a851d1b1477 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateAccessPoliciesAdd.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateAccessPoliciesAdd.json @@ -77,6 +77,33 @@ ] } } + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } + }, + "404": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } + }, + "409": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json index ab5ddd1dd782..8ca879358c90 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/examples/updateVault.json @@ -215,6 +215,24 @@ "provisioningState": "Succeeded" } } + }, + "400": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } + }, + "409": { + "headers": {}, + "body": { + "error": { + "code": "", + "message": "" + } + } } } } diff --git a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json index a80c323d2d61..9f83b2bedbb1 100644 --- a/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json +++ b/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2019-09-01/keyvault.json @@ -63,6 +63,20 @@ "$ref": "#/definitions/Vault" } }, + "400": { + "description": "Bad request.", + "schema": { + "$ref": "#/definitions/CloudError" + }, + "x-ms-error-response": true + }, + "409": { + "description": "A conflict occurred to prevent the operation from completing.", + "schema": { + "$ref": "#/definitions/CloudError" + }, + "x-ms-error-response": true + }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -136,6 +150,20 @@ "$ref": "#/definitions/Vault" } }, + "400": { + "description": "Bad request.", + "schema": { + "$ref": "#/definitions/CloudError" + }, + "x-ms-error-response": true + }, + "409": { + "description": "A conflict occurred to prevent the operation from completing.", + "schema": { + "$ref": "#/definitions/CloudError" + }, + "x-ms-error-response": true + }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -190,6 +218,13 @@ "204": { "description": "No Content." }, + "400": { + "description": "Bad request.", + "schema": { + "$ref": "#/definitions/CloudError" + }, + "x-ms-error-response": true + }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -332,6 +367,27 @@ "$ref": "#/definitions/VaultAccessPolicyParameters" } }, + "400": { + "description": "Bad request.", + "schema": { + "$ref": "#/definitions/CloudError" + }, + "x-ms-error-response": true + }, + "404": { + "description": "The specified resource does not exist.", + "schema": { + "$ref": "#/definitions/CloudError" + }, + "x-ms-error-response": true + }, + "409": { + "description": "A conflict occurred to prevent the operation from completing.", + "schema": { + "$ref": "#/definitions/CloudError" + }, + "x-ms-error-response": true + }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -583,6 +639,20 @@ "202": { "description": "Vault is being purged." }, + "400": { + "description": "Bad request.", + "schema": { + "$ref": "#/definitions/CloudError" + }, + "x-ms-error-response": true + }, + "404": { + "description": "The specified resource does not exist.", + "schema": { + "$ref": "#/definitions/CloudError" + }, + "x-ms-error-response": true + }, "default": { "description": "Error response describing why the operation failed.", "schema": { @@ -808,7 +878,8 @@ "headers": { "Retry-After": { "description": "(specified only if operation does not finish synchronously) The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation.", - "type": "integer" + "type": "integer", + "format": "int32" }, "Azure-AsyncOperation": { "description": "(specified only if operation does not finish synchronously) The URI to poll for completion status. The response of this URI may be synchronous or asynchronous.", @@ -870,7 +941,8 @@ "headers": { "Retry-After": { "description": "The recommended number of seconds to wait before calling the URI specified in the location header.", - "type": "integer" + "type": "integer", + "format": "int32" }, "Location": { "description": "The URI to poll for completion status.", @@ -1209,7 +1281,15 @@ }, "provisioningState": { "type": "string", - "description": "Provisioning state of the vault." + "description": "Provisioning state of the vault.", + "enum": [ + "Succeeded", + "RegisteringDns" + ], + "x-ms-enum": { + "name": "VaultProvisioningState", + "modelAsString": true + } }, "privateEndpointConnections": { "readOnly": true, @@ -1705,7 +1785,7 @@ }, "etag": { "type": "string", - "description": "Modified whenever the user or NRP changes the state of PE connection." + "description": "Modified whenever there is a change in the state of private endpoint connection." } }, "allOf": [