Skip to main content

vulnerability_assessment_rule_baselines

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

Overview

Namevulnerability_assessment_rule_baselines
TypeResource
Idazure.sql.vulnerability_assessment_rule_baselines

Fields

NameDatatypeDescription
baselineNametextfield from the properties object
resourceGroupNametextfield from the properties object
resultstextfield from the properties object
ruleIdtextfield from the properties object
serverNametextfield from the properties object
subscriptionIdtextfield from the properties object
systemDatabaseNametextfield from the properties object
system_datatextfield from the properties object
vulnerabilityAssessmentNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTbaselineName, resourceGroupName, ruleId, serverName, subscriptionId, systemDatabaseName, vulnerabilityAssessmentNameGets a system database's sql vulnerability assessment rule baseline.
list_by_baselineSELECTbaselineName, resourceGroupName, serverName, subscriptionId, systemDatabaseName, vulnerabilityAssessmentNameGets a system database's sql vulnerability assessment rule baseline.
create_or_updateINSERTbaselineName, resourceGroupName, ruleId, serverName, subscriptionId, systemDatabaseName, vulnerabilityAssessmentNameCreates or updates a database's vulnerability assessment rule baseline.
deleteDELETEbaselineName, resourceGroupName, ruleId, serverName, subscriptionId, systemDatabaseName, vulnerabilityAssessmentNameRemoves the database's vulnerability assessment rule baseline.

SELECT examples

Gets a system database's sql vulnerability assessment rule baseline.

SELECT
baselineName,
resourceGroupName,
results,
ruleId,
serverName,
subscriptionId,
systemDatabaseName,
system_data,
vulnerabilityAssessmentName
FROM azure.sql.vw_vulnerability_assessment_rule_baselines
WHERE baselineName = '{{ baselineName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND systemDatabaseName = '{{ systemDatabaseName }}'
AND vulnerabilityAssessmentName = '{{ vulnerabilityAssessmentName }}';

INSERT example

Use the following StackQL query and manifest file to create a new vulnerability_assessment_rule_baselines resource.

/*+ create */
INSERT INTO azure.sql.vulnerability_assessment_rule_baselines (
baselineName,
resourceGroupName,
ruleId,
serverName,
subscriptionId,
systemDatabaseName,
vulnerabilityAssessmentName,
properties
)
SELECT
'{{ baselineName }}',
'{{ resourceGroupName }}',
'{{ ruleId }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ systemDatabaseName }}',
'{{ vulnerabilityAssessmentName }}',
'{{ properties }}'
;

DELETE example

Deletes the specified vulnerability_assessment_rule_baselines resource.

/*+ delete */
DELETE FROM azure.sql.vulnerability_assessment_rule_baselines
WHERE baselineName = '{{ baselineName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND ruleId = '{{ ruleId }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND systemDatabaseName = '{{ systemDatabaseName }}'
AND vulnerabilityAssessmentName = '{{ vulnerabilityAssessmentName }}';