server_vulnerability_assessments
Creates, updates, deletes, gets or lists a server_vulnerability_assessments
resource.
Overview
Name | server_vulnerability_assessments |
Type | Resource |
Id | azure.sql.server_vulnerability_assessments |
Fields
- vw_server_vulnerability_assessments
- server_vulnerability_assessments
Name | Datatype | Description |
---|---|---|
recurring_scans | text | field from the properties object |
resourceGroupName | text | field from the properties object |
serverName | 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 server Vulnerability Assessment. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, serverName, subscriptionId, vulnerabilityAssessmentName | Gets the server's vulnerability assessment. |
list_by_server | SELECT | resourceGroupName, serverName, subscriptionId | Lists the vulnerability assessment policies associated with a server. |
create_or_update | INSERT | resourceGroupName, serverName, subscriptionId, vulnerabilityAssessmentName | Creates or updates the server'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 | resourceGroupName, serverName, subscriptionId, vulnerabilityAssessmentName | Removes the server's vulnerability assessment. |
SELECT
examples
Lists the vulnerability assessment policies associated with a server.
- vw_server_vulnerability_assessments
- server_vulnerability_assessments
SELECT
recurring_scans,
resourceGroupName,
serverName,
storage_account_access_key,
storage_container_path,
storage_container_sas_key,
subscriptionId,
vulnerabilityAssessmentName
FROM azure.sql.vw_server_vulnerability_assessments
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.sql.server_vulnerability_assessments
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new server_vulnerability_assessments
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.server_vulnerability_assessments (
resourceGroupName,
serverName,
subscriptionId,
vulnerabilityAssessmentName,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ 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 server_vulnerability_assessments
resource.
/*+ delete */
DELETE FROM azure.sql.server_vulnerability_assessments
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND vulnerabilityAssessmentName = '{{ vulnerabilityAssessmentName }}';