Microsoft.OperationalInsights workspaces template reference

Template format

To create a Microsoft.OperationalInsights/workspaces resource, add the following JSON to the resources section of your template.

  "name": "string",
  "type": "Microsoft.OperationalInsights/workspaces",
  "apiVersion": "2015-11-01-preview",
  "location": "string",
  "tags": {},
  "properties": {
    "source": "string",
    "customerId": "string",
    "portalUrl": "string",
    "sku": {
      "name": "string"
    "retentionInDays": "integer"
  "resources": []

Property values

The following tables describe the values you need to set in the schema.

Microsoft.OperationalInsights/workspaces object

Name Type Required Value
name string Yes
type enum Yes Microsoft.OperationalInsights/workspaces
apiVersion enum Yes 2015-11-01-preview
location string No Resource location
tags object No Resource tags
properties object Yes Workspace properties. - WorkspaceProperties object
resources array No dataSources linkedServices

WorkspaceProperties object

Name Type Required Value
source string No The source of the workspace. Source defines where the workspace was created. 'Azure' implies it was created in Azure. 'External' implies it was created via the Operational Insights Portal. This value is set on the service side and read-only on the client side.
customerId string No The ID associated with the workspace. Setting this value at creation time allows the workspace being created to be linked to an existing workspace.
portalUrl string No The URL of the Operational Insights portal for this workspace. This value is set on the service side and read-only on the client side.
sku object No The SKU of the workspace. - Sku object
retentionInDays integer No The workspace data retention in days. -1 means Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed for all other Skus.

Sku object

Name Type Required Value
name enum Yes The name of the SKU. - Free, Standard, Premium, PerNode, PerGB2018, Standalone

Quickstart templates

See all Microsoft.Operationalinsights templates in Azure Quickstart templates.