Skip to main content

defender_for_storage

Creates, updates, deletes, gets or lists a defender_for_storage resource.

Overview

Namedefender_for_storage
TypeResource
Idazure.security.defender_for_storage

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
scanEndTimestringThe time at which the scan has ended. Only available for a scan which has terminated.
scanIdstringThe identifier of the scan.
scanStartTimestringThe time at which the scan had been initiated.
scanStatusstringA status code of the scan operation.
scanStatusMessagestringA description of the status of the scan.
scanSummaryobjectA summary of the scan results.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_malware_scanselectresource_id, setting_name, scan_idGets the Defender for Storage malware scan for the specified storage resource.
getselectresource_id, setting_nameGets the Defender for Storage settings for the specified storage account.
listselectresource_idLists the Defender for Storage settings for the specified storage account.
createinsertresource_id, setting_nameCreates or updates the Defender for Storage settings on a specified storage account.
start_malware_scanexecresource_id, setting_nameInitiate a Defender for Storage malware scan for the specified storage account. Blobs and Files will be scanned for malware.
cancel_malware_scanexecresource_id, setting_name, scan_idCancels a Defender for Storage malware scan for the specified storage account.

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
resource_idstringThe fully qualified Azure Resource manager identifier of the resource. Required.
scan_idstringThe identifier of the scan. Can be either 'latest' or a GUID. Required.
setting_namestringThe defender for storage setting name. Known values are: "MCAS", "WDATP", "WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW", "WDATP_UNIFIED_SOLUTION", "Sentinel", and "current". Required.

SELECT examples

Gets the Defender for Storage malware scan for the specified storage resource.

SELECT
scanEndTime,
scanId,
scanStartTime,
scanStatus,
scanStatusMessage,
scanSummary
FROM azure.security.defender_for_storage
WHERE resource_id = '{{ resource_id }}' -- required
AND setting_name = '{{ setting_name }}' -- required
AND scan_id = '{{ scan_id }}' -- required
;

INSERT examples

Creates or updates the Defender for Storage settings on a specified storage account.

INSERT INTO azure.security.defender_for_storage (
properties,
resource_id,
setting_name
)
SELECT
'{{ properties }}',
'{{ resource_id }}',
'{{ setting_name }}'
RETURNING
id,
name,
properties,
systemData,
type
;

Lifecycle Methods

Initiate a Defender for Storage malware scan for the specified storage account. Blobs and Files will be scanned for malware.

EXEC azure.security.defender_for_storage.start_malware_scan 
@resource_id='{{ resource_id }}' --required,
@setting_name='{{ setting_name }}' --required
;