Share via


Microsoft.Datadog monitors/tagRules

Bicep resource definition

The monitors/tagRules resource type can be deployed with operations that target:

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

Resource format

To create a Microsoft.Datadog/monitors/tagRules resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Datadog/monitors/tagRules@2025-11-03-preview' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    agentRules: {
      enableAgentMonitoring: bool
      filteringTags: [
        {
          action: 'string'
          name: 'string'
          value: 'string'
        }
      ]
    }
    automuting: bool
    customMetrics: bool
    logRules: {
      filteringTags: [
        {
          action: 'string'
          name: 'string'
          value: 'string'
        }
      ]
      sendAadLogs: bool
      sendResourceLogs: bool
      sendSubscriptionLogs: bool
    }
    metricRules: {
      filteringTags: [
        {
          action: 'string'
          name: 'string'
          value: 'string'
        }
      ]
    }
  }
}

Property Values

Microsoft.Datadog/monitors/tagRules

Name Description Value
name The resource name 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: monitors
properties Definition of the properties for a TagRules resource. MonitoringTagRulesProperties

AgentRules

Name Description Value
enableAgentMonitoring Flag specifying if agent monitoring should be enabled for the Monitor resource. bool
filteringTags List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags. FilteringTag[]

FilteringTag

Name Description Value
action Valid actions for a filtering tag. Exclusion takes priority over inclusion. 'Exclude'
'Include'
name The name (also known as the key) of the tag. string
value The value of the tag. string

LogRules

Name Description Value
filteringTags List of filtering tags to be used for capturing logs. This only takes effect if SendResourceLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags. FilteringTag[]
sendAadLogs Flag specifying if AAD logs should be sent for the Monitor resource. bool
sendResourceLogs Flag specifying if Azure resource logs should be sent for the Monitor resource. bool
sendSubscriptionLogs Flag specifying if Azure subscription logs should be sent for the Monitor resource. bool

MetricRules

Name Description Value
filteringTags List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags. FilteringTag[]

MonitoringTagRulesProperties

Name Description Value
agentRules Set of rules for managing agents for the Monitor resource. AgentRules
automuting Configuration to enable/disable auto-muting flag bool
customMetrics Configuration to enable/disable custom metrics. If enabled, custom metrics from app insights will be sent. bool
logRules Set of rules for sending logs for the Monitor resource. LogRules
metricRules Set of rules for sending metrics for the Monitor resource. MetricRules

Usage Examples

Azure Quickstart Samples

The following Azure Quickstart templates contain Bicep samples for deploying this resource type.

Bicep File Description
Create a new Datadog Organization This template creates a new Datadog - An Azure Native ISV Service resource and a Datadog organization to monitor resources in your subscription.

ARM template resource definition

The monitors/tagRules resource type can be deployed with operations that target:

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

Resource format

To create a Microsoft.Datadog/monitors/tagRules resource, add the following JSON to your template.

{
  "type": "Microsoft.Datadog/monitors/tagRules",
  "apiVersion": "2025-11-03-preview",
  "name": "string",
  "properties": {
    "agentRules": {
      "enableAgentMonitoring": "bool",
      "filteringTags": [
        {
          "action": "string",
          "name": "string",
          "value": "string"
        }
      ]
    },
    "automuting": "bool",
    "customMetrics": "bool",
    "logRules": {
      "filteringTags": [
        {
          "action": "string",
          "name": "string",
          "value": "string"
        }
      ],
      "sendAadLogs": "bool",
      "sendResourceLogs": "bool",
      "sendSubscriptionLogs": "bool"
    },
    "metricRules": {
      "filteringTags": [
        {
          "action": "string",
          "name": "string",
          "value": "string"
        }
      ]
    }
  }
}

Property Values

Microsoft.Datadog/monitors/tagRules

Name Description Value
apiVersion The api version '2025-11-03-preview'
name The resource name string (required)
properties Definition of the properties for a TagRules resource. MonitoringTagRulesProperties
type The resource type 'Microsoft.Datadog/monitors/tagRules'

