Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The queryPacks resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.OperationalInsights/queryPacks resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.OperationalInsights/queryPacks@2025-07-01' = {
location: 'string'
name: 'string'
properties: {}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.OperationalInsights/queryPacks
| Name | Description | Value |
|---|---|---|
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string (required) |
| properties | Properties that define a Log Analytics QueryPack resource. | LogAnalyticsQueryPackProperties (required) |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
LogAnalyticsQueryPackProperties
| Name | Description | Value |
|---|
TrackedResourceTags
| Name | Description | Value |
|---|
Usage Examples
Bicep Samples
A basic example of deploying Log Analytics Query Pack.
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource queryPack 'Microsoft.OperationalInsights/queryPacks@2019-09-01' = {
name: resourceName
location: location
properties: {}
}
ARM template resource definition
The queryPacks resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.OperationalInsights/queryPacks resource, add the following JSON to your template.
{
"type": "Microsoft.OperationalInsights/queryPacks",
"apiVersion": "2025-07-01",
"name": "string",
"location": "string",
"properties": {
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.OperationalInsights/queryPacks
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2025-07-01' |
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string (required) |
| properties | Properties that define a Log Analytics QueryPack resource. | LogAnalyticsQueryPackProperties (required) |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.OperationalInsights/queryPacks' |
LogAnalyticsQueryPackProperties
| Name | Description | Value |
|---|
TrackedResourceTags
| Name | Description | Value |
|---|
Usage Examples
Terraform (AzAPI provider) resource definition
The queryPacks resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.OperationalInsights/queryPacks resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.OperationalInsights/queryPacks@2025-07-01"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
}
}
}
Property Values
Microsoft.OperationalInsights/queryPacks
| Name | Description | Value |
|---|---|---|
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string (required) |
| properties | Properties that define a Log Analytics QueryPack resource. | LogAnalyticsQueryPackProperties (required) |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.OperationalInsights/queryPacks@2025-07-01" |
LogAnalyticsQueryPackProperties
| Name | Description | Value |
|---|
TrackedResourceTags
| Name | Description | Value |
|---|
Usage Examples
Terraform Samples
A basic example of deploying Log Analytics Query Pack.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "queryPack" {
type = "Microsoft.OperationalInsights/queryPacks@2019-09-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}