assessments
Creates, updates, deletes, gets or lists a assessments
resource.
Overview
Name | assessments |
Type | Resource |
Id | azure.security.assessments |
Fields
- vw_assessments
- assessments
Name | Datatype | Description |
---|---|---|
id | text | Resource Id |
name | text | Resource name |
additional_data | text | field from the properties object |
assessmentName | text | field from the properties object |
display_name | text | field from the properties object |
links | text | field from the properties object |
metadata | text | field from the properties object |
partners_data | text | field from the properties object |
resourceId | text | field from the properties object |
resource_details | text | field from the properties object |
scope | text | field from the properties object |
status | text | field from the properties object |
type | text | Resource type |
Name | Datatype | Description |
---|---|---|
id | string | Resource Id |
name | string | Resource name |
properties | object | Describes properties of an assessment. |
type | string | Resource type |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | assessmentName, resourceId | Get a security assessment on your scanned resource |
list | SELECT | scope | Get security assessments on all your scanned resources inside a scope |
create_or_update | INSERT | assessmentName, resourceId | Create a security assessment on your resource. An assessment metadata that describes this assessment must be predefined with the same name before inserting the assessment result |
delete | DELETE | assessmentName, resourceId | Delete a security assessment on your resource. An assessment metadata that describes this assessment must be predefined with the same name before inserting the assessment result |
SELECT
examples
Get security assessments on all your scanned resources inside a scope
- vw_assessments
- assessments
SELECT
id,
name,
additional_data,
assessmentName,
display_name,
links,
metadata,
partners_data,
resourceId,
resource_details,
scope,
status,
type
FROM azure.security.vw_assessments
WHERE scope = '{{ scope }}';
SELECT
id,
name,
properties,
type
FROM azure.security.assessments
WHERE scope = '{{ scope }}';
INSERT
example
Use the following StackQL query and manifest file to create a new assessments
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.security.assessments (
assessmentName,
resourceId,
properties
)
SELECT
'{{ assessmentName }}',
'{{ resourceId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: status
value:
- name: code
value: string
- name: cause
value: string
- name: description
value: string
- name: resourceDetails
value:
- name: source
value: string
- name: displayName
value: string
- name: additionalData
value: object
- name: links
value:
- name: azurePortalUri
value: string
- name: metadata
value:
- name: displayName
value: string
- name: policyDefinitionId
value: string
- name: description
value: string
- name: remediationDescription
value: string
- name: categories
value:
- string
- name: severity
value: string
- name: userImpact
value: string
- name: implementationEffort
value: string
- name: threats
value:
- string
- name: preview
value: boolean
- name: assessmentType
value: string
- name: partnerData
value:
- name: partnerName
value: string
- name: productName
value: string
- name: secret
value: string
- name: partnersData
value:
- name: partnerName
value: string
- name: secret
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
DELETE
example
Deletes the specified assessments
resource.
/*+ delete */
DELETE FROM azure.security.assessments
WHERE assessmentName = '{{ assessmentName }}'
AND resourceId = '{{ resourceId }}';