AgentRules

Name Description Value
enableAgentMonitoring Flag specifying if agent monitoring should be enabled for the Monitor resource. bool
filteringTags List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags. FilteringTag[]

FilteringTag

Name Description Value
action Valid actions for a filtering tag. Exclusion takes priority over inclusion. 'Exclude'
'Include'
name The name (also known as the key) of the tag. string
value The value of the tag. string

LogRules

Name Description Value
filteringTags List of filtering tags to be used for capturing logs. This only takes effect if SendResourceLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags. FilteringTag[]
sendAadLogs Flag specifying if AAD logs should be sent for the Monitor resource. bool
sendResourceLogs Flag specifying if Azure resource logs should be sent for the Monitor resource. bool
sendSubscriptionLogs Flag specifying if Azure subscription logs should be sent for the Monitor resource. bool

MetricRules

Name Description Value
filteringTags List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags. FilteringTag[]

MonitoringTagRulesProperties

Name Description Value
agentRules Set of rules for managing agents for the Monitor resource. AgentRules
automuting Configuration to enable/disable auto-muting flag bool
customMetrics Configuration to enable/disable custom metrics. If enabled, custom metrics from app insights will be sent. bool
logRules Set of rules for sending logs for the Monitor resource. LogRules
metricRules Set of rules for sending metrics for the Monitor resource. MetricRules

Usage Examples

Azure Quickstart Templates

The following Azure Quickstart templates deploy this resource type.

Template Description
Create a new Datadog Organization

Deploy to Azure
This template creates a new Datadog - An Azure Native ISV Service resource and a Datadog organization to monitor resources in your subscription.

Terraform (AzAPI provider) resource definition

The monitors/tagRules 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.Datadog/monitors/tagRules resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Datadog/monitors/tagRules@2025-11-03-preview"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      agentRules = {
        enableAgentMonitoring = bool
        filteringTags = [
          {
            action = "string"
            name = "string"
            value = "string"
          }
        ]
      }
      automuting = bool
      customMetrics = bool
      logRules = {
        filteringTags = [
          {
            action = "string"
            name = "string"
            value = "string"
          }
        ]
        sendAadLogs = bool
        sendResourceLogs = bool
        sendSubscriptionLogs = bool
      }
      metricRules = {
        filteringTags = [
          {
            action = "string"
            name = "string"
            value = "string"
          }
        ]
      }
    }
  }
}

Property Values

Microsoft.Datadog/monitors/tagRules

Name Description Value
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: monitors
properties Definition of the properties for a TagRules resource. MonitoringTagRulesProperties
type The resource type "Microsoft.Datadog/monitors/tagRules@2025-11-03-preview"

AgentRules

Name Description Value
enableAgentMonitoring Flag specifying if agent monitoring should be enabled for the Monitor resource. bool
filteringTags List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags. FilteringTag[]

FilteringTag

Name Description Value
action Valid actions for a filtering tag. Exclusion takes priority over inclusion. 'Exclude'
'Include'
name The name (also known as the key) of the tag. string
value The value of the tag. string

LogRules

Name Description Value
filteringTags List of filtering tags to be used for capturing logs. This only takes effect if SendResourceLogs flag is enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags. FilteringTag[]
sendAadLogs Flag specifying if AAD logs should be sent for the Monitor resource. bool
sendResourceLogs Flag specifying if Azure resource logs should be sent for the Monitor resource. bool
sendSubscriptionLogs Flag specifying if Azure subscription logs should be sent for the Monitor resource. bool

MetricRules

Name Description Value
filteringTags List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags. FilteringTag[]

MonitoringTagRulesProperties

Name Description Value
agentRules Set of rules for managing agents for the Monitor resource. AgentRules
automuting Configuration to enable/disable auto-muting flag bool
customMetrics Configuration to enable/disable custom metrics. If enabled, custom metrics from app insights will be sent. bool
logRules Set of rules for sending logs for the Monitor resource. LogRules
metricRules Set of rules for sending metrics for the Monitor resource. MetricRules