Skip to main content

hunts

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

Overview

Namehunts
TypeResource
Idazure.security_insight.hunts

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.
attackTacticsarrayA list of mitre attack tactics the hunt is associated with.
attackTechniquesarrayA list of a mitre attack techniques the hunt is associated with.
descriptionstringThe description of the hunt. Required.
displayNamestringThe display name of the hunt. Required.
etagstringEtag of the azure resource.
hypothesisStatusstringThe hypothesis status of the hunt. Known values are: "Unknown", "Invalidated", and "Validated". (Unknown, Invalidated, Validated)
labelsarrayList of labels relevant to this hunt.
ownerobjectDescribes a user that the hunt is assigned to.
statusstringThe status of the hunt. Known values are: "New", "Active", "Closed", "Backlog", "Approved", "Succeeded", "Failed", and "InProgress". (New, Active, Closed, Backlog, Approved, Succeeded, Failed, InProgress)
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
getselectresource_group_name, workspace_name, hunt_id, subscription_idGets a hunt, without relations and comments.
listselectresource_group_name, workspace_name, subscription_id$filter, $orderby, $top, $skipTokenGets all hunts, without relations and comments.
create_or_updateinsertresource_group_name, workspace_name, hunt_id, subscription_idCreate or update a hunt.
create_or_updatereplaceresource_group_name, workspace_name, hunt_id, subscription_idCreate or update a hunt.
deletedeleteresource_group_name, workspace_name, hunt_id, subscription_idDelete a hunt.

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
hunt_idstringThe hunt id (GUID). 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 hunt, without relations and comments.

SELECT
id,
name,
attackTactics,
attackTechniques,
description,
displayName,
etag,
hypothesisStatus,
labels,
owner,
status,
systemData,
type
FROM azure.security_insight.hunts
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND workspace_name = '{{ workspace_name }}' -- required
AND hunt_id = '{{ hunt_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or update a hunt.

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

REPLACE examples

Create or update a hunt.

REPLACE azure.security_insight.hunts
SET
properties = '{{ properties }}',
etag = '{{ etag }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND workspace_name = '{{ workspace_name }}' --required
AND hunt_id = '{{ hunt_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
properties,
systemData,
type;

DELETE examples

Delete a hunt.

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