Skip to main content

evidence

Creates, updates, deletes, gets or lists an evidence resource.

Overview

Nameevidence
TypeResource
Idazure_extras.app_compliance_automation.evidence

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
namestringThe name of the resource.
controlIdstringControl id.
evidenceTypestringEvidence type. Known values are: "File", "AutoCollectedEvidence", and "Data".
extraDatastringExtra data considered as evidence.
filePathstringThe path of the file in storage. Required.
provisioningStatestringAzure lifecycle management. Known values are: "Succeeded", "Failed", "Canceled", "Creating", "Deleting", "Fixing", "Verifying", and "Updating".
responsibilityIdstringResponsibility id.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectreport_name, evidence_nameGet the evidence metadata.
list_by_reportselectreport_name$skipToken, $top, $select, $filter, $orderby, offerGuid, reportCreatorTenantIdReturns a paginated list of evidences for a specified report.
create_or_updateinsertreport_name, evidence_name, propertiesofferGuid, reportCreatorTenantIdCreate or Update an evidence a specified report.
create_or_updatereplacereport_name, evidence_name, propertiesofferGuid, reportCreatorTenantIdCreate or Update an evidence a specified report.
deletedeletereport_name, evidence_nameDelete an existent evidence from a specified report.
downloadexecreport_name, evidence_nameDownload evidence file.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
evidence_namestringThe evidence name. Required.
report_namestringReport Name. Required.
$filterstringThe filter to apply on the operation. Default value is None.
$orderbystringOData order by query option. Default value is None.
$selectstringOData Select statement. Limits the properties on each entry to just those requested, e.g. ?$select=reportName,id. Default value is None.
$skipTokenstringSkip over when retrieving results. Default value is None.
$topintegerNumber of elements to return when retrieving results. Default value is None.
offerGuidstringThe offerGuid which mapping to the reports. Default value is None.
reportCreatorTenantIdstringThe tenant id of the report creator. Default value is None.

SELECT examples

Get the evidence metadata.

SELECT
id,
name,
controlId,
evidenceType,
extraData,
filePath,
provisioningState,
responsibilityId,
systemData,
type
FROM azure_extras.app_compliance_automation.evidence
WHERE report_name = '{{ report_name }}' -- required
AND evidence_name = '{{ evidence_name }}' -- required
;

INSERT examples

Create or Update an evidence a specified report.

INSERT INTO azure_extras.app_compliance_automation.evidence (
properties,
report_name,
evidence_name,
offerGuid,
reportCreatorTenantId
)
SELECT
'{{ properties }}' /* required */,
'{{ report_name }}',
'{{ evidence_name }}',
'{{ offerGuid }}',
'{{ reportCreatorTenantId }}'
RETURNING
id,
name,
properties,
systemData,
type
;

REPLACE examples

Create or Update an evidence a specified report.

REPLACE azure_extras.app_compliance_automation.evidence
SET
properties = '{{ properties }}'
WHERE
report_name = '{{ report_name }}' --required
AND evidence_name = '{{ evidence_name }}' --required
AND properties = '{{ properties }}' --required
AND offerGuid = '{{ offerGuid}}'
AND reportCreatorTenantId = '{{ reportCreatorTenantId}}'
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Delete an existent evidence from a specified report.

DELETE FROM azure_extras.app_compliance_automation.evidence
WHERE report_name = '{{ report_name }}' --required
AND evidence_name = '{{ evidence_name }}' --required
;

Lifecycle Methods

Download evidence file.

EXEC azure_extras.app_compliance_automation.evidence.download 
@report_name='{{ report_name }}' --required,
@evidence_name='{{ evidence_name }}' --required
@@json=
'{
"reportCreatorTenantId": "{{ reportCreatorTenantId }}",
"offerGuid": "{{ offerGuid }}"
}'
;