Skip to main content

database_vulnerability_assessment_rule_baselines

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

Overview

Namedatabase_vulnerability_assessment_rule_baselines
TypeResource
Idazure.sql.database_vulnerability_assessment_rule_baselines

Fields

NameDatatypeDescription
baselineNametextfield from the properties object
baseline_resultstextfield from the properties object
databaseNametextfield from the properties object
resourceGroupNametextfield from the properties object
ruleIdtextfield from the properties object
serverNametextfield from the properties object
subscriptionIdtextfield from the properties object
vulnerabilityAssessmentNametextfield from the properties object

Methods

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

SELECT examples

Gets a database's vulnerability assessment rule baseline.

SELECT
baselineName,
baseline_results,
databaseName,
resourceGroupName,
ruleId,
serverName,
subscriptionId,
vulnerabilityAssessmentName
FROM azure.sql.vw_database_vulnerability_assessment_rule_baselines
WHERE baselineName = '{{ baselineName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND ruleId = '{{ ruleId }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND vulnerabilityAssessmentName = '{{ vulnerabilityAssessmentName }}';

INSERT example

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

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

DELETE example

Deletes the specified database_vulnerability_assessment_rule_baselines resource.

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