Skip to main content

file_imports

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

Overview

Namefile_imports
TypeResource
Idazure.security_insight.file_imports

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}.
namestringThe name of the resource.
contentTypestringThe content type of this file. Required. Known values are: "BasicIndicator", "StixIndicator", and "Unspecified". (BasicIndicator, StixIndicator, Unspecified)
createdTimeUTCstring (date-time)The time the file was imported.
errorFileobjectRepresents the error file (if the import was ingested with errors or failed the validation).
errorsPreviewarrayAn ordered list of some of the errors that were encountered during validation.
filesValidUntilTimeUTCstring (date-time)The time the files associated with this import are deleted from the storage account.
importFileobjectRepresents the imported file. Required.
importValidUntilTimeUTCstring (date-time)The time the file import record is soft deleted from the database and history.
ingestedRecordCountintegerThe number of records that have been successfully ingested.
ingestionModestringDescribes how to ingest the records in the file. Required. Known values are: "IngestOnlyIfAllAreValid", "IngestAnyValidRecords", and "Unspecified". (IngestOnlyIfAllAreValid, IngestAnyValidRecords, Unspecified)
sourcestringThe source for the data in the file. Required.
statestringThe state of the file import. Known values are: "FatalError", "Ingested", "IngestedWithErrors", "InProgress", "Invalid", "WaitingForUpload", and "Unspecified". (FatalError, Ingested, IngestedWithErrors, InProgress, Invalid, WaitingForUpload, Unspecified)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
totalRecordCountintegerThe number of records in the file.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
validRecordCountintegerThe number of records that have passed validation.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, workspace_name, file_import_id, subscription_idGets a file import.
listselectresource_group_name, workspace_name, subscription_id$filter, $orderby, $top, $skipTokenGets all file imports.
createinsertresource_group_name, workspace_name, file_import_id, subscription_idCreates the file import.
deletedeleteresource_group_name, workspace_name, file_import_id, subscription_idDelete the file import.

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
file_import_idstringFile import ID. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
workspace_namestringThe name of the workspace. Required.
$filterstringFilters the results, based on a Boolean condition. Optional. Default value is None.
$orderbystringSorts the results. Optional. Default value is None.
$skipTokenstringSkiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. Optional. Default value is None.
$topintegerReturns only the first n results. Optional. Default value is None.

SELECT examples

Gets a file import.

SELECT
id,
name,
contentType,
createdTimeUTC,
errorFile,
errorsPreview,
filesValidUntilTimeUTC,
importFile,
importValidUntilTimeUTC,
ingestedRecordCount,
ingestionMode,
source,
state,
systemData,
totalRecordCount,
type,
validRecordCount
FROM azure.security_insight.file_imports
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND workspace_name = '{{ workspace_name }}' -- required
AND file_import_id = '{{ file_import_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates the file import.

INSERT INTO azure.security_insight.file_imports (
properties,
resource_group_name,
workspace_name,
file_import_id,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ workspace_name }}',
'{{ file_import_id }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

DELETE examples

Delete the file import.

DELETE FROM azure.security_insight.file_imports
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND workspace_name = '{{ workspace_name }}' --required
AND file_import_id = '{{ file_import_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;