/
getScheduledQueryRulesLog.go
71 lines (66 loc) · 2.49 KB
/
getScheduledQueryRulesLog.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package monitoring
import (
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Use this data source to access the properties of a LogToMetricAction scheduled query rule.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/monitoring"
// "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := monitoring.LookupScheduledQueryRulesLog(ctx, &monitoring.LookupScheduledQueryRulesLogArgs{
// Name: "tfex-queryrule",
// ResourceGroupName: "example-rg",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("queryRuleId", example.Id)
// return nil
// })
// }
// ```
func LookupScheduledQueryRulesLog(ctx *pulumi.Context, args *LookupScheduledQueryRulesLogArgs, opts ...pulumi.InvokeOption) (*LookupScheduledQueryRulesLogResult, error) {
var rv LookupScheduledQueryRulesLogResult
err := ctx.Invoke("azure:monitoring/getScheduledQueryRulesLog:getScheduledQueryRulesLog", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getScheduledQueryRulesLog.
type LookupScheduledQueryRulesLogArgs struct {
// Specifies the name of the scheduled query rule.
Name string `pulumi:"name"`
// Specifies the name of the resource group where the scheduled query rule is located.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getScheduledQueryRulesLog.
type LookupScheduledQueryRulesLogResult struct {
AuthorizedResourceIds []string `pulumi:"authorizedResourceIds"`
// A `criteria` block as defined below.
Criterias []GetScheduledQueryRulesLogCriteria `pulumi:"criterias"`
// The resource URI over which log search query is to be run.
DataSourceId string `pulumi:"dataSourceId"`
// The description of the scheduled query rule.
Description string `pulumi:"description"`
// Whether this scheduled query rule is enabled.
Enabled bool `pulumi:"enabled"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Location string `pulumi:"location"`
// Name of the dimension.
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
Tags map[string]string `pulumi:"tags"`
}