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

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.monitoring.getScheduledQueryRulesLog

Explore with Pulumi AI

Use this data source to access the properties of a LogToMetricAction scheduled query rule.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.monitoring.getScheduledQueryRulesLog({
    resourceGroupName: "example-rg",
    name: "tfex-queryrule",
});
export const queryRuleId = example.then(example => example.id);
Copy
import pulumi
import pulumi_azure as azure

example = azure.monitoring.get_scheduled_query_rules_log(resource_group_name="example-rg",
    name="tfex-queryrule")
pulumi.export("queryRuleId", example.id)
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := monitoring.LookupScheduledQueryRulesLog(ctx, &monitoring.LookupScheduledQueryRulesLogArgs{
			ResourceGroupName: "example-rg",
			Name:              "tfex-queryrule",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("queryRuleId", example.Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = Azure.Monitoring.GetScheduledQueryRulesLog.Invoke(new()
    {
        ResourceGroupName = "example-rg",
        Name = "tfex-queryrule",
    });

    return new Dictionary<string, object?>
    {
        ["queryRuleId"] = example.Apply(getScheduledQueryRulesLogResult => getScheduledQueryRulesLogResult.Id),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.monitoring.MonitoringFunctions;
import com.pulumi.azure.monitoring.inputs.GetScheduledQueryRulesLogArgs;
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) {
        final var example = MonitoringFunctions.getScheduledQueryRulesLog(GetScheduledQueryRulesLogArgs.builder()
            .resourceGroupName("example-rg")
            .name("tfex-queryrule")
            .build());

        ctx.export("queryRuleId", example.applyValue(getScheduledQueryRulesLogResult -> getScheduledQueryRulesLogResult.id()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azure:monitoring:getScheduledQueryRulesLog
      arguments:
        resourceGroupName: example-rg
        name: tfex-queryrule
outputs:
  queryRuleId: ${example.id}
Copy

Using getScheduledQueryRulesLog

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getScheduledQueryRulesLog(args: GetScheduledQueryRulesLogArgs, opts?: InvokeOptions): Promise<GetScheduledQueryRulesLogResult>
function getScheduledQueryRulesLogOutput(args: GetScheduledQueryRulesLogOutputArgs, opts?: InvokeOptions): Output<GetScheduledQueryRulesLogResult>
Copy
def get_scheduled_query_rules_log(name: Optional[str] = None,
                                  resource_group_name: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetScheduledQueryRulesLogResult
def get_scheduled_query_rules_log_output(name: Optional[pulumi.Input[str]] = None,
                                  resource_group_name: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetScheduledQueryRulesLogResult]
Copy
func LookupScheduledQueryRulesLog(ctx *Context, args *LookupScheduledQueryRulesLogArgs, opts ...InvokeOption) (*LookupScheduledQueryRulesLogResult, error)
func LookupScheduledQueryRulesLogOutput(ctx *Context, args *LookupScheduledQueryRulesLogOutputArgs, opts ...InvokeOption) LookupScheduledQueryRulesLogResultOutput
Copy

> Note: This function is named LookupScheduledQueryRulesLog in the Go SDK.

public static class GetScheduledQueryRulesLog 
{
    public static Task<GetScheduledQueryRulesLogResult> InvokeAsync(GetScheduledQueryRulesLogArgs args, InvokeOptions? opts = null)
    public static Output<GetScheduledQueryRulesLogResult> Invoke(GetScheduledQueryRulesLogInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetScheduledQueryRulesLogResult> getScheduledQueryRulesLog(GetScheduledQueryRulesLogArgs args, InvokeOptions options)
public static Output<GetScheduledQueryRulesLogResult> getScheduledQueryRulesLog(GetScheduledQueryRulesLogArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:monitoring/getScheduledQueryRulesLog:getScheduledQueryRulesLog
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
Specifies the name of the scheduled query rule.
ResourceGroupName This property is required. string
Specifies the name of the resource group where the scheduled query rule is located.
Name This property is required. string
Specifies the name of the scheduled query rule.
ResourceGroupName This property is required. string
Specifies the name of the resource group where the scheduled query rule is located.
name This property is required. String
Specifies the name of the scheduled query rule.
resourceGroupName This property is required. String
Specifies the name of the resource group where the scheduled query rule is located.
name This property is required. string
Specifies the name of the scheduled query rule.
resourceGroupName This property is required. string
Specifies the name of the resource group where the scheduled query rule is located.
name This property is required. str
Specifies the name of the scheduled query rule.
resource_group_name This property is required. str
Specifies the name of the resource group where the scheduled query rule is located.
name This property is required. String
Specifies the name of the scheduled query rule.
resourceGroupName This property is required. String
Specifies the name of the resource group where the scheduled query rule is located.

getScheduledQueryRulesLog Result

The following output properties are available:

AuthorizedResourceIds List<string>
A list of IDs of Resources referred into query.
Criterias List<GetScheduledQueryRulesLogCriteria>
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.
Id string
The provider-assigned unique ID for this managed resource.
Location string
Specifies the Azure Region where the resource should exist.
Name string
Name of the dimension.
ResourceGroupName string
Tags Dictionary<string, string>
AuthorizedResourceIds []string
A list of IDs of Resources referred into query.
Criterias []GetScheduledQueryRulesLogCriteria
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.
Id string
The provider-assigned unique ID for this managed resource.
Location string
Specifies the Azure Region where the resource should exist.
Name string
Name of the dimension.
ResourceGroupName string
Tags map[string]string
authorizedResourceIds List<String>
A list of IDs of Resources referred into query.
criterias List<GetScheduledQueryRulesLogCriteria>
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.
id String
The provider-assigned unique ID for this managed resource.
location String
Specifies the Azure Region where the resource should exist.
name String
Name of the dimension.
resourceGroupName String
tags Map<String,String>
authorizedResourceIds string[]
A list of IDs of Resources referred into query.
criterias GetScheduledQueryRulesLogCriteria[]
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.
id string
The provider-assigned unique ID for this managed resource.
location string
Specifies the Azure Region where the resource should exist.
name string
Name of the dimension.
resourceGroupName string
tags {[key: string]: string}
authorized_resource_ids Sequence[str]
A list of IDs of Resources referred into query.
criterias Sequence[GetScheduledQueryRulesLogCriteria]
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.
id str
The provider-assigned unique ID for this managed resource.
location str
Specifies the Azure Region where the resource should exist.
name str
Name of the dimension.
resource_group_name str
tags Mapping[str, str]
authorizedResourceIds List<String>
A list of IDs of Resources referred into query.
criterias List<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.
id String
The provider-assigned unique ID for this managed resource.
location String
Specifies the Azure Region where the resource should exist.
name String
Name of the dimension.
resourceGroupName String
tags Map<String>

Supporting Types

GetScheduledQueryRulesLogCriteria

Dimensions This property is required. List<GetScheduledQueryRulesLogCriteriaDimension>
A dimension block as defined below.
MetricName This property is required. string
Name of the metric.
Dimensions This property is required. []GetScheduledQueryRulesLogCriteriaDimension
A dimension block as defined below.
MetricName This property is required. string
Name of the metric.
dimensions This property is required. List<GetScheduledQueryRulesLogCriteriaDimension>
A dimension block as defined below.
metricName This property is required. String
Name of the metric.
dimensions This property is required. GetScheduledQueryRulesLogCriteriaDimension[]
A dimension block as defined below.
metricName This property is required. string
Name of the metric.
dimensions This property is required. Sequence[GetScheduledQueryRulesLogCriteriaDimension]
A dimension block as defined below.
metric_name This property is required. str
Name of the metric.
dimensions This property is required. List<Property Map>
A dimension block as defined below.
metricName This property is required. String
Name of the metric.

GetScheduledQueryRulesLogCriteriaDimension

Name This property is required. string
Specifies the name of the scheduled query rule.
Operator This property is required. string
Operator for dimension values.
Values This property is required. List<string>
List of dimension values.
Name This property is required. string
Specifies the name of the scheduled query rule.
Operator This property is required. string
Operator for dimension values.
Values This property is required. []string
List of dimension values.
name This property is required. String
Specifies the name of the scheduled query rule.
operator This property is required. String
Operator for dimension values.
values This property is required. List<String>
List of dimension values.
name This property is required. string
Specifies the name of the scheduled query rule.
operator This property is required. string
Operator for dimension values.
values This property is required. string[]
List of dimension values.
name This property is required. str
Specifies the name of the scheduled query rule.
operator This property is required. str
Operator for dimension values.
values This property is required. Sequence[str]
List of dimension values.
name This property is required. String
Specifies the name of the scheduled query rule.
operator This property is required. String
Operator for dimension values.
values This property is required. List<String>
List of dimension values.

Package Details

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