Skip to main content

managed_database_vulnerability_assessments

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

Overview

Namemanaged_database_vulnerability_assessments
TypeResource
Idazure.sql.managed_database_vulnerability_assessments

Fields

NameDatatypeDescription
databaseNametextfield from the properties object
managedInstanceNametextfield from the properties object
recurring_scanstextfield from the properties object
resourceGroupNametextfield from the properties object
storage_account_access_keytextfield from the properties object
storage_container_pathtextfield from the properties object
storage_container_sas_keytextfield from the properties object
subscriptionIdtextfield from the properties object
vulnerabilityAssessmentNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTdatabaseName, managedInstanceName, resourceGroupName, subscriptionId, vulnerabilityAssessmentNameGets the database's vulnerability assessment.
list_by_databaseSELECTdatabaseName, managedInstanceName, resourceGroupName, subscriptionIdLists the vulnerability assessments of a managed database.
create_or_updateINSERTdatabaseName, managedInstanceName, resourceGroupName, subscriptionId, vulnerabilityAssessmentNameCreates or updates the database's vulnerability assessment.
deleteDELETEdatabaseName, managedInstanceName, resourceGroupName, subscriptionId, vulnerabilityAssessmentNameRemoves the database's vulnerability assessment.

SELECT examples

Lists the vulnerability assessments of a managed database.

SELECT
databaseName,
managedInstanceName,
recurring_scans,
resourceGroupName,
storage_account_access_key,
storage_container_path,
storage_container_sas_key,
subscriptionId,
vulnerabilityAssessmentName
FROM azure.sql.vw_managed_database_vulnerability_assessments
WHERE databaseName = '{{ databaseName }}'
AND managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.sql.managed_database_vulnerability_assessments (
databaseName,
managedInstanceName,
resourceGroupName,
subscriptionId,
vulnerabilityAssessmentName,
properties
)
SELECT
'{{ databaseName }}',
'{{ managedInstanceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ vulnerabilityAssessmentName }}',
'{{ properties }}'
;

DELETE example

Deletes the specified managed_database_vulnerability_assessments resource.

/*+ delete */
DELETE FROM azure.sql.managed_database_vulnerability_assessments
WHERE databaseName = '{{ databaseName }}'
AND managedInstanceName = '{{ managedInstanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND vulnerabilityAssessmentName = '{{ vulnerabilityAssessmentName }}';