Skip to main content

sql_vulnerability_assessment_scans

Creates, updates, deletes, gets or lists a sql_vulnerability_assessment_scans resource.

Overview

Namesql_vulnerability_assessment_scans
TypeResource
Idazure.sql.sql_vulnerability_assessment_scans

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
databasestringThe database name.
endTimestring (date-time)The scan end time (UTC).
errorsarrayThe scan errors.
highSeverityFailedRulesCountintegerThe number of failed rules with high severity.
isBaselineAppliedbooleanBaseline created for this database, and has one or more rules.
lastScanTimestring (date-time)The last scan time.
lowSeverityFailedRulesCountintegerThe number of failed rules with low severity.
mediumSeverityFailedRulesCountintegerThe number of failed rules with medium severity.
scanIdstringThe scan ID.
serverstringThe server name.
sqlVersionstringThe SQL version.
startTimestring (date-time)The scan start time (UTC).
statestringThe scan status. Known values are: "Passed", "Failed", "FailedToRun", and "InProgress". (Passed, Failed, FailedToRun, InProgress)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
totalFailedRulesCountintegerThe number of total failed rules.
totalPassedRulesCountintegerThe number of total passed rules.
totalRulesCountintegerThe number of total rules assessed.
triggerTypestringThe scan trigger type. Known values are: "OnDemand" and "Recurring". (OnDemand, Recurring)
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, server_name, vulnerability_assessment_name, scan_id, subscription_idGet a system database vulnerability assessment scan record.
list_by_sql_vulnerability_assessmentsselectresource_group_name, server_name, vulnerability_assessment_name, subscription_idLists the vulnerability assessment scans of a database.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
scan_idstringRequired.
server_namestringThe name of the server. Required.
subscription_idstring
vulnerability_assessment_namestringThe name of the vulnerability assessment. "default" Required.

SELECT examples

Get a system database vulnerability assessment scan record.

SELECT
id,
name,
database,
endTime,
errors,
highSeverityFailedRulesCount,
isBaselineApplied,
lastScanTime,
lowSeverityFailedRulesCount,
mediumSeverityFailedRulesCount,
scanId,
server,
sqlVersion,
startTime,
state,
systemData,
totalFailedRulesCount,
totalPassedRulesCount,
totalRulesCount,
triggerType,
type
FROM azure.sql.sql_vulnerability_assessment_scans
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND vulnerability_assessment_name = '{{ vulnerability_assessment_name }}' -- required
AND scan_id = '{{ scan_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;