We recommend using Azure Native.
azure.monitoring.ScheduledQueryRulesLog
Explore with Pulumi AI
Manages a LogToMetricAction Scheduled Query Rules resource within Azure Monitor.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "monitoring-resources",
location: "West Europe",
});
const exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("example", {
name: "loganalytics",
location: example.location,
resourceGroupName: example.name,
sku: "PerGB2018",
retentionInDays: 30,
});
const exampleActionGroup = new azure.monitoring.ActionGroup("example", {
name: "example-actiongroup",
resourceGroupName: example.name,
shortName: "exampleact",
webhookReceivers: [{
name: "callmyapi",
serviceUri: "http://example.com/alert",
}],
});
// Example: Creates alert using the new Scheduled Query Rules metric
const exampleMetricAlert = new azure.monitoring.MetricAlert("example", {
name: "example-metricalert",
resourceGroupName: example.name,
scopes: [exampleAnalyticsWorkspace.id],
description: "Action will be triggered when Average_% Idle Time metric is less than 10.",
frequency: "PT1M",
windowSize: "PT5M",
criterias: [{
metricNamespace: "Microsoft.OperationalInsights/workspaces",
metricName: "UsedCapacity",
aggregation: "Average",
operator: "LessThan",
threshold: 10,
}],
actions: [{
actionGroupId: exampleActionGroup.id,
}],
});
// Example: LogToMetric Action for the named Computer
const exampleScheduledQueryRulesLog = new azure.monitoring.ScheduledQueryRulesLog("example", {
name: "example",
location: example.location,
resourceGroupName: example.name,
criteria: {
metricName: "Average_% Idle Time",
dimensions: [{
name: "Computer",
operator: "Include",
values: ["targetVM"],
}],
},
dataSourceId: exampleAnalyticsWorkspace.id,
description: "Scheduled query rule LogToMetric example",
enabled: true,
tags: {
foo: "bar",
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="monitoring-resources",
location="West Europe")
example_analytics_workspace = azure.operationalinsights.AnalyticsWorkspace("example",
name="loganalytics",
location=example.location,
resource_group_name=example.name,
sku="PerGB2018",
retention_in_days=30)
example_action_group = azure.monitoring.ActionGroup("example",
name="example-actiongroup",
resource_group_name=example.name,
short_name="exampleact",
webhook_receivers=[{
"name": "callmyapi",
"service_uri": "http://example.com/alert",
}])
# Example: Creates alert using the new Scheduled Query Rules metric
example_metric_alert = azure.monitoring.MetricAlert("example",
name="example-metricalert",
resource_group_name=example.name,
scopes=[example_analytics_workspace.id],
description="Action will be triggered when Average_% Idle Time metric is less than 10.",
frequency="PT1M",
window_size="PT5M",
criterias=[{
"metric_namespace": "Microsoft.OperationalInsights/workspaces",
"metric_name": "UsedCapacity",
"aggregation": "Average",
"operator": "LessThan",
"threshold": 10,
}],
actions=[{
"action_group_id": example_action_group.id,
}])
# Example: LogToMetric Action for the named Computer
example_scheduled_query_rules_log = azure.monitoring.ScheduledQueryRulesLog("example",
name="example",
location=example.location,
resource_group_name=example.name,
criteria={
"metric_name": "Average_% Idle Time",
"dimensions": [{
"name": "Computer",
"operator": "Include",
"values": ["targetVM"],
}],
},
data_source_id=example_analytics_workspace.id,
description="Scheduled query rule LogToMetric example",
enabled=True,
tags={
"foo": "bar",
})
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("monitoring-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
Name: pulumi.String("loganalytics"),
Location: example.Location,
ResourceGroupName: example.Name,
Sku: pulumi.String("PerGB2018"),
RetentionInDays: pulumi.Int(30),
})
if err != nil {
return err
}
exampleActionGroup, err := monitoring.NewActionGroup(ctx, "example", &monitoring.ActionGroupArgs{
Name: pulumi.String("example-actiongroup"),
ResourceGroupName: example.Name,
ShortName: pulumi.String("exampleact"),
WebhookReceivers: monitoring.ActionGroupWebhookReceiverArray{
&monitoring.ActionGroupWebhookReceiverArgs{
Name: pulumi.String("callmyapi"),
ServiceUri: pulumi.String("http://example.com/alert"),
},
},
})
if err != nil {
return err
}
// Example: Creates alert using the new Scheduled Query Rules metric
_, err = monitoring.NewMetricAlert(ctx, "example", &monitoring.MetricAlertArgs{
Name: pulumi.String("example-metricalert"),
ResourceGroupName: example.Name,
Scopes: pulumi.StringArray{
exampleAnalyticsWorkspace.ID(),
},
Description: pulumi.String("Action will be triggered when Average_% Idle Time metric is less than 10."),
Frequency: pulumi.String("PT1M"),
WindowSize: pulumi.String("PT5M"),
Criterias: monitoring.MetricAlertCriteriaArray{
&monitoring.MetricAlertCriteriaArgs{
MetricNamespace: pulumi.String("Microsoft.OperationalInsights/workspaces"),
MetricName: pulumi.String("UsedCapacity"),
Aggregation: pulumi.String("Average"),
Operator: pulumi.String("LessThan"),
Threshold: pulumi.Float64(10),
},
},
Actions: monitoring.MetricAlertActionArray{
&monitoring.MetricAlertActionArgs{
ActionGroupId: exampleActionGroup.ID(),
},
},
})
if err != nil {
return err
}
// Example: LogToMetric Action for the named Computer
_, err = monitoring.NewScheduledQueryRulesLog(ctx, "example", &monitoring.ScheduledQueryRulesLogArgs{
Name: pulumi.String("example"),
Location: example.Location,
ResourceGroupName: example.Name,
Criteria: &monitoring.ScheduledQueryRulesLogCriteriaArgs{
MetricName: pulumi.String("Average_% Idle Time"),
Dimensions: monitoring.ScheduledQueryRulesLogCriteriaDimensionArray{
&monitoring.ScheduledQueryRulesLogCriteriaDimensionArgs{
Name: pulumi.String("Computer"),
Operator: pulumi.String("Include"),
Values: pulumi.StringArray{
pulumi.String("targetVM"),
},
},
},
},
DataSourceId: exampleAnalyticsWorkspace.ID(),
Description: pulumi.String("Scheduled query rule LogToMetric example"),
Enabled: pulumi.Bool(true),
Tags: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "monitoring-resources",
Location = "West Europe",
});
var exampleAnalyticsWorkspace = new Azure.OperationalInsights.AnalyticsWorkspace("example", new()
{
Name = "loganalytics",
Location = example.Location,
ResourceGroupName = example.Name,
Sku = "PerGB2018",
RetentionInDays = 30,
});
var exampleActionGroup = new Azure.Monitoring.ActionGroup("example", new()
{
Name = "example-actiongroup",
ResourceGroupName = example.Name,
ShortName = "exampleact",
WebhookReceivers = new[]
{
new Azure.Monitoring.Inputs.ActionGroupWebhookReceiverArgs
{
Name = "callmyapi",
ServiceUri = "http://example.com/alert",
},
},
});
// Example: Creates alert using the new Scheduled Query Rules metric
var exampleMetricAlert = new Azure.Monitoring.MetricAlert("example", new()
{
Name = "example-metricalert",
ResourceGroupName = example.Name,
Scopes = new[]
{
exampleAnalyticsWorkspace.Id,
},
Description = "Action will be triggered when Average_% Idle Time metric is less than 10.",
Frequency = "PT1M",
WindowSize = "PT5M",
Criterias = new[]
{
new Azure.Monitoring.Inputs.MetricAlertCriteriaArgs
{
MetricNamespace = "Microsoft.OperationalInsights/workspaces",
MetricName = "UsedCapacity",
Aggregation = "Average",
Operator = "LessThan",
Threshold = 10,
},
},
Actions = new[]
{
new Azure.Monitoring.Inputs.MetricAlertActionArgs
{
ActionGroupId = exampleActionGroup.Id,
},
},
});
// Example: LogToMetric Action for the named Computer
var exampleScheduledQueryRulesLog = new Azure.Monitoring.ScheduledQueryRulesLog("example", new()
{
Name = "example",
Location = example.Location,
ResourceGroupName = example.Name,
Criteria = new Azure.Monitoring.Inputs.ScheduledQueryRulesLogCriteriaArgs
{
MetricName = "Average_% Idle Time",
Dimensions = new[]
{
new Azure.Monitoring.Inputs.ScheduledQueryRulesLogCriteriaDimensionArgs
{
Name = "Computer",
Operator = "Include",
Values = new[]
{
"targetVM",
},
},
},
},
DataSourceId = exampleAnalyticsWorkspace.Id,
Description = "Scheduled query rule LogToMetric example",
Enabled = true,
Tags =
{
{ "foo", "bar" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.operationalinsights.AnalyticsWorkspace;
import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs;
import com.pulumi.azure.monitoring.ActionGroup;
import com.pulumi.azure.monitoring.ActionGroupArgs;
import com.pulumi.azure.monitoring.inputs.ActionGroupWebhookReceiverArgs;
import com.pulumi.azure.monitoring.MetricAlert;
import com.pulumi.azure.monitoring.MetricAlertArgs;
import com.pulumi.azure.monitoring.inputs.MetricAlertCriteriaArgs;
import com.pulumi.azure.monitoring.inputs.MetricAlertActionArgs;
import com.pulumi.azure.monitoring.ScheduledQueryRulesLog;
import com.pulumi.azure.monitoring.ScheduledQueryRulesLogArgs;
import com.pulumi.azure.monitoring.inputs.ScheduledQueryRulesLogCriteriaArgs;
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) {
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("monitoring-resources")
.location("West Europe")
.build());
var exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
.name("loganalytics")
.location(example.location())
.resourceGroupName(example.name())
.sku("PerGB2018")
.retentionInDays(30)
.build());
var exampleActionGroup = new ActionGroup("exampleActionGroup", ActionGroupArgs.builder()
.name("example-actiongroup")
.resourceGroupName(example.name())
.shortName("exampleact")
.webhookReceivers(ActionGroupWebhookReceiverArgs.builder()
.name("callmyapi")
.serviceUri("http://example.com/alert")
.build())
.build());
// Example: Creates alert using the new Scheduled Query Rules metric
var exampleMetricAlert = new MetricAlert("exampleMetricAlert", MetricAlertArgs.builder()
.name("example-metricalert")
.resourceGroupName(example.name())
.scopes(exampleAnalyticsWorkspace.id())
.description("Action will be triggered when Average_% Idle Time metric is less than 10.")
.frequency("PT1M")
.windowSize("PT5M")
.criterias(MetricAlertCriteriaArgs.builder()
.metricNamespace("Microsoft.OperationalInsights/workspaces")
.metricName("UsedCapacity")
.aggregation("Average")
.operator("LessThan")
.threshold(10)
.build())
.actions(MetricAlertActionArgs.builder()
.actionGroupId(exampleActionGroup.id())
.build())
.build());
// Example: LogToMetric Action for the named Computer
var exampleScheduledQueryRulesLog = new ScheduledQueryRulesLog("exampleScheduledQueryRulesLog", ScheduledQueryRulesLogArgs.builder()
.name("example")
.location(example.location())
.resourceGroupName(example.name())
.criteria(ScheduledQueryRulesLogCriteriaArgs.builder()
.metricName("Average_% Idle Time")
.dimensions(ScheduledQueryRulesLogCriteriaDimensionArgs.builder()
.name("Computer")
.operator("Include")
.values("targetVM")
.build())
.build())
.dataSourceId(exampleAnalyticsWorkspace.id())
.description("Scheduled query rule LogToMetric example")
.enabled(true)
.tags(Map.of("foo", "bar"))
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: monitoring-resources
location: West Europe
exampleAnalyticsWorkspace:
type: azure:operationalinsights:AnalyticsWorkspace
name: example
properties:
name: loganalytics
location: ${example.location}
resourceGroupName: ${example.name}
sku: PerGB2018
retentionInDays: 30
exampleActionGroup:
type: azure:monitoring:ActionGroup
name: example
properties:
name: example-actiongroup
resourceGroupName: ${example.name}
shortName: exampleact
webhookReceivers:
- name: callmyapi
serviceUri: http://example.com/alert
# Example: Creates alert using the new Scheduled Query Rules metric
exampleMetricAlert:
type: azure:monitoring:MetricAlert
name: example
properties:
name: example-metricalert
resourceGroupName: ${example.name}
scopes:
- ${exampleAnalyticsWorkspace.id}
description: Action will be triggered when Average_% Idle Time metric is less than 10.
frequency: PT1M
windowSize: PT5M
criterias:
- metricNamespace: Microsoft.OperationalInsights/workspaces
metricName: UsedCapacity
aggregation: Average
operator: LessThan
threshold: 10
actions:
- actionGroupId: ${exampleActionGroup.id}
# Example: LogToMetric Action for the named Computer
exampleScheduledQueryRulesLog:
type: azure:monitoring:ScheduledQueryRulesLog
name: example
properties:
name: example
location: ${example.location}
resourceGroupName: ${example.name}
criteria:
metricName: Average_% Idle Time
dimensions:
- name: Computer
operator: Include
values:
- targetVM
dataSourceId: ${exampleAnalyticsWorkspace.id}
description: Scheduled query rule LogToMetric example
enabled: true
tags:
foo: bar
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
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. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- List<string>
- A list of IDs of Resources referred into query.
- Description string
- The description of the scheduled query rule.
- Enabled bool
- Whether this scheduled query rule is enabled. Default is
true
. - Location string
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- Name string
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Criteria
Scheduled
Query Rules Log Criteria Args - A
criteria
block as defined below. - Data
Source stringId - The resource URI over which log search query is to be run. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- []string
- A list of IDs of Resources referred into query.
- Description string
- The description of the scheduled query rule.
- Enabled bool
- Whether this scheduled query rule is enabled. Default is
true
. - Location string
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- Name string
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- map[string]string
- A mapping of tags to assign to the resource.
- criteria
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. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- List<String>
- A list of IDs of Resources referred into query.
- description String
- The description of the scheduled query rule.
- enabled Boolean
- Whether this scheduled query rule is enabled. Default is
true
. - location String
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- name String
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- Map<String,String>
- A mapping of tags to assign to the resource.
- criteria
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. Changing this forces a new resource to be created.
- resource
Group stringName - The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- string[]
- A list of IDs of Resources referred into query.
- description string
- The description of the scheduled query rule.
- enabled boolean
- Whether this scheduled query rule is enabled. Default is
true
. - location string
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- name string
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- criteria
Scheduled
Query Rules Log Criteria Args - A
criteria
block as defined below. - data_
source_ strid - The resource URI over which log search query is to be run. Changing this forces a new resource to be created.
- resource_
group_ strname - The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- Sequence[str]
- A list of IDs of Resources referred into query.
- description str
- The description of the scheduled query rule.
- enabled bool
- Whether this scheduled query rule is enabled. Default is
true
. - location str
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- name str
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- criteria Property Map
- A
criteria
block as defined below. - data
Source StringId - The resource URI over which log search query is to be run. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- List<String>
- A list of IDs of Resources referred into query.
- description String
- The description of the scheduled query rule.
- enabled Boolean
- Whether this scheduled query rule is enabled. Default is
true
. - location String
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- name String
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- Map<String>
- A mapping of tags to assign to the resource.
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)
Resource lookup is not supported in YAML
- 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.
- List<string>
- A list of IDs of Resources referred into query.
- Criteria
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. Changing this forces a new resource to be created.
- Description string
- The description of the scheduled query rule.
- Enabled bool
- Whether this scheduled query rule is enabled. Default is
true
. - Location string
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- Name string
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- []string
- A list of IDs of Resources referred into query.
- Criteria
Scheduled
Query Rules Log Criteria Args - A
criteria
block as defined below. - Data
Source stringId - The resource URI over which log search query is to be run. Changing this forces a new resource to be created.
- Description string
- The description of the scheduled query rule.
- Enabled bool
- Whether this scheduled query rule is enabled. Default is
true
. - Location string
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- Name string
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- map[string]string
- A mapping of tags to assign to the resource.
- List<String>
- A list of IDs of Resources referred into query.
- criteria
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. Changing this forces a new resource to be created.
- description String
- The description of the scheduled query rule.
- enabled Boolean
- Whether this scheduled query rule is enabled. Default is
true
. - location String
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- name String
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- Map<String,String>
- A mapping of tags to assign to the resource.
- string[]
- A list of IDs of Resources referred into query.
- criteria
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. Changing this forces a new resource to be created.
- description string
- The description of the scheduled query rule.
- enabled boolean
- Whether this scheduled query rule is enabled. Default is
true
. - location string
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- name string
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- resource
Group stringName - The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- Sequence[str]
- A list of IDs of Resources referred into query.
- criteria
Scheduled
Query Rules Log Criteria Args - A
criteria
block as defined below. - data_
source_ strid - The resource URI over which log search query is to be run. Changing this forces a new resource to be created.
- description str
- The description of the scheduled query rule.
- enabled bool
- Whether this scheduled query rule is enabled. Default is
true
. - location str
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- name str
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- resource_
group_ strname - The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- List<String>
- A list of IDs of Resources referred into query.
- criteria Property Map
- A
criteria
block as defined below. - data
Source StringId - The resource URI over which log search query is to be run. Changing this forces a new resource to be created.
- description String
- The description of the scheduled query rule.
- enabled Boolean
- Whether this scheduled query rule is enabled. Default is
true
. - location String
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- name String
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- Map<String>
- A mapping of tags to assign to the resource.
Supporting Types
ScheduledQueryRulesLogCriteria, ScheduledQueryRulesLogCriteriaArgs
- Dimensions
List<Scheduled
Query Rules Log Criteria Dimension> - A
dimension
block as defined below. - Metric
Name string - Name of the metric. Supported metrics are listed in the Azure Monitor Microsoft.OperationalInsights/workspaces metrics namespace.
- Dimensions
[]Scheduled
Query Rules Log Criteria Dimension - A
dimension
block as defined below. - Metric
Name string - Name of the metric. Supported metrics are listed in the Azure Monitor Microsoft.OperationalInsights/workspaces metrics namespace.
- dimensions
List<Scheduled
Query Rules Log Criteria Dimension> - A
dimension
block as defined below. - metric
Name String - Name of the metric. Supported metrics are listed in the Azure Monitor Microsoft.OperationalInsights/workspaces metrics namespace.
- dimensions
Scheduled
Query Rules Log Criteria Dimension[] - A
dimension
block as defined below. - metric
Name string - Name of the metric. Supported metrics are listed in the Azure Monitor Microsoft.OperationalInsights/workspaces metrics namespace.
- dimensions
Sequence[Scheduled
Query Rules Log Criteria Dimension] - 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. - metric
Name String - Name of the metric. Supported metrics are listed in the Azure Monitor Microsoft.OperationalInsights/workspaces metrics namespace.
ScheduledQueryRulesLogCriteriaDimension, ScheduledQueryRulesLogCriteriaDimensionArgs
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.