From e6a2296d02ec6c4b2c32479198bfbcb9b16ea247 Mon Sep 17 00:00:00 2001 From: Ruoxuan Wang <52271048+ruowan@users.noreply.github.com> Date: Tue, 11 Jan 2022 13:28:40 +0800 Subject: [PATCH] Revert "[DO NOT MERGE ] Introduce new scanners resource type (#17107)" (#17232) This reverts commit 30fca88fa23112e4296322f38610e02da522d390. --- .../Scanners/DeleteScanner_example.json | 12 - .../examples/Scanners/GetScanner_example.json | 27 -- .../ListBySubscriptionScanners_example.json | 44 --- .../Scanners/ListScanners_example.json | 45 --- .../examples/Scanners/PutScanner_example.json | 28 -- .../preview/2021-12-01-preview/scanners.json | 302 ------------------ .../security/resource-manager/readme.md | 16 - 7 files changed, 474 deletions(-) delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/DeleteScanner_example.json delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/GetScanner_example.json delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/ListBySubscriptionScanners_example.json delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/ListScanners_example.json delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/PutScanner_example.json delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/scanners.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/DeleteScanner_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/DeleteScanner_example.json deleted file mode 100644 index 348ef6f73b34..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/DeleteScanner_example.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parameters": { - "api-version": "2021-12-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "resourceGroupName": "myResourceGroup", - "scannerName": "scanner" - }, - "responses": { - "200": {}, - "204": {} - } -} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/GetScanner_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/GetScanner_example.json deleted file mode 100644 index 84ccc7029f44..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/GetScanner_example.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "parameters": { - "api-version": "2021-12-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "resourceGroupName": "myResourceGroup", - "scannerName": "scanner" - }, - "responses": { - "200": { - "body": { - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/scanners/scanner", - "name": "scanner", - "type": "Microsoft.Security/scanners", - "location": "East US", - "etag": "etag value", - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } - } - } - } -} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/ListBySubscriptionScanners_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/ListBySubscriptionScanners_example.json deleted file mode 100644 index 1b1ef6f5bf59..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/ListBySubscriptionScanners_example.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "parameters": { - "api-version": "2021-12-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/scanners/scanner1", - "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "type": "Microsoft.Security/scanners", - "location": "East US", - "etag": "etag value", - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } - }, - { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/scanners/155afdf9-d239-4a5c-847f-89da613e7143", - "name": "155afdf9-d239-4a5c-847f-89da613e7143", - "type": "Microsoft.Security/scanners", - "location": "East US", - "etag": "etag value", - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } - } - ] - } - } - } -} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/ListScanners_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/ListScanners_example.json deleted file mode 100644 index 9317dca68617..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/ListScanners_example.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "parameters": { - "api-version": "2021-12-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "resourceGroupName": "myResourceGroup" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/scanners/scanner1", - "name": "scanner1", - "type": "Microsoft.Security/scanners", - "location": "East US", - "etag": "etag value", - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } - }, - { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/scanners/scanner2", - "name": "scanner2", - "type": "Microsoft.Security/scanners", - "location": "East US", - "etag": "etag value", - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } - } - ] - } - } - } -} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/PutScanner_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/PutScanner_example.json deleted file mode 100644 index e9be864aae15..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/examples/Scanners/PutScanner_example.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "parameters": { - "api-version": "2021-12-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "resourceGroupName": "myResourceGroup", - "scannerName": "scanner", - "scanner": {} - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/provider/Microsoft.Security/scanners/scanner", - "name": "scanner", - "type": "Microsoft.Security/scanners", - "location": "East US", - "etag": "etag value", - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } - } - } - } -} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/scanners.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/scanners.json deleted file mode 100644 index 85438ae6187f..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-12-01-preview/scanners.json +++ /dev/null @@ -1,302 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Security Center", - "description": "API spec for Microsoft.Security (Azure Security Center) resource provider", - "version": "2021-12-01-preview" - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "security": [ - { - "azure_auth": [ - "user_impersonation" - ] - } - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "paths": { - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/scanners": { - "get": { - "x-ms-examples": { - "List security scanners by subscription level scope": { - "$ref": "./examples/Scanners/ListBySubscriptionScanners_example.json" - } - }, - "tags": [ - "Scanners" - ], - "description": "Get a list of all relevant security Scanners over a subscription level scope.", - "operationId": "Scanners_ListBySubscription", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/ScannersList" - } - }, - "default": { - "description": "Error response describing why the operation failed", - "schema": { - "$ref": "../../../common/v1/types.json#/definitions/CloudError" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/scanners": { - "get": { - "x-ms-examples": { - "List security scanners": { - "$ref": "./examples/Scanners/ListScanners_example.json" - } - }, - "tags": [ - "Scanners" - ], - "description": "Get security scanners on all your resources inside a scope", - "operationId": "Scanners_List", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/ScannersList" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../common/v1/types.json#/definitions/CloudError" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/scanners/{scannerName}": { - "get": { - "x-ms-examples": { - "Get a specific security scanner by scope and scannerName": { - "$ref": "./examples/Scanners/GetScanner_example.json" - } - }, - "tags": [ - "Scanners" - ], - "description": "Get a specific security scanner for the requested scope", - "operationId": "Scanners_Get", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" - }, - { - "$ref": "#/parameters/ScannerName" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Scanner" - } - }, - "default": { - "description": "Error response describing why the operation failed", - "schema": { - "$ref": "../../../common/v1/types.json#/definitions/CloudError" - } - } - } - }, - "put": { - "x-ms-examples": { - "Create a security scanner on a specified scope": { - "$ref": "./examples/Scanners/PutScanner_example.json" - } - }, - "tags": [ - "Scanners" - ], - "description": "Create a security scanner on the given scope.", - "operationId": "Scanners_CreateOrUpdate", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" - }, - { - "$ref": "#/parameters/ScannerName" - }, - { - "$ref": "#/parameters/ScannerBody" - } - ], - "responses": { - "200": { - "description": "Successful request to put scanner.", - "schema": { - "$ref": "#/definitions/Scanner" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../common/v1/types.json#/definitions/CloudError" - } - } - } - }, - "delete": { - "x-ms-examples": { - "Delete a security scanner": { - "$ref": "./examples/Scanners/DeleteScanner_example.json" - } - }, - "tags": [ - "Scanners" - ], - "description": "Delete a security Scanners.", - "operationId": "Scanners_Delete", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" - }, - { - "$ref": "#/parameters/ScannerName" - } - ], - "responses": { - "200": { - "description": "OK - Scanner was deleted" - }, - "204": { - "description": "No Content - Scanner does not exist" - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../common/v1/types.json#/definitions/CloudError" - } - } - } - } - } - }, - "definitions": { - "ScannersList": { - "type": "object", - "description": "Page of a Scanners list", - "properties": { - "value": { - "description": "Collection of Scanners in this page", - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/Scanner" - } - }, - "nextLink": { - "readOnly": true, - "type": "string", - "description": "The URI to fetch the next page" - } - } - }, - "Scanner": { - "type": "object", - "description": "Security Scanner resource", - "properties": { - "systemData": { - "readOnly": true, - "type": "object", - "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" - } - }, - "allOf": [ - { - "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" - } - ] - } - }, - "parameters": { - "ScannerName": { - "name": "scannerName", - "in": "path", - "required": true, - "type": "string", - "description": "Security scanner name", - "x-ms-parameter-location": "method" - }, - "ScannerBody": { - "name": "scanner", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Scanner" - }, - "description": "security scanner", - "x-ms-parameter-location": "method" - } - } -} diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 4eaebdea41e0..abd1373a9744 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -56,10 +56,6 @@ directive: where: $.paths from: standards.json reason: Suppression of OperationsAPI as it doesn't apply to this specific file. - - suppress: OperationsAPIImplementation - where: $.paths - from: scanners.json - reason: Suppression of OperationsAPI as it doesn't apply to this specific file. ``` ### Basic Information @@ -90,18 +86,6 @@ override-info: title: SecurityCenter ``` -### Tag: package-preview-2021-12 - -These settings apply only when `--tag=package-preview-2021-12` is specified on the command line. - -``` yaml $(tag) == 'package-preview-2021-12' -input-file: - - Microsoft.Security/preview/2021-12-01-preview/scanners.json - -override-info: - title: SecurityCenter -``` - ### Tag: package-composite-v1 These settings apply only when `--tag=package-composite-v1` is specified on the command line.