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 queries 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.ResourceGraph/queries resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.ResourceGraph/queries@2024-04-01' = {
etag: 'string'
location: 'string'
name: 'string'
properties: {
description: 'string'
query: 'string'
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.ResourceGraph/queries
Name | Description | Value |
---|---|---|
etag | This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict. | string |
location | The location of the resource | string |
name | The resource name | string Constraints: Pattern = ^[^<>&:\?]*$ (required) |
properties | Metadata describing a graph query for an Azure resource. | GraphQueryProperties |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
GraphQueryProperties
Name | Description | Value |
---|---|---|
description | The description of a graph query. | string |
query | KQL query that will be graph. | string (required) |
ResourceTags
Name | Description | Value |
---|
Usage Examples
Azure Verified Modules
The following Azure Verified Modules can be used to deploy this resource type.
Module | Description |
---|---|
Resource Graph Query | AVM Resource Module for Resource Graph Query |
Azure Quickstart Samples
The following Azure Quickstart templates contain Bicep samples for deploying this resource type.
Bicep File | Description |
---|---|
Resource Graph Shared Query - Count OS | This template deploys an Azure Resource Graph shared query. The shared query counts all virtual machine resources and summarizes by the OS type. A shared query can be pinned to a dashboard or converted to a supported visualization such as a bar or pie chart. |
ARM template resource definition
The queries 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.ResourceGraph/queries resource, add the following JSON to your template.
{
"type": "Microsoft.ResourceGraph/queries",
"apiVersion": "2024-04-01",
"name": "string",
"etag": "string",
"location": "string",
"properties": {
"description": "string",
"query": "string"
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.ResourceGraph/queries
Name | Description | Value |
---|---|---|
apiVersion | The api version | '2024-04-01' |
etag | This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict. | string |
location | The location of the resource | string |
name | The resource name | string Constraints: Pattern = ^[^<>&:\?]*$ (required) |
properties | Metadata describing a graph query for an Azure resource. | GraphQueryProperties |
tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
type | The resource type | 'Microsoft.ResourceGraph/queries' |
GraphQueryProperties
Name | Description | Value |
---|---|---|
description | The description of a graph query. | string |
query | KQL query that will be graph. | string (required) |
ResourceTags
Name | Description | Value |
---|
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
Template | Description |
---|---|
Resource Graph Shared Query - Count OS |
This template deploys an Azure Resource Graph shared query. The shared query counts all virtual machine resources and summarizes by the OS type. A shared query can be pinned to a dashboard or converted to a supported visualization such as a bar or pie chart. |
Terraform (AzAPI provider) resource definition
The queries 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.ResourceGraph/queries resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.ResourceGraph/queries@2024-04-01"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
etag = "string"
properties = {
description = "string"
query = "string"
}
}
}
Property Values
Microsoft.ResourceGraph/queries
Name | Description | Value |
---|---|---|
etag | This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict. | string |
location | The location of the resource | string |
name | The resource name | string Constraints: Pattern = ^[^<>&:\?]*$ (required) |
properties | Metadata describing a graph query for an Azure resource. | GraphQueryProperties |
tags | Resource tags | Dictionary of tag names and values. |
type | The resource type | "Microsoft.ResourceGraph/queries@2024-04-01" |
GraphQueryProperties
Name | Description | Value |
---|---|---|
description | The description of a graph query. | string |
query | KQL query that will be graph. | string (required) |
ResourceTags
Name | Description | Value |
---|
Usage Examples
Azure Verified Modules
The following Azure Verified Modules can be used to deploy this resource type.
Module | Description |
---|---|
Resource Graph Query | AVM Resource Module for Resource Graph Query |