Skip to main content

content_template

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

Overview

Namecontent_template
TypeResource
Idazure.security_insight.content_template

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 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. Dynamic for user-created. This is the resource name.
contentKindstringThe kind of content the template is for. Known values are: "DataConnector", "DataType", "Workbook", "WorkbookTemplate", "Playbook", "PlaybookTemplate", "AnalyticsRuleTemplate", "AnalyticsRule", "HuntingQuery", "InvestigationQuery", "Parser", "Watchlist", "WatchlistTemplate", "Solution", "AzureFunction", "LogicAppsCustomConnector", "AutomationRule", "ResourcesDataConnector", "Notebook", "Standalone", "SummaryRule", and "CustomDetection". (DataConnector, DataType, Workbook, WorkbookTemplate, Playbook, PlaybookTemplate, AnalyticsRuleTemplate, AnalyticsRule, HuntingQuery, InvestigationQuery, Parser, Watchlist, WatchlistTemplate, Solution, AzureFunction, LogicAppsCustomConnector, AutomationRule, ResourcesDataConnector, Notebook, Standalone, SummaryRule, CustomDetection)
contentProductIdstringUnique ID for the content. It should be generated based on the contentId of the package, contentId of the template, contentKind of the template and the contentVersion of the template.
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.
dependantTemplatesarrayDependant templates. Expandable.
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.
displayNamestringThe display name of the template.
etagstringEtag of the azure resource.
firstPublishDatestring (date)first publish date content item.
iconstringthe icon identifier. this id can later be fetched from the content metadata.
isDeprecatedstringFlag indicates if this template is deprecated. Known values are: "true" and "false". (true, false)
lastPublishDatestring (date)last publish date for the content item.
mainTemplateobjectThe JSON of the ARM template to deploy active content. Expandable.
packageIdstringthe package Id contains this template.
packageKindstringthe packageKind of the package contains this template. Known values are: "Solution" and "Standalone". (Solution, Standalone)
packageNamestringthe name of the package contains this template.
packageVersionstringVersion of the package. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, 1.0.0.0), following ARM metadata best practices. Can also be any string, but then we cannot guarantee any version checks.
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 content item.
sourceobjectSource of the content. This is where/how it was created.
supportobjectSupport information for the template - 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 metadata 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, template_id, subscription_idGets a template byt its identifier. Expandable properties: * properties/mainTemplate * properties/dependantTemplates.
deletedeleteresource_group_name, workspace_name, template_id, subscription_idDelete an installed template.
installexecresource_group_name, workspace_name, template_id, subscription_idInstall a template.

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
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
template_idstringtemplate Id. Required.
workspace_namestringThe name of the monitor workspace. Required.

SELECT examples

Gets a template byt its identifier. Expandable properties: * properties/mainTemplate * properties/dependantTemplates.

SELECT
id,
name,
author,
categories,
contentId,
contentKind,
contentProductId,
contentSchemaVersion,
customVersion,
dependantTemplates,
dependencies,
displayName,
etag,
firstPublishDate,
icon,
isDeprecated,
lastPublishDate,
mainTemplate,
packageId,
packageKind,
packageName,
packageVersion,
previewImages,
previewImagesDark,
providers,
source,
support,
systemData,
threatAnalysisTactics,
threatAnalysisTechniques,
type,
version
FROM azure.security_insight.content_template
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND workspace_name = '{{ workspace_name }}' -- required
AND template_id = '{{ template_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

DELETE examples

Delete an installed template.

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

Lifecycle Methods

Install a template.

EXEC azure.security_insight.content_template.install 
@resource_group_name='{{ resource_group_name }}' --required,
@workspace_name='{{ workspace_name }}' --required,
@template_id='{{ template_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}",
"etag": "{{ etag }}"
}'
;