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

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

azure.monitoring.getScheduledQueryRulesLog

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:monitoring/getScheduledQueryRulesLog:getScheduledQueryRulesLog
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Specifies the name of the scheduled query rule.
    ResourceGroupName string
    Specifies the name of the resource group where the scheduled query rule is located.
    Name string
    Specifies the name of the scheduled query rule.
    ResourceGroupName string
    Specifies the name of the resource group where the scheduled query rule is located.
    name String
    Specifies the name of the scheduled query rule.
    resourceGroupName String
    Specifies the name of the resource group where the scheduled query rule is located.
    name string
    Specifies the name of the scheduled query rule.
    resourceGroupName string
    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_name str
    Specifies the name of the resource group where the scheduled query rule is located.
    name String
    Specifies the name of the scheduled query rule.
    resourceGroupName 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 List<GetScheduledQueryRulesLogCriteriaDimension>
    A dimension block as defined below.
    MetricName string
    Name of the metric.
    Dimensions []GetScheduledQueryRulesLogCriteriaDimension
    A dimension block as defined below.
    MetricName string
    Name of the metric.
    dimensions List<GetScheduledQueryRulesLogCriteriaDimension>
    A dimension block as defined below.
    metricName String
    Name of the metric.
    dimensions GetScheduledQueryRulesLogCriteriaDimension[]
    A dimension block as defined below.
    metricName string
    Name of the metric.
    dimensions Sequence[GetScheduledQueryRulesLogCriteriaDimension]
    A dimension block as defined below.
    metric_name str
    Name of the metric.
    dimensions List<Property Map>
    A dimension block as defined below.
    metricName String
    Name of the metric.

    GetScheduledQueryRulesLogCriteriaDimension

    Name string
    Specifies the name of the scheduled query rule.
    Operator string
    Operator for dimension values.
    Values List<string>
    List of dimension values.
    Name string
    Specifies the name of the scheduled query rule.
    Operator string
    Operator for dimension values.
    Values []string
    List of dimension values.
    name String
    Specifies the name of the scheduled query rule.
    operator String
    Operator for dimension values.
    values List<String>
    List of dimension values.
    name string
    Specifies the name of the scheduled query rule.
    operator string
    Operator for dimension values.
    values string[]
    List of dimension values.
    name str
    Specifies the name of the scheduled query rule.
    operator str
    Operator for dimension values.
    values Sequence[str]
    List of dimension values.
    name String
    Specifies the name of the scheduled query rule.
    operator String
    Operator for dimension values.
    values 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.
    azure logo

    We recommend using Azure Native.

    Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi