From 820a811648f2ad945a1ebe35c79f9ec588f2c808 Mon Sep 17 00:00:00 2001 From: erelh Date: Wed, 12 Feb 2020 09:26:25 +0200 Subject: [PATCH 1/6] adding DELETE API to applicationWhitelistings --- .../applicationWhitelistings.json | 37 +++++++++++++++++++ ...eleteApplicationWhitelistings_example.json | 11 ++++++ 2 files changed, 48 insertions(+) create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/ApplicationWhitelistings/DeleteApplicationWhitelistings_example.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json b/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json index 803cf27d5b8f..d121773898ee 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json @@ -168,6 +168,43 @@ } } } + }, + "delete": { + "x-ms-examples": { + "Delete an application control VM/server group": { + "$ref": "./examples/ApplicationWhitelistings/DeleteApplicationWhitelistings_example.json" + } + }, + "tags": [ + "applicationWhitelistings" + ], + "description": "Delete an application control VM/server group", + "operationId": "AdaptiveApplicationControls_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/AscLocation" + }, + { + "$ref": "#/parameters/GroupName" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } } } }, diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/ApplicationWhitelistings/DeleteApplicationWhitelistings_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/ApplicationWhitelistings/DeleteApplicationWhitelistings_example.json new file mode 100644 index 000000000000..5fb1ffc3ab8e --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/ApplicationWhitelistings/DeleteApplicationWhitelistings_example.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2015-06-01-preview", + "subscriptionId": "3eeab341-f466-499c-a8be-85427e154baf", + "groupName": "GROUP1", + "ascLocation": "centralus" + }, + "responses": { + "200": {} + } +} From 4e2f970c42542afcb7c8b29ffb17b5e4409c7dbd Mon Sep 17 00:00:00 2001 From: erelh Date: Wed, 12 Feb 2020 09:28:56 +0200 Subject: [PATCH 2/6] adding NotFound to the response --- .../preview/2015-06-01-preview/applicationWhitelistings.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json b/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json index d121773898ee..e25612a736b0 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json @@ -198,6 +198,9 @@ "200": { "description": "OK" }, + "404": { + "description": "NotFound" + } "default": { "description": "Error response describing why the operation failed.", "schema": { From 68ce7206a51177ede2d69cb2d2d9130a802144ef Mon Sep 17 00:00:00 2001 From: erelh Date: Wed, 12 Feb 2020 09:30:18 +0200 Subject: [PATCH 3/6] fix whitespace --- .../2015-06-01-preview/applicationWhitelistings.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json b/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json index e25612a736b0..4df88dd6c9b5 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json @@ -198,9 +198,9 @@ "200": { "description": "OK" }, - "404": { - "description": "NotFound" - } + "404": { + "description": "NotFound" + }, "default": { "description": "Error response describing why the operation failed.", "schema": { From 7be5de0a2fa843d03e6061865e80bce166e3a708 Mon Sep 17 00:00:00 2001 From: erelh Date: Wed, 12 Feb 2020 09:33:58 +0200 Subject: [PATCH 4/6] add 404 to example --- .../DeleteApplicationWhitelistings_example.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/ApplicationWhitelistings/DeleteApplicationWhitelistings_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/ApplicationWhitelistings/DeleteApplicationWhitelistings_example.json index 5fb1ffc3ab8e..2c580eb1d1a3 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/ApplicationWhitelistings/DeleteApplicationWhitelistings_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/ApplicationWhitelistings/DeleteApplicationWhitelistings_example.json @@ -6,6 +6,7 @@ "ascLocation": "centralus" }, "responses": { - "200": {} + "200": {}, + "404": {} } } From 312ceba2725b569cff2e4bbb3d19a2e21c4bc4c5 Mon Sep 17 00:00:00 2001 From: erelh Date: Thu, 13 Feb 2020 08:55:27 +0200 Subject: [PATCH 5/6] changed 404 to 204 when group not found / already deleted --- .../preview/2015-06-01-preview/applicationWhitelistings.json | 4 ++-- .../DeleteApplicationWhitelistings_example.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json b/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json index 4df88dd6c9b5..1421fbca51c1 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json @@ -198,8 +198,8 @@ "200": { "description": "OK" }, - "404": { - "description": "NotFound" + "204": { + "description": "No Content" }, "default": { "description": "Error response describing why the operation failed.", diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/ApplicationWhitelistings/DeleteApplicationWhitelistings_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/ApplicationWhitelistings/DeleteApplicationWhitelistings_example.json index 2c580eb1d1a3..6e7cc0139827 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/ApplicationWhitelistings/DeleteApplicationWhitelistings_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/ApplicationWhitelistings/DeleteApplicationWhitelistings_example.json @@ -7,6 +7,6 @@ }, "responses": { "200": {}, - "404": {} + "204": {} } } From d9d0078a69cbd2a20067beaff0df3ae38481d833 Mon Sep 17 00:00:00 2001 From: erelh Date: Thu, 13 Feb 2020 09:01:38 +0200 Subject: [PATCH 6/6] added 202 Accepted when performing delete in the background --- .../2015-06-01-preview/applicationWhitelistings.json | 7 +++++-- .../DeleteApplicationWhitelistings_example.json | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json b/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json index 1421fbca51c1..b04c02b7d1af 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/applicationWhitelistings.json @@ -196,10 +196,13 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK - The response indicates that the delete operation completed successfully" + }, + "202": { + "description": "Accepted. The response indicates the delete operation is performed in the background." }, "204": { - "description": "No Content" + "description": "No Content. The response indicates the resource is already deleted." }, "default": { "description": "Error response describing why the operation failed.", diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/ApplicationWhitelistings/DeleteApplicationWhitelistings_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/ApplicationWhitelistings/DeleteApplicationWhitelistings_example.json index 6e7cc0139827..becfa217a797 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/ApplicationWhitelistings/DeleteApplicationWhitelistings_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/examples/ApplicationWhitelistings/DeleteApplicationWhitelistings_example.json @@ -7,6 +7,7 @@ }, "responses": { "200": {}, + "202": {}, "204": {} } }