From 429315ac4e8166e75fe51d2507d3c5c1e924ea6c Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Mon, 25 Apr 2022 14:30:35 +0300 Subject: [PATCH 01/24] Add new Sql VA API --- ...lVulnerabilityAssessmentRuleBaselines.json | 519 ++++++++++++++++ ...eSqlVulnerabilityAssessmentScanResult.json | 486 +++++++++++++++ ...tabaseSqlVulnerabilityAssessmentScans.json | 464 +++++++++++++++ ...qlVulnerabilityAssessmentRuleBaseline.json | 554 ++++++++++++++++++ .../SqlVulnerabilityAssessmentScanResult.json | 500 ++++++++++++++++ .../SqlVulnerabilityAssessmentScans.json | 352 +++++++++++ .../SqlVulnerabilityAssessments.json | 316 ++++++++++ .../SqlVulnerabilityAssessmentsSettings.json | 316 ++++++++++ ...lnerabilityAssessmentListScansResults.json | 133 +++++ ...ulnerabilityAssessmentRuleBaselineAdd.json | 73 +++ ...bilityAssessmentRuleBaselineAddLatest.json | 55 ++ ...erabilityAssessmentRuleBaselineCreate.json | 55 ++ ...erabilityAssessmentRuleBaselineDelete.json | 14 + ...ulnerabilityAssessmentRuleBaselineGet.json | 36 ++ ...yAssessmentRuleBaselineListByDatabase.json | 61 ++ ...atabaseSqlVulnerabilityAssessmentScan.json | 37 ++ ...qlVulnerabilityAssessmentScansExecute.json | 14 + ...qlVulnerabilityAssessmentScansResults.json | 73 +++ .../SqlVulnerabilityAssessmentCreate.json | 36 ++ .../SqlVulnerabilityAssessmentDelete.json | 12 + .../SqlVulnerabilityAssessmentGet.json | 21 + ...qlVulnerabilityAssessmentListByServer.json | 24 + ...lnerabilityAssessmentListScansResults.json | 133 +++++ ...ulnerabilityAssessmentRuleBaselineAdd.json | 77 +++ ...bilityAssessmentRuleBaselineAddLatest.json | 55 ++ ...ulnerabilityAssessmentRuleBaselineGet.json | 36 ++ ...yAssessmentRuleBaselineListByDatabase.json | 60 ++ .../SqlVulnerabilityAssessmentScan.json | 37 ++ ...tyAssessmentScanRecordsListByDatabase.json | 84 +++ ...qlVulnerabilityAssessmentScansExecute.json | 14 + ...qlVulnerabilityAssessmentScansResults.json | 73 +++ 31 files changed, 4720 insertions(+) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessments.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListScansResults.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAdd.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAddLatest.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScan.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansExecute.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentCreate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentListByServer.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentListScansResults.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAdd.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAddLatest.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScan.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScansExecute.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScansResults.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json new file mode 100644 index 000000000000..823ff0f7dbcb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json @@ -0,0 +1,519 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselineRules": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentRuleBaselines" + ], + "description": "Gets a list of database's sql vulnerability assessment rule baselines.", + "operationId": "DatabaseSqlVulnerabilityAssessmentRuleBaselines_ListBySqlvulnerabilityAssessment", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the sql vulnerability assessment rule baseline list.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of database's sql vulnerability assessment rule baselines.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByDatabase.json" + } + } + }, + "post": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentRuleBaselines" + ], + "description": "Add a database's vulnerability assessment rule baseline list.", + "operationId": "DatabaseSqlVulnerabilityAssessmentRuleBaselines_AddBaselineRules", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested rule baseline resource.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully add the vulnerability assessment rule baseline list.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Add a database's vulnerability assessment rule baseline list.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAdd.json" + }, + "Add a database's vulnerability assessment rule baseline from the latest scan result.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAddLatest.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselineRules/{ruleId}": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentRuleBaselines" + ], + "description": "Gets a database's sql vulnerability assessment rule baseline.", + "operationId": "DatabaseSqlVulnerabilityAssessmentRuleBaselines_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the sql vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Gets a database's sql vulnerability assessment rule baseline.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json" + } + } + }, + "put": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentRuleBaselines" + ], + "description": "Creates or updates a database's vulnerability assessment rule baseline.", + "operationId": "DatabaseSqlVulnerabilityAssessmentRuleBaselines_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested rule baseline resource.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineInput" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Creates or updates a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json" + } + } + }, + "delete": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentRuleBaselines" + ], + "description": "Removes the database's vulnerability assessment rule baseline.", + "operationId": "DatabaseSqlVulnerabilityAssessmentRuleBaselines_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "databaseName", + "in": "path", + "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed the database vulnerability assessment rule baseline." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Removes a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json" + } + } + } + } + }, + "definitions": { + "DatabaseSqlVulnerabilityAssessmentRuleBaseline": { + "description": "A database sql vulnerability assessment rule baseline.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineInput": { + "description": "A database sql vulnerability assessment rule baseline input.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties": { + "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", + "required": [ + "latestScan", + "results" + ], + "type": "object", + "properties": { + "latestScan": { + "description": "The latest scan flag", + "type": "boolean" + }, + "results": { + "description": "The rule baseline result", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput": { + "description": "A database sql vulnerability assessment rule baseline list input.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties": { + "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", + "required": [ + "latestScan", + "results" + ], + "type": "object", + "properties": { + "latestScan": { + "description": "The latest scan flag", + "type": "boolean" + }, + "results": { + "description": "The rule baseline result lsit", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult": { + "description": "A list of SQL Vulnerability Assessments rule baseline.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties": { + "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", + "required": [ + "results" + ], + "type": "object", + "properties": { + "results": { + "description": "The rule baseline result", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json new file mode 100644 index 000000000000..aec7821cb762 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json @@ -0,0 +1,486 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/scanResults": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentScanResult" + ], + "description": "Gets a vulnerability assessment scan record of a database.", + "operationId": "DatabaseSqlVulnerabilityAssessmentScanResult_ListByScan", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the SQL Vulnerability Assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SQLVulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The scan id of the SQL Vulnerability Assessment scan to retrieve result from.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved SQL Vulnerability Assessment scan results.", + "schema": { + "$ref": "#/definitions/SQLVulnerabilityAssessmentScanListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List database SQL Vulnerability Assessment scan results for scan id": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentListScansResults.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/scanResults/{scanResultId}": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentScanResult" + ], + "description": "Gets a vulnerability assessment scan record of a database.", + "operationId": "DatabaseSqlVulnerabilityAssessmentScanResult_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the SQL Vulnerability Assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SQLVulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The scan id of the SQL Vulnerability Assessment scan to retrieve result from.", + "required": true, + "type": "string" + }, + { + "name": "scanResultId", + "in": "path", + "description": "The scan result id of the specific result to retrieve.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved SQL Vulnerability Assessment scan results for id.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanResults" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Get a database SQL Vulnerability Assessment scan result for scan id and scan result id": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentScansResults.json" + } + } + } + } + }, + "definitions": { + "Baseline": { + "description": "SQL Vulnerability Assessment baseline Details", + "type": "object", + "properties": { + "expectedResults": { + "description": "SQL Vulnerability Assessment baseline expected results", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + }, + "updatedTime": { + "format": "date-time", + "description": "SQL Vulnerability Assessment baseline update time (UTC)", + "type": "string", + "readOnly": true + } + } + }, + "BaselineAdjustedResult": { + "description": "SQL Vulnerability Assessment baseline adjusted results", + "type": "object", + "properties": { + "baseline": { + "$ref": "#/definitions/Baseline", + "description": "SQL Vulnerability Assessment baseline details", + "readOnly": true + }, + "status": { + "description": "SQL Vulnerability Assessment baseline status", + "enum": [ + "NonFinding", + "Finding", + "InternalError" + ], + "type": "string", + "readOnly": true + }, + "resultsNotInBaseline": { + "description": "SQL Vulnerability Assessment results that are not in baseline", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + }, + "resultsOnlyInBaseline": { + "description": "SQL Vulnerability Assessmentresults that are in baseline.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + } + } + }, + "BenchmarkReference": { + "description": "SQL Vulnerability Assessment benchmark reference", + "type": "object", + "properties": { + "benchmark": { + "description": "SQL Vulnerability Assessment benchmark name", + "type": "string", + "readOnly": true + }, + "reference": { + "description": "SQL Vulnerability Assessment benchmark reference.", + "type": "string", + "readOnly": true + } + } + }, + "QueryCheck": { + "description": "SQL Vulnerability Assessment query check object.", + "type": "object", + "properties": { + "query": { + "description": "SQL Vulnerability Assessment rule query.", + "type": "string", + "readOnly": true + }, + "expectedResult": { + "description": "SQL Vulnerability Assessment query expected result.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + }, + "columnNames": { + "description": "SQL Vulnerability Assessment column names of query expected result.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + } + } + }, + "Remediation": { + "description": "SQL Vulnerability Assessment remediation Details.", + "type": "object", + "properties": { + "description": { + "description": "SQL Vulnerability Assessment remediation description.", + "type": "string", + "readOnly": true + }, + "scripts": { + "description": "SQL Vulnerability Assessment remediation script.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "automated": { + "description": "SQL Vulnerability Assessment is remediation automated.", + "type": "boolean", + "readOnly": true + }, + "portalLink": { + "description": "SQL Vulnerability Assessment optional link to remediate in Azure Portal.", + "type": "string", + "readOnly": true + } + } + }, + "SQLVulnerabilityAssessmentScanListResult": { + "description": "A list of vulnerability assessment scan results.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanResults" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentScanResultProperties": { + "description": "SQL Vulnerability Assessment scan result properties for a single rule.", + "type": "object", + "properties": { + "ruleId": { + "description": "SQL Vulnerability Assessment rule Id.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "SQL Vulnerability Assessment rule result status.", + "enum": [ + "NonFinding", + "Finding", + "InternalError" + ], + "type": "string", + "readOnly": true + }, + "errorMessage": { + "description": "SQL Vulnerability Assessment error message.", + "type": "string", + "readOnly": true + }, + "isTrimmed": { + "description": "SQL Vulnerability Assessment is the query results trimmed.", + "type": "boolean", + "readOnly": true + }, + "queryResults": { + "description": "SQL Vulnerability Assessment query results that was run.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + }, + "remediation": { + "$ref": "#/definitions/Remediation", + "description": "SQL Vulnerability Assessment the remediation details.", + "readOnly": true + }, + "baselineAdjustedResult": { + "$ref": "#/definitions/BaselineAdjustedResult", + "description": "SQL Vulnerability Assessment rule result adjusted with baseline.", + "readOnly": true + }, + "ruleMetadata": { + "$ref": "#/definitions/VaRule", + "description": "SQL Vulnerability Assessment rule metadata.", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentScanResults": { + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanResultProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "VaRule": { + "description": "SQL Vulnerability Assessment rule metadata details.", + "type": "object", + "properties": { + "ruleId": { + "description": "SQL Vulnerability Assessment rule Id.", + "type": "string", + "readOnly": true + }, + "severity": { + "description": "SQL Vulnerability Assessment rule severity.", + "enum": [ + "High", + "Medium", + "Low", + "Informational", + "Obsolete" + ], + "type": "string", + "readOnly": true + }, + "category": { + "description": "SQL Vulnerability Assessment rule category.", + "type": "string", + "readOnly": true + }, + "ruleType": { + "description": "SQL Vulnerability Assessment rule type.", + "enum": [ + "Binary", + "BaselineExpected", + "PositiveList", + "NegativeList" + ], + "type": "string", + "readOnly": true + }, + "title": { + "description": "SQL Vulnerability Assessment rule title.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "SQL Vulnerability Assessment rule description.", + "type": "string", + "readOnly": true + }, + "rationale": { + "description": "SQL Vulnerability Assessment rule rationale.", + "type": "string", + "readOnly": true + }, + "queryCheck": { + "$ref": "#/definitions/QueryCheck", + "description": "SQL Vulnerability Assessment rule query details.", + "readOnly": true + }, + "benchmarkReferences": { + "description": "SQL Vulnerability Assessment benchmark references.", + "type": "array", + "items": { + "$ref": "#/definitions/BenchmarkReference" + }, + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json new file mode 100644 index 000000000000..6119ceda1954 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json @@ -0,0 +1,464 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/initiateScan": { + "post": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentScans" + ], + "description": "Executes a Vulnerability Assessment database scan.", + "operationId": "DatabaseSqlVulnerabilityAssessmentScans_Execute", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully executed a Vulnerability Assessment database scan." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "202": { + "description": "Successfully started a Vulnerability Assessment database scan." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Executes a database's vulnerability assessment scan.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentScansExecute.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentScans" + ], + "description": "Lists the vulnerability assessment scans of a database.", + "operationId": "DatabaseSqlVulnerabilityAssessmentScans_ListBySqlVulnerabilityAssessments", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment scan records.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanRecordListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the list of a database vulnerability assessment scan records": { + "$ref": "./examples/SqlDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentScans" + ], + "description": "Get a database vulnerability assessment scan result.", + "operationId": "DatabaseSqlVulnerabilityAssessmentScans_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The vulnerability assessment scan Id of the scan to retrieve.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment scan.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanRecord" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Get a database's vulnerability assessment scan.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentScan.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/initiateScan": { + "post": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentScans" + ], + "description": "Executes a Vulnerability Assessment database scan.", + "operationId": "DatabaseSqlVulnerabilityAssessmentScans_Execute", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully executed a Vulnerability Assessment database scan." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "202": { + "description": "Successfully started a Vulnerability Assessment database scan." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Executes a database's vulnerability assessment scan.": { + "$ref": "./examples/SqlVulnerabilityAssessmentScansExecute.json" + } + } + } + } + }, + "definitions": { + "SqlVulnerabilityAssessmentScanError": { + "description": "Properties of a vulnerability assessment scan error.", + "type": "object", + "properties": { + "code": { + "description": "The error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "The error message.", + "type": "string", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentScanRecord": { + "description": "A vulnerability assessment scan record.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanRecordProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SqlVulnerabilityAssessmentScanRecordListResult": { + "description": "A list of vulnerability assessment scan records.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanRecord" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentScanRecordProperties": { + "description": "Properties of a vulnerability assessment scan record.", + "type": "object", + "properties": { + "scanId": { + "description": "The scan ID.", + "type": "string", + "readOnly": true + }, + "triggerType": { + "description": "The scan trigger type.", + "enum": [ + "OnDemand", + "Recurring" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VulnerabilityAssessmentScanTriggerType", + "modelAsString": true + } + }, + "state": { + "description": "The scan status.", + "enum": [ + "Passed", + "Failed", + "FailedToRun", + "InProgress" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VulnerabilityAssessmentScanState", + "modelAsString": true + } + }, + "startTime": { + "format": "date-time", + "description": "The scan start time (UTC).", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "The scan end time (UTC).", + "type": "string", + "readOnly": true + }, + "errors": { + "description": "The scan errors.", + "type": "array", + "items": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanError" + }, + "readOnly": true + }, + "server": { + "description": "The server name.", + "type": "string", + "readOnly": true + }, + "database": { + "description": "The database name.", + "type": "string", + "readOnly": true + }, + "sqlVersion": { + "description": "The SQL version.", + "type": "string", + "readOnly": true + }, + "highSeverityFailedRulesCount": { + "format": "int32", + "description": "The number of failed rules with high severity.", + "type": "integer", + "readOnly": true + }, + "mediumSeverityFailedRulesCount": { + "format": "int32", + "description": "The number of failed rules with medium severity.", + "type": "integer", + "readOnly": true + }, + "lowSeverityFailedRulesCount": { + "format": "int32", + "description": "The number of failed rules with low severity.", + "type": "integer", + "readOnly": true + }, + "totalPassedRulesCount": { + "format": "int32", + "description": "The number of total passed rules.", + "type": "integer", + "readOnly": true + }, + "totalFailedRulesCount": { + "format": "int32", + "description": "The number of total failed rules.", + "type": "integer", + "readOnly": true + }, + "totalRulesCount": { + "format": "int32", + "description": "The number of total rules assessed.", + "type": "integer", + "readOnly": true + }, + "isBaselineApplied": { + "description": "Baseline created for this database, and has one or more rules.", + "type": "boolean", + "readOnly": true + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json new file mode 100644 index 000000000000..17a136a96ffb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json @@ -0,0 +1,554 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselineRules": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentRuleBaseline" + ], + "description": "Gets a list of database's sql vulnerability assessment rule baselines.", + "operationId": "SqlVulnerabilityAssessmentRuleBaseline_ListBySqlVulnerabilityAssessments", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the sql vulnerability assessment rule baseline list.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of system database's sql vulnerability assessment rule baselines.": { + "$ref": "./examples/SqlVulnerabilityAssessmentRuleBaselineListByDatabase.json" + } + } + }, + "post": { + "tags": [ + "SqlVulnerabilityAssessmentRuleBaseline" + ], + "description": "Add a database's vulnerability assessment rule baseline list.", + "operationId": "SqlVulnerabilityAssessmentRuleBaseline_AddBaselineRules", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested rule baseline resource.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully add the vulnerability assessment rule baseline list.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Add a database's vulnerability assessment rule baseline list.": { + "$ref": "./examples/SqlVulnerabilityAssessmentRuleBaselineAdd.json" + }, + "Add a database's vulnerability assessment rule baseline from the latest scan result.": { + "$ref": "./examples/SqlVulnerabilityAssessmentRuleBaselineAddLatest.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselineRules/{ruleId}": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentRuleBaseline" + ], + "description": "Gets a system database's sql vulnerability assessment rule baseline.", + "operationId": "SqlVulnerabilityAssessmentRuleBaseline_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the sql vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Gets a system database's sql vulnerability assessment rule baseline.": { + "$ref": "./examples/SqlVulnerabilityAssessmentRuleBaselineGet.json" + } + } + }, + "put": { + "tags": [ + "SqlVulnerabilityAssessmentRuleBaseline" + ], + "description": "Creates or updates a database's vulnerability assessment rule baseline.", + "operationId": "SqlVulnerabilityAssessmentRuleBaseline_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested rule baseline resource.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineInput" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Creates or updates a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json" + } + } + }, + "delete": { + "tags": [ + "SqlVulnerabilityAssessmentRuleBaseline" + ], + "description": "Removes the database's vulnerability assessment rule baseline.", + "operationId": "SqlVulnerabilityAssessmentRuleBaselines_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed the database vulnerability assessment rule baseline." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Removes a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json" + } + } + } + } + }, + "definitions": { + "DatabaseSqlVulnerabilityAssessmentRuleBaseline": { + "description": "A database sql vulnerability assessment rule baseline.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineInput": { + "description": "A database sql vulnerability assessment rule baseline input.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties": { + "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", + "required": [ + "latestScan", + "results" + ], + "type": "object", + "properties": { + "latestScan": { + "description": "The latest scan flag", + "type": "boolean" + }, + "results": { + "description": "The rule baseline result", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput": { + "description": "A database sql vulnerability assessment rule baseline list input.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties": { + "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", + "required": [ + "latestScan", + "results" + ], + "type": "object", + "properties": { + "latestScan": { + "description": "The latest scan flag", + "type": "boolean" + }, + "results": { + "description": "The rule baseline result lsit", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult": { + "description": "A list of SQL Vulnerability Assessments rule baseline.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties": { + "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", + "required": [ + "results" + ], + "type": "object", + "properties": { + "results": { + "description": "The rule baseline result", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json new file mode 100644 index 000000000000..90d4902017b6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json @@ -0,0 +1,500 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/scanResults": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentScanResult" + ], + "description": "Gets a vulnerability assessment scan record of a database.", + "operationId": "SqlVulnerabilityAssessmentScanResult_ListByScan", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the SQL Vulnerability Assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SQLVulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The scan id of the SQL Vulnerability Assessment scan to retrieve result from.", + "required": true, + "type": "string" + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The SQL vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved SQL Vulnerability Assessment scan results.", + "schema": { + "$ref": "#/definitions/SQLVulnerabilityAssessmentScanListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List system database SQL Vulnerability Assessment scan results for scan id": { + "$ref": "./examples/SqlVulnerabilityAssessmentListScansResults.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/scanResults/{scanResultId}": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentScanResult" + ], + "description": "Gets a vulnerability assessment scan record of a database.", + "operationId": "SqlVulnerabilityAssessmentScanResult_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the SQL Vulnerability Assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SQLVulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "description": "The scan id of the SQL Vulnerability Assessment scan to retrieve result from.", + "required": true, + "type": "string" + }, + { + "name": "scanResultId", + "in": "path", + "description": "The scan result id of the specific result to retrieve.", + "required": true, + "type": "string" + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The SQL vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved SQL Vulnerability Assessment scan results for id.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanResults" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Get a system database SQL Vulnerability Assessment scan result for scan id and scan result id": { + "$ref": "./examples/SqlVulnerabilityAssessmentScansResults.json" + } + } + } + } + }, + "definitions": { + "Baseline": { + "description": "SQL Vulnerability Assessment baseline Details", + "type": "object", + "properties": { + "expectedResults": { + "description": "SQL Vulnerability Assessment baseline expected results", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + }, + "updatedTime": { + "format": "date-time", + "description": "SQL Vulnerability Assessment baseline update time (UTC)", + "type": "string", + "readOnly": true + } + } + }, + "BaselineAdjustedResult": { + "description": "SQL Vulnerability Assessment baseline adjusted results", + "type": "object", + "properties": { + "baseline": { + "$ref": "#/definitions/Baseline", + "description": "SQL Vulnerability Assessment baseline details", + "readOnly": true + }, + "status": { + "description": "SQL Vulnerability Assessment baseline status", + "enum": [ + "NonFinding", + "Finding", + "InternalError" + ], + "type": "string", + "readOnly": true + }, + "resultsNotInBaseline": { + "description": "SQL Vulnerability Assessment results that are not in baseline", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + }, + "resultsOnlyInBaseline": { + "description": "SQL Vulnerability Assessmentresults that are in baseline.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + } + } + }, + "BenchmarkReference": { + "description": "SQL Vulnerability Assessment benchmark reference", + "type": "object", + "properties": { + "benchmark": { + "description": "SQL Vulnerability Assessment benchmark name", + "type": "string", + "readOnly": true + }, + "reference": { + "description": "SQL Vulnerability Assessment benchmark reference.", + "type": "string", + "readOnly": true + } + } + }, + "QueryCheck": { + "description": "SQL Vulnerability Assessment query check object.", + "type": "object", + "properties": { + "query": { + "description": "SQL Vulnerability Assessment rule query.", + "type": "string", + "readOnly": true + }, + "expectedResult": { + "description": "SQL Vulnerability Assessment query expected result.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + }, + "columnNames": { + "description": "SQL Vulnerability Assessment column names of query expected result.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + } + } + }, + "Remediation": { + "description": "SQL Vulnerability Assessment remediation Details.", + "type": "object", + "properties": { + "description": { + "description": "SQL Vulnerability Assessment remediation description.", + "type": "string", + "readOnly": true + }, + "scripts": { + "description": "SQL Vulnerability Assessment remediation script.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "automated": { + "description": "SQL Vulnerability Assessment is remediation automated.", + "type": "boolean", + "readOnly": true + }, + "portalLink": { + "description": "SQL Vulnerability Assessment optional link to remediate in Azure Portal.", + "type": "string", + "readOnly": true + } + } + }, + "SQLVulnerabilityAssessmentScanListResult": { + "description": "A list of vulnerability assessment scan results.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanResults" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentScanResultProperties": { + "description": "SQL Vulnerability Assessment scan result properties for a single rule.", + "type": "object", + "properties": { + "ruleId": { + "description": "SQL Vulnerability Assessment rule Id.", + "type": "string", + "readOnly": true + }, + "status": { + "description": "SQL Vulnerability Assessment rule result status.", + "enum": [ + "NonFinding", + "Finding", + "InternalError" + ], + "type": "string", + "readOnly": true + }, + "errorMessage": { + "description": "SQL Vulnerability Assessment error message.", + "type": "string", + "readOnly": true + }, + "isTrimmed": { + "description": "SQL Vulnerability Assessment is the query results trimmed.", + "type": "boolean", + "readOnly": true + }, + "queryResults": { + "description": "SQL Vulnerability Assessment query results that was run.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": true + }, + "remediation": { + "$ref": "#/definitions/Remediation", + "description": "SQL Vulnerability Assessment the remediation details.", + "readOnly": true + }, + "baselineAdjustedResult": { + "$ref": "#/definitions/BaselineAdjustedResult", + "description": "SQL Vulnerability Assessment rule result adjusted with baseline.", + "readOnly": true + }, + "ruleMetadata": { + "$ref": "#/definitions/VaRule", + "description": "SQL Vulnerability Assessment rule metadata.", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentScanResults": { + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanResultProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "VaRule": { + "description": "SQL Vulnerability Assessment rule metadata details.", + "type": "object", + "properties": { + "ruleId": { + "description": "SQL Vulnerability Assessment rule Id.", + "type": "string", + "readOnly": true + }, + "severity": { + "description": "SQL Vulnerability Assessment rule severity.", + "enum": [ + "High", + "Medium", + "Low", + "Informational", + "Obsolete" + ], + "type": "string", + "readOnly": true + }, + "category": { + "description": "SQL Vulnerability Assessment rule category.", + "type": "string", + "readOnly": true + }, + "ruleType": { + "description": "SQL Vulnerability Assessment rule type.", + "enum": [ + "Binary", + "BaselineExpected", + "PositiveList", + "NegativeList" + ], + "type": "string", + "readOnly": true + }, + "title": { + "description": "SQL Vulnerability Assessment rule title.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "SQL Vulnerability Assessment rule description.", + "type": "string", + "readOnly": true + }, + "rationale": { + "description": "SQL Vulnerability Assessment rule rationale.", + "type": "string", + "readOnly": true + }, + "queryCheck": { + "$ref": "#/definitions/QueryCheck", + "description": "SQL Vulnerability Assessment rule query details.", + "readOnly": true + }, + "benchmarkReferences": { + "description": "SQL Vulnerability Assessment benchmark references.", + "type": "array", + "items": { + "$ref": "#/definitions/BenchmarkReference" + }, + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json new file mode 100644 index 000000000000..b17046282297 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json @@ -0,0 +1,352 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentScans" + ], + "description": "Lists the vulnerability assessment scans of a database.", + "operationId": "SqlVulnerabilityAssessmentScans_ListBySqlVulnerabilityAssessments", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment scan records.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanRecordListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the list of a database vulnerability assessment scan records": { + "$ref": "./examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentScans" + ], + "description": "Get a system database vulnerability assessment scan record.", + "operationId": "SqlVulnerabilityAssessmentScans_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "scanId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment scan record.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanRecord" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Gets the a database vulnerability assessment scan records": { + "$ref": "./examples/SqlVulnerabilityAssessmentScan.json" + } + } + } + } + }, + "definitions": { + "SqlVulnerabilityAssessmentScanError": { + "description": "Properties of a vulnerability assessment scan error.", + "type": "object", + "properties": { + "code": { + "description": "The error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "The error message.", + "type": "string", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentScanRecord": { + "description": "A vulnerability assessment scan record.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanRecordProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SqlVulnerabilityAssessmentScanRecordListResult": { + "description": "A list of vulnerability assessment scan records.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanRecord" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentScanRecordProperties": { + "description": "Properties of a vulnerability assessment scan record.", + "type": "object", + "properties": { + "scanId": { + "description": "The scan ID.", + "type": "string", + "readOnly": true + }, + "triggerType": { + "description": "The scan trigger type.", + "enum": [ + "OnDemand", + "Recurring" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VulnerabilityAssessmentScanTriggerType", + "modelAsString": true + } + }, + "state": { + "description": "The scan status.", + "enum": [ + "Passed", + "Failed", + "FailedToRun", + "InProgress" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VulnerabilityAssessmentScanState", + "modelAsString": true + } + }, + "startTime": { + "format": "date-time", + "description": "The scan start time (UTC).", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "The scan end time (UTC).", + "type": "string", + "readOnly": true + }, + "errors": { + "description": "The scan errors.", + "type": "array", + "items": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentScanError" + }, + "readOnly": true + }, + "server": { + "description": "The server name.", + "type": "string", + "readOnly": true + }, + "database": { + "description": "The database name.", + "type": "string", + "readOnly": true + }, + "sqlVersion": { + "description": "The SQL version.", + "type": "string", + "readOnly": true + }, + "highSeverityFailedRulesCount": { + "format": "int32", + "description": "The number of failed rules with high severity.", + "type": "integer", + "readOnly": true + }, + "mediumSeverityFailedRulesCount": { + "format": "int32", + "description": "The number of failed rules with medium severity.", + "type": "integer", + "readOnly": true + }, + "lowSeverityFailedRulesCount": { + "format": "int32", + "description": "The number of failed rules with low severity.", + "type": "integer", + "readOnly": true + }, + "totalPassedRulesCount": { + "format": "int32", + "description": "The number of total passed rules.", + "type": "integer", + "readOnly": true + }, + "totalFailedRulesCount": { + "format": "int32", + "description": "The number of total failed rules.", + "type": "integer", + "readOnly": true + }, + "totalRulesCount": { + "format": "int32", + "description": "The number of total rules assessed.", + "type": "integer", + "readOnly": true + }, + "isBaselineApplied": { + "description": "Baseline created for this database, and has one or more rules.", + "type": "boolean", + "readOnly": true + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessments.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessments.json new file mode 100644 index 000000000000..9645b332ec19 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessments.json @@ -0,0 +1,316 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments": { + "get": { + "tags": [ + "SqlVulnerabilityAssessments" + ], + "description": "Lists SQL Vulnerability Assessment policies associated with a server.", + "operationId": "SqlVulnerabilityAssessments_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved SQL Vulnerability Assessment policies.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get SQL Vulnerability Assessment policies": { + "$ref": "./examples/SqlVulnerabilityAssessmentListByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}": { + "get": { + "tags": [ + "SqlVulnerabilityAssessments" + ], + "description": "Gets SQL Vulnerability Assessment policy.", + "operationId": "SqlVulnerabilityAssessments_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server for which the SQL Vulnerability Assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the SQL Vulnerability Assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SqlVulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved SQL Vulnerability Assessment.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Get SQL Vulnerability Assessment policy": { + "$ref": "./examples/SqlVulnerabilityAssessmentGet.json" + } + } + }, + "put": { + "tags": [ + "SqlVulnerabilityAssessments" + ], + "description": "Creates or updates SQL Vulnerability Assessment policy.", + "operationId": "SqlVulnerabilityAssessments_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server for which the SQL Vulnerability Assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the SQL Vulnerability Assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested resource.", + "required": true, + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessment" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set SQL Vulnerability Assessment.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "201": { + "description": "Successfully created SQL Vulnerability Assessment.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessment" + } + } + }, + "x-ms-examples": { + "Create a SQL Vulnerability Assessment policy": { + "$ref": "./examples/SqlVulnerabilityAssessmentCreate.json" + } + } + }, + "delete": { + "tags": [ + "SqlVulnerabilityAssessments" + ], + "description": "Removes SQL Vulnerability Assessment.", + "operationId": "SqlVulnerabilityAssessments_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server for which the SQL Vulnerability Assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the SQL Vulnerability Assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed SQL Vulnerability Assessment." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Remove SQL Vulnerability Assessment": { + "$ref": "./examples/SqlVulnerabilityAssessmentDelete.json" + } + } + } + } + }, + "definitions": { + "SqlVulnerabilityAssessment": { + "description": "A SQL Vulnerability Assessment.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SqlVulnerabilityAssessmentListResult": { + "description": "A list of SQL Vulnerability Assessments.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SqlVulnerabilityAssessment" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentPolicyProperties": { + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "SqlVulnerabilityAssessmentState", + "modelAsString": false + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json new file mode 100644 index 000000000000..6995a99d8ea3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json @@ -0,0 +1,316 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentsSettings" + ], + "description": "Lists SQL Vulnerability Assessment policies associated with a server.", + "operationId": "SqlVulnerabilityAssessmentsSettings_ListByServer", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved SQL Vulnerability Assessment policies.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get SQL Vulnerability Assessment policies": { + "$ref": "./examples/SqlVulnerabilityAssessmentListByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentsSettings" + ], + "description": "Gets SQL Vulnerability Assessment policy.", + "operationId": "SqlVulnerabilityAssessmentsSettings_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server for which the SQL Vulnerability Assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the SQL Vulnerability Assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SqlVulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved SQL Vulnerability Assessment.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Get SQL Vulnerability Assessment policy": { + "$ref": "./examples/SqlVulnerabilityAssessmentGet.json" + } + } + }, + "put": { + "tags": [ + "SqlVulnerabilityAssessmentsSettings" + ], + "description": "Creates or updates SQL Vulnerability Assessment policy.", + "operationId": "SqlVulnerabilityAssessmentsSettings_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server for which the SQL Vulnerability Assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the SQL Vulnerability Assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested resource.", + "required": true, + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessment" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set SQL Vulnerability Assessment.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "201": { + "description": "Successfully created SQL Vulnerability Assessment.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessment" + } + } + }, + "x-ms-examples": { + "Create a SQL Vulnerability Assessment policy": { + "$ref": "./examples/SqlVulnerabilityAssessmentCreate.json" + } + } + }, + "delete": { + "tags": [ + "SqlVulnerabilityAssessmentsSettings" + ], + "description": "Removes SQL Vulnerability Assessment.", + "operationId": "SqlVulnerabilityAssessments_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server for which the SQL Vulnerability Assessment is defined.", + "required": true, + "type": "string" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the SQL Vulnerability Assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed SQL Vulnerability Assessment." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Remove SQL Vulnerability Assessment": { + "$ref": "./examples/SqlVulnerabilityAssessmentDelete.json" + } + } + } + } + }, + "definitions": { + "SqlVulnerabilityAssessment": { + "description": "A SQL Vulnerability Assessment.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SqlVulnerabilityAssessmentListResult": { + "description": "A list of SQL Vulnerability Assessments.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SqlVulnerabilityAssessment" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentPolicyProperties": { + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "SqlVulnerabilityAssessmentState", + "modelAsString": false + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListScansResults.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListScansResults.json new file mode 100644 index 000000000000..4e5c5e520af1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListScansResults.json @@ -0,0 +1,133 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "testsvr", + "databaseName": "master", + "vulnerabilityAssessmentName": "default", + "scanId": "scanId1", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "ruleId": "VA1234", + "status": "NonFinding", + "errorMessage": null, + "isTrimmed": false, + "queryResults": [ + [ + "a1", + "a2", + "a3" + ], + [ + "b1", + "b2", + "b3" + ] + ], + "remediation": { + "description": "Remove users", + "scripts": [ + "drop user a", + "drop user b" + ], + "automated": false, + "portalLink": null + }, + "baselineAdjustedResult": null, + "ruleMetadata": { + "ruleId": "VA1234", + "severity": "Informational", + "category": "information", + "ruleType": "NegativeList", + "title": "This is the title", + "description": "This is an example check", + "rationale": "This is important", + "queryCheck": { + "query": "Select a1,a2, a3", + "expectedResult": [], + "columnNames": [ + "col1", + "col2", + "col3" + ] + }, + "benchmarkReferences": [ + { + "benchmark": "fedramp", + "reference": "v1" + } + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/testsvr/databases/master/sqlVulnerabilityAssessments/Default/scans/scanId1/scanResults/VA1234", + "name": "VA1234", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans/scanResults" + }, + { + "properties": { + "ruleId": "VA2341", + "status": "NonFinding", + "errorMessage": null, + "isTrimmed": false, + "queryResults": [ + [ + "a1", + "a2", + "a3" + ], + [ + "b1", + "b2", + "b3" + ] + ], + "remediation": { + "description": "Remove users", + "scripts": [ + "drop user a", + "drop user b" + ], + "automated": false, + "portalLink": null + }, + "baselineAdjustedResult": null, + "ruleMetadata": { + "ruleId": "VA1234", + "severity": "Informational", + "category": "information", + "ruleType": "NegativeList", + "title": "This is the title", + "description": "This is an example check", + "rationale": "This is important", + "queryCheck": { + "query": "Select a1,a2, a3", + "expectedResult": [], + "columnNames": [ + "col1", + "col2", + "col3" + ] + }, + "benchmarkReferences": [ + { + "benchmark": "fedramp", + "reference": "v1" + } + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/testsvr/databases/master/sqlVulnerabilityAssessments/Default/scans/scanId1/scanResults/VA2341", + "name": "VA2341", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans/scanResults" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAdd.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAdd.json new file mode 100644 index 000000000000..3274b0ecdd3b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAdd.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2022-02-01-preview", + "parameters": { + "properties": { + "latestScan": false, + "results": { + "VA1234": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ] + ], + "VA5678": [ + [ + "Test", + "0.0.0.0", + "125.125.125.125" + ] + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/baselineRules/VA1234", + "name": "VA1234", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ] + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/baselineRules/VA5678", + "name": "VA5678", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", + "properties": { + "results": [ + [ + "Test", + "0.0.0.0", + "125.125.125.125" + ] + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAddLatest.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAddLatest.json new file mode 100644 index 000000000000..bf24e7e9adb8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAddLatest.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2022-02-01-preview", + "parameters": { + "properties": { + "latestScan": true, + "results": {} + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/baselineRules/VA1234", + "name": "VA1234", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ] + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/baselineRules/VA5678", + "name": "VA5678", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", + "properties": { + "results": [ + [ + "Test", + "0.0.0.0", + "125.125.125.125" + ] + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json new file mode 100644 index 000000000000..2ae94cc42a91 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "ruleId": "VA1001", + "api-version": "2022-02-01-preview", + "parameters": { + "properties": { + "latestScan": true, + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/rules/VA1001", + "name": "Scan123", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json new file mode 100644 index 000000000000..c2b0c6e3e35f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "ruleId": "VA1001", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json new file mode 100644 index 000000000000..97efeb0dabeb --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "ruleId": "VA1001", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/baselineRules/VA1001", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByDatabase.json new file mode 100644 index 000000000000..b51271d59a12 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByDatabase.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "ruleId": "VA1001", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/baselineRules/VA1001", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/baselineRules/VA1002", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScan.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScan.json new file mode 100644 index 000000000000..3b4bdf5db455 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScan.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan001", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "testdb", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-23T09:49:00.6455136+03:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansExecute.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansExecute.json new file mode 100644 index 000000000000..2353f7364d02 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansExecute.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json new file mode 100644 index 000000000000..84894b2a86ad --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "databaseName": "master", + "vulnerabilityAssessmentName": "default", + "scanId": "scanId1", + "scanResultId": "VA1234", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "ruleId": "VA1234", + "status": "NonFinding", + "errorMessage": null, + "isTrimmed": false, + "queryResults": [ + [ + "a1", + "a2", + "a3" + ], + [ + "b1", + "b2", + "b3" + ] + ], + "remediation": { + "description": "Remove users", + "scripts": [ + "drop user a", + "drop user b" + ], + "automated": false, + "portalLink": null + }, + "baselineAdjustedResult": null, + "ruleMetadata": { + "ruleId": "VA1234", + "severity": "Informational", + "category": "information", + "ruleType": "NegativeList", + "title": "This is the title", + "description": "This is an example check", + "rationale": "This is important", + "queryCheck": { + "query": "Select a1,a2, a3", + "expectedResult": [], + "columnNames": [ + "col1", + "col2", + "col3" + ] + }, + "benchmarkReferences": [ + { + "benchmark": "fedramp", + "reference": "v1" + } + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/Default/scans/scanId1/scanResults/VA1234", + "name": "VA1234", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans/scanResults" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentCreate.json new file mode 100644 index 000000000000..765a452e7839 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentCreate.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2022-02-01-preview", + "parameters": { + "properties": { + "state": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments", + "properties": { + "state": "Enabled" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments", + "properties": { + "state": "Enabled" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentDelete.json new file mode 100644 index 000000000000..d94ecdc68479 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentDelete.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentGet.json new file mode 100644 index 000000000000..6ad825542d6d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentGet.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments", + "properties": { + "state": "Enabled" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentListByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentListByServer.json new file mode 100644 index 000000000000..473b75b7827c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentListByServer.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/", + "name": "default", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments", + "properties": { + "state": "Enabled" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentListScansResults.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentListScansResults.json new file mode 100644 index 000000000000..e93f69160f58 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentListScansResults.json @@ -0,0 +1,133 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "testsvr", + "vulnerabilityAssessmentName": "default", + "scanId": "scanId1", + "systemDatabaseName": "master", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "ruleId": "VA1234", + "status": "NonFinding", + "errorMessage": null, + "isTrimmed": false, + "queryResults": [ + [ + "a1", + "a2", + "a3" + ], + [ + "b1", + "b2", + "b3" + ] + ], + "remediation": { + "description": "Remove users", + "scripts": [ + "drop user a", + "drop user b" + ], + "automated": false, + "portalLink": null + }, + "baselineAdjustedResult": null, + "ruleMetadata": { + "ruleId": "VA1234", + "severity": "Informational", + "category": "information", + "ruleType": "NegativeList", + "title": "This is the title", + "description": "This is an example check", + "rationale": "This is important", + "queryCheck": { + "query": "Select a1,a2, a3", + "expectedResult": [], + "columnNames": [ + "col1", + "col2", + "col3" + ] + }, + "benchmarkReferences": [ + { + "benchmark": "fedramp", + "reference": "v1" + } + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/testsvr/sqlVulnerabilityAssessments/Default/scans/scanId1/scanResults/VA1234", + "name": "VA1234", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans/scanResults" + }, + { + "properties": { + "ruleId": "VA2341", + "status": "NonFinding", + "errorMessage": null, + "isTrimmed": false, + "queryResults": [ + [ + "a1", + "a2", + "a3" + ], + [ + "b1", + "b2", + "b3" + ] + ], + "remediation": { + "description": "Remove users", + "scripts": [ + "drop user a", + "drop user b" + ], + "automated": false, + "portalLink": null + }, + "baselineAdjustedResult": null, + "ruleMetadata": { + "ruleId": "VA1234", + "severity": "Informational", + "category": "information", + "ruleType": "NegativeList", + "title": "This is the title", + "description": "This is an example check", + "rationale": "This is important", + "queryCheck": { + "query": "Select a1,a2, a3", + "expectedResult": [], + "columnNames": [ + "col1", + "col2", + "col3" + ] + }, + "benchmarkReferences": [ + { + "benchmark": "fedramp", + "reference": "v1" + } + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/testsvr/sqlVulnerabilityAssessments/Default/scans/scanId1/scanResults/VA2341", + "name": "VA2341", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans/scanResults" + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAdd.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAdd.json new file mode 100644 index 000000000000..ca48c1479b4a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAdd.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "systemDatabaseName": "master", + "api-version": "2022-02-01-preview", + "parameters": { + "properties": { + "latestScan": false, + "results": { + "VA1234": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ] + ], + "VA5678": [ + [ + "Test", + "0.0.0.0", + "125.125.125.125" + ] + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6411/vulnerabilityAssessments/default/baselineRules/VA1234", + "name": "VA1234", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselineRules", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6411/vulnerabilityAssessments/default/baselineRules/VA5678", + "name": "VA5678", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselineRules", + "properties": { + "results": [ + [ + "Test", + "0.0.0.0", + "125.125.125.125" + ] + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAddLatest.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAddLatest.json new file mode 100644 index 000000000000..2caa3137f01a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAddLatest.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "systemDatabaseName": "master", + "api-version": "2022-02-01-preview", + "parameters": { + "properties": { + "latestScan": true, + "results": {} + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default/baselineRules/VA1234", + "name": "VA1234", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselineRules", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ] + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default/baselineRules/VA5678", + "name": "VA5678", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselineRules", + "properties": { + "results": [ + [ + "Test", + "0.0.0.0", + "125.125.125.125" + ] + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json new file mode 100644 index 000000000000..896ec9a9d31d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "ruleId": "VA1001", + "systemDatabaseName": "master", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default/baselineRules/VA1001", + "name": "default", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselineRules", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByDatabase.json new file mode 100644 index 000000000000..03b6244215c0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByDatabase.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "systemDatabaseName": "master", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default/baselineRules/VA1001", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default/baselineRules/VA1002", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScan.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScan.json new file mode 100644 index 000000000000..d33d473b2ce9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScan.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "scanId": "scan001", + "systemDatabaseName": "master", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "master", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-23T09:49:00.6455136+03:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json new file mode 100644 index 000000000000..7740265eb20b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "systemDatabase": "master", + "vulnerabilityAssessmentName": "default", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "testdb", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-23T09:49:00.6455136+03:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan002", + "name": "scan001", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan002", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "testdb", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-23T09:49:00.6455136+03:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan003", + "name": "scan001", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan003", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "testdb", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-23T09:49:00.6455136+03:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 0, + "mediumSeverityFailedRulesCount": 0, + "lowSeverityFailedRulesCount": 0, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": true + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScansExecute.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScansExecute.json new file mode 100644 index 000000000000..8594a6dc226d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScansExecute.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "systemDatabaseName": "master", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScansResults.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScansResults.json new file mode 100644 index 000000000000..63358a50308b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScansResults.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "scanId": "scanId1", + "scanResultId": "VA1234", + "systemDatabaseName": "master", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "ruleId": "VA1234", + "status": "NonFinding", + "errorMessage": null, + "isTrimmed": false, + "queryResults": [ + [ + "a1", + "a2", + "a3" + ], + [ + "b1", + "b2", + "b3" + ] + ], + "remediation": { + "description": "Remove users", + "scripts": [ + "drop user a", + "drop user b" + ], + "automated": false, + "portalLink": null + }, + "baselineAdjustedResult": null, + "ruleMetadata": { + "ruleId": "VA1234", + "severity": "Informational", + "category": "information", + "ruleType": "NegativeList", + "title": "This is the title", + "description": "This is an example check", + "rationale": "This is important", + "queryCheck": { + "query": "Select a1,a2, a3", + "expectedResult": [], + "columnNames": [ + "col1", + "col2", + "col3" + ] + }, + "benchmarkReferences": [ + { + "benchmark": "fedramp", + "reference": "v1" + } + ] + } + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/Default/scans/scanId1/scanResults/VA1234", + "name": "VA1234", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans/scanResults" + } + } + } +} From 49cb6adcccf0ccffeda46929aa51b96175d8eada Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Mon, 25 Apr 2022 15:11:53 +0300 Subject: [PATCH 02/24] Update server level API --- .../SqlVulnerabilityAssessmentRuleBaseline.json | 14 +++++++------- .../SqlVulnerabilityAssessmentScanResult.json | 4 ++-- .../SqlVulnerabilityAssessmentScans.json | 4 ++-- .../SqlVulnerabilityAssessments.json | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json index 17a136a96ffb..1892f96db529 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json @@ -73,7 +73,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -150,7 +150,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -230,7 +230,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { @@ -311,12 +311,12 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { "Creates or updates a database's vulnerability assessment rule baseline.": { - "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json" + "$ref": "./examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json" } } }, @@ -380,12 +380,12 @@ "description": "Successfully removed the database vulnerability assessment rule baseline." }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { "Removes a database's vulnerability assessment rule baseline.": { - "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json" + "$ref": "./examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json" } } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json index 90d4902017b6..e5c254535c8a 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json @@ -80,7 +80,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -164,7 +164,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json index b17046282297..f2f943e1419f 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json @@ -73,7 +73,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -149,7 +149,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessments.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessments.json index 9645b332ec19..1390e88860dc 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessments.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessments.json @@ -45,7 +45,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -105,7 +105,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { @@ -169,7 +169,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." }, "201": { "description": "Successfully created SQL Vulnerability Assessment.", @@ -227,7 +227,7 @@ "description": "Successfully removed SQL Vulnerability Assessment." }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { From 09cf8191ed0633daadc51eb85ce29d4990bd02db Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Mon, 25 Apr 2022 17:36:34 +0300 Subject: [PATCH 03/24] Update API attributes --- ...SqlVulnerabilityAssessmentExecuteScan.json | 107 ++++++ ...lVulnerabilityAssessmentRuleBaselines.json | 10 +- ...lityAssessmentScanAzureAsyncOperation.json | 77 +++++ ...eSqlVulnerabilityAssessmentScanResult.json | 4 +- ...tabaseSqlVulnerabilityAssessmentScans.json | 129 +------ ...SqlVulnerabilityAssessmentExecuteScan.json | 110 ++++++ .../SqlVulnerabilityAssessments.json | 316 ------------------ 7 files changed, 303 insertions(+), 450 deletions(-) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentExecuteScan.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanAzureAsyncOperation.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentExecuteScan.json delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessments.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentExecuteScan.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentExecuteScan.json new file mode 100644 index 000000000000..68b65ab70df7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentExecuteScan.json @@ -0,0 +1,107 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/initiateScan": { + "post": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentExecuteScan" + ], + "description": "Executes a Vulnerability Assessment database scan.", + "operationId": "DatabaseSqlVulnerabilityAssessmentExecuteScan_Execute", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully executed a Vulnerability Assessment database scan." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "202": { + "description": "Successfully started a Vulnerability Assessment database scan." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Executes a database's vulnerability assessment scan.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentScansExecute.json" + } + } + } + } + }, + "definitions": {}, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json index 823ff0f7dbcb..d63ea4b7f919 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json @@ -66,7 +66,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -136,7 +136,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -209,7 +209,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { @@ -283,7 +283,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { @@ -345,7 +345,7 @@ "description": "Successfully removed the database vulnerability assessment rule baseline." }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanAzureAsyncOperation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanAzureAsyncOperation.json new file mode 100644 index 000000000000..926742fb9d51 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanAzureAsyncOperation.json @@ -0,0 +1,77 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/sqlVulnerabilityAssessmentScanAzureAsyncOperation/{operationId}": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentScanAzureAsyncOperation" + ], + "description": "Get a database sql vulnerability assessment scan azure async operation.", + "operationId": "DatabaseSqlVulnerabilityAssessmentScanAzureAsyncOperation_GetAzureAsyncOperation", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "locationName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + } + } + } + }, + "definitions": {}, + "parameters": {}, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json index aec7821cb762..7aa64e5664e9 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json @@ -69,7 +69,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -142,7 +142,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json index 6119ceda1954..76daba438efd 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json @@ -16,63 +16,6 @@ "application/json" ], "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/initiateScan": { - "post": { - "tags": [ - "DatabaseSqlVulnerabilityAssessmentScans" - ], - "description": "Executes a Vulnerability Assessment database scan.", - "operationId": "DatabaseSqlVulnerabilityAssessmentScans_Execute", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ServerNameParameter" - }, - { - "$ref": "#/parameters/DatabaseNameParameter" - }, - { - "name": "vulnerabilityAssessmentName", - "in": "path", - "description": "The name of the vulnerability assessment.", - "required": true, - "type": "string", - "enum": [ - "default" - ], - "x-ms-enum": { - "name": "VulnerabilityAssessmentName", - "modelAsString": true - } - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully executed a Vulnerability Assessment database scan." - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." - }, - "202": { - "description": "Successfully started a Vulnerability Assessment database scan." - } - }, - "x-ms-long-running-operation": true, - "x-ms-examples": { - "Executes a database's vulnerability assessment scan.": { - "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentScansExecute.json" - } - } - } - }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans": { "get": { "tags": [ @@ -119,7 +62,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -185,7 +128,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id '{0}' is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan '{0}' does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found for rule '{0}'\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id '{0}'. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule '{0}' is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { @@ -194,74 +137,6 @@ } } } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/initiateScan": { - "post": { - "tags": [ - "DatabaseSqlVulnerabilityAssessmentScans" - ], - "description": "Executes a Vulnerability Assessment database scan.", - "operationId": "DatabaseSqlVulnerabilityAssessmentScans_Execute", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ServerNameParameter" - }, - { - "name": "vulnerabilityAssessmentName", - "in": "path", - "description": "The name of the vulnerability assessment.", - "required": true, - "type": "string", - "enum": [ - "default" - ], - "x-ms-enum": { - "name": "VulnerabilityAssessmentName", - "modelAsString": true - } - }, - { - "name": "systemDatabaseName", - "in": "query", - "description": "The vulnerability assessment system database name.", - "required": true, - "type": "string", - "enum": [ - "master" - ], - "x-ms-enum": { - "name": "VulnerabilityAssessmentSystemDatabaseName", - "modelAsString": false - } - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully executed a Vulnerability Assessment database scan." - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." - }, - "202": { - "description": "Successfully started a Vulnerability Assessment database scan." - } - }, - "x-ms-long-running-operation": true, - "x-ms-examples": { - "Executes a database's vulnerability assessment scan.": { - "$ref": "./examples/SqlVulnerabilityAssessmentScansExecute.json" - } - } - } } }, "definitions": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentExecuteScan.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentExecuteScan.json new file mode 100644 index 000000000000..592fa9440e91 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentExecuteScan.json @@ -0,0 +1,110 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/initiateScan": { + "post": { + "tags": [ + "SqlVulnerabilityAssessmentExecuteScan" + ], + "description": "Executes a Vulnerability Assessment database scan.", + "operationId": "SqlVulnerabilityAssessmentExecuteScan_Execute", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully executed a Vulnerability Assessment database scan." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "202": { + "description": "Successfully started a Vulnerability Assessment database scan." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Executes a database's vulnerability assessment scan.": { + "$ref": "./examples/SqlVulnerabilityAssessmentScansExecute.json" + } + } + } + } + }, + "definitions": {}, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessments.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessments.json deleted file mode 100644 index 1390e88860dc..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessments.json +++ /dev/null @@ -1,316 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2022-02-01-preview", - "title": "SqlManagementClient", - "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments": { - "get": { - "tags": [ - "SqlVulnerabilityAssessments" - ], - "description": "Lists SQL Vulnerability Assessment policies associated with a server.", - "operationId": "SqlVulnerabilityAssessments_ListByServer", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ServerNameParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully retrieved SQL Vulnerability Assessment policies.", - "schema": { - "$ref": "#/definitions/SqlVulnerabilityAssessmentListResult" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "Get SQL Vulnerability Assessment policies": { - "$ref": "./examples/SqlVulnerabilityAssessmentListByServer.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}": { - "get": { - "tags": [ - "SqlVulnerabilityAssessments" - ], - "description": "Gets SQL Vulnerability Assessment policy.", - "operationId": "SqlVulnerabilityAssessments_Get", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" - }, - { - "name": "serverName", - "in": "path", - "description": "The name of the server for which the SQL Vulnerability Assessment is defined.", - "required": true, - "type": "string" - }, - { - "name": "vulnerabilityAssessmentName", - "in": "path", - "description": "The name of the SQL Vulnerability Assessment.", - "required": true, - "type": "string", - "enum": [ - "default" - ], - "x-ms-enum": { - "name": "SqlVulnerabilityAssessmentName", - "modelAsString": true - } - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully retrieved SQL Vulnerability Assessment.", - "schema": { - "$ref": "#/definitions/SqlVulnerabilityAssessment" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." - } - }, - "x-ms-examples": { - "Get SQL Vulnerability Assessment policy": { - "$ref": "./examples/SqlVulnerabilityAssessmentGet.json" - } - } - }, - "put": { - "tags": [ - "SqlVulnerabilityAssessments" - ], - "description": "Creates or updates SQL Vulnerability Assessment policy.", - "operationId": "SqlVulnerabilityAssessments_CreateOrUpdate", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" - }, - { - "name": "serverName", - "in": "path", - "description": "The name of the server for which the SQL Vulnerability Assessment is defined.", - "required": true, - "type": "string" - }, - { - "name": "vulnerabilityAssessmentName", - "in": "path", - "description": "The name of the SQL Vulnerability Assessment.", - "required": true, - "type": "string", - "enum": [ - "default" - ], - "x-ms-enum": { - "name": "VulnerabilityAssessmentName", - "modelAsString": true - } - }, - { - "name": "parameters", - "in": "body", - "description": "The requested resource.", - "required": true, - "schema": { - "$ref": "#/definitions/SqlVulnerabilityAssessment" - } - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully set SQL Vulnerability Assessment.", - "schema": { - "$ref": "#/definitions/SqlVulnerabilityAssessment" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." - }, - "201": { - "description": "Successfully created SQL Vulnerability Assessment.", - "schema": { - "$ref": "#/definitions/SqlVulnerabilityAssessment" - } - } - }, - "x-ms-examples": { - "Create a SQL Vulnerability Assessment policy": { - "$ref": "./examples/SqlVulnerabilityAssessmentCreate.json" - } - } - }, - "delete": { - "tags": [ - "SqlVulnerabilityAssessments" - ], - "description": "Removes SQL Vulnerability Assessment.", - "operationId": "SqlVulnerabilityAssessments_Delete", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" - }, - { - "name": "serverName", - "in": "path", - "description": "The name of the server for which the SQL Vulnerability Assessment is defined.", - "required": true, - "type": "string" - }, - { - "name": "vulnerabilityAssessmentName", - "in": "path", - "description": "The name of the SQL Vulnerability Assessment.", - "required": true, - "type": "string", - "enum": [ - "default" - ], - "x-ms-enum": { - "name": "VulnerabilityAssessmentName", - "modelAsString": true - } - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully removed SQL Vulnerability Assessment." - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results for rule Id '{0}' does not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." - } - }, - "x-ms-examples": { - "Remove SQL Vulnerability Assessment": { - "$ref": "./examples/SqlVulnerabilityAssessmentDelete.json" - } - } - } - } - }, - "definitions": { - "SqlVulnerabilityAssessment": { - "description": "A SQL Vulnerability Assessment.", - "type": "object", - "allOf": [ - { - "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/SqlVulnerabilityAssessmentPolicyProperties", - "description": "Resource properties.", - "x-ms-client-flatten": true - } - } - }, - "SqlVulnerabilityAssessmentListResult": { - "description": "A list of SQL Vulnerability Assessments.", - "type": "object", - "properties": { - "value": { - "description": "Array of results.", - "type": "array", - "items": { - "$ref": "#/definitions/SqlVulnerabilityAssessment" - }, - "readOnly": true - }, - "nextLink": { - "description": "Link to retrieve next page of results.", - "type": "string", - "readOnly": true - } - } - }, - "SqlVulnerabilityAssessmentPolicyProperties": { - "type": "object", - "properties": { - "state": { - "description": "Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.", - "enum": [ - "Enabled", - "Disabled" - ], - "type": "string", - "x-ms-enum": { - "name": "SqlVulnerabilityAssessmentState", - "modelAsString": false - } - } - } - } - }, - "parameters": { - "ServerNameParameter": { - "name": "serverName", - "in": "path", - "description": "The name of the server.", - "required": true, - "type": "string", - "x-ms-parameter-location": "method" - } - }, - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "description": "Azure Active Directory OAuth2 Flow", - "flow": "implicit", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - } -} From 528cc275f0eda90743493e902b9a6463661e7051 Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Tue, 26 Apr 2022 14:22:01 +0300 Subject: [PATCH 04/24] Update controlers --- ...lVulnerabilityAssessmentRuleBaselines.json | 4 +- ...lityAssessmentScanAzureAsyncOperation.json | 77 ------- ...eSqlVulnerabilityAssessmentScanResult.json | 2 +- ...seSqlVulnerabilityAssessmentsSettings.json | 208 ++++++++++++++++++ ...qlVulnerabilityAssessmentRuleBaseline.json | 2 +- .../SqlVulnerabilityAssessmentScanResult.json | 2 +- ...erabilityAssessmentRuleBaselineCreate.json | 55 +++++ ...erabilityAssessmentRuleBaselineDelete.json | 14 ++ 8 files changed, 282 insertions(+), 82 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanAzureAsyncOperation.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json index d63ea4b7f919..b3594686d40c 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json @@ -22,7 +22,7 @@ "DatabaseSqlVulnerabilityAssessmentRuleBaselines" ], "description": "Gets a list of database's sql vulnerability assessment rule baselines.", - "operationId": "DatabaseSqlVulnerabilityAssessmentRuleBaselines_ListBySqlvulnerabilityAssessment", + "operationId": "DatabaseSqlVulnerabilityAssessmentRuleBaselines_ListBySqlVulnerabilityAssessment", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" @@ -442,7 +442,7 @@ "type": "boolean" }, "results": { - "description": "The rule baseline result lsit", + "description": "The rule baseline result list", "type": "object", "additionalProperties": { "type": "array", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanAzureAsyncOperation.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanAzureAsyncOperation.json deleted file mode 100644 index 926742fb9d51..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanAzureAsyncOperation.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2022-02-01-preview", - "title": "SqlManagementClient", - "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/sqlVulnerabilityAssessmentScanAzureAsyncOperation/{operationId}": { - "get": { - "tags": [ - "DatabaseSqlVulnerabilityAssessmentScanAzureAsyncOperation" - ], - "description": "Get a database sql vulnerability assessment scan azure async operation.", - "operationId": "DatabaseSqlVulnerabilityAssessmentScanAzureAsyncOperation_GetAzureAsyncOperation", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" - }, - { - "name": "locationName", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "operationId", - "in": "path", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." - } - } - } - } - }, - "definitions": {}, - "parameters": {}, - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "description": "Azure Active Directory OAuth2 Flow", - "flow": "implicit", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - } -} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json index 7aa64e5664e9..24ef0783bf8a 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json @@ -208,7 +208,7 @@ "readOnly": true }, "resultsOnlyInBaseline": { - "description": "SQL Vulnerability Assessmentresults that are in baseline.", + "description": "SQL Vulnerability Assessment results that are in baseline.", "type": "array", "items": { "type": "array", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json new file mode 100644 index 000000000000..3695c96872ef --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json @@ -0,0 +1,208 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentsSettings" + ], + "description": "Lists SQL Vulnerability Assessment policies associated with a database.", + "operationId": "DatabaseSqlVulnerabilityAssessmentsSettings_ListByDatabase", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved SQL Vulnerability Assessment policies on a given database.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get SQL Vulnerability Assessment policies on a given database": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentsSettings" + ], + "description": "Gets SQL Vulnerability Assessment policy for database.", + "operationId": "DatabaseSqlVulnerabilityAssessmentsSettings_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "name": "serverName", + "in": "path", + "description": "The name of the server for which the SQL Vulnerability Assessment is defined.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the SQL Vulnerability Assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "SqlVulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved SQL Vulnerability Assessment policy for database.", + "schema": { + "$ref": "#/definitions/SqlVulnerabilityAssessment" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Get SQL Vulnerability Assessment policy for database": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentGet.json" + } + } + } + } + }, + "definitions": { + "SqlVulnerabilityAssessment": { + "description": "A SQL Vulnerability Assessment.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/SqlVulnerabilityAssessmentPolicyProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "SqlVulnerabilityAssessmentListResult": { + "description": "A list of SQL Vulnerability Assessments.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/SqlVulnerabilityAssessment" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "SqlVulnerabilityAssessmentPolicyProperties": { + "type": "object", + "properties": { + "state": { + "description": "Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.", + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "SqlVulnerabilityAssessmentState", + "modelAsString": false + } + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json index 1892f96db529..349048c55b03 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json @@ -477,7 +477,7 @@ "type": "boolean" }, "results": { - "description": "The rule baseline result lsit", + "description": "The rule baseline result list", "type": "object", "additionalProperties": { "type": "array", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json index e5c254535c8a..8ffde9d6f8c5 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json @@ -230,7 +230,7 @@ "readOnly": true }, "resultsOnlyInBaseline": { - "description": "SQL Vulnerability Assessmentresults that are in baseline.", + "description": "SQL Vulnerability Assessment results that are in baseline.", "type": "array", "items": { "type": "array", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json new file mode 100644 index 000000000000..075beab1622d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "vulnerabilityAssessmentName": "default", + "ruleId": "VA1001", + "systemDatabaseName": "master", + "api-version": "2022-02-01-preview", + "parameters": { + "properties": { + "latestScan": true, + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/rules/VA1001", + "name": "Scan123", + "type": "Microsoft.Sql/servers/vulnerabilityAssessments/rules/baselines", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json new file mode 100644 index 000000000000..bce57c912275 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "ruleId": "VA1001", + "systemDatabaseName": "master", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": {} + } +} From 85f2c80b7d2a98a220cf9b24fa8da05b54d8cfd3 Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Tue, 26 Apr 2022 15:27:38 +0300 Subject: [PATCH 05/24] Add missing examples --- ...VulnerabilityAssessmentListByDatabase.json | 26 ++++++ ...tyAssessmentScanRecordsListByDatabase.json | 84 +++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListByDatabase.json new file mode 100644 index 000000000000..12cee6fe91a1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListByDatabase.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments", + "properties": { + "state": "Enabled" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json new file mode 100644 index 000000000000..ab4706553a86 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "testdb", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-23T09:49:00.6455136+03:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/scans/scan002", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan002", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "testdb", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-23T09:49:00.6455136+03:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/scans/scan003", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan003", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "testdb", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-23T09:49:00.6455136+03:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false + } + } + ] + } + } + } +} From 6ca36f98a33e2cbe5ef82560a719dede6e177329 Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Tue, 26 Apr 2022 16:04:03 +0300 Subject: [PATCH 06/24] Fix examples --- ...DatabaseSqlVulnerabilityAssessmentGet.json | 22 +++++++++++++++++++ ...tyAssessmentScanRecordsListByDatabase.json | 10 ++++----- 2 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentGet.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentGet.json new file mode 100644 index 000000000000..8e7f7d934b3f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "serverName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments", + "properties": { + "state": "Enabled" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json index 7740265eb20b..24f2fcf07660 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json @@ -3,8 +3,8 @@ "subscriptionId": "00000000-1111-2222-3333-444444444444", "resourceGroupName": "vulnerabilityassessmenttest-4711", "serverName": "vulnerabilityassessmenttest-6411", - "systemDatabase": "master", "vulnerabilityAssessmentName": "default", + "systemDatabaseName": "master", "api-version": "2022-02-01-preview" }, "responses": { @@ -22,7 +22,7 @@ "server": "vulnerabilityassessmenttest-6411", "database": "testdb", "sqlVersion": "15.0.2000", - "startTime": "2020-06-23T09:49:00.6455136+03:00", + "startTime": "2020-06-23T06:49:00.6455136+00:00", "endTime": "2020-06-23T06:49:00.7236217Z", "highSeverityFailedRulesCount": 3, "mediumSeverityFailedRulesCount": 2, @@ -44,7 +44,7 @@ "server": "vulnerabilityassessmenttest-6411", "database": "testdb", "sqlVersion": "15.0.2000", - "startTime": "2020-06-23T09:49:00.6455136+03:00", + "startTime": "2020-06-23T06:49:00.6455136+00:00", "endTime": "2020-06-23T06:49:00.7236217Z", "highSeverityFailedRulesCount": 3, "mediumSeverityFailedRulesCount": 2, @@ -66,7 +66,7 @@ "server": "vulnerabilityassessmenttest-6411", "database": "testdb", "sqlVersion": "15.0.2000", - "startTime": "2020-06-23T09:49:00.6455136+03:00", + "startTime": "2020-06-23T06:49:00.6455136+00:00", "endTime": "2020-06-23T06:49:00.7236217Z", "highSeverityFailedRulesCount": 0, "mediumSeverityFailedRulesCount": 0, @@ -81,4 +81,4 @@ } } } -} +} \ No newline at end of file From 4c59cbb5985597ae1d7e37da5cb626beb3922644 Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Tue, 26 Apr 2022 16:41:38 +0300 Subject: [PATCH 07/24] Format JSON file --- ...tyAssessmentScanRecordsListByDatabase.json | 160 +++++++++--------- 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json index 24f2fcf07660..707f8e2e8714 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json @@ -1,84 +1,84 @@ { - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "vulnerabilityassessmenttest-4711", - "serverName": "vulnerabilityassessmenttest-6411", - "vulnerabilityAssessmentName": "default", - "systemDatabaseName": "master", - "api-version": "2022-02-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan001", - "name": "scan001", - "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", - "properties": { - "scanId": "scan001", - "triggerType": "Recurring", - "state": "Failed", - "server": "vulnerabilityassessmenttest-6411", - "database": "testdb", - "sqlVersion": "15.0.2000", - "startTime": "2020-06-23T06:49:00.6455136+00:00", - "endTime": "2020-06-23T06:49:00.7236217Z", - "highSeverityFailedRulesCount": 3, - "mediumSeverityFailedRulesCount": 2, - "lowSeverityFailedRulesCount": 1, - "totalPassedRulesCount": 20, - "totalFailedRulesCount": 6, - "totalRulesCount": 26, - "isBaselineApplied": false + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "systemDatabaseName": "master", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "master", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-23T06:49:00.6455136+00:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan002", + "name": "scan001", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan002", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "master", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-23T06:49:00.6455136+00:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan003", + "name": "scan001", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan003", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "master", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-23T06:49:00.6455136+00:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 0, + "mediumSeverityFailedRulesCount": 0, + "lowSeverityFailedRulesCount": 0, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": true + } + } + ] } - }, - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan002", - "name": "scan001", - "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", - "properties": { - "scanId": "scan002", - "triggerType": "Recurring", - "state": "Failed", - "server": "vulnerabilityassessmenttest-6411", - "database": "testdb", - "sqlVersion": "15.0.2000", - "startTime": "2020-06-23T06:49:00.6455136+00:00", - "endTime": "2020-06-23T06:49:00.7236217Z", - "highSeverityFailedRulesCount": 3, - "mediumSeverityFailedRulesCount": 2, - "lowSeverityFailedRulesCount": 1, - "totalPassedRulesCount": 20, - "totalFailedRulesCount": 6, - "totalRulesCount": 26, - "isBaselineApplied": false - } - }, - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan003", - "name": "scan001", - "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", - "properties": { - "scanId": "scan003", - "triggerType": "Recurring", - "state": "Failed", - "server": "vulnerabilityassessmenttest-6411", - "database": "testdb", - "sqlVersion": "15.0.2000", - "startTime": "2020-06-23T06:49:00.6455136+00:00", - "endTime": "2020-06-23T06:49:00.7236217Z", - "highSeverityFailedRulesCount": 0, - "mediumSeverityFailedRulesCount": 0, - "lowSeverityFailedRulesCount": 0, - "totalPassedRulesCount": 20, - "totalFailedRulesCount": 6, - "totalRulesCount": 26, - "isBaselineApplied": true - } - } - ] - } + } } - } } \ No newline at end of file From 99fa82c4a7eb5b99eb8652a44dd7900a42f409be Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Wed, 27 Apr 2022 09:00:18 +0300 Subject: [PATCH 08/24] Update examples --- ...tyAssessmentScanRecordsListByDatabase.json | 84 --------- ...tyAssessmentScanRecordsListByDatabase.json | 162 +++++++++--------- 2 files changed, 81 insertions(+), 165 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json deleted file mode 100644 index ab4706553a86..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "vulnerabilityassessmenttest-4711", - "serverName": "vulnerabilityassessmenttest-6411", - "databaseName": "testdb", - "vulnerabilityAssessmentName": "default", - "api-version": "2022-02-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/scans/scan001", - "name": "scan001", - "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans", - "properties": { - "scanId": "scan001", - "triggerType": "Recurring", - "state": "Failed", - "server": "vulnerabilityassessmenttest-6411", - "database": "testdb", - "sqlVersion": "15.0.2000", - "startTime": "2020-06-23T09:49:00.6455136+03:00", - "endTime": "2020-06-23T06:49:00.7236217Z", - "highSeverityFailedRulesCount": 3, - "mediumSeverityFailedRulesCount": 2, - "lowSeverityFailedRulesCount": 1, - "totalPassedRulesCount": 20, - "totalFailedRulesCount": 6, - "totalRulesCount": 26, - "isBaselineApplied": false - } - }, - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/scans/scan002", - "name": "scan001", - "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans", - "properties": { - "scanId": "scan002", - "triggerType": "Recurring", - "state": "Failed", - "server": "vulnerabilityassessmenttest-6411", - "database": "testdb", - "sqlVersion": "15.0.2000", - "startTime": "2020-06-23T09:49:00.6455136+03:00", - "endTime": "2020-06-23T06:49:00.7236217Z", - "highSeverityFailedRulesCount": 3, - "mediumSeverityFailedRulesCount": 2, - "lowSeverityFailedRulesCount": 1, - "totalPassedRulesCount": 20, - "totalFailedRulesCount": 6, - "totalRulesCount": 26, - "isBaselineApplied": false - } - }, - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/scans/scan003", - "name": "scan001", - "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans", - "properties": { - "scanId": "scan003", - "triggerType": "Recurring", - "state": "Failed", - "server": "vulnerabilityassessmenttest-6411", - "database": "testdb", - "sqlVersion": "15.0.2000", - "startTime": "2020-06-23T09:49:00.6455136+03:00", - "endTime": "2020-06-23T06:49:00.7236217Z", - "highSeverityFailedRulesCount": 3, - "mediumSeverityFailedRulesCount": 2, - "lowSeverityFailedRulesCount": 1, - "totalPassedRulesCount": 20, - "totalFailedRulesCount": 6, - "totalRulesCount": 26, - "isBaselineApplied": false - } - } - ] - } - } - } -} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json index 707f8e2e8714..766f19732bda 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json @@ -1,84 +1,84 @@ { - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "vulnerabilityassessmenttest-4711", - "serverName": "vulnerabilityassessmenttest-6411", - "vulnerabilityAssessmentName": "default", - "systemDatabaseName": "master", - "api-version": "2022-02-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan001", - "name": "scan001", - "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", - "properties": { - "scanId": "scan001", - "triggerType": "Recurring", - "state": "Failed", - "server": "vulnerabilityassessmenttest-6411", - "database": "master", - "sqlVersion": "15.0.2000", - "startTime": "2020-06-23T06:49:00.6455136+00:00", - "endTime": "2020-06-23T06:49:00.7236217Z", - "highSeverityFailedRulesCount": 3, - "mediumSeverityFailedRulesCount": 2, - "lowSeverityFailedRulesCount": 1, - "totalPassedRulesCount": 20, - "totalFailedRulesCount": 6, - "totalRulesCount": 26, - "isBaselineApplied": false - } - }, - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan002", - "name": "scan001", - "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", - "properties": { - "scanId": "scan002", - "triggerType": "Recurring", - "state": "Failed", - "server": "vulnerabilityassessmenttest-6411", - "database": "master", - "sqlVersion": "15.0.2000", - "startTime": "2020-06-23T06:49:00.6455136+00:00", - "endTime": "2020-06-23T06:49:00.7236217Z", - "highSeverityFailedRulesCount": 3, - "mediumSeverityFailedRulesCount": 2, - "lowSeverityFailedRulesCount": 1, - "totalPassedRulesCount": 20, - "totalFailedRulesCount": 6, - "totalRulesCount": 26, - "isBaselineApplied": false - } - }, - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan003", - "name": "scan001", - "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", - "properties": { - "scanId": "scan003", - "triggerType": "Recurring", - "state": "Failed", - "server": "vulnerabilityassessmenttest-6411", - "database": "master", - "sqlVersion": "15.0.2000", - "startTime": "2020-06-23T06:49:00.6455136+00:00", - "endTime": "2020-06-23T06:49:00.7236217Z", - "highSeverityFailedRulesCount": 0, - "mediumSeverityFailedRulesCount": 0, - "lowSeverityFailedRulesCount": 0, - "totalPassedRulesCount": 20, - "totalFailedRulesCount": 6, - "totalRulesCount": 26, - "isBaselineApplied": true - } - } - ] + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "systemDatabaseName": "master", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "master", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-23T09:49:00.6455136+03:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false } - } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan002", + "name": "scan001", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan002", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "master", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-23T09:49:00.6455136+03:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan003", + "name": "scan001", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan003", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "master", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-23T09:49:00.6455136+03:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 0, + "mediumSeverityFailedRulesCount": 0, + "lowSeverityFailedRulesCount": 0, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": true + } + } + ] + } } -} \ No newline at end of file + } +} From 22f106dd3be7c965747e83e54977ba7c6630386e Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Wed, 27 Apr 2022 09:37:05 +0300 Subject: [PATCH 09/24] Updae scan record API --- ...tabaseSqlVulnerabilityAssessmentScans.json | 2 +- ...tyAssessmentScanRecordsListByDatabase.json | 84 +++++++++++++++++++ 2 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScanRecordsListByDatabase.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json index 76daba438efd..7c886f8f3e8e 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json @@ -70,7 +70,7 @@ }, "x-ms-examples": { "Gets the list of a database vulnerability assessment scan records": { - "$ref": "./examples/SqlDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json" + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentScanRecordsListByDatabase.json" } } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScanRecordsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScanRecordsListByDatabase.json new file mode 100644 index 000000000000..ab4706553a86 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScanRecordsListByDatabase.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "serverName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "testdb", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-23T09:49:00.6455136+03:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/scans/scan002", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan002", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "testdb", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-23T09:49:00.6455136+03:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/scans/scan003", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans", + "properties": { + "scanId": "scan003", + "triggerType": "Recurring", + "state": "Failed", + "server": "vulnerabilityassessmenttest-6411", + "database": "testdb", + "sqlVersion": "15.0.2000", + "startTime": "2020-06-23T09:49:00.6455136+03:00", + "endTime": "2020-06-23T06:49:00.7236217Z", + "highSeverityFailedRulesCount": 3, + "mediumSeverityFailedRulesCount": 2, + "lowSeverityFailedRulesCount": 1, + "totalPassedRulesCount": 20, + "totalFailedRulesCount": 6, + "totalRulesCount": 26, + "isBaselineApplied": false + } + } + ] + } + } + } +} From 96c47d5c05816708034e62c88ff419f35f898a4c Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Wed, 27 Apr 2022 10:00:03 +0300 Subject: [PATCH 10/24] Add ref to README file --- specification/sql/resource-manager/readme.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index 6afc59cd1279..1efca94eb171 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -32,6 +32,23 @@ tag: package-composite-v5 The following packages may be composed from multiple api-versions. +### Tag: package-preview-2022-01 + +These settings apply only when `--tag=package-preview-2022-01` is specified on the command line. + +```yaml $(tag) == 'package-preview-2021-11' +input-file: + - ./Microsoft.Sql/preview/2021-11-01-preview/DatabaseSqlVulnerabilityAssessmentExecuteScan.json + - ./Microsoft.Sql/preview/2021-11-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json + - ./Microsoft.Sql/preview/2021-11-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json + - ./Microsoft.Sql/preview/2021-11-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json + - ./Microsoft.Sql/preview/2021-11-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json + - ./Microsoft.Sql/preview/2021-11-01-preview/SqlVulnerabilityAssessmentExecuteScan.json + - ./Microsoft.Sql/preview/2021-11-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json + - ./Microsoft.Sql/preview/2021-11-01-preview/SqlVulnerabilityAssessmentScanResult.json + - ./Microsoft.Sql/preview/2021-11-01-preview/SqlVulnerabilityAssessmentScans.json + - ./Microsoft.Sql/preview/2021-11-01-preview/SqlVulnerabilityAssessmentsSettings.json +``` ### Tag: package-preview-2021-11 These settings apply only when `--tag=package-preview-2021-11` is specified on the command line. From 8457b87e2488dcc70d5178805cd406b417eab726 Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Wed, 27 Apr 2022 10:01:31 +0300 Subject: [PATCH 11/24] Update version --- specification/sql/resource-manager/readme.md | 22 ++++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index 1efca94eb171..56621221f11c 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -36,18 +36,18 @@ The following packages may be composed from multiple api-versions. These settings apply only when `--tag=package-preview-2022-01` is specified on the command line. -```yaml $(tag) == 'package-preview-2021-11' +```yaml $(tag) == 'package-preview-2022-02' input-file: - - ./Microsoft.Sql/preview/2021-11-01-preview/DatabaseSqlVulnerabilityAssessmentExecuteScan.json - - ./Microsoft.Sql/preview/2021-11-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json - - ./Microsoft.Sql/preview/2021-11-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json - - ./Microsoft.Sql/preview/2021-11-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json - - ./Microsoft.Sql/preview/2021-11-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json - - ./Microsoft.Sql/preview/2021-11-01-preview/SqlVulnerabilityAssessmentExecuteScan.json - - ./Microsoft.Sql/preview/2021-11-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json - - ./Microsoft.Sql/preview/2021-11-01-preview/SqlVulnerabilityAssessmentScanResult.json - - ./Microsoft.Sql/preview/2021-11-01-preview/SqlVulnerabilityAssessmentScans.json - - ./Microsoft.Sql/preview/2021-11-01-preview/SqlVulnerabilityAssessmentsSettings.json + - ./Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentExecuteScan.json + - ./Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json + - ./Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json + - ./Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json + - ./Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json + - ./Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentExecuteScan.json + - ./Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json + - ./Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json + - ./Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json + - ./Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json ``` ### Tag: package-preview-2021-11 From 14d8683cd404b1d422b618875558f4d72a6a4b73 Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Wed, 27 Apr 2022 11:56:33 +0300 Subject: [PATCH 12/24] Update enums --- ...eSqlVulnerabilityAssessmentScanResult.json | 24 +++++++++++++++---- .../SqlVulnerabilityAssessmentScanResult.json | 24 +++++++++++++++---- 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json index 24ef0783bf8a..8611efd4bc59 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json @@ -194,7 +194,11 @@ "InternalError" ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "RuleStatus", + "modelAsString": true + } }, "resultsNotInBaseline": { "description": "SQL Vulnerability Assessment results that are not in baseline", @@ -331,7 +335,11 @@ "InternalError" ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "RuleStatus", + "modelAsString": false + } }, "errorMessage": { "description": "SQL Vulnerability Assessment error message.", @@ -405,7 +413,11 @@ "Obsolete" ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "RuleSeverity", + "modelAsString": true + } }, "category": { "description": "SQL Vulnerability Assessment rule category.", @@ -421,7 +433,11 @@ "NegativeList" ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "RuleType", + "modelAsString": true + } }, "title": { "description": "SQL Vulnerability Assessment rule title.", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json index 8ffde9d6f8c5..95a7f54c8c64 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json @@ -216,7 +216,11 @@ "InternalError" ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "RuleStatus", + "modelAsString": true + } }, "resultsNotInBaseline": { "description": "SQL Vulnerability Assessment results that are not in baseline", @@ -353,7 +357,11 @@ "InternalError" ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "RuleStatus", + "modelAsString": false + } }, "errorMessage": { "description": "SQL Vulnerability Assessment error message.", @@ -427,7 +435,11 @@ "Obsolete" ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "RuleSeverity", + "modelAsString": true + } }, "category": { "description": "SQL Vulnerability Assessment rule category.", @@ -443,7 +455,11 @@ "NegativeList" ], "type": "string", - "readOnly": true + "readOnly": true, + "x-ms-enum": { + "name": "RuleType", + "modelAsString": true + } }, "title": { "description": "SQL Vulnerability Assessment rule title.", From 8a004e74b3414b94d0617ce11f39ca1701beab09 Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Wed, 27 Apr 2022 17:22:54 +0300 Subject: [PATCH 13/24] Add SystemData --- ...seSqlVulnerabilityAssessmentRuleBaselines.json | 15 +++++++++++++++ .../DatabaseSqlVulnerabilityAssessmentScans.json | 5 +++++ ...tabaseSqlVulnerabilityAssessmentsSettings.json | 5 +++++ .../SqlVulnerabilityAssessmentRuleBaseline.json | 15 +++++++++++++++ .../SqlVulnerabilityAssessmentScans.json | 5 +++++ .../SqlVulnerabilityAssessmentsSettings.json | 5 +++++ 6 files changed, 50 insertions(+) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json index b3594686d40c..06c907561a84 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json @@ -366,6 +366,11 @@ } ], "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.", + "readOnly": true + }, "properties": { "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties", "description": "Resource properties.", @@ -382,6 +387,11 @@ } ], "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineInputResource.", + "readOnly": true + }, "properties": { "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties", "description": "Resource properties.", @@ -422,6 +432,11 @@ } ], "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputResource.", + "readOnly": true + }, "properties": { "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties", "description": "Resource properties.", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json index 7c886f8f3e8e..0cb0f5e6490d 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json @@ -165,6 +165,11 @@ } ], "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of SqlVulnerabilityAssessmentScanRecordResource.", + "readOnly": true + }, "properties": { "$ref": "#/definitions/SqlVulnerabilityAssessmentScanRecordProperties", "description": "Resource properties.", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json index 3695c96872ef..03bb98486532 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json @@ -132,6 +132,11 @@ } ], "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of SqlVulnerabilityAssessmentResource.", + "readOnly": true + }, "properties": { "$ref": "#/definitions/SqlVulnerabilityAssessmentPolicyProperties", "description": "Resource properties.", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json index 349048c55b03..73980d8d5079 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json @@ -401,6 +401,11 @@ } ], "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.", + "readOnly": true + }, "properties": { "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties", "description": "Resource properties.", @@ -417,6 +422,11 @@ } ], "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineInputResource.", + "readOnly": true + }, "properties": { "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineInputProperties", "description": "Resource properties.", @@ -457,6 +467,11 @@ } ], "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputResource.", + "readOnly": true + }, "properties": { "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties", "description": "Resource properties.", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json index f2f943e1419f..fbc8cd14879f 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json @@ -186,6 +186,11 @@ } ], "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of SqlVulnerabilityAssessmentScanRecordResource.", + "readOnly": true + }, "properties": { "$ref": "#/definitions/SqlVulnerabilityAssessmentScanRecordProperties", "description": "Resource properties.", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json index 6995a99d8ea3..87d2cf5251a5 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json @@ -248,6 +248,11 @@ } ], "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of SqlVulnerabilityAssessmentResource.", + "readOnly": true + }, "properties": { "$ref": "#/definitions/SqlVulnerabilityAssessmentPolicyProperties", "description": "Resource properties.", From ced6fef444f4cb426e5bbc41f96cee2f8edce9e7 Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Wed, 27 Apr 2022 18:17:11 +0300 Subject: [PATCH 14/24] add systemData --- .../DatabaseSqlVulnerabilityAssessmentRuleBaselines.json | 2 +- .../DatabaseSqlVulnerabilityAssessmentScanResult.json | 5 +++++ .../SqlVulnerabilityAssessmentScanResult.json | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json index 06c907561a84..6ff4b0fc3b7b 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json @@ -83,7 +83,7 @@ "DatabaseSqlVulnerabilityAssessmentRuleBaselines" ], "description": "Add a database's vulnerability assessment rule baseline list.", - "operationId": "DatabaseSqlVulnerabilityAssessmentRuleBaselines_AddBaselineRules", + "operationId": "DatabaseSqlVulnerabilityAssessmentRuleBaselines_AddBaselineRuleList", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json index 8611efd4bc59..6835b497bdf0 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json @@ -387,6 +387,11 @@ } ], "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of AdvancedThreatProtectionResource.", + "readOnly": true + }, "properties": { "$ref": "#/definitions/SqlVulnerabilityAssessmentScanResultProperties", "description": "Resource properties.", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json index 95a7f54c8c64..523af016e4e2 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json @@ -409,6 +409,11 @@ } ], "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of AdvancedThreatProtectionResource.", + "readOnly": true + }, "properties": { "$ref": "#/definitions/SqlVulnerabilityAssessmentScanResultProperties", "description": "Resource properties.", From 55f718e60344291568aafafaf3eb09d47f22c556 Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Thu, 28 Apr 2022 12:05:03 +0300 Subject: [PATCH 15/24] sort readme files --- specification/sql/resource-manager/readme.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index fa5c5ae5175d..70feb313971d 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -49,6 +49,11 @@ input-file: - Microsoft.Sql/preview/2022-02-01-preview/DatabaseRecommendedActions.json - Microsoft.Sql/preview/2022-02-01-preview/DatabaseSchemas.json - Microsoft.Sql/preview/2022-02-01-preview/DatabaseSecurityAlertPolicies.json + - Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentExecuteScan.json + - Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json + - Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json + - Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json + - Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json - Microsoft.Sql/preview/2022-02-01-preview/DatabaseTables.json - Microsoft.Sql/preview/2022-02-01-preview/DatabaseUsages.json - Microsoft.Sql/preview/2022-02-01-preview/DatabaseVulnerabilityAssessmentRuleBaselines.json @@ -136,6 +141,11 @@ input-file: - Microsoft.Sql/preview/2022-02-01-preview/ServerVulnerabilityAssessments.json - Microsoft.Sql/preview/2022-02-01-preview/Servers.json - Microsoft.Sql/preview/2022-02-01-preview/SqlAgent.json + - Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentExecuteScan.json + - Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json + - Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json + - Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json + - Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json - Microsoft.Sql/preview/2022-02-01-preview/SubscriptionUsages.json - Microsoft.Sql/preview/2022-02-01-preview/SyncAgents.json - Microsoft.Sql/preview/2022-02-01-preview/SyncGroups.json @@ -148,16 +158,6 @@ input-file: - Microsoft.Sql/preview/2022-02-01-preview/VirtualNetworkRules.json - Microsoft.Sql/preview/2022-02-01-preview/WorkloadClassifiers.json - Microsoft.Sql/preview/2022-02-01-preview/WorkloadGroups.json - - Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentExecuteScan.json - - Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json - - Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json - - Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json - - Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json - - Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentExecuteScan.json - - Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json - - Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json - - Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json - - Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json ``` ### Tag: package-preview-2021-11 From 505506f7c74f0030a112efd8e63e32658ddbc916 Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Thu, 28 Apr 2022 14:27:06 +0300 Subject: [PATCH 16/24] Update examples --- ...baseSqlVulnerabilityAssessmentRuleBaselineAdd.json | 4 ++-- ...lVulnerabilityAssessmentRuleBaselineAddLatest.json | 4 ++-- ...eSqlVulnerabilityAssessmentRuleBaselineDelete.json | 11 ++++++++++- ...baseSqlVulnerabilityAssessmentRuleBaselineGet.json | 4 ++-- ...erabilityAssessmentRuleBaselineListByDatabase.json | 4 ++-- .../SqlVulnerabilityAssessmentRuleBaselineAdd.json | 4 ++-- ...lVulnerabilityAssessmentRuleBaselineAddLatest.json | 4 ++-- .../SqlVulnerabilityAssessmentRuleBaselineDelete.json | 11 ++++++++++- .../SqlVulnerabilityAssessmentRuleBaselineGet.json | 2 +- ...erabilityAssessmentRuleBaselineListByDatabase.json | 4 ++-- 10 files changed, 35 insertions(+), 17 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAdd.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAdd.json index 3274b0ecdd3b..fcdd16d67249 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAdd.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAdd.json @@ -36,7 +36,7 @@ "body": { "value": [ { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/baselineRules/VA1234", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselineRules/VA1234", "name": "VA1234", "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", "properties": { @@ -53,7 +53,7 @@ } }, { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/baselineRules/VA5678", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselineRules/VA5678", "name": "VA5678", "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", "properties": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAddLatest.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAddLatest.json index bf24e7e9adb8..01a0f1bde44b 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAddLatest.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAddLatest.json @@ -18,7 +18,7 @@ "body": { "value": [ { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/baselineRules/VA1234", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselineRules/VA1234", "name": "VA1234", "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", "properties": { @@ -35,7 +35,7 @@ } }, { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/baselineRules/VA5678", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselineRules/VA5678", "name": "VA5678", "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", "properties": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json index c2b0c6e3e35f..e8c6d370bc43 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json @@ -9,6 +9,15 @@ "api-version": "2022-02-01-preview" }, "responses": { - "200": {} + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/baselineRules/VA1001", + "name": "VA1001", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", + "properties": { + "results": [] + } + } + } } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json index 97efeb0dabeb..b7a7fbb53b5d 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json @@ -11,8 +11,8 @@ "responses": { "200": { "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/baselineRules/VA1001", - "name": "default", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselineRules/VA1001", + "name": "VA1001", "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", "properties": { "results": [ diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByDatabase.json index b51271d59a12..b147c42a62b4 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByDatabase.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByDatabase.json @@ -13,7 +13,7 @@ "body": { "value": [ { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/baselineRules/VA1001", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselineRules/VA1001", "name": "default", "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", "properties": { @@ -34,7 +34,7 @@ } }, { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/baselineRules/VA1002", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselineRules/VA1002", "name": "default", "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", "properties": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAdd.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAdd.json index ca48c1479b4a..d94647d48d50 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAdd.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAdd.json @@ -36,7 +36,7 @@ "body": { "value": [ { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6411/vulnerabilityAssessments/default/baselineRules/VA1234", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6411/sqlVulnerabilityAssessments/default/baselineRules/VA1234", "name": "VA1234", "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselineRules", "properties": { @@ -57,7 +57,7 @@ } }, { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6411/vulnerabilityAssessments/default/baselineRules/VA5678", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6411/sqlVulnerabilityAssessments/default/baselineRules/VA5678", "name": "VA5678", "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselineRules", "properties": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAddLatest.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAddLatest.json index 2caa3137f01a..1e962df517af 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAddLatest.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAddLatest.json @@ -18,7 +18,7 @@ "body": { "value": [ { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default/baselineRules/VA1234", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselineRules/VA1234", "name": "VA1234", "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselineRules", "properties": { @@ -35,7 +35,7 @@ } }, { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default/baselineRules/VA5678", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselineRules/VA5678", "name": "VA5678", "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselineRules", "properties": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json index bce57c912275..d69f6366bef7 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json @@ -9,6 +9,15 @@ "api-version": "2022-02-01-preview" }, "responses": { - "200": {} + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6411/sqlVulnerabilityAssessments/default/baselineRules/VA1001", + "name": "VA1001", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselineRules", + "properties": { + "results": [] + } + } + } } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json index 896ec9a9d31d..127445ae24cc 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json @@ -11,7 +11,7 @@ "responses": { "200": { "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default/baselineRules/VA1001", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselineRules/VA1001", "name": "default", "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselineRules", "properties": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByDatabase.json index 03b6244215c0..8c2619dedbb6 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByDatabase.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByDatabase.json @@ -12,7 +12,7 @@ "body": { "value": [ { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default/baselineRules/VA1001", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselineRules/VA1001", "name": "default", "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", "properties": { @@ -33,7 +33,7 @@ } }, { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default/baselineRules/VA1002", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselineRules/VA1002", "name": "default", "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", "properties": { From 44bea630e99cefec151c4f78069c5c03cd8a3d03 Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Thu, 28 Apr 2022 14:47:05 +0300 Subject: [PATCH 17/24] Update remove baseline API --- .../DatabaseSqlVulnerabilityAssessmentRuleBaselines.json | 5 ++++- .../SqlVulnerabilityAssessmentRuleBaseline.json | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json index 6ff4b0fc3b7b..cfea0bc58596 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json @@ -342,7 +342,10 @@ ], "responses": { "200": { - "description": "Successfully removed the database vulnerability assessment rule baseline." + "description": "Successfully removed the database vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" + } }, "default": { "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json index 73980d8d5079..aa93cea3251f 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json @@ -377,7 +377,10 @@ ], "responses": { "200": { - "description": "Successfully removed the database vulnerability assessment rule baseline." + "description": "Successfully removed the database vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" + } }, "default": { "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." From e67a3c61d48b7fb16638b622e35474a9f8b8bd4b Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Thu, 28 Apr 2022 17:31:19 +0300 Subject: [PATCH 18/24] Add 204 respond to delete API --- .../DatabaseSqlVulnerabilityAssessmentRuleBaselines.json | 3 +++ .../SqlVulnerabilityAssessmentRuleBaseline.json | 3 +++ 2 files changed, 6 insertions(+) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json index cfea0bc58596..624dc13df87f 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json @@ -349,6 +349,9 @@ }, "default": { "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "204": { + "description": "Successfully removed the database vulnerability assessment rule baseline." } }, "x-ms-examples": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json index aa93cea3251f..0281f3b2f9fb 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json @@ -384,6 +384,9 @@ }, "default": { "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "204": { + "description": "Successfully removed the database vulnerability assessment rule baseline." } }, "x-ms-examples": { From d3993527ad0369483f68ef527ccf16a4acb11dee Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Thu, 28 Apr 2022 17:54:29 +0300 Subject: [PATCH 19/24] Add 204 error --- ...abaseSqlVulnerabilityAssessmentRuleBaselines.json | 5 +---- .../SqlVulnerabilityAssessmentRuleBaseline.json | 5 +---- .../SqlVulnerabilityAssessmentsSettings.json | 3 +++ ...SqlVulnerabilityAssessmentRuleBaselineDelete.json | 12 ++---------- ...SqlVulnerabilityAssessmentRuleBaselineDelete.json | 12 ++---------- 5 files changed, 9 insertions(+), 28 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json index 624dc13df87f..bbef816679a9 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json @@ -342,10 +342,7 @@ ], "responses": { "200": { - "description": "Successfully removed the database vulnerability assessment rule baseline.", - "schema": { - "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" - } + "description": "Successfully removed the database vulnerability assessment rule baseline." }, "default": { "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json index 0281f3b2f9fb..7e509bdc8c59 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json @@ -377,10 +377,7 @@ ], "responses": { "200": { - "description": "Successfully removed the database vulnerability assessment rule baseline.", - "schema": { - "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" - } + "description": "Successfully removed the database vulnerability assessment rule baseline." }, "default": { "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json index 87d2cf5251a5..6d98233d3bd0 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json @@ -228,6 +228,9 @@ }, "default": { "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "204": { + "description": "Successfully removed the database vulnerability assessment rule baseline." } }, "x-ms-examples": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json index e8c6d370bc43..a7b80f7bde47 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json @@ -9,15 +9,7 @@ "api-version": "2022-02-01-preview" }, "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/baselineRules/VA1001", - "name": "VA1001", - "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", - "properties": { - "results": [] - } - } - } + "200": {}, + "204": {} } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json index d69f6366bef7..5af3253db9f2 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json @@ -9,15 +9,7 @@ "api-version": "2022-02-01-preview" }, "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6411/sqlVulnerabilityAssessments/default/baselineRules/VA1001", - "name": "VA1001", - "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselineRules", - "properties": { - "results": [] - } - } - } + "200": {}, + "204": {} } } From 4527af3f11e401446f4a4e51e102206a96db580b Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Sun, 1 May 2022 17:20:56 +0300 Subject: [PATCH 20/24] Fixed error --- .../DatabaseSqlVulnerabilityAssessmentRuleBaselines.json | 4 ++-- .../DatabaseSqlVulnerabilityAssessmentScanResult.json | 1 + .../DatabaseSqlVulnerabilityAssessmentScans.json | 1 + .../SqlVulnerabilityAssessmentRuleBaseline.json | 4 ++-- .../SqlVulnerabilityAssessmentScanResult.json | 1 + .../2022-02-01-preview/SqlVulnerabilityAssessmentScans.json | 1 + .../SqlVulnerabilityAssessmentsSettings.json | 2 +- .../examples/SqlVulnerabilityAssessmentDelete.json | 3 ++- 8 files changed, 11 insertions(+), 6 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json index bbef816679a9..a3ac7af9dd3a 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json @@ -83,7 +83,7 @@ "DatabaseSqlVulnerabilityAssessmentRuleBaselines" ], "description": "Add a database's vulnerability assessment rule baseline list.", - "operationId": "DatabaseSqlVulnerabilityAssessmentRuleBaselines_AddBaselineRuleList", + "operationId": "DatabaseSqlVulnerabilityAssessmentRuleBaselines_ListBaselineRules", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" @@ -348,7 +348,7 @@ "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." }, "204": { - "description": "Successfully removed the database vulnerability assessment rule baseline." + "description": "The specified rule baseline does not exist." } }, "x-ms-examples": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json index 6835b497bdf0..ec00f0dfa09a 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json @@ -470,6 +470,7 @@ "items": { "$ref": "#/definitions/BenchmarkReference" }, + "x-ms-identifiers": [], "readOnly": true } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json index 0cb0f5e6490d..9fc4773aef75 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json @@ -251,6 +251,7 @@ "items": { "$ref": "#/definitions/SqlVulnerabilityAssessmentScanError" }, + "x-ms-identifiers": [], "readOnly": true }, "server": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json index 7e509bdc8c59..e1d7d3e67467 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json @@ -90,7 +90,7 @@ "SqlVulnerabilityAssessmentRuleBaseline" ], "description": "Add a database's vulnerability assessment rule baseline list.", - "operationId": "SqlVulnerabilityAssessmentRuleBaseline_AddBaselineRules", + "operationId": "SqlVulnerabilityAssessmentRuleBaselines_ListBaselineRules", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" @@ -383,7 +383,7 @@ "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." }, "204": { - "description": "Successfully removed the database vulnerability assessment rule baseline." + "description": "The specified rule baseline does not exist." } }, "x-ms-examples": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json index 523af016e4e2..20e5356dafec 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json @@ -492,6 +492,7 @@ "items": { "$ref": "#/definitions/BenchmarkReference" }, + "x-ms-identifiers": [], "readOnly": true } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json index fbc8cd14879f..24303da1ea69 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json @@ -272,6 +272,7 @@ "items": { "$ref": "#/definitions/SqlVulnerabilityAssessmentScanError" }, + "x-ms-identifiers": [], "readOnly": true }, "server": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json index 6d98233d3bd0..ad986eac3a90 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json @@ -230,7 +230,7 @@ "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." }, "204": { - "description": "Successfully removed the database vulnerability assessment rule baseline." + "description": "The SQL Vulnerability Assessment settings does not exist." } }, "x-ms-examples": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentDelete.json index d94ecdc68479..8f49c907f824 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentDelete.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentDelete.json @@ -7,6 +7,7 @@ "api-version": "2022-02-01-preview" }, "responses": { - "200": {} + "200": {}, + "204": {} } } From fecd218f3ea1a07b5aff7c2fb0c4060aa0527d3d Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Sat, 7 May 2022 17:31:11 +0300 Subject: [PATCH 21/24] Update description --- ...abaseSqlVulnerabilityAssessmentRuleBaselines.json | 4 ++-- .../SqlVulnerabilityAssessmentRuleBaseline.json | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json index a3ac7af9dd3a..ff72fa6ff311 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json @@ -136,7 +136,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -283,7 +283,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json index e1d7d3e67467..472bb66dd2ec 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json @@ -73,7 +73,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -150,7 +150,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -230,7 +230,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { @@ -311,7 +311,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { @@ -325,7 +325,7 @@ "SqlVulnerabilityAssessmentRuleBaseline" ], "description": "Removes the database's vulnerability assessment rule baseline.", - "operationId": "SqlVulnerabilityAssessmentRuleBaselines_Delete", + "operationId": "DatabaseSqlVulnerabilityAssessmentRuleBaselines_Delete", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" @@ -380,7 +380,7 @@ "description": "Successfully removed the database vulnerability assessment rule baseline." }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." }, "204": { "description": "The specified rule baseline does not exist." From 7501159a586ee016f16c8a585a2d90948818095b Mon Sep 17 00:00:00 2001 From: Shimon Arzuan Date: Sat, 14 May 2022 14:23:43 +0300 Subject: [PATCH 22/24] Update swagger --- ...SqlVulnerabilityAssessmentExecuteScan.json | 2 +- ...lVulnerabilityAssessmentRuleBaselines.json | 48 +++++++------------ ...eSqlVulnerabilityAssessmentScanResult.json | 6 +-- ...tabaseSqlVulnerabilityAssessmentScans.json | 4 +- ...seSqlVulnerabilityAssessmentsSettings.json | 10 ++-- ...SqlVulnerabilityAssessmentExecuteScan.json | 2 +- ...qlVulnerabilityAssessmentRuleBaseline.json | 10 ++-- .../SqlVulnerabilityAssessmentScanResult.json | 6 +-- .../SqlVulnerabilityAssessmentScans.json | 4 +- .../SqlVulnerabilityAssessmentsSettings.json | 26 +++------- 10 files changed, 45 insertions(+), 73 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentExecuteScan.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentExecuteScan.json index 68b65ab70df7..556798a3f88f 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentExecuteScan.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentExecuteScan.json @@ -59,7 +59,7 @@ "description": "Successfully executed a Vulnerability Assessment database scan." }, "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." }, "202": { "description": "Successfully started a Vulnerability Assessment database scan." diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json index ff72fa6ff311..2d1b81f0f11d 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json @@ -31,11 +31,7 @@ "$ref": "#/parameters/ServerNameParameter" }, { - "name": "databaseName", - "in": "path", - "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", - "required": true, - "type": "string" + "$ref": "#/parameters/DatabaseNameParameter" }, { "name": "vulnerabilityAssessmentName", @@ -66,7 +62,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -92,11 +88,7 @@ "$ref": "#/parameters/ServerNameParameter" }, { - "name": "databaseName", - "in": "path", - "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", - "required": true, - "type": "string" + "$ref": "#/parameters/DatabaseNameParameter" }, { "name": "vulnerabilityAssessmentName", @@ -136,7 +128,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -167,11 +159,7 @@ "$ref": "#/parameters/ServerNameParameter" }, { - "name": "databaseName", - "in": "path", - "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", - "required": true, - "type": "string" + "$ref": "#/parameters/DatabaseNameParameter" }, { "name": "vulnerabilityAssessmentName", @@ -209,7 +197,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { @@ -232,11 +220,7 @@ "$ref": "#/parameters/ServerNameParameter" }, { - "name": "databaseName", - "in": "path", - "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", - "required": true, - "type": "string" + "$ref": "#/parameters/DatabaseNameParameter" }, { "name": "vulnerabilityAssessmentName", @@ -283,7 +267,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { @@ -306,11 +290,7 @@ "$ref": "#/parameters/ServerNameParameter" }, { - "name": "databaseName", - "in": "path", - "description": "The name of the database for which the vulnerability assessment rule baseline is defined.", - "required": true, - "type": "string" + "$ref": "#/parameters/DatabaseNameParameter" }, { "name": "vulnerabilityAssessmentName", @@ -345,7 +325,7 @@ "description": "Successfully removed the database vulnerability assessment rule baseline." }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." }, "204": { "description": "The specified rule baseline does not exist." @@ -514,6 +494,14 @@ } }, "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, "ServerNameParameter": { "name": "serverName", "in": "path", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json index ec00f0dfa09a..8d50561bc7ea 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScanResult.json @@ -69,7 +69,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -142,7 +142,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { @@ -338,7 +338,7 @@ "readOnly": true, "x-ms-enum": { "name": "RuleStatus", - "modelAsString": false + "modelAsString": true } }, "errorMessage": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json index 9fc4773aef75..e016f4a8d806 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentScans.json @@ -62,7 +62,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -128,7 +128,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json index 03bb98486532..a9000696af4a 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentsSettings.json @@ -48,7 +48,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -73,11 +73,7 @@ "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { - "name": "serverName", - "in": "path", - "description": "The name of the server for which the SQL Vulnerability Assessment is defined.", - "required": true, - "type": "string" + "$ref": "#/parameters/ServerNameParameter" }, { "$ref": "#/parameters/DatabaseNameParameter" @@ -111,7 +107,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentExecuteScan.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentExecuteScan.json index 592fa9440e91..3944a1a06f61 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentExecuteScan.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentExecuteScan.json @@ -70,7 +70,7 @@ "description": "Successfully executed a Vulnerability Assessment database scan." }, "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." }, "202": { "description": "Successfully started a Vulnerability Assessment database scan." diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json index 472bb66dd2ec..8e8dd18040cc 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json @@ -73,7 +73,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -150,7 +150,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -230,7 +230,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { @@ -311,7 +311,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { @@ -380,7 +380,7 @@ "description": "Successfully removed the database vulnerability assessment rule baseline." }, "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." }, "204": { "description": "The specified rule baseline does not exist." diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json index 20e5356dafec..57f4043decdf 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScanResult.json @@ -80,7 +80,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -164,7 +164,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { @@ -360,7 +360,7 @@ "readOnly": true, "x-ms-enum": { "name": "RuleStatus", - "modelAsString": false + "modelAsString": true } }, "errorMessage": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json index 24303da1ea69..9b90740c61c4 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentScans.json @@ -73,7 +73,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -149,7 +149,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json index ad986eac3a90..2cde5432a256 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentsSettings.json @@ -45,7 +45,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { @@ -70,11 +70,7 @@ "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { - "name": "serverName", - "in": "path", - "description": "The name of the server for which the SQL Vulnerability Assessment is defined.", - "required": true, - "type": "string" + "$ref": "#/parameters/ServerNameParameter" }, { "name": "vulnerabilityAssessmentName", @@ -105,7 +101,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { @@ -125,11 +121,7 @@ "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { - "name": "serverName", - "in": "path", - "description": "The name of the server for which the SQL Vulnerability Assessment is defined.", - "required": true, - "type": "string" + "$ref": "#/parameters/ServerNameParameter" }, { "name": "vulnerabilityAssessmentName", @@ -169,7 +161,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." }, "201": { "description": "Successfully created SQL Vulnerability Assessment.", @@ -195,11 +187,7 @@ "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { - "name": "serverName", - "in": "path", - "description": "The name of the server for which the SQL Vulnerability Assessment is defined.", - "required": true, - "type": "string" + "$ref": "#/parameters/ServerNameParameter" }, { "name": "vulnerabilityAssessmentName", @@ -227,7 +215,7 @@ "description": "Successfully removed SQL Vulnerability Assessment." }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." }, "204": { "description": "The SQL Vulnerability Assessment settings does not exist." From 2752e8167564dfd42ef94b0ce48322b520ca0f2d Mon Sep 17 00:00:00 2001 From: Ahmad Abas Date: Wed, 25 May 2022 22:52:12 +0300 Subject: [PATCH 23/24] fix PR comments, seperated baseline operations to /baselines/default/rules/ruleid --- ...seSqlVulnerabilityAssessmentBaselines.json | 371 ++++++++++++++++ ...lVulnerabilityAssessmentRuleBaselines.json | 161 +++---- .../SqlVulnerabilityAssessmentBaseline.json | 396 ++++++++++++++++++ ...qlVulnerabilityAssessmentRuleBaseline.json | 198 +++------ ...qlVulnerabilityAssessmentBaselineAdd.json} | 8 +- ...erabilityAssessmentBaselineAddLatest.json} | 8 +- ...qlVulnerabilityAssessmentBaselineGet.json} | 8 +- ...elineListBySqlVulnerabilityAssessment.json | 61 +++ ...erabilityAssessmentRuleBaselineCreate.json | 4 +- ...ulnerabilityAssessmentRuleBaselineGet.json | 2 +- ...yAssessmentRuleBaselineListByBaseline.json | 61 +++ ...qlVulnerabilityAssessmentBaselineAdd.json} | 8 +- ...erabilityAssessmentBaselineAddLatest.json} | 8 +- ...qlVulnerabilityAssessmentBaselineGet.json} | 8 +- ...elineListBySqlVulnerabilityAssessment.json | 60 +++ ...erabilityAssessmentRuleBaselineCreate.json | 2 +- ...ulnerabilityAssessmentRuleBaselineGet.json | 4 +- ...yAssessmentRuleBaselineListByBaseline.json | 60 +++ 18 files changed, 1137 insertions(+), 291 deletions(-) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentBaselines.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentBaseline.json rename specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/{DatabaseSqlVulnerabilityAssessmentRuleBaselineAdd.json => DatabaseSqlVulnerabilityAssessmentBaselineAdd.json} (90%) rename specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/{DatabaseSqlVulnerabilityAssessmentRuleBaselineAddLatest.json => DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json} (88%) rename specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/{DatabaseSqlVulnerabilityAssessmentRuleBaselineListByDatabase.json => DatabaseSqlVulnerabilityAssessmentBaselineGet.json} (89%) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByBaseline.json rename specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/{SqlVulnerabilityAssessmentRuleBaselineAdd.json => SqlVulnerabilityAssessmentBaselineAdd.json} (92%) rename specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/{SqlVulnerabilityAssessmentRuleBaselineAddLatest.json => SqlVulnerabilityAssessmentBaselineAddLatest.json} (91%) rename specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/{SqlVulnerabilityAssessmentRuleBaselineListByDatabase.json => SqlVulnerabilityAssessmentBaselineGet.json} (90%) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentBaselines.json new file mode 100644 index 000000000000..05e5726f25a1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentBaselines.json @@ -0,0 +1,371 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentBaselines" + ], + "description": "Gets a list of database's sql vulnerability assessment rule baselines.", + "operationId": "DatabaseSqlVulnerabilityAssessmentBaselines_ListBySqlVulnerabilityAssessment", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the sql vulnerability assessment rule baseline list.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of database's sql vulnerability assessment rule baselines.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}": { + "get": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentBaselines" + ], + "description": "Gets a list of database's sql vulnerability assessment rule baselines.", + "operationId": "DatabaseSqlVulnerabilityAssessmentBaselines_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the sql vulnerability assessment rule baseline list.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of database's sql vulnerability assessment rule baselines.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json" + } + } + }, + "put": { + "tags": [ + "DatabaseSqlVulnerabilityAssessmentBaselines" + ], + "description": "Add a database's vulnerability assessment rule baseline list.", + "operationId": "DatabaseSqlVulnerabilityAssessmentBaselines_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested rule baseline resource.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully add the vulnerability assessment rule baseline list.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Add a database's vulnerability assessment rule baseline list.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json" + }, + "Add a database's vulnerability assessment rule baseline from the latest scan result.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json" + } + } + } + } + }, + "definitions": { + "DatabaseSqlVulnerabilityAssessmentRuleBaseline": { + "description": "A database sql vulnerability assessment rule baseline.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput": { + "description": "A database sql vulnerability assessment rule baseline list input.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties": { + "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", + "required": [ + "latestScan", + "results" + ], + "type": "object", + "properties": { + "latestScan": { + "description": "The latest scan flag", + "type": "boolean" + }, + "results": { + "description": "The rule baseline result list", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult": { + "description": "A list of SQL Vulnerability Assessments rule baseline.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties": { + "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", + "required": [ + "results" + ], + "type": "object", + "properties": { + "results": { + "description": "The rule baseline result", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "parameters": { + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json index 2d1b81f0f11d..36d803679c41 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/DatabaseSqlVulnerabilityAssessmentRuleBaselines.json @@ -16,13 +16,13 @@ "application/json" ], "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselineRules": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules": { "get": { "tags": [ "DatabaseSqlVulnerabilityAssessmentRuleBaselines" ], "description": "Gets a list of database's sql vulnerability assessment rule baselines.", - "operationId": "DatabaseSqlVulnerabilityAssessmentRuleBaselines_ListBySqlVulnerabilityAssessment", + "operationId": "DatabaseSqlVulnerabilityAssessmentRuleBaselines_ListByBaseline", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" @@ -48,71 +48,18 @@ } }, { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully got the sql vulnerability assessment rule baseline list.", - "schema": { - "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "Gets a list of database's sql vulnerability assessment rule baselines.": { - "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByDatabase.json" - } - } - }, - "post": { - "tags": [ - "DatabaseSqlVulnerabilityAssessmentRuleBaselines" - ], - "description": "Add a database's vulnerability assessment rule baseline list.", - "operationId": "DatabaseSqlVulnerabilityAssessmentRuleBaselines_ListBaselineRules", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ServerNameParameter" - }, - { - "$ref": "#/parameters/DatabaseNameParameter" - }, - { - "name": "vulnerabilityAssessmentName", + "name": "baselineName", "in": "path", - "description": "The name of the vulnerability assessment.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { - "name": "VulnerabilityAssessmentName", + "name": "BaselineName", "modelAsString": true } }, - { - "name": "parameters", - "in": "body", - "description": "The requested rule baseline resource.", - "required": true, - "schema": { - "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput" - } - }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" }, @@ -122,29 +69,26 @@ ], "responses": { "200": { - "description": "Successfully add the vulnerability assessment rule baseline list.", + "description": "Successfully got the sql vulnerability assessment rule baseline list.", "schema": { "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult" } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-examples": { - "Add a database's vulnerability assessment rule baseline list.": { - "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAdd.json" - }, - "Add a database's vulnerability assessment rule baseline from the latest scan result.": { - "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAddLatest.json" + "Gets a list of database's sql vulnerability assessment rule baselines.": { + "$ref": "./examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByBaseline.json" } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselineRules/{ruleId}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules/{ruleId}": { "get": { "tags": [ "DatabaseSqlVulnerabilityAssessmentRuleBaselines" @@ -175,6 +119,19 @@ "modelAsString": true } }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, { "name": "ruleId", "in": "path", @@ -236,6 +193,19 @@ "modelAsString": true } }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, { "name": "ruleId", "in": "path", @@ -306,6 +276,19 @@ "modelAsString": true } }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, { "name": "ruleId", "in": "path", @@ -406,54 +389,6 @@ } } }, - "DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput": { - "description": "A database sql vulnerability assessment rule baseline list input.", - "type": "object", - "allOf": [ - { - "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" - } - ], - "properties": { - "systemData": { - "$ref": "../../../common/v1/types.json#/definitions/systemData", - "description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputResource.", - "readOnly": true - }, - "properties": { - "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties", - "description": "Resource properties.", - "x-ms-client-flatten": true - } - } - }, - "DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties": { - "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", - "required": [ - "latestScan", - "results" - ], - "type": "object", - "properties": { - "latestScan": { - "description": "The latest scan flag", - "type": "boolean" - }, - "results": { - "description": "The rule baseline result list", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - }, "DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult": { "description": "A list of SQL Vulnerability Assessments rule baseline.", "type": "object", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentBaseline.json new file mode 100644 index 000000000000..bc43cd540293 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentBaseline.json @@ -0,0 +1,396 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-02-01-preview", + "title": "SqlManagementClient", + "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentBaseline" + ], + "description": "Gets a list of database's sql vulnerability assessment rule baselines.", + "operationId": "SqlVulnerabilityAssessmentBaseline_ListBySqlVulnerabilityAssessment", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the sql vulnerability assessment rule baseline list.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of database's sql vulnerability assessment rule baselines.": { + "$ref": "./examples/SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}": { + "get": { + "tags": [ + "SqlVulnerabilityAssessmentBaseline" + ], + "description": "Gets a list of database's sql vulnerability assessment rule baselines.", + "operationId": "SqlVulnerabilityAssessmentBaseline_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the sql vulnerability assessment rule baseline list.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets a list of database's sql vulnerability assessment rule baselines.": { + "$ref": "./examples/SqlVulnerabilityAssessmentBaselineGet.json" + } + } + }, + "put": { + "tags": [ + "SqlVulnerabilityAssessmentBaseline" + ], + "description": "Add a database's vulnerability assessment rule baseline list.", + "operationId": "DatabaseSqlVulnerabilityAssessmentBaselines_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "vulnerabilityAssessmentName", + "in": "path", + "description": "The name of the vulnerability assessment.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentName", + "modelAsString": true + } + }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, + { + "name": "systemDatabaseName", + "in": "query", + "description": "The vulnerability assessment system database name.", + "required": true, + "type": "string", + "enum": [ + "master" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentSystemDatabaseName", + "modelAsString": false + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested rule baseline resource.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput" + } + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully add the vulnerability assessment rule baseline list.", + "schema": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Add a database's vulnerability assessment rule baseline list.": { + "$ref": "./examples/SqlVulnerabilityAssessmentBaselineAdd.json" + }, + "Add a database's vulnerability assessment rule baseline from the latest scan result.": { + "$ref": "./examples/SqlVulnerabilityAssessmentBaselineAddLatest.json" + } + } + } + } + }, + "definitions": { + "DatabaseSqlVulnerabilityAssessmentRuleBaseline": { + "description": "A database sql vulnerability assessment rule baseline.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput": { + "description": "A database sql vulnerability assessment rule baseline list input.", + "type": "object", + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../common/v1/types.json#/definitions/systemData", + "description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputResource.", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties": { + "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", + "required": [ + "latestScan", + "results" + ], + "type": "object", + "properties": { + "latestScan": { + "description": "The latest scan flag", + "type": "boolean" + }, + "results": { + "description": "The rule baseline result list", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult": { + "description": "A list of SQL Vulnerability Assessments rule baseline.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties": { + "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", + "required": [ + "results" + ], + "type": "object", + "properties": { + "results": { + "description": "The rule baseline result", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "parameters": { + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json index 8e8dd18040cc..1f905a0beb60 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json @@ -16,13 +16,13 @@ "application/json" ], "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselineRules": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules": { "get": { "tags": [ "SqlVulnerabilityAssessmentRuleBaseline" ], - "description": "Gets a list of database's sql vulnerability assessment rule baselines.", - "operationId": "SqlVulnerabilityAssessmentRuleBaseline_ListBySqlVulnerabilityAssessments", + "description": "Gets a system database's sql vulnerability assessment rule baseline.", + "operationId": "SqlVulnerabilityAssessmentRuleBaseline_ListByBaseline", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" @@ -45,70 +45,15 @@ } }, { - "name": "systemDatabaseName", - "in": "query", - "description": "The vulnerability assessment system database name.", - "required": true, - "type": "string", - "enum": [ - "master" - ], - "x-ms-enum": { - "name": "VulnerabilityAssessmentSystemDatabaseName", - "modelAsString": false - } - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully got the sql vulnerability assessment rule baseline list.", - "schema": { - "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "Gets a list of system database's sql vulnerability assessment rule baselines.": { - "$ref": "./examples/SqlVulnerabilityAssessmentRuleBaselineListByDatabase.json" - } - } - }, - "post": { - "tags": [ - "SqlVulnerabilityAssessmentRuleBaseline" - ], - "description": "Add a database's vulnerability assessment rule baseline list.", - "operationId": "SqlVulnerabilityAssessmentRuleBaselines_ListBaselineRules", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" - }, - { - "$ref": "#/parameters/ServerNameParameter" - }, - { - "name": "vulnerabilityAssessmentName", + "name": "baselineName", "in": "path", - "description": "The name of the vulnerability assessment.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { - "name": "VulnerabilityAssessmentName", + "name": "BaselineName", "modelAsString": true } }, @@ -126,15 +71,6 @@ "modelAsString": false } }, - { - "name": "parameters", - "in": "body", - "description": "The requested rule baseline resource.", - "required": true, - "schema": { - "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput" - } - }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" }, @@ -144,29 +80,23 @@ ], "responses": { "200": { - "description": "Successfully add the vulnerability assessment rule baseline list.", + "description": "Successfully got the sql vulnerability assessment rule baseline.", "schema": { - "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult" + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, "x-ms-examples": { - "Add a database's vulnerability assessment rule baseline list.": { - "$ref": "./examples/SqlVulnerabilityAssessmentRuleBaselineAdd.json" - }, - "Add a database's vulnerability assessment rule baseline from the latest scan result.": { - "$ref": "./examples/SqlVulnerabilityAssessmentRuleBaselineAddLatest.json" + "Gets a system database's sql vulnerability assessment rule baseline.": { + "$ref": "./examples/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json" } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselineRules/{ruleId}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules/{ruleId}": { "get": { "tags": [ "SqlVulnerabilityAssessmentRuleBaseline" @@ -194,6 +124,19 @@ "modelAsString": true } }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, { "name": "ruleId", "in": "path", @@ -266,6 +209,19 @@ "modelAsString": true } }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, { "name": "ruleId", "in": "path", @@ -347,6 +303,19 @@ "modelAsString": true } }, + { + "name": "baselineName", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "BaselineName", + "modelAsString": true + } + }, { "name": "ruleId", "in": "path", @@ -461,73 +430,6 @@ } } }, - "DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput": { - "description": "A database sql vulnerability assessment rule baseline list input.", - "type": "object", - "allOf": [ - { - "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" - } - ], - "properties": { - "systemData": { - "$ref": "../../../common/v1/types.json#/definitions/systemData", - "description": "SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputResource.", - "readOnly": true - }, - "properties": { - "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties", - "description": "Resource properties.", - "x-ms-client-flatten": true - } - } - }, - "DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputProperties": { - "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", - "required": [ - "latestScan", - "results" - ], - "type": "object", - "properties": { - "latestScan": { - "description": "The latest scan flag", - "type": "boolean" - }, - "results": { - "description": "The rule baseline result list", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - }, - "DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult": { - "description": "A list of SQL Vulnerability Assessments rule baseline.", - "type": "object", - "properties": { - "value": { - "description": "Array of results.", - "type": "array", - "items": { - "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" - }, - "readOnly": true - }, - "nextLink": { - "description": "Link to retrieve next page of results.", - "type": "string", - "readOnly": true - } - } - }, "DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties": { "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", "required": [ diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAdd.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json similarity index 90% rename from specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAdd.json rename to specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json index fcdd16d67249..05b1eab98b58 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAdd.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json @@ -36,9 +36,9 @@ "body": { "value": [ { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselineRules/VA1234", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1234", "name": "VA1234", - "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", "properties": { "results": [ [ @@ -53,9 +53,9 @@ } }, { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselineRules/VA5678", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselines/default/rules/VA5678", "name": "VA5678", - "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", "properties": { "results": [ [ diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAddLatest.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json similarity index 88% rename from specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAddLatest.json rename to specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json index 01a0f1bde44b..5051e6afda76 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineAddLatest.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json @@ -18,9 +18,9 @@ "body": { "value": [ { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselineRules/VA1234", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1234", "name": "VA1234", - "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", "properties": { "results": [ [ @@ -35,9 +35,9 @@ } }, { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselineRules/VA5678", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselines/default/rules/VA5678", "name": "VA5678", - "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", "properties": { "results": [ [ diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json similarity index 89% rename from specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByDatabase.json rename to specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json index b147c42a62b4..2dd4b0fefbf7 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByDatabase.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json @@ -13,9 +13,9 @@ "body": { "value": [ { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselineRules/VA1001", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1001", "name": "default", - "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", "properties": { "results": [ [ @@ -34,9 +34,9 @@ } }, { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselineRules/VA1002", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1002", "name": "default", - "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", "properties": { "results": [ [ diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json new file mode 100644 index 000000000000..2dd4b0fefbf7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "ruleId": "VA1001", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1001", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1002", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json index 2ae94cc42a91..a2c45f2af0e0 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json @@ -9,7 +9,7 @@ "api-version": "2022-02-01-preview", "parameters": { "properties": { - "latestScan": true, + "latestScan": false, "results": [ [ "userA", @@ -30,7 +30,7 @@ "responses": { "200": { "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/rules/VA1001", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1001", "name": "Scan123", "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines", "properties": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json index b7a7fbb53b5d..d4fcb1ef8559 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json @@ -11,7 +11,7 @@ "responses": { "200": { "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselineRules/VA1001", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1001", "name": "VA1001", "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", "properties": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByBaseline.json new file mode 100644 index 000000000000..2dd4b0fefbf7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByBaseline.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "ruleId": "VA1001", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1001", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1002", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAdd.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineAdd.json similarity index 92% rename from specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAdd.json rename to specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineAdd.json index d94647d48d50..c8d6a3850d88 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAdd.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineAdd.json @@ -36,9 +36,9 @@ "body": { "value": [ { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6411/sqlVulnerabilityAssessments/default/baselineRules/VA1234", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6411/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1234", "name": "VA1234", - "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselineRules", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselines", "properties": { "results": [ [ @@ -57,9 +57,9 @@ } }, { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6411/sqlVulnerabilityAssessments/default/baselineRules/VA5678", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6411/sqlVulnerabilityAssessments/default/baselines/default/rules/VA5678", "name": "VA5678", - "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselineRules", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselines", "properties": { "results": [ [ diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAddLatest.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineAddLatest.json similarity index 91% rename from specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAddLatest.json rename to specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineAddLatest.json index 1e962df517af..2016ebfebde5 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineAddLatest.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineAddLatest.json @@ -18,9 +18,9 @@ "body": { "value": [ { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselineRules/VA1234", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1234", "name": "VA1234", - "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselineRules", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselines", "properties": { "results": [ [ @@ -35,9 +35,9 @@ } }, { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselineRules/VA5678", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselines/default/rules/VA5678", "name": "VA5678", - "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselineRules", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselines", "properties": { "results": [ [ diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json similarity index 90% rename from specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByDatabase.json rename to specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json index 8c2619dedbb6..1f44f4a6a30c 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByDatabase.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json @@ -12,9 +12,9 @@ "body": { "value": [ { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselineRules/VA1001", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1001", "name": "default", - "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", "properties": { "results": [ [ @@ -33,9 +33,9 @@ } }, { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselineRules/VA1002", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1002", "name": "default", - "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", "properties": { "results": [ [ diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json new file mode 100644 index 000000000000..1f44f4a6a30c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "systemDatabaseName": "master", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1001", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1002", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json index 075beab1622d..f0459aa26b69 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json @@ -9,7 +9,7 @@ "api-version": "2022-02-01-preview", "parameters": { "properties": { - "latestScan": true, + "latestScan": false, "results": [ [ "userA", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json index 127445ae24cc..45ebbbe59849 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json @@ -11,9 +11,9 @@ "responses": { "200": { "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselineRules/VA1001", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1001", "name": "default", - "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselineRules", + "type": "Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselines", "properties": { "results": [ [ diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json new file mode 100644 index 000000000000..1f44f4a6a30c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "serverName": "vulnerabilityaseessmenttest-6411", + "vulnerabilityAssessmentName": "default", + "systemDatabaseName": "master", + "api-version": "2022-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1001", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1002", + "name": "default", + "type": "Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines", + "properties": { + "results": [ + [ + "userA", + "SELECT" + ], + [ + "userB", + "SELECT" + ], + [ + "userC", + "SELECT" + ] + ] + } + } + ] + } + } + } +} From 049a3ee33fc9fd8752e807fd823eba9f3dcd95ad Mon Sep 17 00:00:00 2001 From: Ahmad Abas Date: Thu, 26 May 2022 00:19:59 +0300 Subject: [PATCH 24/24] fix validations errors --- ...qlVulnerabilityAssessmentRuleBaseline.json | 24 ++++++++++++++++++- ...SqlVulnerabilityAssessmentBaselineAdd.json | 1 + ...nerabilityAssessmentBaselineAddLatest.json | 1 + ...SqlVulnerabilityAssessmentBaselineGet.json | 2 +- ...elineListBySqlVulnerabilityAssessment.json | 1 - ...erabilityAssessmentRuleBaselineCreate.json | 1 + ...erabilityAssessmentRuleBaselineDelete.json | 1 + ...ulnerabilityAssessmentRuleBaselineGet.json | 1 + ...yAssessmentRuleBaselineListByBaseline.json | 2 +- ...SqlVulnerabilityAssessmentBaselineAdd.json | 1 + ...nerabilityAssessmentBaselineAddLatest.json | 1 + ...SqlVulnerabilityAssessmentBaselineGet.json | 1 + ...erabilityAssessmentRuleBaselineCreate.json | 1 + ...erabilityAssessmentRuleBaselineDelete.json | 1 + ...ulnerabilityAssessmentRuleBaselineGet.json | 1 + ...yAssessmentRuleBaselineListByBaseline.json | 1 + 16 files changed, 37 insertions(+), 4 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json index 1f905a0beb60..d8bf218dae74 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/SqlVulnerabilityAssessmentRuleBaseline.json @@ -82,13 +82,16 @@ "200": { "description": "Successfully got the sql vulnerability assessment rule baseline.", "schema": { - "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult" } }, "default": { "description": "*** Error Responses: ***\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 SqlVulnerabilityAssessmentInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 SqlVulnerabilityAssessmentIsDisabled - SQL vulnerability assessment feature is disabled. please enable the feature before executing other SQL vulnerability assessment operations.\n\n * 400 SqlVulnerabilityAssessmentScanResultsAreNotAvailableYet - SQL vulnerability assessment results are not available yet, please try again later.\n\n * 400 SqlVulnerabilityAssessmentInvalidRuleId - The SQL vulnerability assessment rule id is invalid.\n\n * 400 SqlVulnerabilityAssessmentScanDoesNotExist - SQL vulnerability assessment scan does not exist.\n\n * 400 SqlVulnerabilityAssessmentNoBaseline - No baseline have been found for the latest scan in the resource\n\n * 400 SqlVulnerabilityAssessmentNoRuleBaseline - No SQL vulnerability assessment baseline was found\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResults - No scan results have been found for rule Id. To set a baseline there must be results for this rule in the latest scan available\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBadRuleFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadRuleWithoutRuleIdFormat - The provided results do not comply with the actual layout of the scan results\n\n * 400 SqlVulnerabilityAssessmentBadBinaryRuleWithoutRuleIdFormat - Input for binary rule is not a boolean representation\n\n * 400 SqlVulnerabilityAssessmentBaselineNoScanResultsWithoutRuleId - No scan results have been found for one of the rules. To set a baseline there must be results for this rule in the latest scan available\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - SQL Vulnerability Assessment scan is already in progress\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, "x-ms-examples": { "Gets a system database's sql vulnerability assessment rule baseline.": { "$ref": "./examples/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json" @@ -430,6 +433,25 @@ } } }, + "DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult": { + "description": "A list of SQL Vulnerability Assessments rule baseline.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseSqlVulnerabilityAssessmentRuleBaseline" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, "DatabaseSqlVulnerabilityAssessmentRuleBaselineProperties": { "description": "Properties of a database Sql Vulnerability Assessment rule baseline.", "required": [ diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json index 05b1eab98b58..813d10c5148a 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json @@ -5,6 +5,7 @@ "serverName": "vulnerabilityaseessmenttest-6440", "databaseName": "testdb", "vulnerabilityAssessmentName": "default", + "baselineName": "default", "api-version": "2022-02-01-preview", "parameters": { "properties": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json index 5051e6afda76..51c2917eb466 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json @@ -5,6 +5,7 @@ "serverName": "vulnerabilityaseessmenttest-6440", "databaseName": "testdb", "vulnerabilityAssessmentName": "default", + "baselineName": "default", "api-version": "2022-02-01-preview", "parameters": { "properties": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json index 2dd4b0fefbf7..5e8404442e85 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json @@ -5,7 +5,7 @@ "serverName": "vulnerabilityaseessmenttest-6411", "databaseName": "testdb", "vulnerabilityAssessmentName": "default", - "ruleId": "VA1001", + "baselineName": "default", "api-version": "2022-02-01-preview" }, "responses": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json index 2dd4b0fefbf7..f0f9934ff72b 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json @@ -5,7 +5,6 @@ "serverName": "vulnerabilityaseessmenttest-6411", "databaseName": "testdb", "vulnerabilityAssessmentName": "default", - "ruleId": "VA1001", "api-version": "2022-02-01-preview" }, "responses": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json index a2c45f2af0e0..dc68a4285da9 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json @@ -5,6 +5,7 @@ "serverName": "vulnerabilityaseessmenttest-6440", "databaseName": "testdb", "vulnerabilityAssessmentName": "default", + "baselineName": "default", "ruleId": "VA1001", "api-version": "2022-02-01-preview", "parameters": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json index a7b80f7bde47..6fe10ca8ae8e 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json @@ -5,6 +5,7 @@ "serverName": "vulnerabilityaseessmenttest-6411", "databaseName": "testdb", "vulnerabilityAssessmentName": "default", + "baselineName": "default", "ruleId": "VA1001", "api-version": "2022-02-01-preview" }, diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json index d4fcb1ef8559..caac61415737 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json @@ -5,6 +5,7 @@ "serverName": "vulnerabilityaseessmenttest-6411", "databaseName": "testdb", "vulnerabilityAssessmentName": "default", + "baselineName": "default", "ruleId": "VA1001", "api-version": "2022-02-01-preview" }, diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByBaseline.json index 2dd4b0fefbf7..5e8404442e85 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByBaseline.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByBaseline.json @@ -5,7 +5,7 @@ "serverName": "vulnerabilityaseessmenttest-6411", "databaseName": "testdb", "vulnerabilityAssessmentName": "default", - "ruleId": "VA1001", + "baselineName": "default", "api-version": "2022-02-01-preview" }, "responses": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineAdd.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineAdd.json index c8d6a3850d88..953fd01e0ff2 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineAdd.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineAdd.json @@ -4,6 +4,7 @@ "resourceGroupName": "vulnerabilityaseessmenttest-4711", "serverName": "vulnerabilityaseessmenttest-6411", "vulnerabilityAssessmentName": "default", + "baselineName": "default", "systemDatabaseName": "master", "api-version": "2022-02-01-preview", "parameters": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineAddLatest.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineAddLatest.json index 2016ebfebde5..1a599b3af404 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineAddLatest.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineAddLatest.json @@ -4,6 +4,7 @@ "resourceGroupName": "vulnerabilityaseessmenttest-4799", "serverName": "vulnerabilityaseessmenttest-6440", "vulnerabilityAssessmentName": "default", + "baselineName": "default", "systemDatabaseName": "master", "api-version": "2022-02-01-preview", "parameters": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json index 1f44f4a6a30c..d261b65501b4 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json @@ -4,6 +4,7 @@ "resourceGroupName": "vulnerabilityaseessmenttest-4711", "serverName": "vulnerabilityaseessmenttest-6411", "vulnerabilityAssessmentName": "default", + "baselineName": "default", "systemDatabaseName": "master", "api-version": "2022-02-01-preview" }, diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json index f0459aa26b69..d6d4f3fda29a 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json @@ -4,6 +4,7 @@ "resourceGroupName": "vulnerabilityaseessmenttest-4799", "serverName": "vulnerabilityaseessmenttest-6440", "vulnerabilityAssessmentName": "default", + "baselineName": "default", "ruleId": "VA1001", "systemDatabaseName": "master", "api-version": "2022-02-01-preview", diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json index 5af3253db9f2..56d556a868f6 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json @@ -4,6 +4,7 @@ "resourceGroupName": "vulnerabilityaseessmenttest-4711", "serverName": "vulnerabilityaseessmenttest-6411", "vulnerabilityAssessmentName": "default", + "baselineName": "default", "ruleId": "VA1001", "systemDatabaseName": "master", "api-version": "2022-02-01-preview" diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json index 45ebbbe59849..13e90edffb5e 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json @@ -4,6 +4,7 @@ "resourceGroupName": "vulnerabilityaseessmenttest-4711", "serverName": "vulnerabilityaseessmenttest-6411", "vulnerabilityAssessmentName": "default", + "baselineName": "default", "ruleId": "VA1001", "systemDatabaseName": "master", "api-version": "2022-02-01-preview" diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json index 1f44f4a6a30c..d261b65501b4 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json @@ -4,6 +4,7 @@ "resourceGroupName": "vulnerabilityaseessmenttest-4711", "serverName": "vulnerabilityaseessmenttest-6411", "vulnerabilityAssessmentName": "default", + "baselineName": "default", "systemDatabaseName": "master", "api-version": "2022-02-01-preview" },