Skip to main content

watchlists

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

Overview

Namewatchlists
TypeResource
Idazure.sentinel.watchlists

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
etagstringEtag of the azure resource
propertiesobjectWatchlist properties

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, workspaceName, watchlistAliasGet a watchlist, without its watchlist items.
listselectsubscriptionId, resourceGroupName, workspaceName$skipTokenGet all watchlists, without watchlist items.
create_or_updateinsertsubscriptionId, resourceGroupName, workspaceName, watchlistAliasCreate or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To create a Watchlist and its Items, we should call this endpoint with rawContent and contentType properties.
deletedeletesubscriptionId, resourceGroupName, workspaceName, watchlistAliasDelete a watchlist.

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
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstringThe ID of the target subscription.
watchlistAliasstringThe watchlist alias
workspaceNamestringThe name of the workspace.
$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.

SELECT examples

Get a watchlist, without its watchlist items.

SELECT
etag,
properties
FROM azure.sentinel.watchlists
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND workspaceName = '{{ workspaceName }}' -- required
AND watchlistAlias = '{{ watchlistAlias }}' -- required
;

INSERT examples

Create or update a Watchlist and its Watchlist Items (bulk creation, e.g. through text/csv content type). To create a Watchlist and its Items, we should call this endpoint with rawContent and contentType properties.

INSERT INTO azure.sentinel.watchlists (
data__etag,
data__properties,
subscriptionId,
resourceGroupName,
workspaceName,
watchlistAlias
)
SELECT
'{{ etag }}',
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ workspaceName }}',
'{{ watchlistAlias }}'
RETURNING
etag,
properties
;

DELETE examples

Delete a watchlist.

DELETE FROM azure.sentinel.watchlists
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND workspaceName = '{{ workspaceName }}' --required
AND watchlistAlias = '{{ watchlistAlias }}' --required
;