file_imports
Creates, updates, deletes, gets or lists a file_imports resource.
Overview
| Name | file_imports |
| Type | Resource |
| Id | azure.security_insight.file_imports |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
contentType | string | The content type of this file. Required. Known values are: "BasicIndicator", "StixIndicator", and "Unspecified". (BasicIndicator, StixIndicator, Unspecified) |
createdTimeUTC | string (date-time) | The time the file was imported. |
errorFile | object | Represents the error file (if the import was ingested with errors or failed the validation). |
errorsPreview | array | An ordered list of some of the errors that were encountered during validation. |
filesValidUntilTimeUTC | string (date-time) | The time the files associated with this import are deleted from the storage account. |
importFile | object | Represents the imported file. Required. |
importValidUntilTimeUTC | string (date-time) | The time the file import record is soft deleted from the database and history. |
ingestedRecordCount | integer | The number of records that have been successfully ingested. |
ingestionMode | string | Describes how to ingest the records in the file. Required. Known values are: "IngestOnlyIfAllAreValid", "IngestAnyValidRecords", and "Unspecified". (IngestOnlyIfAllAreValid, IngestAnyValidRecords, Unspecified) |
source | string | The source for the data in the file. Required. |
state | string | The state of the file import. Known values are: "FatalError", "Ingested", "IngestedWithErrors", "InProgress", "Invalid", "WaitingForUpload", and "Unspecified". (FatalError, Ingested, IngestedWithErrors, InProgress, Invalid, WaitingForUpload, Unspecified) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
totalRecordCount | integer | The number of records in the file. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
validRecordCount | integer | The number of records that have passed validation. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
contentType | string | The content type of this file. Required. Known values are: "BasicIndicator", "StixIndicator", and "Unspecified". (BasicIndicator, StixIndicator, Unspecified) |
createdTimeUTC | string (date-time) | The time the file was imported. |
errorFile | object | Represents the error file (if the import was ingested with errors or failed the validation). |
errorsPreview | array | An ordered list of some of the errors that were encountered during validation. |
filesValidUntilTimeUTC | string (date-time) | The time the files associated with this import are deleted from the storage account. |
importFile | object | Represents the imported file. Required. |
importValidUntilTimeUTC | string (date-time) | The time the file import record is soft deleted from the database and history. |
ingestedRecordCount | integer | The number of records that have been successfully ingested. |
ingestionMode | string | Describes how to ingest the records in the file. Required. Known values are: "IngestOnlyIfAllAreValid", "IngestAnyValidRecords", and "Unspecified". (IngestOnlyIfAllAreValid, IngestAnyValidRecords, Unspecified) |
source | string | The source for the data in the file. Required. |
state | string | The state of the file import. Known values are: "FatalError", "Ingested", "IngestedWithErrors", "InProgress", "Invalid", "WaitingForUpload", and "Unspecified". (FatalError, Ingested, IngestedWithErrors, InProgress, Invalid, WaitingForUpload, Unspecified) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
totalRecordCount | integer | The number of records in the file. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
validRecordCount | integer | The number of records that have passed validation. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, workspace_name, file_import_id, subscription_id | Gets a file import. | |
list | select | resource_group_name, workspace_name, subscription_id | $filter, $orderby, $top, $skipToken | Gets all file imports. |
create | insert | resource_group_name, workspace_name, file_import_id, subscription_id | Creates the file import. | |
delete | delete | resource_group_name, workspace_name, file_import_id, subscription_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
file_import_id | string | File import ID. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
workspace_name | string | The name of the workspace. Required. |
$filter | string | Filters the results, based on a Boolean condition. Optional. Default value is None. |
$orderby | string | Sorts the results. Optional. Default value is None. |
$skipToken | string | Skiptoken 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. |
$top | integer | Returns only the first n results. Optional. Default value is None. |
SELECT examples
- get
- list
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
;
Gets all file imports.
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 subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
AND $orderby = '{{ $orderby }}'
AND $top = '{{ $top }}'
AND $skipToken = '{{ $skipToken }}'
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: file_imports
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the file_imports resource.
- name: workspace_name
value: "{{ workspace_name }}"
description: Required parameter for the file_imports resource.
- name: file_import_id
value: "{{ file_import_id }}"
description: Required parameter for the file_imports resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the file_imports resource.
- name: properties
description: |
File import properties.
value:
ingestionMode: "{{ ingestionMode }}"
contentType: "{{ contentType }}"
createdTimeUTC: "{{ createdTimeUTC }}"
errorFile:
fileFormat: "{{ fileFormat }}"
fileName: "{{ fileName }}"
fileSize: {{ fileSize }}
fileContentUri: "{{ fileContentUri }}"
deleteStatus: "{{ deleteStatus }}"
errorsPreview:
- recordIndex: {{ recordIndex }}
errorMessages: "{{ errorMessages }}"
importFile:
fileFormat: "{{ fileFormat }}"
fileName: "{{ fileName }}"
fileSize: {{ fileSize }}
fileContentUri: "{{ fileContentUri }}"
deleteStatus: "{{ deleteStatus }}"
ingestedRecordCount: {{ ingestedRecordCount }}
source: "{{ source }}"
state: "{{ state }}"
totalRecordCount: {{ totalRecordCount }}
validRecordCount: {{ validRecordCount }}
filesValidUntilTimeUTC: "{{ filesValidUntilTimeUTC }}"
importValidUntilTimeUTC: "{{ importValidUntilTimeUTC }}"
DELETE examples
- delete
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
;