1. Packages
  2. Azure Classic
  3. API Docs
  4. datadog
  5. MonitorTagRule

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.datadog.MonitorTagRule

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Manages TagRules on the datadog Monitor.

    Example Usage

    Adding TagRules on monitor

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-datadog",
        location: "West US 2",
    });
    const exampleMonitor = new azure.datadog.Monitor("example", {
        name: "example-monitor",
        resourceGroupName: example.name,
        location: example.location,
        datadogOrganization: {
            apiKey: "XXXX",
            applicationKey: "XXXX",
        },
        user: {
            name: "Example",
            email: "abc@xyz.com",
        },
        skuName: "Linked",
        identity: {
            type: "SystemAssigned",
        },
    });
    const exampleMonitorTagRule = new azure.datadog.MonitorTagRule("example", {
        datadogMonitorId: exampleMonitor.id,
        logs: [{
            subscriptionLogEnabled: true,
        }],
        metrics: [{
            filters: [{
                name: "Test",
                value: "Logs",
                action: "Include",
            }],
        }],
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-datadog",
        location="West US 2")
    example_monitor = azure.datadog.Monitor("example",
        name="example-monitor",
        resource_group_name=example.name,
        location=example.location,
        datadog_organization={
            "api_key": "XXXX",
            "application_key": "XXXX",
        },
        user={
            "name": "Example",
            "email": "abc@xyz.com",
        },
        sku_name="Linked",
        identity={
            "type": "SystemAssigned",
        })
    example_monitor_tag_rule = azure.datadog.MonitorTagRule("example",
        datadog_monitor_id=example_monitor.id,
        logs=[{
            "subscription_log_enabled": True,
        }],
        metrics=[{
            "filters": [{
                "name": "Test",
                "value": "Logs",
                "action": "Include",
            }],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/datadog"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-datadog"),
    			Location: pulumi.String("West US 2"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleMonitor, err := datadog.NewMonitor(ctx, "example", &datadog.MonitorArgs{
    			Name:              pulumi.String("example-monitor"),
    			ResourceGroupName: example.Name,
    			Location:          example.Location,
    			DatadogOrganization: &datadog.MonitorDatadogOrganizationArgs{
    				ApiKey:         pulumi.String("XXXX"),
    				ApplicationKey: pulumi.String("XXXX"),
    			},
    			User: &datadog.MonitorUserArgs{
    				Name:  pulumi.String("Example"),
    				Email: pulumi.String("abc@xyz.com"),
    			},
    			SkuName: pulumi.String("Linked"),
    			Identity: &datadog.MonitorIdentityArgs{
    				Type: pulumi.String("SystemAssigned"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = datadog.NewMonitorTagRule(ctx, "example", &datadog.MonitorTagRuleArgs{
    			DatadogMonitorId: exampleMonitor.ID(),
    			Logs: datadog.MonitorTagRuleLogArray{
    				&datadog.MonitorTagRuleLogArgs{
    					SubscriptionLogEnabled: pulumi.Bool(true),
    				},
    			},
    			Metrics: datadog.MonitorTagRuleMetricArray{
    				&datadog.MonitorTagRuleMetricArgs{
    					Filters: datadog.MonitorTagRuleMetricFilterArray{
    						&datadog.MonitorTagRuleMetricFilterArgs{
    							Name:   pulumi.String("Test"),
    							Value:  pulumi.String("Logs"),
    							Action: pulumi.String("Include"),
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-datadog",
            Location = "West US 2",
        });
    
        var exampleMonitor = new Azure.Datadog.Monitor("example", new()
        {
            Name = "example-monitor",
            ResourceGroupName = example.Name,
            Location = example.Location,
            DatadogOrganization = new Azure.Datadog.Inputs.MonitorDatadogOrganizationArgs
            {
                ApiKey = "XXXX",
                ApplicationKey = "XXXX",
            },
            User = new Azure.Datadog.Inputs.MonitorUserArgs
            {
                Name = "Example",
                Email = "abc@xyz.com",
            },
            SkuName = "Linked",
            Identity = new Azure.Datadog.Inputs.MonitorIdentityArgs
            {
                Type = "SystemAssigned",
            },
        });
    
        var exampleMonitorTagRule = new Azure.Datadog.MonitorTagRule("example", new()
        {
            DatadogMonitorId = exampleMonitor.Id,
            Logs = new[]
            {
                new Azure.Datadog.Inputs.MonitorTagRuleLogArgs
                {
                    SubscriptionLogEnabled = true,
                },
            },
            Metrics = new[]
            {
                new Azure.Datadog.Inputs.MonitorTagRuleMetricArgs
                {
                    Filters = new[]
                    {
                        new Azure.Datadog.Inputs.MonitorTagRuleMetricFilterArgs
                        {
                            Name = "Test",
                            Value = "Logs",
                            Action = "Include",
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.datadog.Monitor;
    import com.pulumi.azure.datadog.MonitorArgs;
    import com.pulumi.azure.datadog.inputs.MonitorDatadogOrganizationArgs;
    import com.pulumi.azure.datadog.inputs.MonitorUserArgs;
    import com.pulumi.azure.datadog.inputs.MonitorIdentityArgs;
    import com.pulumi.azure.datadog.MonitorTagRule;
    import com.pulumi.azure.datadog.MonitorTagRuleArgs;
    import com.pulumi.azure.datadog.inputs.MonitorTagRuleLogArgs;
    import com.pulumi.azure.datadog.inputs.MonitorTagRuleMetricArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-datadog")
                .location("West US 2")
                .build());
    
            var exampleMonitor = new Monitor("exampleMonitor", MonitorArgs.builder()
                .name("example-monitor")
                .resourceGroupName(example.name())
                .location(example.location())
                .datadogOrganization(MonitorDatadogOrganizationArgs.builder()
                    .apiKey("XXXX")
                    .applicationKey("XXXX")
                    .build())
                .user(MonitorUserArgs.builder()
                    .name("Example")
                    .email("abc@xyz.com")
                    .build())
                .skuName("Linked")
                .identity(MonitorIdentityArgs.builder()
                    .type("SystemAssigned")
                    .build())
                .build());
    
            var exampleMonitorTagRule = new MonitorTagRule("exampleMonitorTagRule", MonitorTagRuleArgs.builder()
                .datadogMonitorId(exampleMonitor.id())
                .logs(MonitorTagRuleLogArgs.builder()
                    .subscriptionLogEnabled(true)
                    .build())
                .metrics(MonitorTagRuleMetricArgs.builder()
                    .filters(MonitorTagRuleMetricFilterArgs.builder()
                        .name("Test")
                        .value("Logs")
                        .action("Include")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-datadog
          location: West US 2
      exampleMonitor:
        type: azure:datadog:Monitor
        name: example
        properties:
          name: example-monitor
          resourceGroupName: ${example.name}
          location: ${example.location}
          datadogOrganization:
            apiKey: XXXX
            applicationKey: XXXX
          user:
            name: Example
            email: abc@xyz.com
          skuName: Linked
          identity:
            type: SystemAssigned
      exampleMonitorTagRule:
        type: azure:datadog:MonitorTagRule
        name: example
        properties:
          datadogMonitorId: ${exampleMonitor.id}
          logs:
            - subscriptionLogEnabled: true
          metrics:
            - filters:
                - name: Test
                  value: Logs
                  action: Include
    

    Create MonitorTagRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new MonitorTagRule(name: string, args: MonitorTagRuleArgs, opts?: CustomResourceOptions);
    @overload
    def MonitorTagRule(resource_name: str,
                       args: MonitorTagRuleArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def MonitorTagRule(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       datadog_monitor_id: Optional[str] = None,
                       logs: Optional[Sequence[MonitorTagRuleLogArgs]] = None,
                       metrics: Optional[Sequence[MonitorTagRuleMetricArgs]] = None,
                       name: Optional[str] = None)
    func NewMonitorTagRule(ctx *Context, name string, args MonitorTagRuleArgs, opts ...ResourceOption) (*MonitorTagRule, error)
    public MonitorTagRule(string name, MonitorTagRuleArgs args, CustomResourceOptions? opts = null)
    public MonitorTagRule(String name, MonitorTagRuleArgs args)
    public MonitorTagRule(String name, MonitorTagRuleArgs args, CustomResourceOptions options)
    
    type: azure:datadog:MonitorTagRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args MonitorTagRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args MonitorTagRuleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args MonitorTagRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MonitorTagRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MonitorTagRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var monitorTagRuleResource = new Azure.Datadog.MonitorTagRule("monitorTagRuleResource", new()
    {
        DatadogMonitorId = "string",
        Logs = new[]
        {
            new Azure.Datadog.Inputs.MonitorTagRuleLogArgs
            {
                AadLogEnabled = false,
                Filters = new[]
                {
                    new Azure.Datadog.Inputs.MonitorTagRuleLogFilterArgs
                    {
                        Action = "string",
                        Name = "string",
                        Value = "string",
                    },
                },
                ResourceLogEnabled = false,
                SubscriptionLogEnabled = false,
            },
        },
        Metrics = new[]
        {
            new Azure.Datadog.Inputs.MonitorTagRuleMetricArgs
            {
                Filters = new[]
                {
                    new Azure.Datadog.Inputs.MonitorTagRuleMetricFilterArgs
                    {
                        Action = "string",
                        Name = "string",
                        Value = "string",
                    },
                },
            },
        },
        Name = "string",
    });
    
    example, err := datadog.NewMonitorTagRule(ctx, "monitorTagRuleResource", &datadog.MonitorTagRuleArgs{
    	DatadogMonitorId: pulumi.String("string"),
    	Logs: datadog.MonitorTagRuleLogArray{
    		&datadog.MonitorTagRuleLogArgs{
    			AadLogEnabled: pulumi.Bool(false),
    			Filters: datadog.MonitorTagRuleLogFilterArray{
    				&datadog.MonitorTagRuleLogFilterArgs{
    					Action: pulumi.String("string"),
    					Name:   pulumi.String("string"),
    					Value:  pulumi.String("string"),
    				},
    			},
    			ResourceLogEnabled:     pulumi.Bool(false),
    			SubscriptionLogEnabled: pulumi.Bool(false),
    		},
    	},
    	Metrics: datadog.MonitorTagRuleMetricArray{
    		&datadog.MonitorTagRuleMetricArgs{
    			Filters: datadog.MonitorTagRuleMetricFilterArray{
    				&datadog.MonitorTagRuleMetricFilterArgs{
    					Action: pulumi.String("string"),
    					Name:   pulumi.String("string"),
    					Value:  pulumi.String("string"),
    				},
    			},
    		},
    	},
    	Name: pulumi.String("string"),
    })
    
    var monitorTagRuleResource = new MonitorTagRule("monitorTagRuleResource", MonitorTagRuleArgs.builder()
        .datadogMonitorId("string")
        .logs(MonitorTagRuleLogArgs.builder()
            .aadLogEnabled(false)
            .filters(MonitorTagRuleLogFilterArgs.builder()
                .action("string")
                .name("string")
                .value("string")
                .build())
            .resourceLogEnabled(false)
            .subscriptionLogEnabled(false)
            .build())
        .metrics(MonitorTagRuleMetricArgs.builder()
            .filters(MonitorTagRuleMetricFilterArgs.builder()
                .action("string")
                .name("string")
                .value("string")
                .build())
            .build())
        .name("string")
        .build());
    
    monitor_tag_rule_resource = azure.datadog.MonitorTagRule("monitorTagRuleResource",
        datadog_monitor_id="string",
        logs=[{
            "aad_log_enabled": False,
            "filters": [{
                "action": "string",
                "name": "string",
                "value": "string",
            }],
            "resource_log_enabled": False,
            "subscription_log_enabled": False,
        }],
        metrics=[{
            "filters": [{
                "action": "string",
                "name": "string",
                "value": "string",
            }],
        }],
        name="string")
    
    const monitorTagRuleResource = new azure.datadog.MonitorTagRule("monitorTagRuleResource", {
        datadogMonitorId: "string",
        logs: [{
            aadLogEnabled: false,
            filters: [{
                action: "string",
                name: "string",
                value: "string",
            }],
            resourceLogEnabled: false,
            subscriptionLogEnabled: false,
        }],
        metrics: [{
            filters: [{
                action: "string",
                name: "string",
                value: "string",
            }],
        }],
        name: "string",
    });
    
    type: azure:datadog:MonitorTagRule
    properties:
        datadogMonitorId: string
        logs:
            - aadLogEnabled: false
              filters:
                - action: string
                  name: string
                  value: string
              resourceLogEnabled: false
              subscriptionLogEnabled: false
        metrics:
            - filters:
                - action: string
                  name: string
                  value: string
        name: string
    

    MonitorTagRule Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The MonitorTagRule resource accepts the following input properties:

    DatadogMonitorId string
    The Datadog Monitor Id which should be used for this Datadog Monitor Tag Rule. Changing this forces a new Datadog Monitor Tag Rule to be created.
    Logs List<MonitorTagRuleLog>
    A log block as defined below.
    Metrics List<MonitorTagRuleMetric>
    A metric block as defined below.
    Name string
    The name of the Tag Rules configuration. The allowed value is default. Defaults to default.
    DatadogMonitorId string
    The Datadog Monitor Id which should be used for this Datadog Monitor Tag Rule. Changing this forces a new Datadog Monitor Tag Rule to be created.
    Logs []MonitorTagRuleLogArgs
    A log block as defined below.
    Metrics []MonitorTagRuleMetricArgs
    A metric block as defined below.
    Name string
    The name of the Tag Rules configuration. The allowed value is default. Defaults to default.
    datadogMonitorId String
    The Datadog Monitor Id which should be used for this Datadog Monitor Tag Rule. Changing this forces a new Datadog Monitor Tag Rule to be created.
    logs List<MonitorTagRuleLog>
    A log block as defined below.
    metrics List<MonitorTagRuleMetric>
    A metric block as defined below.
    name String
    The name of the Tag Rules configuration. The allowed value is default. Defaults to default.
    datadogMonitorId string
    The Datadog Monitor Id which should be used for this Datadog Monitor Tag Rule. Changing this forces a new Datadog Monitor Tag Rule to be created.
    logs MonitorTagRuleLog[]
    A log block as defined below.
    metrics MonitorTagRuleMetric[]
    A metric block as defined below.
    name string
    The name of the Tag Rules configuration. The allowed value is default. Defaults to default.
    datadog_monitor_id str
    The Datadog Monitor Id which should be used for this Datadog Monitor Tag Rule. Changing this forces a new Datadog Monitor Tag Rule to be created.
    logs Sequence[MonitorTagRuleLogArgs]
    A log block as defined below.
    metrics Sequence[MonitorTagRuleMetricArgs]
    A metric block as defined below.
    name str
    The name of the Tag Rules configuration. The allowed value is default. Defaults to default.
    datadogMonitorId String
    The Datadog Monitor Id which should be used for this Datadog Monitor Tag Rule. Changing this forces a new Datadog Monitor Tag Rule to be created.
    logs List<Property Map>
    A log block as defined below.
    metrics List<Property Map>
    A metric block as defined below.
    name String
    The name of the Tag Rules configuration. The allowed value is default. Defaults to default.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MonitorTagRule resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing MonitorTagRule Resource

    Get an existing MonitorTagRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: MonitorTagRuleState, opts?: CustomResourceOptions): MonitorTagRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            datadog_monitor_id: Optional[str] = None,
            logs: Optional[Sequence[MonitorTagRuleLogArgs]] = None,
            metrics: Optional[Sequence[MonitorTagRuleMetricArgs]] = None,
            name: Optional[str] = None) -> MonitorTagRule
    func GetMonitorTagRule(ctx *Context, name string, id IDInput, state *MonitorTagRuleState, opts ...ResourceOption) (*MonitorTagRule, error)
    public static MonitorTagRule Get(string name, Input<string> id, MonitorTagRuleState? state, CustomResourceOptions? opts = null)
    public static MonitorTagRule get(String name, Output<String> id, MonitorTagRuleState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DatadogMonitorId string
    The Datadog Monitor Id which should be used for this Datadog Monitor Tag Rule. Changing this forces a new Datadog Monitor Tag Rule to be created.
    Logs List<MonitorTagRuleLog>
    A log block as defined below.
    Metrics List<MonitorTagRuleMetric>
    A metric block as defined below.
    Name string
    The name of the Tag Rules configuration. The allowed value is default. Defaults to default.
    DatadogMonitorId string
    The Datadog Monitor Id which should be used for this Datadog Monitor Tag Rule. Changing this forces a new Datadog Monitor Tag Rule to be created.
    Logs []MonitorTagRuleLogArgs
    A log block as defined below.
    Metrics []MonitorTagRuleMetricArgs
    A metric block as defined below.
    Name string
    The name of the Tag Rules configuration. The allowed value is default. Defaults to default.
    datadogMonitorId String
    The Datadog Monitor Id which should be used for this Datadog Monitor Tag Rule. Changing this forces a new Datadog Monitor Tag Rule to be created.
    logs List<MonitorTagRuleLog>
    A log block as defined below.
    metrics List<MonitorTagRuleMetric>
    A metric block as defined below.
    name String
    The name of the Tag Rules configuration. The allowed value is default. Defaults to default.
    datadogMonitorId string
    The Datadog Monitor Id which should be used for this Datadog Monitor Tag Rule. Changing this forces a new Datadog Monitor Tag Rule to be created.
    logs MonitorTagRuleLog[]
    A log block as defined below.
    metrics MonitorTagRuleMetric[]
    A metric block as defined below.
    name string
    The name of the Tag Rules configuration. The allowed value is default. Defaults to default.
    datadog_monitor_id str
    The Datadog Monitor Id which should be used for this Datadog Monitor Tag Rule. Changing this forces a new Datadog Monitor Tag Rule to be created.
    logs Sequence[MonitorTagRuleLogArgs]
    A log block as defined below.
    metrics Sequence[MonitorTagRuleMetricArgs]
    A metric block as defined below.
    name str
    The name of the Tag Rules configuration. The allowed value is default. Defaults to default.
    datadogMonitorId String
    The Datadog Monitor Id which should be used for this Datadog Monitor Tag Rule. Changing this forces a new Datadog Monitor Tag Rule to be created.
    logs List<Property Map>
    A log block as defined below.
    metrics List<Property Map>
    A metric block as defined below.
    name String
    The name of the Tag Rules configuration. The allowed value is default. Defaults to default.

    Supporting Types

    MonitorTagRuleLog, MonitorTagRuleLogArgs

    AadLogEnabled bool
    Whether AAD logs should be sent for the Monitor resource?
    Filters List<MonitorTagRuleLogFilter>

    A filter block as defined below.

    NOTE: List of filtering tags to be used for capturing logs. This only takes effect if resource_log_enabled 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.

    ResourceLogEnabled bool
    Whether Azure resource logs should be sent for the Monitor resource?
    SubscriptionLogEnabled bool
    Whether Azure subscription logs should be sent for the Monitor resource?
    AadLogEnabled bool
    Whether AAD logs should be sent for the Monitor resource?
    Filters []MonitorTagRuleLogFilter

    A filter block as defined below.

    NOTE: List of filtering tags to be used for capturing logs. This only takes effect if resource_log_enabled 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.

    ResourceLogEnabled bool
    Whether Azure resource logs should be sent for the Monitor resource?
    SubscriptionLogEnabled bool
    Whether Azure subscription logs should be sent for the Monitor resource?
    aadLogEnabled Boolean
    Whether AAD logs should be sent for the Monitor resource?
    filters List<MonitorTagRuleLogFilter>

    A filter block as defined below.

    NOTE: List of filtering tags to be used for capturing logs. This only takes effect if resource_log_enabled 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.

    resourceLogEnabled Boolean
    Whether Azure resource logs should be sent for the Monitor resource?
    subscriptionLogEnabled Boolean
    Whether Azure subscription logs should be sent for the Monitor resource?
    aadLogEnabled boolean
    Whether AAD logs should be sent for the Monitor resource?
    filters MonitorTagRuleLogFilter[]

    A filter block as defined below.

    NOTE: List of filtering tags to be used for capturing logs. This only takes effect if resource_log_enabled 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.

    resourceLogEnabled boolean
    Whether Azure resource logs should be sent for the Monitor resource?
    subscriptionLogEnabled boolean
    Whether Azure subscription logs should be sent for the Monitor resource?
    aad_log_enabled bool
    Whether AAD logs should be sent for the Monitor resource?
    filters Sequence[MonitorTagRuleLogFilter]

    A filter block as defined below.

    NOTE: List of filtering tags to be used for capturing logs. This only takes effect if resource_log_enabled 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.

    resource_log_enabled bool
    Whether Azure resource logs should be sent for the Monitor resource?
    subscription_log_enabled bool
    Whether Azure subscription logs should be sent for the Monitor resource?
    aadLogEnabled Boolean
    Whether AAD logs should be sent for the Monitor resource?
    filters List<Property Map>

    A filter block as defined below.

    NOTE: List of filtering tags to be used for capturing logs. This only takes effect if resource_log_enabled 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.

    resourceLogEnabled Boolean
    Whether Azure resource logs should be sent for the Monitor resource?
    subscriptionLogEnabled Boolean
    Whether Azure subscription logs should be sent for the Monitor resource?

    MonitorTagRuleLogFilter, MonitorTagRuleLogFilterArgs

    Action string
    Allowed values Include or Exclude.
    Name string
    Name of the Tag.
    Value string
    Value of the Tag.
    Action string
    Allowed values Include or Exclude.
    Name string
    Name of the Tag.
    Value string
    Value of the Tag.
    action String
    Allowed values Include or Exclude.
    name String
    Name of the Tag.
    value String
    Value of the Tag.
    action string
    Allowed values Include or Exclude.
    name string
    Name of the Tag.
    value string
    Value of the Tag.
    action str
    Allowed values Include or Exclude.
    name str
    Name of the Tag.
    value str
    Value of the Tag.
    action String
    Allowed values Include or Exclude.
    name String
    Name of the Tag.
    value String
    Value of the Tag.

    MonitorTagRuleMetric, MonitorTagRuleMetricArgs

    Filters List<MonitorTagRuleMetricFilter>

    A filter block as defined below.

    NOTE: 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.

    Filters []MonitorTagRuleMetricFilter

    A filter block as defined below.

    NOTE: 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.

    filters List<MonitorTagRuleMetricFilter>

    A filter block as defined below.

    NOTE: 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.

    filters MonitorTagRuleMetricFilter[]

    A filter block as defined below.

    NOTE: 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.

    filters Sequence[MonitorTagRuleMetricFilter]

    A filter block as defined below.

    NOTE: 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.

    filters List<Property Map>

    A filter block as defined below.

    NOTE: 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.

    MonitorTagRuleMetricFilter, MonitorTagRuleMetricFilterArgs

    Action string
    Allowed values Include or Exclude.
    Name string
    Name of the Tag.
    Value string
    Value of the Tag.
    Action string
    Allowed values Include or Exclude.
    Name string
    Name of the Tag.
    Value string
    Value of the Tag.
    action String
    Allowed values Include or Exclude.
    name String
    Name of the Tag.
    value String
    Value of the Tag.
    action string
    Allowed values Include or Exclude.
    name string
    Name of the Tag.
    value string
    Value of the Tag.
    action str
    Allowed values Include or Exclude.
    name str
    Name of the Tag.
    value str
    Value of the Tag.
    action String
    Allowed values Include or Exclude.
    name String
    Name of the Tag.
    value String
    Value of the Tag.

    Import

    Tag Rules on the Datadog Monitor can be imported using the tag rule resource id, e.g.

    $ pulumi import azure:datadog/monitorTagRule:MonitorTagRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Datadog/monitors/monitor1/tagRules/default
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi