Database Sql Vulnerability Assessment Scans - Get
Get a database vulnerability assessment scan result.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/default/scans/{scanId}?api-version=2023-08-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
database
|
path | True |
string |
The name of the database. |
|
resource
|
path | True |
string |
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
|
scan
|
path | True |
string |
The vulnerability assessment scan Id of the scan to retrieve. |
|
server
|
path | True |
string |
The name of the server. |
|
subscription
|
path | True |
string |
The subscription ID that identifies an Azure subscription. |
|
vulnerability
|
path | True |
The name of the vulnerability assessment. |
|
|
api-version
|
query | True |
string |
The API version to use for the request. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Successfully retrieved the database vulnerability assessment scan. |
|
| Other Status Codes |
*** Error Responses: ***
|
Examples
Get a database's vulnerability assessment scan.
Sample request
Sample response
{
"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-23T12:19:00.6455136+05:30",
"endTime": "2020-06-23T06:49:00.7236217Z",
"highSeverityFailedRulesCount": 3,
"mediumSeverityFailedRulesCount": 2,
"lowSeverityFailedRulesCount": 1,
"totalPassedRulesCount": 20,
"totalFailedRulesCount": 6,
"totalRulesCount": 26,
"isBaselineApplied": false,
"lastScanTime": "2020-06-23T12:19:00.6455136+05:30"
}
}
Definitions
| Name | Description |
|---|---|
|
created |
The type of identity that created the resource. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Sql |
Properties of a vulnerability assessment scan error. |
|
Sql |
A vulnerability assessment scan record. |
|
system |
Metadata pertaining to creation and last modification of the resource. |
|
Vulnerability |
The name of the vulnerability assessment. |
|
Vulnerability |
The scan status. |
|
Vulnerability |
The scan trigger type. |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
SqlVulnerabilityAssessmentScanError
Properties of a vulnerability assessment scan error.
| Name | Type | Description |
|---|---|---|
| code |
string |
The error code. |
| message |
string |
The error message. |
SqlVulnerabilityAssessmentScanRecord
A vulnerability assessment scan record.
| Name | Type | Description |
|---|---|---|
| id |
string |
Resource ID. |
| name |
string |
Resource name. |
| properties.database |
string |
The database name. |
| properties.endTime |
string (date-time) |
The scan end time (UTC). |
| properties.errors |
The scan errors. |
|
| properties.highSeverityFailedRulesCount |
integer (int32) |
The number of failed rules with high severity. |
| properties.isBaselineApplied |
boolean |
Baseline created for this database, and has one or more rules. |
| properties.lastScanTime |
string (date-time) |
The last scan time. |
| properties.lowSeverityFailedRulesCount |
integer (int32) |
The number of failed rules with low severity. |
| properties.mediumSeverityFailedRulesCount |
integer (int32) |
The number of failed rules with medium severity. |
| properties.scanId |
string |
The scan ID. |
| properties.server |
string |
The server name. |
| properties.sqlVersion |
string |
The SQL version. |
| properties.startTime |
string (date-time) |
The scan start time (UTC). |
| properties.state |
The scan status. |
|
| properties.totalFailedRulesCount |
integer (int32) |
The number of total failed rules. |
| properties.totalPassedRulesCount |
integer (int32) |
The number of total passed rules. |
| properties.totalRulesCount |
integer (int32) |
The number of total rules assessed. |
| properties.triggerType |
The scan trigger type. |
|
| systemData |
SystemData of SqlVulnerabilityAssessmentScanRecordResource. |
|
| type |
string |
Resource type. |
systemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |
VulnerabilityAssessmentName
The name of the vulnerability assessment.
| Value | Description |
|---|---|
| default |
VulnerabilityAssessmentScanState
The scan status.
| Value | Description |
|---|---|
| Passed | |
| Failed | |
| FailedToRun | |
| InProgress |
VulnerabilityAssessmentScanTriggerType
The scan trigger type.
| Value | Description |
|---|---|
| OnDemand | |
| Recurring |