managed_instance_vulnerability_assessments
Creates, updates, deletes, gets or lists a managed_instance_vulnerability_assessments
resource.
Overview
Name | managed_instance_vulnerability_assessments |
Type | Resource |
Id | azure.sql.managed_instance_vulnerability_assessments |
Fields
- vw_managed_instance_vulnerability_assessments
- managed_instance_vulnerability_assessments
Name | Datatype | Description |
---|---|---|
managedInstanceName | text | field from the properties object |
recurring_scans | text | field from the properties object |
resourceGroupName | text | field from the properties object |
storage_account_access_key | text | field from the properties object |
storage_container_path | text | field from the properties object |
storage_container_sas_key | text | field from the properties object |
subscriptionId | text | field from the properties object |
vulnerabilityAssessmentName | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Properties of a managed instance vulnerability assessment. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | managedInstanceName, resourceGroupName, subscriptionId, vulnerabilityAssessmentName | Gets the managed instance's vulnerability assessment. |
create_or_update | INSERT | managedInstanceName, resourceGroupName, subscriptionId, vulnerabilityAssessmentName | Creates 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 |
delete | DELETE | managedInstanceName, resourceGroupName, subscriptionId, vulnerabilityAssessmentName | Removes the managed instance's vulnerability assessment. |
SELECT
examples
Gets the managed instance's vulnerability assessment.
- vw_managed_instance_vulnerability_assessments
- managed_instance_vulnerability_assessments
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 }}';
SELECT
properties
FROM azure.sql.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.managed_instance_vulnerability_assessments (
managedInstanceName,
resourceGroupName,
subscriptionId,
vulnerabilityAssessmentName,
properties
)
SELECT
'{{ managedInstanceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ vulnerabilityAssessmentName }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: storageContainerPath
value: string
- name: storageContainerSasKey
value: string
- name: storageAccountAccessKey
value: string
- name: recurringScans
value:
- name: isEnabled
value: boolean
- name: emailSubscriptionAdmins
value: boolean
- name: emails
value:
- string
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 }}';