sql_vulnerability_assessment_scans
Creates, updates, deletes, gets or lists a sql_vulnerability_assessment_scans resource.
Overview
| Name | sql_vulnerability_assessment_scans |
| Type | Resource |
| Id | azure.security.sql_vulnerability_assessment_scans |
Fields
The following fields are returned by SELECT queries:
- get
- get_scan_operation_result
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
database | string | The database name. |
endTime | string (date-time) | Scan results are valid until end time (UTC). |
highSeverityFailedRulesCount | integer | The number of failed rules with high severity. |
isBaselineApplied | boolean | Baseline created for this database, and has one or more rules. |
lastScanTime | string (date-time) | Last scan time. |
lowSeverityFailedRulesCount | integer | The number of failed rules with low severity. |
mediumSeverityFailedRulesCount | integer | The number of failed rules with medium severity. |
server | string | The server name. |
sqlVersion | string | The SQL version. |
startTime | string (date-time) | The scan start time (UTC). |
state | string | The scan status. Known values are: "Failed", "FailedToRun", "InProgress", and "Passed". (Failed, FailedToRun, InProgress, Passed) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
totalFailedRulesCount | integer | The number of total failed rules. |
totalPassedRulesCount | integer | The number of total passed rules. |
totalRulesCount | integer | The number of total rules assessed. |
triggerType | string | The scan trigger type. Known values are: "OnDemand" and "Recurring". (OnDemand, Recurring) |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
operationId | string | Gets or sets the operation id. |
scanStatus | string | The scan operation status. Known values are: "Passed", "Failed", "FailedToRun", and "InProgress". (Passed, Failed, FailedToRun, InProgress) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
database | string | The database name. |
endTime | string (date-time) | Scan results are valid until end time (UTC). |
highSeverityFailedRulesCount | integer | The number of failed rules with high severity. |
isBaselineApplied | boolean | Baseline created for this database, and has one or more rules. |
lastScanTime | string (date-time) | Last scan time. |
lowSeverityFailedRulesCount | integer | The number of failed rules with low severity. |
mediumSeverityFailedRulesCount | integer | The number of failed rules with medium severity. |
server | string | The server name. |
sqlVersion | string | The SQL version. |
startTime | string (date-time) | The scan start time (UTC). |
state | string | The scan status. Known values are: "Failed", "FailedToRun", "InProgress", and "Passed". (Failed, FailedToRun, InProgress, Passed) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
totalFailedRulesCount | integer | The number of total failed rules. |
totalPassedRulesCount | integer | The number of total passed rules. |
totalRulesCount | integer | The number of total rules assessed. |
triggerType | string | The scan trigger type. Known values are: "OnDemand" and "Recurring". (OnDemand, Recurring) |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | scan_id, resource_id | databaseName | Gets the scan details of a single scan record. Gets the scan details of a single scan record. |
get_scan_operation_result | select | resource_id, operation_id | databaseName | Gets the result of a scan operation initiated by the InitiateScan action. Gets the result of a scan operation initiated by the InitiateScan action. |
list | select | resource_id | databaseName | Gets a list of scan records. Gets a list of scan records. |
initiate_scan | exec | resource_id | databaseName | Initiates a vulnerability assessment scan. Initiates a vulnerability assessment scan. |
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.
| Name | Datatype | Description |
|---|---|---|
operation_id | string | Required. |
resource_id | string | Required. |
scan_id | string | The scan Id. Type 'latest' to get the scan record for the latest scan. Required. |
databaseName | string | Default value is None. |
SELECT examples
- get
- get_scan_operation_result
- list
Gets the scan details of a single scan record. Gets the scan details of a single scan record.
SELECT
id,
name,
database,
endTime,
highSeverityFailedRulesCount,
isBaselineApplied,
lastScanTime,
lowSeverityFailedRulesCount,
mediumSeverityFailedRulesCount,
server,
sqlVersion,
startTime,
state,
systemData,
totalFailedRulesCount,
totalPassedRulesCount,
totalRulesCount,
triggerType,
type
FROM azure.security.sql_vulnerability_assessment_scans
WHERE scan_id = '{{ scan_id }}' -- required
AND resource_id = '{{ resource_id }}' -- required
AND databaseName = '{{ databaseName }}'
;
Gets the result of a scan operation initiated by the InitiateScan action. Gets the result of a scan operation initiated by the InitiateScan action.
SELECT
id,
name,
operationId,
scanStatus,
systemData,
type
FROM azure.security.sql_vulnerability_assessment_scans
WHERE resource_id = '{{ resource_id }}' -- required
AND operation_id = '{{ operation_id }}' -- required
AND databaseName = '{{ databaseName }}'
;
Gets a list of scan records. Gets a list of scan records.
SELECT
id,
name,
database,
endTime,
highSeverityFailedRulesCount,
isBaselineApplied,
lastScanTime,
lowSeverityFailedRulesCount,
mediumSeverityFailedRulesCount,
server,
sqlVersion,
startTime,
state,
systemData,
totalFailedRulesCount,
totalPassedRulesCount,
totalRulesCount,
triggerType,
type
FROM azure.security.sql_vulnerability_assessment_scans
WHERE resource_id = '{{ resource_id }}' -- required
AND databaseName = '{{ databaseName }}'
;
Lifecycle Methods
- initiate_scan
Initiates a vulnerability assessment scan. Initiates a vulnerability assessment scan.
EXEC azure.security.sql_vulnerability_assessment_scans.initiate_scan
@resource_id='{{ resource_id }}' --required,
@databaseName='{{ databaseName }}'
;