Skip to main content

managed_instance_vulnerability_assessments

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

Overview

Namemanaged_instance_vulnerability_assessments
TypeResource
Idazure.sql.managed_instance_vulnerability_assessments

Fields

NameDatatypeDescription
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
getSELECTmanagedInstanceName, resourceGroupName, subscriptionId, vulnerabilityAssessmentNameGets the managed instance's vulnerability assessment.
create_or_updateINSERTmanagedInstanceName, resourceGroupName, subscriptionId, vulnerabilityAssessmentNameCreates or updates the managed instance's vulnerability assessment. Learn more about setting SQL vulnerability assessment with managed identity - https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage
deleteDELETEmanagedInstanceName, resourceGroupName, subscriptionId, vulnerabilityAssessmentNameRemoves the managed instance's vulnerability assessment.

SELECT examples

Gets the managed instance's vulnerability assessment.

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

INSERT example

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

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

DELETE example

Deletes the specified managed_instance_vulnerability_assessments resource.

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