Class GetAlertRule
Inheritance
System.Object
GetAlertRule
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Azure.Sentinel
Assembly: Pulumi.Azure.dll
Syntax
public static class GetAlertRule
Methods
View SourceInvokeAsync(GetAlertRuleArgs, InvokeOptions)
Use this data source to access information about an existing Sentinel Alert Rule.
{{% examples %}}
Example Usage
{{% example %}}
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleAnalyticsWorkspace = Output.Create(Azure.OperationalInsights.GetAnalyticsWorkspace.InvokeAsync(new Azure.OperationalInsights.GetAnalyticsWorkspaceArgs
{
Name = "example",
ResourceGroupName = "example-resources",
}));
var exampleAlertRule = exampleAnalyticsWorkspace.Apply(exampleAnalyticsWorkspace => Output.Create(Azure.Sentinel.GetAlertRule.InvokeAsync(new Azure.Sentinel.GetAlertRuleArgs
{
Name = "existing",
LogAnalyticsWorkspaceId = exampleAnalyticsWorkspace.Id,
})));
this.Id = exampleAlertRule.Apply(exampleAlertRule => exampleAlertRule.Id);
}
[Output("id")]
public Output<string> Id { get; set; }
}
{{% /example %}} {{% /examples %}}
Declaration
public static Task<GetAlertRuleResult> InvokeAsync(GetAlertRuleArgs args, InvokeOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetAlertRuleArgs | args | |
| InvokeOptions | options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<GetAlertRuleResult> |