Azure Native
AlertRule
Deprecated:
Please use one of the variants: FusionAlertRule, MicrosoftSecurityIncidentCreationAlertRule, ScheduledAlertRule.
Alert rule. API Version: 2020-01-01.
Example Usage
Creates or updates a Fusion alert rule.
using Pulumi;
using AzureNative = Pulumi.AzureNative;
class MyStack : Stack
{
public MyStack()
{
var alertRule = new AzureNative.SecurityInsights.AlertRule("alertRule", new AzureNative.SecurityInsights.AlertRuleArgs
{
Kind = "Fusion",
ResourceGroupName = "myRg",
RuleId = "myFirstFusionRule",
WorkspaceName = "myWorkspace",
});
}
}
package main
import (
securityinsights "github.com/pulumi/pulumi-azure-native/sdk/go/azure/securityinsights"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := securityinsights.NewAlertRule(ctx, "alertRule", &securityinsights.AlertRuleArgs{
Kind: pulumi.String("Fusion"),
ResourceGroupName: pulumi.String("myRg"),
RuleId: pulumi.String("myFirstFusionRule"),
WorkspaceName: pulumi.String("myWorkspace"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var alertRule = new AlertRule("alertRule", AlertRuleArgs.builder()
.kind("Fusion")
.resourceGroupName("myRg")
.ruleId("myFirstFusionRule")
.workspaceName("myWorkspace")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
alert_rule = azure_native.securityinsights.AlertRule("alertRule",
kind="Fusion",
resource_group_name="myRg",
rule_id="myFirstFusionRule",
workspace_name="myWorkspace")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const alertRule = new azure_native.securityinsights.AlertRule("alertRule", {
kind: "Fusion",
resourceGroupName: "myRg",
ruleId: "myFirstFusionRule",
workspaceName: "myWorkspace",
});
resources:
alertRule:
type: azure-native:securityinsights:AlertRule
properties:
kind: Fusion
resourceGroupName: myRg
ruleId: myFirstFusionRule
workspaceName: myWorkspace
Creates or updates a MicrosoftSecurityIncidentCreation rule.
using Pulumi;
using AzureNative = Pulumi.AzureNative;
class MyStack : Stack
{
public MyStack()
{
var alertRule = new AzureNative.SecurityInsights.AlertRule("alertRule", new AzureNative.SecurityInsights.AlertRuleArgs
{
Kind = "MicrosoftSecurityIncidentCreation",
ResourceGroupName = "myRg",
RuleId = "microsoftSecurityIncidentCreationRuleExample",
WorkspaceName = "myWorkspace",
});
}
}
package main
import (
securityinsights "github.com/pulumi/pulumi-azure-native/sdk/go/azure/securityinsights"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := securityinsights.NewAlertRule(ctx, "alertRule", &securityinsights.AlertRuleArgs{
Kind: pulumi.String("MicrosoftSecurityIncidentCreation"),
ResourceGroupName: pulumi.String("myRg"),
RuleId: pulumi.String("microsoftSecurityIncidentCreationRuleExample"),
WorkspaceName: pulumi.String("myWorkspace"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var alertRule = new AlertRule("alertRule", AlertRuleArgs.builder()
.kind("MicrosoftSecurityIncidentCreation")
.resourceGroupName("myRg")
.ruleId("microsoftSecurityIncidentCreationRuleExample")
.workspaceName("myWorkspace")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
alert_rule = azure_native.securityinsights.AlertRule("alertRule",
kind="MicrosoftSecurityIncidentCreation",
resource_group_name="myRg",
rule_id="microsoftSecurityIncidentCreationRuleExample",
workspace_name="myWorkspace")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const alertRule = new azure_native.securityinsights.AlertRule("alertRule", {
kind: "MicrosoftSecurityIncidentCreation",
resourceGroupName: "myRg",
ruleId: "microsoftSecurityIncidentCreationRuleExample",
workspaceName: "myWorkspace",
});
resources:
alertRule:
type: azure-native:securityinsights:AlertRule
properties:
kind: MicrosoftSecurityIncidentCreation
resourceGroupName: myRg
ruleId: microsoftSecurityIncidentCreationRuleExample
workspaceName: myWorkspace
Creates or updates a Scheduled alert rule.
using Pulumi;
using AzureNative = Pulumi.AzureNative;
class MyStack : Stack
{
public MyStack()
{
var alertRule = new AzureNative.SecurityInsights.AlertRule("alertRule", new AzureNative.SecurityInsights.AlertRuleArgs
{
Kind = "Scheduled",
ResourceGroupName = "myRg",
RuleId = "73e01a99-5cd7-4139-a149-9f2736ff2ab5",
WorkspaceName = "myWorkspace",
});
}
}
package main
import (
securityinsights "github.com/pulumi/pulumi-azure-native/sdk/go/azure/securityinsights"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := securityinsights.NewAlertRule(ctx, "alertRule", &securityinsights.AlertRuleArgs{
Kind: pulumi.String("Scheduled"),
ResourceGroupName: pulumi.String("myRg"),
RuleId: pulumi.String("73e01a99-5cd7-4139-a149-9f2736ff2ab5"),
WorkspaceName: pulumi.String("myWorkspace"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var alertRule = new AlertRule("alertRule", AlertRuleArgs.builder()
.kind("Scheduled")
.resourceGroupName("myRg")
.ruleId("73e01a99-5cd7-4139-a149-9f2736ff2ab5")
.workspaceName("myWorkspace")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
alert_rule = azure_native.securityinsights.AlertRule("alertRule",
kind="Scheduled",
resource_group_name="myRg",
rule_id="73e01a99-5cd7-4139-a149-9f2736ff2ab5",
workspace_name="myWorkspace")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const alertRule = new azure_native.securityinsights.AlertRule("alertRule", {
kind: "Scheduled",
resourceGroupName: "myRg",
ruleId: "73e01a99-5cd7-4139-a149-9f2736ff2ab5",
workspaceName: "myWorkspace",
});
resources:
alertRule:
type: azure-native:securityinsights:AlertRule
properties:
kind: Scheduled
resourceGroupName: myRg
ruleId: 73e01a99-5cd7-4139-a149-9f2736ff2ab5
workspaceName: myWorkspace
Create a AlertRule Resource
new AlertRule(name: string, args: AlertRuleArgs, opts?: CustomResourceOptions);
@overload
def AlertRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
kind: Optional[Union[str, AlertRuleKind]] = None,
resource_group_name: Optional[str] = None,
rule_id: Optional[str] = None,
workspace_name: Optional[str] = None)
@overload
def AlertRule(resource_name: str,
args: AlertRuleArgs,
opts: Optional[ResourceOptions] = None)
func NewAlertRule(ctx *Context, name string, args AlertRuleArgs, opts ...ResourceOption) (*AlertRule, error)
public AlertRule(string name, AlertRuleArgs args, CustomResourceOptions? opts = null)
public AlertRule(String name, AlertRuleArgs args)
public AlertRule(String name, AlertRuleArgs args, CustomResourceOptions options)
type: azure-native:securityinsights:AlertRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlertRuleArgs
- 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 AlertRuleArgs
- 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 AlertRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlertRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AlertRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
AlertRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The AlertRule resource accepts the following input properties:
- Kind
string | Pulumi.
Azure Native. Security Insights. Alert Rule Kind The alert rule kind
- Resource
Group stringName The name of the resource group within the user's subscription. The name is case insensitive.
- Workspace
Name string The name of the workspace.
- Rule
Id string Alert rule ID
- Kind
string | Alert
Rule Kind The alert rule kind
- Resource
Group stringName The name of the resource group within the user's subscription. The name is case insensitive.
- Workspace
Name string The name of the workspace.
- Rule
Id string Alert rule ID
- kind
String | Alert
Rule Kind The alert rule kind
- resource
Group StringName The name of the resource group within the user's subscription. The name is case insensitive.
- workspace
Name String The name of the workspace.
- rule
Id String Alert rule ID
- kind
string | Alert
Rule Kind The alert rule kind
- resource
Group stringName The name of the resource group within the user's subscription. The name is case insensitive.
- workspace
Name string The name of the workspace.
- rule
Id string Alert rule ID
- kind
str | Alert
Rule Kind The alert rule kind
- resource_
group_ strname The name of the resource group within the user's subscription. The name is case insensitive.
- workspace_
name str The name of the workspace.
- rule_
id str Alert rule ID
- kind
String | "Scheduled" | "Microsoft
Security Incident Creation" | "Fusion" The alert rule kind
- resource
Group StringName The name of the resource group within the user's subscription. The name is case insensitive.
- workspace
Name String The name of the workspace.
- rule
Id String Alert rule ID
Outputs
All input properties are implicitly available as output properties. Additionally, the AlertRule resource produces the following output properties:
Supporting Types
AlertRuleKind
- Scheduled
- Scheduled
- Microsoft
Security Incident Creation - MicrosoftSecurityIncidentCreation
- Fusion
- Fusion
- Alert
Rule Kind Scheduled - Scheduled
- Alert
Rule Kind Microsoft Security Incident Creation - MicrosoftSecurityIncidentCreation
- Alert
Rule Kind Fusion - Fusion
- Scheduled
- Scheduled
- Microsoft
Security Incident Creation - MicrosoftSecurityIncidentCreation
- Fusion
- Fusion
- Scheduled
- Scheduled
- Microsoft
Security Incident Creation - MicrosoftSecurityIncidentCreation
- Fusion
- Fusion
- SCHEDULED
- Scheduled
- MICROSOFT_SECURITY_INCIDENT_CREATION
- MicrosoftSecurityIncidentCreation
- FUSION
- Fusion
- "Scheduled"
- Scheduled
- "Microsoft
Security Incident Creation" - MicrosoftSecurityIncidentCreation
- "Fusion"
- Fusion
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:securityinsights:AlertRule 73e01a99-5cd7-4139-a149-9f2736ff2ab5 /subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/alertRules/73e01a99-5cd7-4139-a149-9f2736ff2ab5
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure-native
- License
- Apache-2.0