Skip to content

Commit

Permalink
Add new Sql VA API (Azure#18804)
Browse files Browse the repository at this point in the history
* Add new Sql VA API

* Update server level API

* Update API attributes

* Update controlers

* Add missing examples

* Fix examples

* Format JSON file

* Update examples

* Updae scan record API

* Add ref to README file

* Update version

* Update enums

* Add SystemData

* add systemData

* sort readme files

* Update examples

* Update remove baseline API

* Add 204 respond to delete API

* Add 204 error

* Fixed error

* Update description

* Update swagger

* fix PR comments, seperated baseline operations to /baselines/default/rules/ruleid

* fix validations errors

Co-authored-by: Ahmad Abas <ahabas@microsoft.com>
  • Loading branch information
2 people authored and ericshape committed May 31, 2022
1 parent 97dd05a commit f1bfe83
Show file tree
Hide file tree
Showing 45 changed files with 5,874 additions and 1 deletion.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -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 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."
}
},
"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"
}
}
}
}

Large diffs are not rendered by default.

Loading

0 comments on commit f1bfe83

Please sign in to comment.