From bdf3d5346bff7d3d372883819d897d1d904fe26d Mon Sep 17 00:00:00 2001 From: Nomi Gorovoy Date: Sun, 21 Feb 2021 16:50:28 +0200 Subject: [PATCH 1/9] fixing serverVulnerabilityAssessments swagger correctness in the delete action (instead of synchronous operation it is an asynchronous one) - so adding the operationResults path --- ...erverVulnerabilityAssessments_example.json | 27 ++++++ .../serverVulnerabilityAssessments.json | 93 ++++++++++++++++++- 2 files changed, 118 insertions(+), 2 deletions(-) create mode 100644 specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/GetLocationHeaderResultServerVulnerabilityAssessments_example.json diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/GetLocationHeaderResultServerVulnerabilityAssessments_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/GetLocationHeaderResultServerVulnerabilityAssessments_example.json new file mode 100644 index 000000000000..25b35de43db6 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/GetLocationHeaderResultServerVulnerabilityAssessments_example.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2020-01-01", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "rg1", + "resourceNamespace": "Microsoft.Compute", + "resourceType": "virtualMachines", + "resourceName": "vm1", + "serverVulnerabilityAssessment": "default", + "operationId": "fedcba98-7654-4210-fedc-ba9876543210" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Security/serverVulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Security/serverVulnerabilityAssessments", + "properties": { + "provisioningState": "Succeeded" + } + } + }, + "202": { + "body": {} + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json index d21a7bca94c7..c37809471257 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json @@ -174,6 +174,10 @@ "ServerVulnerabilityAssessment" ], "operationId": "ServerVulnerabilityAssessment_CreateOrUpdate", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "original-uri" + }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" @@ -242,6 +246,10 @@ "ServerVulnerabilityAssessment" ], "operationId": "ServerVulnerabilityAssessment_Delete", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" @@ -284,12 +292,93 @@ "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" } ], + "responses": { + "202": { + "description": "Accepted" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}/operationResults/{operationId}": { + "get": { + "x-ms-examples": { + "Get the result of an operation on a serverVulnerabilityAssessments resource": { + "$ref": "./examples/GetLocationHeaderResultServerVulnerabilityAssessments_example.json" + } + }, + "operationId": "ServerVulnerabilityAssessment_GetLocationHeaderResult", + "summary": "Get serverVulnerabilityAssessments operation status", + "description": "Get the status of a serverVulnerabilityAssessments operation", + "tags": [ + "ServerVulnerabilityAssessment" + ], + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "name": "resourceNamespace", + "in": "path", + "description": "The Namespace of the resource.", + "required": true, + "type": "string" + }, + { + "name": "resourceType", + "in": "path", + "description": "The type of the resource.", + "required": true, + "type": "string" + }, + { + "name": "resourceName", + "in": "path", + "description": "Name of the resource.", + "required": true, + "type": "string" + }, + { + "name": "serverVulnerabilityAssessment", + "in": "path", + "description": "ServerVulnerabilityAssessment status. only a 'default' value is supported.", + "required": true, + "type": "string", + "enum": [ + "default" + ] + }, + { + "name": "operationId", + "type": "string", + "in": "path", + "description": "The Operation ID.", + "required": true + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + } + ], "responses": { "200": { + "schema": { + "$ref": "#/definitions/ServerVulnerabilityAssessment" + }, "description": "OK" }, - "204": { - "description": "No Content - Resource does not exist" + "202": { + "schema": { + "type": "object" + }, + "description": "Accepted" }, "default": { "description": "Error response describing why the operation failed.", From 9f3e9a87a81275ca40081621189d01f66e8d3288 Mon Sep 17 00:00:00 2001 From: Nomi Gorovoy Date: Sun, 21 Feb 2021 16:57:05 +0200 Subject: [PATCH 2/9] fix the examples path --- .../stable/2020-01-01/serverVulnerabilityAssessments.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json index c37809471257..2ab4a4c62d71 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json @@ -309,7 +309,7 @@ "get": { "x-ms-examples": { "Get the result of an operation on a serverVulnerabilityAssessments resource": { - "$ref": "./examples/GetLocationHeaderResultServerVulnerabilityAssessments_example.json" + "$ref": "./examples/ServerVulnerabilityAssessments/GetLocationHeaderResultServerVulnerabilityAssessments_example.json" } }, "operationId": "ServerVulnerabilityAssessment_GetLocationHeaderResult", From d9c6292288244be2263ca0308073228f2072d2ed Mon Sep 17 00:00:00 2001 From: Nomi Gorovoy Date: Sun, 21 Feb 2021 17:03:13 +0200 Subject: [PATCH 3/9] updates to the delete and operationResults responses and status codes --- .../DeleteServerVulnerabilityAssessments_example.json | 3 +-- ...rResultServerVulnerabilityAssessments_example.json | 11 ++--------- .../2020-01-01/serverVulnerabilityAssessments.json | 4 ++-- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/DeleteServerVulnerabilityAssessments_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/DeleteServerVulnerabilityAssessments_example.json index b47510ee03bc..b0c7338f3da9 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/DeleteServerVulnerabilityAssessments_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/DeleteServerVulnerabilityAssessments_example.json @@ -9,7 +9,6 @@ "serverVulnerabilityAssessment": "default" }, "responses": { - "200": {}, - "204": {} + "202": {} } } diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/GetLocationHeaderResultServerVulnerabilityAssessments_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/GetLocationHeaderResultServerVulnerabilityAssessments_example.json index 25b35de43db6..27983b0791ef 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/GetLocationHeaderResultServerVulnerabilityAssessments_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/GetLocationHeaderResultServerVulnerabilityAssessments_example.json @@ -10,15 +10,8 @@ "operationId": "fedcba98-7654-4210-fedc-ba9876543210" }, "responses": { - "200": { - "body": { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Security/serverVulnerabilityAssessments/default", - "name": "default", - "type": "Microsoft.Security/serverVulnerabilityAssessments", - "properties": { - "provisioningState": "Succeeded" - } - } + "204": { + "body": {} }, "202": { "body": {} diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json index 2ab4a4c62d71..2b875ecf6f69 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json @@ -368,9 +368,9 @@ } ], "responses": { - "200": { + "204": { "schema": { - "$ref": "#/definitions/ServerVulnerabilityAssessment" + "type": "object" }, "description": "OK" }, From d7ea72656847ed4c1b6cd3495e4a9c2abc160965 Mon Sep 17 00:00:00 2001 From: Nomi Gorovoy Date: Sun, 21 Feb 2021 17:12:33 +0200 Subject: [PATCH 4/9] removing the long-running-operation from the put, and adding the synchronous status codes to the delete as well --- ...DeleteServerVulnerabilityAssessments_example.json | 4 +++- .../2020-01-01/serverVulnerabilityAssessments.json | 12 +++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/DeleteServerVulnerabilityAssessments_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/DeleteServerVulnerabilityAssessments_example.json index b0c7338f3da9..e1bda847104b 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/DeleteServerVulnerabilityAssessments_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/DeleteServerVulnerabilityAssessments_example.json @@ -9,6 +9,8 @@ "serverVulnerabilityAssessment": "default" }, "responses": { - "202": {} + "202": {}, + "200": {}, + "204": {} } } diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json index 2b875ecf6f69..cda542353c11 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json @@ -174,10 +174,6 @@ "ServerVulnerabilityAssessment" ], "operationId": "ServerVulnerabilityAssessment_CreateOrUpdate", - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "original-uri" - }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" @@ -294,7 +290,13 @@ ], "responses": { "202": { - "description": "Accepted" + "description": "Accepted - the asynchronous delete operation has started." + }, + "200": { + "description": "OK - deleted successfully." + }, + "204": { + "description": "No Content - the resource did not exist in the first place." }, "default": { "description": "Error response describing why the operation failed.", From 056ae33764ebee243be8158e0e5d3259c654a3b7 Mon Sep 17 00:00:00 2001 From: Nomi Gorovoy Date: Sun, 21 Feb 2021 18:01:39 +0200 Subject: [PATCH 5/9] fixing unconnected validation errors in SDK Track2 Validation --- .../CreateJitNetworkAccessPolicy_example.json | 9 ++------- .../InitiateJitNetworkAccessPolicy_example.json | 2 +- .../stable/2020-01-01/externalSecuritySolutions.json | 8 ++++---- .../stable/2020-01-01/jitNetworkAccessPolicies.json | 2 +- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/CreateJitNetworkAccessPolicy_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/CreateJitNetworkAccessPolicy_example.json index a6d2b72050f2..9e79e66eb110 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/CreateJitNetworkAccessPolicy_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/CreateJitNetworkAccessPolicy_example.json @@ -46,13 +46,8 @@ "startTimeUtc": "2018-05-17T08:06:45.5691611Z", "requestor": "barbara@contoso.com" } - ], - "provisioningState": "Succeeded" - }, - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Security/locations/westeurope/jitNetworkAccessPolicies/default", - "name": "default", - "type": "Microsoft.Security/locations/jitNetworkAccessPolicies", - "location": "westeurope" + ] + } } }, "responses": { diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/InitiateJitNetworkAccessPolicy_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/InitiateJitNetworkAccessPolicy_example.json index d944942dbf0c..18657750df49 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/InitiateJitNetworkAccessPolicy_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/InitiateJitNetworkAccessPolicy_example.json @@ -13,7 +13,7 @@ "ports": [ { "number": 3389, - "duration": "PT1H", + "endTimeUtc": "2018-07-12T09:53:03.3658798Z", "allowedSourceAddressPrefix": "192.127.0.2" } ] diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/externalSecuritySolutions.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/externalSecuritySolutions.json index 3b8b3b072232..173e46c5dfbf 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/externalSecuritySolutions.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/externalSecuritySolutions.json @@ -190,7 +190,7 @@ "$ref": "../../../common/v1/types.json#/definitions/Resource" }, { - "$ref": "#/definitions/ExternalSecuritySolutionKind" + "$ref": "#/definitions/ExternalSecuritySolutionWithKind" }, { "$ref": "../../../common/v1/types.json#/definitions/Location" @@ -242,7 +242,7 @@ } } }, - "ExternalSecuritySolutionKind": { + "ExternalSecuritySolutionWithKind": { "type": "object", "description": "Describes an Azure resource with kind", "properties": { @@ -298,7 +298,7 @@ } } }, - "AadConnectivityState": { + "SolutionWithAadConnectivityState": { "type": "object", "description": "Describes an Azure resource with kind", "properties": { @@ -336,7 +336,7 @@ "$ref": "#/definitions/ExternalSecuritySolutionProperties" }, { - "$ref": "#/definitions/AadConnectivityState" + "$ref": "#/definitions/SolutionWithAadConnectivityState" } ] }, diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/jitNetworkAccessPolicies.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/jitNetworkAccessPolicies.json index 9014390efee0..bcdd5a82ceb7 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/jitNetworkAccessPolicies.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/jitNetworkAccessPolicies.json @@ -495,7 +495,7 @@ "*" ], "x-ms-enum": { - "name": "protocol", + "name": "JitNetworkAccessPortRuleProtocol", "modelAsString": true, "values": [ { From 12baa06128ddfd985a8ae7425e015f2ff86fe738 Mon Sep 17 00:00:00 2001 From: Nomi Gorovoy Date: Sun, 21 Feb 2021 18:09:12 +0200 Subject: [PATCH 6/9] fixing SDK Track2 Validation errors - the same specifications were used twice under the same tag (the commented out version and a newer preview api-version) - which caused errors like: "Duplicate Operation '{Get/List}' detected" --- specification/security/resource-manager/readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 09c6332c1981..a83e1b71bce6 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -175,10 +175,10 @@ input-file: - Microsoft.Security/stable/2019-08-01/deviceSecurityGroups.json - Microsoft.Security/stable/2019-08-01/iotSecuritySolutions.json - Microsoft.Security/stable/2019-08-01/iotSecuritySolutionAnalytics.json -- Microsoft.Security/stable/2019-08-01/iotAlertTypes.json -- Microsoft.Security/stable/2019-08-01/iotAlerts.json -- Microsoft.Security/stable/2019-08-01/iotRecommendationTypes.json -- Microsoft.Security/stable/2019-08-01/iotRecommendations.json +#- Microsoft.Security/stable/2019-08-01/iotAlertTypes.json +#- Microsoft.Security/stable/2019-08-01/iotAlerts.json +#- Microsoft.Security/stable/2019-08-01/iotRecommendationTypes.json +#- Microsoft.Security/stable/2019-08-01/iotRecommendations.json - Microsoft.Security/preview/2015-06-01-preview/locations.json - Microsoft.Security/preview/2015-06-01-preview/operations.json - Microsoft.Security/preview/2015-06-01-preview/tasks.json From 8c50bf4ed1c90be5a5a334d295b93ef3fabe69d6 Mon Sep 17 00:00:00 2001 From: Nomi Gorovoy Date: Mon, 22 Feb 2021 09:00:11 +0200 Subject: [PATCH 7/9] Revert "fixing SDK Track2 Validation errors - the same specifications were used twice under the same tag (the commented out version and a newer preview api-version) - which caused errors like: "Duplicate Operation '{Get/List}' detected"" This reverts commit 12baa06128ddfd985a8ae7425e015f2ff86fe738. --- specification/security/resource-manager/readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index a83e1b71bce6..09c6332c1981 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -175,10 +175,10 @@ input-file: - Microsoft.Security/stable/2019-08-01/deviceSecurityGroups.json - Microsoft.Security/stable/2019-08-01/iotSecuritySolutions.json - Microsoft.Security/stable/2019-08-01/iotSecuritySolutionAnalytics.json -#- Microsoft.Security/stable/2019-08-01/iotAlertTypes.json -#- Microsoft.Security/stable/2019-08-01/iotAlerts.json -#- Microsoft.Security/stable/2019-08-01/iotRecommendationTypes.json -#- Microsoft.Security/stable/2019-08-01/iotRecommendations.json +- Microsoft.Security/stable/2019-08-01/iotAlertTypes.json +- Microsoft.Security/stable/2019-08-01/iotAlerts.json +- Microsoft.Security/stable/2019-08-01/iotRecommendationTypes.json +- Microsoft.Security/stable/2019-08-01/iotRecommendations.json - Microsoft.Security/preview/2015-06-01-preview/locations.json - Microsoft.Security/preview/2015-06-01-preview/operations.json - Microsoft.Security/preview/2015-06-01-preview/tasks.json From 2076afbc133e15f29d0bbe126d6984464573a99d Mon Sep 17 00:00:00 2001 From: Nomi Gorovoy Date: Mon, 22 Feb 2021 09:00:26 +0200 Subject: [PATCH 8/9] Revert "fixing unconnected validation errors in SDK Track2 Validation" This reverts commit 056ae33764ebee243be8158e0e5d3259c654a3b7. --- .../CreateJitNetworkAccessPolicy_example.json | 9 +++++++-- .../InitiateJitNetworkAccessPolicy_example.json | 2 +- .../stable/2020-01-01/externalSecuritySolutions.json | 8 ++++---- .../stable/2020-01-01/jitNetworkAccessPolicies.json | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/CreateJitNetworkAccessPolicy_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/CreateJitNetworkAccessPolicy_example.json index 9e79e66eb110..a6d2b72050f2 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/CreateJitNetworkAccessPolicy_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/CreateJitNetworkAccessPolicy_example.json @@ -46,8 +46,13 @@ "startTimeUtc": "2018-05-17T08:06:45.5691611Z", "requestor": "barbara@contoso.com" } - ] - } + ], + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg1/providers/Microsoft.Security/locations/westeurope/jitNetworkAccessPolicies/default", + "name": "default", + "type": "Microsoft.Security/locations/jitNetworkAccessPolicies", + "location": "westeurope" } }, "responses": { diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/InitiateJitNetworkAccessPolicy_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/InitiateJitNetworkAccessPolicy_example.json index 18657750df49..d944942dbf0c 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/InitiateJitNetworkAccessPolicy_example.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/JitNetworkAccessPolicies/InitiateJitNetworkAccessPolicy_example.json @@ -13,7 +13,7 @@ "ports": [ { "number": 3389, - "endTimeUtc": "2018-07-12T09:53:03.3658798Z", + "duration": "PT1H", "allowedSourceAddressPrefix": "192.127.0.2" } ] diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/externalSecuritySolutions.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/externalSecuritySolutions.json index 173e46c5dfbf..3b8b3b072232 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/externalSecuritySolutions.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/externalSecuritySolutions.json @@ -190,7 +190,7 @@ "$ref": "../../../common/v1/types.json#/definitions/Resource" }, { - "$ref": "#/definitions/ExternalSecuritySolutionWithKind" + "$ref": "#/definitions/ExternalSecuritySolutionKind" }, { "$ref": "../../../common/v1/types.json#/definitions/Location" @@ -242,7 +242,7 @@ } } }, - "ExternalSecuritySolutionWithKind": { + "ExternalSecuritySolutionKind": { "type": "object", "description": "Describes an Azure resource with kind", "properties": { @@ -298,7 +298,7 @@ } } }, - "SolutionWithAadConnectivityState": { + "AadConnectivityState": { "type": "object", "description": "Describes an Azure resource with kind", "properties": { @@ -336,7 +336,7 @@ "$ref": "#/definitions/ExternalSecuritySolutionProperties" }, { - "$ref": "#/definitions/SolutionWithAadConnectivityState" + "$ref": "#/definitions/AadConnectivityState" } ] }, diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/jitNetworkAccessPolicies.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/jitNetworkAccessPolicies.json index bcdd5a82ceb7..9014390efee0 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/jitNetworkAccessPolicies.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/jitNetworkAccessPolicies.json @@ -495,7 +495,7 @@ "*" ], "x-ms-enum": { - "name": "JitNetworkAccessPortRuleProtocol", + "name": "protocol", "modelAsString": true, "values": [ { From ea620fc790040da0e59a0951722ce8b5a2abb29e Mon Sep 17 00:00:00 2001 From: Nomi Gorovoy Date: Thu, 25 Feb 2021 21:45:28 +0200 Subject: [PATCH 9/9] removing the operationResults path and example from the swagger - as this resource type does not need to be declared in the Swagger (verified in ARM office hours) --- ...erverVulnerabilityAssessments_example.json | 20 ----- .../serverVulnerabilityAssessments.json | 84 ------------------- 2 files changed, 104 deletions(-) delete mode 100644 specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/GetLocationHeaderResultServerVulnerabilityAssessments_example.json diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/GetLocationHeaderResultServerVulnerabilityAssessments_example.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/GetLocationHeaderResultServerVulnerabilityAssessments_example.json deleted file mode 100644 index 27983b0791ef..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/examples/ServerVulnerabilityAssessments/GetLocationHeaderResultServerVulnerabilityAssessments_example.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "parameters": { - "api-version": "2020-01-01", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "resourceGroupName": "rg1", - "resourceNamespace": "Microsoft.Compute", - "resourceType": "virtualMachines", - "resourceName": "vm1", - "serverVulnerabilityAssessment": "default", - "operationId": "fedcba98-7654-4210-fedc-ba9876543210" - }, - "responses": { - "204": { - "body": {} - }, - "202": { - "body": {} - } - } -} diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json index cda542353c11..402846e94a0d 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/serverVulnerabilityAssessments.json @@ -306,90 +306,6 @@ } } } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/serverVulnerabilityAssessments/{serverVulnerabilityAssessment}/operationResults/{operationId}": { - "get": { - "x-ms-examples": { - "Get the result of an operation on a serverVulnerabilityAssessments resource": { - "$ref": "./examples/ServerVulnerabilityAssessments/GetLocationHeaderResultServerVulnerabilityAssessments_example.json" - } - }, - "operationId": "ServerVulnerabilityAssessment_GetLocationHeaderResult", - "summary": "Get serverVulnerabilityAssessments operation status", - "description": "Get the status of a serverVulnerabilityAssessments operation", - "tags": [ - "ServerVulnerabilityAssessment" - ], - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" - }, - { - "name": "resourceNamespace", - "in": "path", - "description": "The Namespace of the resource.", - "required": true, - "type": "string" - }, - { - "name": "resourceType", - "in": "path", - "description": "The type of the resource.", - "required": true, - "type": "string" - }, - { - "name": "resourceName", - "in": "path", - "description": "Name of the resource.", - "required": true, - "type": "string" - }, - { - "name": "serverVulnerabilityAssessment", - "in": "path", - "description": "ServerVulnerabilityAssessment status. only a 'default' value is supported.", - "required": true, - "type": "string", - "enum": [ - "default" - ] - }, - { - "name": "operationId", - "type": "string", - "in": "path", - "description": "The Operation ID.", - "required": true - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" - } - ], - "responses": { - "204": { - "schema": { - "type": "object" - }, - "description": "OK" - }, - "202": { - "schema": { - "type": "object" - }, - "description": "Accepted" - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../common/v1/types.json#/definitions/CloudError" - } - } - } - } } }, "definitions": {