Microsoft.OperationalInsights queryPacks/queries

Bicep resource definition

The queryPacks/queries resource type can be deployed to:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.OperationalInsights/queryPacks/queries resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.OperationalInsights/queryPacks/queries@2019-09-01' = {
  name: 'string'
  parent: resourceSymbolicName
  properties: {
    body: 'string'
    description: 'string'
    displayName: 'string'
    properties: any()
    related: {
      categories: [
        'string'
      ]
      resourceTypes: [
        'string'
      ]
      solutions: [
        'string'
      ]
    }
    tags: {}
  }
}

Property values

queryPacks/queries

Name Description Value
name The resource name

See how to set names and types for child resources in Bicep.
string (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: queryPacks
properties Properties that define an Log Analytics QueryPack-Query resource. LogAnalyticsQueryPackQueryProperties

LogAnalyticsQueryPackQueryProperties

Name Description Value
body Body of the query. string (required)
description Description of the query. string
displayName Unique display name for your query within the Query Pack. string (required)
properties Additional properties that can be set for the query. For Bicep, you can use the any() function.
related The related metadata items for the function. LogAnalyticsQueryPackQueryPropertiesRelated
tags Tags associated with the query. object

LogAnalyticsQueryPackQueryPropertiesRelated

Name Description Value
categories The related categories for the function. string[]
resourceTypes The related resource types for the function. string[]
solutions The related Log Analytics solutions for the function. string[]

ARM template resource definition

The queryPacks/queries resource type can be deployed to:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.OperationalInsights/queryPacks/queries resource, add the following JSON to your template.

{
  "type": "Microsoft.OperationalInsights/queryPacks/queries",
  "apiVersion": "2019-09-01",
  "name": "string",
  "properties": {
    "body": "string",
    "description": "string",
    "displayName": "string",
    "properties": {},
    "related": {
      "categories": [ "string" ],
      "resourceTypes": [ "string" ],
      "solutions": [ "string" ]
    },
    "tags": {}
  }
}

Property values

queryPacks/queries

Name Description Value
type The resource type 'Microsoft.OperationalInsights/queryPacks/queries'
apiVersion The resource api version '2019-09-01'
name The resource name

See how to set names and types for child resources in JSON ARM templates.
string (required)
properties Properties that define an Log Analytics QueryPack-Query resource. LogAnalyticsQueryPackQueryProperties

LogAnalyticsQueryPackQueryProperties

Name Description Value
body Body of the query. string (required)
description Description of the query. string
displayName Unique display name for your query within the Query Pack. string (required)
properties Additional properties that can be set for the query.
related The related metadata items for the function. LogAnalyticsQueryPackQueryPropertiesRelated
tags Tags associated with the query. object

LogAnalyticsQueryPackQueryPropertiesRelated

Name Description Value
categories The related categories for the function. string[]
resourceTypes The related resource types for the function. string[]
solutions The related Log Analytics solutions for the function. string[]

Terraform (AzAPI provider) resource definition

The queryPacks/queries resource type can be deployed to:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.OperationalInsights/queryPacks/queries resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.OperationalInsights/queryPacks/queries@2019-09-01"
  name = "string"
  parent_id = "string"
  body = jsonencode({
    properties = {
      body = "string"
      description = "string"
      displayName = "string"
      related = {
        categories = [
          "string"
        ]
        resourceTypes = [
          "string"
        ]
        solutions = [
          "string"
        ]
      }
      tags = {}
    }
  })
}

Property values

queryPacks/queries

Name Description Value
type The resource type "Microsoft.OperationalInsights/queryPacks/queries@2019-09-01"
name The resource name string (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: queryPacks
properties Properties that define an Log Analytics QueryPack-Query resource. LogAnalyticsQueryPackQueryProperties

LogAnalyticsQueryPackQueryProperties

Name Description Value
body Body of the query. string (required)
description Description of the query. string
displayName Unique display name for your query within the Query Pack. string (required)
properties Additional properties that can be set for the query.
related The related metadata items for the function. LogAnalyticsQueryPackQueryPropertiesRelated
tags Tags associated with the query. object

LogAnalyticsQueryPackQueryPropertiesRelated

Name Description Value
categories The related categories for the function. string[]
resourceTypes The related resource types for the function. string[]
solutions The related Log Analytics solutions for the function. string[]