managed_database_vulnerability_assessments
Creates, updates, deletes, gets or lists a managed_database_vulnerability_assessments
resource.
Overview
Name | managed_database_vulnerability_assessments |
Type | Resource |
Id | azure.sql.managed_database_vulnerability_assessments |
Fields
- vw_managed_database_vulnerability_assessments
- managed_database_vulnerability_assessments
Name | Datatype | Description |
---|---|---|
databaseName | text | field from the properties object |
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 database Vulnerability Assessment. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | databaseName, managedInstanceName, resourceGroupName, subscriptionId, vulnerabilityAssessmentName | Gets the database's vulnerability assessment. |
list_by_database | SELECT | databaseName, managedInstanceName, resourceGroupName, subscriptionId | Lists the vulnerability assessments of a managed database. |
create_or_update | INSERT | databaseName, managedInstanceName, resourceGroupName, subscriptionId, vulnerabilityAssessmentName | Creates or updates the database's vulnerability assessment. |
delete | DELETE | databaseName, managedInstanceName, resourceGroupName, subscriptionId, vulnerabilityAssessmentName | Removes the database's vulnerability assessment. |
SELECT
examples
Lists the vulnerability assessments of a managed database.
- vw_managed_database_vulnerability_assessments
- managed_database_vulnerability_assessments
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 }}';
SELECT
properties
FROM azure.sql.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.managed_database_vulnerability_assessments (
databaseName,
managedInstanceName,
resourceGroupName,
subscriptionId,
vulnerabilityAssessmentName,
properties
)
SELECT
'{{ databaseName }}',
'{{ 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_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 }}';