1. Packages
  2. Azure Classic
  3. API Docs
  4. monitoring
  5. LogzTagRule

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages a logz Tag Rule.

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
            {
                Location = "West Europe",
            });
            var exampleLogzMonitor = new Azure.Monitoring.LogzMonitor("exampleLogzMonitor", new Azure.Monitoring.LogzMonitorArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                Location = exampleResourceGroup.Location,
                Plan = new Azure.Monitoring.Inputs.LogzMonitorPlanArgs
                {
                    BillingCycle = "Monthly",
                    EffectiveDate = "2022-06-06T00:00:00Z",
                    PlanId = "100gb14days",
                    UsageType = "Committed",
                },
                User = new Azure.Monitoring.Inputs.LogzMonitorUserArgs
                {
                    Email = "user@example.com",
                    FirstName = "Example",
                    LastName = "User",
                    PhoneNumber = "+12313803556",
                },
            });
            var exampleLogzTagRule = new Azure.Monitoring.LogzTagRule("exampleLogzTagRule", new Azure.Monitoring.LogzTagRuleArgs
            {
                LogzMonitorId = exampleLogzMonitor.Id,
                TagFilters = 
                {
                    new Azure.Monitoring.Inputs.LogzTagRuleTagFilterArgs
                    {
                        Name = "name1",
                        Action = "Include",
                        Value = "value1",
                    },
                    new Azure.Monitoring.Inputs.LogzTagRuleTagFilterArgs
                    {
                        Name = "name2",
                        Action = "Exclude",
                        Value = "value2",
                    },
                },
                SendAadLogs = true,
                SendActivityLogs = true,
                SendSubscriptionLogs = true,
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/monitoring"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleLogzMonitor, err := monitoring.NewLogzMonitor(ctx, "exampleLogzMonitor", &monitoring.LogzMonitorArgs{
    			ResourceGroupName: exampleResourceGroup.Name,
    			Location:          exampleResourceGroup.Location,
    			Plan: &monitoring.LogzMonitorPlanArgs{
    				BillingCycle:  pulumi.String("Monthly"),
    				EffectiveDate: pulumi.String("2022-06-06T00:00:00Z"),
    				PlanId:        pulumi.String("100gb14days"),
    				UsageType:     pulumi.String("Committed"),
    			},
    			User: &monitoring.LogzMonitorUserArgs{
    				Email:       pulumi.String("user@example.com"),
    				FirstName:   pulumi.String("Example"),
    				LastName:    pulumi.String("User"),
    				PhoneNumber: pulumi.String("+12313803556"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = monitoring.NewLogzTagRule(ctx, "exampleLogzTagRule", &monitoring.LogzTagRuleArgs{
    			LogzMonitorId: exampleLogzMonitor.ID(),
    			TagFilters: monitoring.LogzTagRuleTagFilterArray{
    				&monitoring.LogzTagRuleTagFilterArgs{
    					Name:   pulumi.String("name1"),
    					Action: pulumi.String("Include"),
    					Value:  pulumi.String("value1"),
    				},
    				&monitoring.LogzTagRuleTagFilterArgs{
    					Name:   pulumi.String("name2"),
    					Action: pulumi.String("Exclude"),
    					Value:  pulumi.String("value2"),
    				},
    			},
    			SendAadLogs:          pulumi.Bool(true),
    			SendActivityLogs:     pulumi.Bool(true),
    			SendSubscriptionLogs: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleLogzMonitor = new azure.monitoring.LogzMonitor("exampleLogzMonitor", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        plan: {
            billingCycle: "Monthly",
            effectiveDate: "2022-06-06T00:00:00Z",
            planId: "100gb14days",
            usageType: "Committed",
        },
        user: {
            email: "user@example.com",
            firstName: "Example",
            lastName: "User",
            phoneNumber: "+12313803556",
        },
    });
    const exampleLogzTagRule = new azure.monitoring.LogzTagRule("exampleLogzTagRule", {
        logzMonitorId: exampleLogzMonitor.id,
        tagFilters: [
            {
                name: "name1",
                action: "Include",
                value: "value1",
            },
            {
                name: "name2",
                action: "Exclude",
                value: "value2",
            },
        ],
        sendAadLogs: true,
        sendActivityLogs: true,
        sendSubscriptionLogs: true,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_logz_monitor = azure.monitoring.LogzMonitor("exampleLogzMonitor",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        plan=azure.monitoring.LogzMonitorPlanArgs(
            billing_cycle="Monthly",
            effective_date="2022-06-06T00:00:00Z",
            plan_id="100gb14days",
            usage_type="Committed",
        ),
        user=azure.monitoring.LogzMonitorUserArgs(
            email="user@example.com",
            first_name="Example",
            last_name="User",
            phone_number="+12313803556",
        ))
    example_logz_tag_rule = azure.monitoring.LogzTagRule("exampleLogzTagRule",
        logz_monitor_id=example_logz_monitor.id,
        tag_filters=[
            azure.monitoring.LogzTagRuleTagFilterArgs(
                name="name1",
                action="Include",
                value="value1",
            ),
            azure.monitoring.LogzTagRuleTagFilterArgs(
                name="name2",
                action="Exclude",
                value="value2",
            ),
        ],
        send_aad_logs=True,
        send_activity_logs=True,
        send_subscription_logs=True)
    

    Example coming soon!

    Create LogzTagRule Resource

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

    Constructor syntax

    new LogzTagRule(name: string, args: LogzTagRuleArgs, opts?: CustomResourceOptions);
    @overload
    def LogzTagRule(resource_name: str,
                    args: LogzTagRuleArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def LogzTagRule(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    logz_monitor_id: Optional[str] = None,
                    send_aad_logs: Optional[bool] = None,
                    send_activity_logs: Optional[bool] = None,
                    send_subscription_logs: Optional[bool] = None,
                    tag_filters: Optional[Sequence[LogzTagRuleTagFilterArgs]] = None)
    func NewLogzTagRule(ctx *Context, name string, args LogzTagRuleArgs, opts ...ResourceOption) (*LogzTagRule, error)
    public LogzTagRule(string name, LogzTagRuleArgs args, CustomResourceOptions? opts = null)
    public LogzTagRule(String name, LogzTagRuleArgs args)
    public LogzTagRule(String name, LogzTagRuleArgs args, CustomResourceOptions options)
    
    type: azure:monitoring:LogzTagRule
    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 LogzTagRuleArgs
    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 LogzTagRuleArgs
    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 LogzTagRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LogzTagRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LogzTagRuleArgs
    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 logzTagRuleResource = new Azure.Monitoring.LogzTagRule("logzTagRuleResource", new()
    {
        LogzMonitorId = "string",
        SendAadLogs = false,
        SendActivityLogs = false,
        SendSubscriptionLogs = false,
        TagFilters = new[]
        {
            new Azure.Monitoring.Inputs.LogzTagRuleTagFilterArgs
            {
                Action = "string",
                Name = "string",
                Value = "string",
            },
        },
    });
    
    example, err := monitoring.NewLogzTagRule(ctx, "logzTagRuleResource", &monitoring.LogzTagRuleArgs{
    	LogzMonitorId:        pulumi.String("string"),
    	SendAadLogs:          pulumi.Bool(false),
    	SendActivityLogs:     pulumi.Bool(false),
    	SendSubscriptionLogs: pulumi.Bool(false),
    	TagFilters: monitoring.LogzTagRuleTagFilterArray{
    		&monitoring.LogzTagRuleTagFilterArgs{
    			Action: pulumi.String("string"),
    			Name:   pulumi.String("string"),
    			Value:  pulumi.String("string"),
    		},
    	},
    })
    
    var logzTagRuleResource = new LogzTagRule("logzTagRuleResource", LogzTagRuleArgs.builder()
        .logzMonitorId("string")
        .sendAadLogs(false)
        .sendActivityLogs(false)
        .sendSubscriptionLogs(false)
        .tagFilters(LogzTagRuleTagFilterArgs.builder()
            .action("string")
            .name("string")
            .value("string")
            .build())
        .build());
    
    logz_tag_rule_resource = azure.monitoring.LogzTagRule("logzTagRuleResource",
        logz_monitor_id="string",
        send_aad_logs=False,
        send_activity_logs=False,
        send_subscription_logs=False,
        tag_filters=[{
            "action": "string",
            "name": "string",
            "value": "string",
        }])
    
    const logzTagRuleResource = new azure.monitoring.LogzTagRule("logzTagRuleResource", {
        logzMonitorId: "string",
        sendAadLogs: false,
        sendActivityLogs: false,
        sendSubscriptionLogs: false,
        tagFilters: [{
            action: "string",
            name: "string",
            value: "string",
        }],
    });
    
    type: azure:monitoring:LogzTagRule
    properties:
        logzMonitorId: string
        sendAadLogs: false
        sendActivityLogs: false
        sendSubscriptionLogs: false
        tagFilters:
            - action: string
              name: string
              value: string
    

    LogzTagRule 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 LogzTagRule resource accepts the following input properties:

    LogzMonitorId string
    The ID of the Logz Monitor. Changing this forces a new logz Tag Rule to be created.
    SendAadLogs bool
    Whether AAD logs should be sent to the Monitor resource?
    SendActivityLogs bool
    Whether activity logs from Azure resources should be sent to the Monitor resource?
    SendSubscriptionLogs bool
    Whether subscription logs should be sent to the Monitor resource?
    TagFilters List<LogzTagRuleTagFilter>
    One or more (up to 10) tag_filter blocks as defined below.
    LogzMonitorId string
    The ID of the Logz Monitor. Changing this forces a new logz Tag Rule to be created.
    SendAadLogs bool
    Whether AAD logs should be sent to the Monitor resource?
    SendActivityLogs bool
    Whether activity logs from Azure resources should be sent to the Monitor resource?
    SendSubscriptionLogs bool
    Whether subscription logs should be sent to the Monitor resource?
    TagFilters []LogzTagRuleTagFilterArgs
    One or more (up to 10) tag_filter blocks as defined below.
    logzMonitorId String
    The ID of the Logz Monitor. Changing this forces a new logz Tag Rule to be created.
    sendAadLogs Boolean
    Whether AAD logs should be sent to the Monitor resource?
    sendActivityLogs Boolean
    Whether activity logs from Azure resources should be sent to the Monitor resource?
    sendSubscriptionLogs Boolean
    Whether subscription logs should be sent to the Monitor resource?
    tagFilters List<LogzTagRuleTagFilter>
    One or more (up to 10) tag_filter blocks as defined below.
    logzMonitorId string
    The ID of the Logz Monitor. Changing this forces a new logz Tag Rule to be created.
    sendAadLogs boolean
    Whether AAD logs should be sent to the Monitor resource?
    sendActivityLogs boolean
    Whether activity logs from Azure resources should be sent to the Monitor resource?
    sendSubscriptionLogs boolean
    Whether subscription logs should be sent to the Monitor resource?
    tagFilters LogzTagRuleTagFilter[]
    One or more (up to 10) tag_filter blocks as defined below.
    logz_monitor_id str
    The ID of the Logz Monitor. Changing this forces a new logz Tag Rule to be created.
    send_aad_logs bool
    Whether AAD logs should be sent to the Monitor resource?
    send_activity_logs bool
    Whether activity logs from Azure resources should be sent to the Monitor resource?
    send_subscription_logs bool
    Whether subscription logs should be sent to the Monitor resource?
    tag_filters Sequence[LogzTagRuleTagFilterArgs]
    One or more (up to 10) tag_filter blocks as defined below.
    logzMonitorId String
    The ID of the Logz Monitor. Changing this forces a new logz Tag Rule to be created.
    sendAadLogs Boolean
    Whether AAD logs should be sent to the Monitor resource?
    sendActivityLogs Boolean
    Whether activity logs from Azure resources should be sent to the Monitor resource?
    sendSubscriptionLogs Boolean
    Whether subscription logs should be sent to the Monitor resource?
    tagFilters List<Property Map>
    One or more (up to 10) tag_filter blocks as defined below.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the LogzTagRule 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 LogzTagRule Resource

    Get an existing LogzTagRule 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?: LogzTagRuleState, opts?: CustomResourceOptions): LogzTagRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            logz_monitor_id: Optional[str] = None,
            send_aad_logs: Optional[bool] = None,
            send_activity_logs: Optional[bool] = None,
            send_subscription_logs: Optional[bool] = None,
            tag_filters: Optional[Sequence[LogzTagRuleTagFilterArgs]] = None) -> LogzTagRule
    func GetLogzTagRule(ctx *Context, name string, id IDInput, state *LogzTagRuleState, opts ...ResourceOption) (*LogzTagRule, error)
    public static LogzTagRule Get(string name, Input<string> id, LogzTagRuleState? state, CustomResourceOptions? opts = null)
    public static LogzTagRule get(String name, Output<String> id, LogzTagRuleState state, CustomResourceOptions options)
    resources:  _:    type: azure:monitoring:LogzTagRule    get:      id: ${id}
    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:
    LogzMonitorId string
    The ID of the Logz Monitor. Changing this forces a new logz Tag Rule to be created.
    SendAadLogs bool
    Whether AAD logs should be sent to the Monitor resource?
    SendActivityLogs bool
    Whether activity logs from Azure resources should be sent to the Monitor resource?
    SendSubscriptionLogs bool
    Whether subscription logs should be sent to the Monitor resource?
    TagFilters List<LogzTagRuleTagFilter>
    One or more (up to 10) tag_filter blocks as defined below.
    LogzMonitorId string
    The ID of the Logz Monitor. Changing this forces a new logz Tag Rule to be created.
    SendAadLogs bool
    Whether AAD logs should be sent to the Monitor resource?
    SendActivityLogs bool
    Whether activity logs from Azure resources should be sent to the Monitor resource?
    SendSubscriptionLogs bool
    Whether subscription logs should be sent to the Monitor resource?
    TagFilters []LogzTagRuleTagFilterArgs
    One or more (up to 10) tag_filter blocks as defined below.
    logzMonitorId String
    The ID of the Logz Monitor. Changing this forces a new logz Tag Rule to be created.
    sendAadLogs Boolean
    Whether AAD logs should be sent to the Monitor resource?
    sendActivityLogs Boolean
    Whether activity logs from Azure resources should be sent to the Monitor resource?
    sendSubscriptionLogs Boolean
    Whether subscription logs should be sent to the Monitor resource?
    tagFilters List<LogzTagRuleTagFilter>
    One or more (up to 10) tag_filter blocks as defined below.
    logzMonitorId string
    The ID of the Logz Monitor. Changing this forces a new logz Tag Rule to be created.
    sendAadLogs boolean
    Whether AAD logs should be sent to the Monitor resource?
    sendActivityLogs boolean
    Whether activity logs from Azure resources should be sent to the Monitor resource?
    sendSubscriptionLogs boolean
    Whether subscription logs should be sent to the Monitor resource?
    tagFilters LogzTagRuleTagFilter[]
    One or more (up to 10) tag_filter blocks as defined below.
    logz_monitor_id str
    The ID of the Logz Monitor. Changing this forces a new logz Tag Rule to be created.
    send_aad_logs bool
    Whether AAD logs should be sent to the Monitor resource?
    send_activity_logs bool
    Whether activity logs from Azure resources should be sent to the Monitor resource?
    send_subscription_logs bool
    Whether subscription logs should be sent to the Monitor resource?
    tag_filters Sequence[LogzTagRuleTagFilterArgs]
    One or more (up to 10) tag_filter blocks as defined below.
    logzMonitorId String
    The ID of the Logz Monitor. Changing this forces a new logz Tag Rule to be created.
    sendAadLogs Boolean
    Whether AAD logs should be sent to the Monitor resource?
    sendActivityLogs Boolean
    Whether activity logs from Azure resources should be sent to the Monitor resource?
    sendSubscriptionLogs Boolean
    Whether subscription logs should be sent to the Monitor resource?
    tagFilters List<Property Map>
    One or more (up to 10) tag_filter blocks as defined below.

    Supporting Types

    LogzTagRuleTagFilter, LogzTagRuleTagFilterArgs

    Action string
    The action for a filtering tag. Possible values are "Include" and "Exclude" is allowed. Note that the Exclude takes priority over the Include.
    Name string
    The name of this tag_filter.
    Value string
    The value of this tag_filter.
    Action string
    The action for a filtering tag. Possible values are "Include" and "Exclude" is allowed. Note that the Exclude takes priority over the Include.
    Name string
    The name of this tag_filter.
    Value string
    The value of this tag_filter.
    action String
    The action for a filtering tag. Possible values are "Include" and "Exclude" is allowed. Note that the Exclude takes priority over the Include.
    name String
    The name of this tag_filter.
    value String
    The value of this tag_filter.
    action string
    The action for a filtering tag. Possible values are "Include" and "Exclude" is allowed. Note that the Exclude takes priority over the Include.
    name string
    The name of this tag_filter.
    value string
    The value of this tag_filter.
    action str
    The action for a filtering tag. Possible values are "Include" and "Exclude" is allowed. Note that the Exclude takes priority over the Include.
    name str
    The name of this tag_filter.
    value str
    The value of this tag_filter.
    action String
    The action for a filtering tag. Possible values are "Include" and "Exclude" is allowed. Note that the Exclude takes priority over the Include.
    name String
    The name of this tag_filter.
    value String
    The value of this tag_filter.

    Import

    logz Tag Rules can be imported using the resource id, e.g.

     $ pulumi import azure:monitoring/logzTagRule:LogzTagRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Logz/monitors/monitor1/tagRules/ruleSet1
    

    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.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.