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

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 LogToMetricAction Scheduled Query Rules resource within Azure Monitor.

    Create ScheduledQueryRulesLog Resource

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

    Constructor syntax

    new ScheduledQueryRulesLog(name: string, args: ScheduledQueryRulesLogArgs, opts?: CustomResourceOptions);
    @overload
    def ScheduledQueryRulesLog(resource_name: str,
                               args: ScheduledQueryRulesLogArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def ScheduledQueryRulesLog(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               criteria: Optional[ScheduledQueryRulesLogCriteriaArgs] = None,
                               data_source_id: Optional[str] = None,
                               resource_group_name: Optional[str] = None,
                               authorized_resource_ids: Optional[Sequence[str]] = None,
                               description: Optional[str] = None,
                               enabled: Optional[bool] = None,
                               location: Optional[str] = None,
                               name: Optional[str] = None,
                               tags: Optional[Mapping[str, str]] = None)
    func NewScheduledQueryRulesLog(ctx *Context, name string, args ScheduledQueryRulesLogArgs, opts ...ResourceOption) (*ScheduledQueryRulesLog, error)
    public ScheduledQueryRulesLog(string name, ScheduledQueryRulesLogArgs args, CustomResourceOptions? opts = null)
    public ScheduledQueryRulesLog(String name, ScheduledQueryRulesLogArgs args)
    public ScheduledQueryRulesLog(String name, ScheduledQueryRulesLogArgs args, CustomResourceOptions options)
    
    type: azure:monitoring:ScheduledQueryRulesLog
    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 ScheduledQueryRulesLogArgs
    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 ScheduledQueryRulesLogArgs
    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 ScheduledQueryRulesLogArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ScheduledQueryRulesLogArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ScheduledQueryRulesLogArgs
    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 scheduledQueryRulesLogResource = new Azure.Monitoring.ScheduledQueryRulesLog("scheduledQueryRulesLogResource", new()
    {
        Criteria = new Azure.Monitoring.Inputs.ScheduledQueryRulesLogCriteriaArgs
        {
            Dimensions = new[]
            {
                new Azure.Monitoring.Inputs.ScheduledQueryRulesLogCriteriaDimensionArgs
                {
                    Name = "string",
                    Values = new[]
                    {
                        "string",
                    },
                    Operator = "string",
                },
            },
            MetricName = "string",
        },
        DataSourceId = "string",
        ResourceGroupName = "string",
        AuthorizedResourceIds = new[]
        {
            "string",
        },
        Description = "string",
        Enabled = false,
        Location = "string",
        Name = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := monitoring.NewScheduledQueryRulesLog(ctx, "scheduledQueryRulesLogResource", &monitoring.ScheduledQueryRulesLogArgs{
    	Criteria: &monitoring.ScheduledQueryRulesLogCriteriaArgs{
    		Dimensions: monitoring.ScheduledQueryRulesLogCriteriaDimensionArray{
    			&monitoring.ScheduledQueryRulesLogCriteriaDimensionArgs{
    				Name: pulumi.String("string"),
    				Values: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    				Operator: pulumi.String("string"),
    			},
    		},
    		MetricName: pulumi.String("string"),
    	},
    	DataSourceId:      pulumi.String("string"),
    	ResourceGroupName: pulumi.String("string"),
    	AuthorizedResourceIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	Enabled:     pulumi.Bool(false),
    	Location:    pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var scheduledQueryRulesLogResource = new ScheduledQueryRulesLog("scheduledQueryRulesLogResource", ScheduledQueryRulesLogArgs.builder()
        .criteria(ScheduledQueryRulesLogCriteriaArgs.builder()
            .dimensions(ScheduledQueryRulesLogCriteriaDimensionArgs.builder()
                .name("string")
                .values("string")
                .operator("string")
                .build())
            .metricName("string")
            .build())
        .dataSourceId("string")
        .resourceGroupName("string")
        .authorizedResourceIds("string")
        .description("string")
        .enabled(false)
        .location("string")
        .name("string")
        .tags(Map.of("string", "string"))
        .build());
    
    scheduled_query_rules_log_resource = azure.monitoring.ScheduledQueryRulesLog("scheduledQueryRulesLogResource",
        criteria={
            "dimensions": [{
                "name": "string",
                "values": ["string"],
                "operator": "string",
            }],
            "metric_name": "string",
        },
        data_source_id="string",
        resource_group_name="string",
        authorized_resource_ids=["string"],
        description="string",
        enabled=False,
        location="string",
        name="string",
        tags={
            "string": "string",
        })
    
    const scheduledQueryRulesLogResource = new azure.monitoring.ScheduledQueryRulesLog("scheduledQueryRulesLogResource", {
        criteria: {
            dimensions: [{
                name: "string",
                values: ["string"],
                operator: "string",
            }],
            metricName: "string",
        },
        dataSourceId: "string",
        resourceGroupName: "string",
        authorizedResourceIds: ["string"],
        description: "string",
        enabled: false,
        location: "string",
        name: "string",
        tags: {
            string: "string",
        },
    });
    
    type: azure:monitoring:ScheduledQueryRulesLog
    properties:
        authorizedResourceIds:
            - string
        criteria:
            dimensions:
                - name: string
                  operator: string
                  values:
                    - string
            metricName: string
        dataSourceId: string
        description: string
        enabled: false
        location: string
        name: string
        resourceGroupName: string
        tags:
            string: string
    

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

    Criteria ScheduledQueryRulesLogCriteria
    A criteria block as defined below.
    DataSourceId string
    The resource uri over which log search query is to be run.
    ResourceGroupName string
    The name of the resource group in which to create the scheduled query rule instance.
    AuthorizedResourceIds List<string>
    Description string
    The description of the scheduled query rule.
    Enabled bool
    Whether this scheduled query rule is enabled. Default is true.
    Location string
    Name string
    The name of the scheduled query rule. Changing this forces a new resource to be created.
    Tags Dictionary<string, string>
    Criteria ScheduledQueryRulesLogCriteriaArgs
    A criteria block as defined below.
    DataSourceId string
    The resource uri over which log search query is to be run.
    ResourceGroupName string
    The name of the resource group in which to create the scheduled query rule instance.
    AuthorizedResourceIds []string
    Description string
    The description of the scheduled query rule.
    Enabled bool
    Whether this scheduled query rule is enabled. Default is true.
    Location string
    Name string
    The name of the scheduled query rule. Changing this forces a new resource to be created.
    Tags map[string]string
    criteria ScheduledQueryRulesLogCriteria
    A criteria block as defined below.
    dataSourceId String
    The resource uri over which log search query is to be run.
    resourceGroupName String
    The name of the resource group in which to create the scheduled query rule instance.
    authorizedResourceIds List<String>
    description String
    The description of the scheduled query rule.
    enabled Boolean
    Whether this scheduled query rule is enabled. Default is true.
    location String
    name String
    The name of the scheduled query rule. Changing this forces a new resource to be created.
    tags Map<String,String>
    criteria ScheduledQueryRulesLogCriteria
    A criteria block as defined below.
    dataSourceId string
    The resource uri over which log search query is to be run.
    resourceGroupName string
    The name of the resource group in which to create the scheduled query rule instance.
    authorizedResourceIds string[]
    description string
    The description of the scheduled query rule.
    enabled boolean
    Whether this scheduled query rule is enabled. Default is true.
    location string
    name string
    The name of the scheduled query rule. Changing this forces a new resource to be created.
    tags {[key: string]: string}
    criteria ScheduledQueryRulesLogCriteriaArgs
    A criteria block as defined below.
    data_source_id str
    The resource uri over which log search query is to be run.
    resource_group_name str
    The name of the resource group in which to create the scheduled query rule instance.
    authorized_resource_ids Sequence[str]
    description str
    The description of the scheduled query rule.
    enabled bool
    Whether this scheduled query rule is enabled. Default is true.
    location str
    name str
    The name of the scheduled query rule. Changing this forces a new resource to be created.
    tags Mapping[str, str]
    criteria Property Map
    A criteria block as defined below.
    dataSourceId String
    The resource uri over which log search query is to be run.
    resourceGroupName String
    The name of the resource group in which to create the scheduled query rule instance.
    authorizedResourceIds List<String>
    description String
    The description of the scheduled query rule.
    enabled Boolean
    Whether this scheduled query rule is enabled. Default is true.
    location String
    name String
    The name of the scheduled query rule. Changing this forces a new resource to be created.
    tags Map<String>

    Outputs

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

    Get an existing ScheduledQueryRulesLog 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?: ScheduledQueryRulesLogState, opts?: CustomResourceOptions): ScheduledQueryRulesLog
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            authorized_resource_ids: Optional[Sequence[str]] = None,
            criteria: Optional[ScheduledQueryRulesLogCriteriaArgs] = None,
            data_source_id: Optional[str] = None,
            description: Optional[str] = None,
            enabled: Optional[bool] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None) -> ScheduledQueryRulesLog
    func GetScheduledQueryRulesLog(ctx *Context, name string, id IDInput, state *ScheduledQueryRulesLogState, opts ...ResourceOption) (*ScheduledQueryRulesLog, error)
    public static ScheduledQueryRulesLog Get(string name, Input<string> id, ScheduledQueryRulesLogState? state, CustomResourceOptions? opts = null)
    public static ScheduledQueryRulesLog get(String name, Output<String> id, ScheduledQueryRulesLogState state, CustomResourceOptions options)
    resources:  _:    type: azure:monitoring:ScheduledQueryRulesLog    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:
    AuthorizedResourceIds List<string>
    Criteria ScheduledQueryRulesLogCriteria
    A criteria block as defined below.
    DataSourceId string
    The resource uri over which log search query is to be run.
    Description string
    The description of the scheduled query rule.
    Enabled bool
    Whether this scheduled query rule is enabled. Default is true.
    Location string
    Name string
    The name of the scheduled query rule. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the scheduled query rule instance.
    Tags Dictionary<string, string>
    AuthorizedResourceIds []string
    Criteria ScheduledQueryRulesLogCriteriaArgs
    A criteria block as defined below.
    DataSourceId string
    The resource uri over which log search query is to be run.
    Description string
    The description of the scheduled query rule.
    Enabled bool
    Whether this scheduled query rule is enabled. Default is true.
    Location string
    Name string
    The name of the scheduled query rule. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the scheduled query rule instance.
    Tags map[string]string
    authorizedResourceIds List<String>
    criteria ScheduledQueryRulesLogCriteria
    A criteria block as defined below.
    dataSourceId String
    The resource uri over which log search query is to be run.
    description String
    The description of the scheduled query rule.
    enabled Boolean
    Whether this scheduled query rule is enabled. Default is true.
    location String
    name String
    The name of the scheduled query rule. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the scheduled query rule instance.
    tags Map<String,String>
    authorizedResourceIds string[]
    criteria ScheduledQueryRulesLogCriteria
    A criteria block as defined below.
    dataSourceId string
    The resource uri over which log search query is to be run.
    description string
    The description of the scheduled query rule.
    enabled boolean
    Whether this scheduled query rule is enabled. Default is true.
    location string
    name string
    The name of the scheduled query rule. Changing this forces a new resource to be created.
    resourceGroupName string
    The name of the resource group in which to create the scheduled query rule instance.
    tags {[key: string]: string}
    authorized_resource_ids Sequence[str]
    criteria ScheduledQueryRulesLogCriteriaArgs
    A criteria block as defined below.
    data_source_id str
    The resource uri over which log search query is to be run.
    description str
    The description of the scheduled query rule.
    enabled bool
    Whether this scheduled query rule is enabled. Default is true.
    location str
    name str
    The name of the scheduled query rule. Changing this forces a new resource to be created.
    resource_group_name str
    The name of the resource group in which to create the scheduled query rule instance.
    tags Mapping[str, str]
    authorizedResourceIds List<String>
    criteria Property Map
    A criteria block as defined below.
    dataSourceId String
    The resource uri over which log search query is to be run.
    description String
    The description of the scheduled query rule.
    enabled Boolean
    Whether this scheduled query rule is enabled. Default is true.
    location String
    name String
    The name of the scheduled query rule. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the scheduled query rule instance.
    tags Map<String>

    Supporting Types

    ScheduledQueryRulesLogCriteria, ScheduledQueryRulesLogCriteriaArgs

    Dimensions List<ScheduledQueryRulesLogCriteriaDimension>
    A dimension block as defined below.
    MetricName string
    Name of the metric. Supported metrics are listed in the Azure Monitor Microsoft.OperationalInsights/workspaces metrics namespace.
    Dimensions []ScheduledQueryRulesLogCriteriaDimension
    A dimension block as defined below.
    MetricName string
    Name of the metric. Supported metrics are listed in the Azure Monitor Microsoft.OperationalInsights/workspaces metrics namespace.
    dimensions List<ScheduledQueryRulesLogCriteriaDimension>
    A dimension block as defined below.
    metricName String
    Name of the metric. Supported metrics are listed in the Azure Monitor Microsoft.OperationalInsights/workspaces metrics namespace.
    dimensions ScheduledQueryRulesLogCriteriaDimension[]
    A dimension block as defined below.
    metricName string
    Name of the metric. Supported metrics are listed in the Azure Monitor Microsoft.OperationalInsights/workspaces metrics namespace.
    dimensions Sequence[ScheduledQueryRulesLogCriteriaDimension]
    A dimension block as defined below.
    metric_name str
    Name of the metric. Supported metrics are listed in the Azure Monitor Microsoft.OperationalInsights/workspaces metrics namespace.
    dimensions List<Property Map>
    A dimension block as defined below.
    metricName String
    Name of the metric. Supported metrics are listed in the Azure Monitor Microsoft.OperationalInsights/workspaces metrics namespace.

    ScheduledQueryRulesLogCriteriaDimension, ScheduledQueryRulesLogCriteriaDimensionArgs

    Name string
    Name of the dimension.
    Values List<string>
    List of dimension values.
    Operator string
    Operator for dimension values, - 'Include'.
    Name string
    Name of the dimension.
    Values []string
    List of dimension values.
    Operator string
    Operator for dimension values, - 'Include'.
    name String
    Name of the dimension.
    values List<String>
    List of dimension values.
    operator String
    Operator for dimension values, - 'Include'.
    name string
    Name of the dimension.
    values string[]
    List of dimension values.
    operator string
    Operator for dimension values, - 'Include'.
    name str
    Name of the dimension.
    values Sequence[str]
    List of dimension values.
    operator str
    Operator for dimension values, - 'Include'.
    name String
    Name of the dimension.
    values List<String>
    List of dimension values.
    operator String
    Operator for dimension values, - 'Include'.

    Import

    Scheduled Query Rule Log can be imported using the resource id, e.g.

     $ pulumi import azure:monitoring/scheduledQueryRulesLog:ScheduledQueryRulesLog example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Insights/scheduledQueryRules/myrulename
    

    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.