We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 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);
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)
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
	})
}
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),
    };
});
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()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:monitoring:getScheduledQueryRulesLog
      arguments:
        resourceGroupName: example-rg
        name: tfex-queryrule
outputs:
  queryRuleId: ${example.id}
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>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]func LookupScheduledQueryRulesLog(ctx *Context, args *LookupScheduledQueryRulesLogArgs, opts ...InvokeOption) (*LookupScheduledQueryRulesLogResult, error)
func LookupScheduledQueryRulesLogOutput(ctx *Context, args *LookupScheduledQueryRulesLogOutputArgs, opts ...InvokeOption) LookupScheduledQueryRulesLogResultOutput> 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)
}public static CompletableFuture<GetScheduledQueryRulesLogResult> getScheduledQueryRulesLog(GetScheduledQueryRulesLogArgs args, InvokeOptions options)
public static Output<GetScheduledQueryRulesLogResult> getScheduledQueryRulesLog(GetScheduledQueryRulesLogArgs args, InvokeOptions options)
fn::invoke:
  function: azure:monitoring/getScheduledQueryRulesLog:getScheduledQueryRulesLog
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- Specifies the name of the scheduled query rule.
- ResourceGroup stringName 
- Specifies the name of the resource group where the scheduled query rule is located.
- Name string
- Specifies the name of the scheduled query rule.
- ResourceGroup stringName 
- Specifies the name of the resource group where the scheduled query rule is located.
- name String
- Specifies the name of the scheduled query rule.
- resourceGroup StringName 
- Specifies the name of the resource group where the scheduled query rule is located.
- name string
- Specifies the name of the scheduled query rule.
- resourceGroup stringName 
- Specifies the name of the resource group where the scheduled query rule is located.
- name str
- Specifies the name of the scheduled query rule.
- resource_group_ strname 
- Specifies the name of the resource group where the scheduled query rule is located.
- name String
- Specifies the name of the scheduled query rule.
- resourceGroup StringName 
- Specifies the name of the resource group where the scheduled query rule is located.
getScheduledQueryRulesLog Result
The following output properties are available:
- List<string>
- A list of IDs of Resources referred into query.
- Criterias
List<GetScheduled Query Rules Log Criteria> 
- A criteriablock as defined below.
- DataSource stringId 
- 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.
- ResourceGroup stringName 
- Dictionary<string, string>
- []string
- A list of IDs of Resources referred into query.
- Criterias
[]GetScheduled Query Rules Log Criteria 
- A criteriablock as defined below.
- DataSource stringId 
- 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.
- ResourceGroup stringName 
- map[string]string
- List<String>
- A list of IDs of Resources referred into query.
- criterias
List<GetScheduled Query Rules Log Criteria> 
- A criteriablock as defined below.
- dataSource StringId 
- 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.
- resourceGroup StringName 
- Map<String,String>
- string[]
- A list of IDs of Resources referred into query.
- criterias
GetScheduled Query Rules Log Criteria[] 
- A criteriablock as defined below.
- dataSource stringId 
- 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.
- resourceGroup stringName 
- {[key: string]: string}
- Sequence[str]
- A list of IDs of Resources referred into query.
- criterias
Sequence[GetScheduled Query Rules Log Criteria] 
- A criteriablock as defined below.
- data_source_ strid 
- 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_ strname 
- Mapping[str, str]
- List<String>
- A list of IDs of Resources referred into query.
- criterias List<Property Map>
- A criteriablock as defined below.
- dataSource StringId 
- 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.
- resourceGroup StringName 
- Map<String>
Supporting Types
GetScheduledQueryRulesLogCriteria     
- Dimensions
List<GetScheduled Query Rules Log Criteria Dimension> 
- A dimensionblock as defined below.
- MetricName string
- Name of the metric.
- Dimensions
[]GetScheduled Query Rules Log Criteria Dimension 
- A dimensionblock as defined below.
- MetricName string
- Name of the metric.
- dimensions
List<GetScheduled Query Rules Log Criteria Dimension> 
- A dimensionblock as defined below.
- metricName String
- Name of the metric.
- dimensions
GetScheduled Query Rules Log Criteria Dimension[] 
- A dimensionblock as defined below.
- metricName string
- Name of the metric.
- dimensions
Sequence[GetScheduled Query Rules Log Criteria Dimension] 
- A dimensionblock as defined below.
- metric_name str
- Name of the metric.
- dimensions List<Property Map>
- A dimensionblock as defined below.
- metricName String
- Name of the metric.
GetScheduledQueryRulesLogCriteriaDimension      
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.