We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 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)
// 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.
- Resource
Group 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.
- Resource
Group 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.
- resource
Group 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.
- resource
Group 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.
- resource
Group 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<Get
Scheduled Query Rules Log Criteria> - A
criteria
block as defined below. - Data
Source 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.
- Resource
Group stringName - Dictionary<string, string>
- []string
- A list of IDs of Resources referred into query.
- Criterias
[]Get
Scheduled Query Rules Log Criteria - A
criteria
block as defined below. - Data
Source 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.
- Resource
Group stringName - map[string]string
- List<String>
- A list of IDs of Resources referred into query.
- criterias
List<Get
Scheduled Query Rules Log Criteria> - A
criteria
block as defined below. - data
Source 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.
- resource
Group StringName - Map<String,String>
- string[]
- A list of IDs of Resources referred into query.
- criterias
Get
Scheduled Query Rules Log Criteria[] - A
criteria
block as defined below. - data
Source 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.
- resource
Group stringName - {[key: string]: string}
- Sequence[str]
- A list of IDs of Resources referred into query.
- criterias
Sequence[Get
Scheduled Query Rules Log Criteria] - A
criteria
block 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
criteria
block as defined below. - data
Source 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.
- resource
Group StringName - Map<String>
Supporting Types
GetScheduledQueryRulesLogCriteria
- Dimensions
List<Get
Scheduled Query Rules Log Criteria Dimension> - A
dimension
block as defined below. - Metric
Name string - Name of the metric.
- Dimensions
[]Get
Scheduled Query Rules Log Criteria Dimension - A
dimension
block as defined below. - Metric
Name string - Name of the metric.
- dimensions
List<Get
Scheduled Query Rules Log Criteria Dimension> - A
dimension
block as defined below. - metric
Name String - Name of the metric.
- dimensions
Get
Scheduled Query Rules Log Criteria Dimension[] - A
dimension
block as defined below. - metric
Name string - Name of the metric.
- dimensions
Sequence[Get
Scheduled Query Rules Log Criteria Dimension] - A
dimension
block as defined below. - metric_
name str - Name of the metric.
- dimensions List<Property Map>
- A
dimension
block as defined below. - metric
Name 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
azurerm
Terraform Provider.