We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
Manages a LogToMetricAction Scheduled Query Rules resource within Azure Monitor.
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
criteriablock as defined below. - Data
Source stringId - The resource uri over which log search query is to be run.
- Resource
Group stringName - The name of the resource group in which to create the scheduled query rule instance.
- List<string>
- Description string
- The description of the scheduled query rule.
- Enabled bool
- Whether this scheduled query rule is enabled. Default is
true. - Location string
- Name string
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- Dictionary<string, string>
- Criteria
Scheduled
Query Rules Log Criteria Args - A
criteriablock as defined below. - Data
Source stringId - The resource uri over which log search query is to be run.
- Resource
Group stringName - The name of the resource group in which to create the scheduled query rule instance.
- []string
- Description string
- The description of the scheduled query rule.
- Enabled bool
- Whether this scheduled query rule is enabled. Default is
true. - Location string
- Name string
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- map[string]string
- criteria
Scheduled
Query Rules Log Criteria - A
criteriablock as defined below. - data
Source StringId - The resource uri over which log search query is to be run.
- resource
Group StringName - The name of the resource group in which to create the scheduled query rule instance.
- List<String>
- description String
- The description of the scheduled query rule.
- enabled Boolean
- Whether this scheduled query rule is enabled. Default is
true. - location String
- name String
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- Map<String,String>
- criteria
Scheduled
Query Rules Log Criteria - A
criteriablock as defined below. - data
Source stringId - The resource uri over which log search query is to be run.
- resource
Group stringName - The name of the resource group in which to create the scheduled query rule instance.
- string[]
- description string
- The description of the scheduled query rule.
- enabled boolean
- Whether this scheduled query rule is enabled. Default is
true. - location string
- name string
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- {[key: string]: string}
- criteria
Scheduled
Query Rules Log Criteria Args - A
criteriablock as defined below. - data_
source_ strid - The resource uri over which log search query is to be run.
- resource_
group_ strname - The name of the resource group in which to create the scheduled query rule instance.
- Sequence[str]
- description str
- The description of the scheduled query rule.
- enabled bool
- Whether this scheduled query rule is enabled. Default is
true. - location str
- name str
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- Mapping[str, str]
- criteria Property Map
- A
criteriablock as defined below. - data
Source StringId - The resource uri over which log search query is to be run.
- resource
Group StringName - The name of the resource group in which to create the scheduled query rule instance.
- List<String>
- description String
- The description of the scheduled query rule.
- enabled Boolean
- Whether this scheduled query rule is enabled. Default is
true. - location String
- name String
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- Map<String>
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) -> ScheduledQueryRulesLogfunc 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)resources: _: type: azure:monitoring:ScheduledQueryRulesLog get: id: ${id}- 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>
- Criteria
Scheduled
Query Rules Log Criteria - A
criteriablock 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. Default is
true. - Location string
- 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.
- Dictionary<string, string>
- []string
- Criteria
Scheduled
Query Rules Log Criteria Args - A
criteriablock 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. Default is
true. - Location string
- 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.
- map[string]string
- List<String>
- criteria
Scheduled
Query Rules Log Criteria - A
criteriablock 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. Default is
true. - location String
- 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.
- Map<String,String>
- string[]
- criteria
Scheduled
Query Rules Log Criteria - A
criteriablock 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. Default is
true. - location string
- 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.
- {[key: string]: string}
- Sequence[str]
- criteria
Scheduled
Query Rules Log Criteria Args - 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. Default is
true. - location str
- 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.
- Mapping[str, str]
- List<String>
- criteria Property Map
- A
criteriablock 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. Default is
true. - location String
- 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.
- Map<String>
Supporting Types
ScheduledQueryRulesLogCriteria, ScheduledQueryRulesLogCriteriaArgs
- Dimensions
List<Scheduled
Query Rules Log Criteria Dimension> - A
dimensionblock 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
dimensionblock 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
dimensionblock 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
dimensionblock 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
dimensionblock 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
dimensionblock 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
azurermTerraform Provider.
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
