Skip to main content

metadata

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

Overview

Namemetadata
TypeResource
Idazure.security_insight.metadata

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.
authorobjectThe creator of the content item.
categoriesobjectCategories for the solution content item.
contentIdstringStatic ID for the content. Used to identify dependencies and content from solutions or community. Hard-coded/static for out of the box content and solutions. Can be optionally set for user created content to define dependencies. If an active content item is made from a template, both will have the same contentId.
contentSchemaVersionstringSchema version of the content. Can be used to distinguish between different flow based on the schema version.
customVersionstringThe custom version of the content. A optional free text.
dependenciesobjectDependencies for the content item, what other content items it requires to work. Can describe more complex dependencies using a recursive/nested structure. For a single dependency an id/kind/version can be supplied or operator/criteria for complex formats.
etagstringEtag of the azure resource.
firstPublishDatestring (date)first publish date of solution content item.
iconstringthe icon identifier. this id can later be fetched from the solution template.
kindstringThe kind of content the metadata is for. Required.
lastPublishDatestring (date)last publish date of solution content item.
parentIdstringFull parent resource ID of the content item the metadata is for. This is the full resource ID including the scope (subscription and resource group). Required.
previewImagesarraypreview image file names. These will be taken from the solution artifacts.
previewImagesDarkarraypreview image file names. These will be taken from the solution artifacts. used for dark theme support.
providersarrayProviders for the solution content item.
sourceobjectSource of the content. This is where/how it was created.
supportobjectSupport information for the metadata - type, name, contact information.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
threatAnalysisTacticsarraythe tactics the resource covers.
threatAnalysisTechniquesarraythe techniques the resource covers, these have to be aligned with the tactics being used.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
versionstringVersion of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, 1.0.0.0), following ARM template best practices. Can also be any string, but then we cannot guarantee any version checks.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, workspace_name, metadata_name, subscription_idGet a Metadata.
listselectresource_group_name, workspace_name, subscription_id$filter, $orderby, $top, $skipList of all metadata.
createinsertresource_group_name, workspace_name, metadata_name, subscription_idCreate a Metadata.
updateupdateresource_group_name, workspace_name, metadata_name, subscription_idUpdate an existing Metadata.
deletedeleteresource_group_name, workspace_name, metadata_name, subscription_idDelete a Metadata.

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
metadata_namestringThe Metadata name. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
workspace_namestringThe name of the monitor workspace. Required.
$filterstringFilters the results, based on a Boolean condition. Optional. Default value is None.
$orderbystringSorts the results. Optional. Default value is None.
$skipintegerUsed to skip n elements in the OData query (offset). Returns a nextLink to the next page of results if there are any left. Default value is None.
$topintegerReturns only the first n results. Optional. Default value is None.

SELECT examples

Get a Metadata.

SELECT
id,
name,
author,
categories,
contentId,
contentSchemaVersion,
customVersion,
dependencies,
etag,
firstPublishDate,
icon,
kind,
lastPublishDate,
parentId,
previewImages,
previewImagesDark,
providers,
source,
support,
systemData,
threatAnalysisTactics,
threatAnalysisTechniques,
type,
version
FROM azure.security_insight.metadata
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND workspace_name = '{{ workspace_name }}' -- required
AND metadata_name = '{{ metadata_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create a Metadata.

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

UPDATE examples

Update an existing Metadata.

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

DELETE examples

Delete a Metadata.

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