1. Packages
  2. Azure Classic
  3. API Docs
  4. monitoring
  5. SmartDetectorAlertRule

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

azure.monitoring.SmartDetectorAlertRule

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

    Manages an Monitor Smart Detector Alert Rule.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleInsights = new azure.appinsights.Insights("example", {
        name: "example-appinsights",
        location: example.location,
        resourceGroupName: example.name,
        applicationType: "web",
    });
    const exampleActionGroup = new azure.monitoring.ActionGroup("example", {
        name: "example-action-group",
        resourceGroupName: example.name,
        shortName: "example",
    });
    const exampleSmartDetectorAlertRule = new azure.monitoring.SmartDetectorAlertRule("example", {
        name: "example-smart-detector-alert-rule",
        resourceGroupName: example.name,
        severity: "Sev0",
        scopeResourceIds: [exampleInsights.id],
        frequency: "PT1M",
        detectorType: "FailureAnomaliesDetector",
        actionGroup: {
            ids: [exampleActionGroup.id],
        },
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_insights = azure.appinsights.Insights("example",
        name="example-appinsights",
        location=example.location,
        resource_group_name=example.name,
        application_type="web")
    example_action_group = azure.monitoring.ActionGroup("example",
        name="example-action-group",
        resource_group_name=example.name,
        short_name="example")
    example_smart_detector_alert_rule = azure.monitoring.SmartDetectorAlertRule("example",
        name="example-smart-detector-alert-rule",
        resource_group_name=example.name,
        severity="Sev0",
        scope_resource_ids=[example_insights.id],
        frequency="PT1M",
        detector_type="FailureAnomaliesDetector",
        action_group={
            "ids": [example_action_group.id],
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring"
    	"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("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
    			Name:              pulumi.String("example-appinsights"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			ApplicationType:   pulumi.String("web"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleActionGroup, err := monitoring.NewActionGroup(ctx, "example", &monitoring.ActionGroupArgs{
    			Name:              pulumi.String("example-action-group"),
    			ResourceGroupName: example.Name,
    			ShortName:         pulumi.String("example"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = monitoring.NewSmartDetectorAlertRule(ctx, "example", &monitoring.SmartDetectorAlertRuleArgs{
    			Name:              pulumi.String("example-smart-detector-alert-rule"),
    			ResourceGroupName: example.Name,
    			Severity:          pulumi.String("Sev0"),
    			ScopeResourceIds: pulumi.StringArray{
    				exampleInsights.ID(),
    			},
    			Frequency:    pulumi.String("PT1M"),
    			DetectorType: pulumi.String("FailureAnomaliesDetector"),
    			ActionGroup: &monitoring.SmartDetectorAlertRuleActionGroupArgs{
    				Ids: pulumi.StringArray{
    					exampleActionGroup.ID(),
    				},
    			},
    		})
    		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 = "example-resources",
            Location = "West Europe",
        });
    
        var exampleInsights = new Azure.AppInsights.Insights("example", new()
        {
            Name = "example-appinsights",
            Location = example.Location,
            ResourceGroupName = example.Name,
            ApplicationType = "web",
        });
    
        var exampleActionGroup = new Azure.Monitoring.ActionGroup("example", new()
        {
            Name = "example-action-group",
            ResourceGroupName = example.Name,
            ShortName = "example",
        });
    
        var exampleSmartDetectorAlertRule = new Azure.Monitoring.SmartDetectorAlertRule("example", new()
        {
            Name = "example-smart-detector-alert-rule",
            ResourceGroupName = example.Name,
            Severity = "Sev0",
            ScopeResourceIds = new[]
            {
                exampleInsights.Id,
            },
            Frequency = "PT1M",
            DetectorType = "FailureAnomaliesDetector",
            ActionGroup = new Azure.Monitoring.Inputs.SmartDetectorAlertRuleActionGroupArgs
            {
                Ids = new[]
                {
                    exampleActionGroup.Id,
                },
            },
        });
    
    });
    
    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.appinsights.Insights;
    import com.pulumi.azure.appinsights.InsightsArgs;
    import com.pulumi.azure.monitoring.ActionGroup;
    import com.pulumi.azure.monitoring.ActionGroupArgs;
    import com.pulumi.azure.monitoring.SmartDetectorAlertRule;
    import com.pulumi.azure.monitoring.SmartDetectorAlertRuleArgs;
    import com.pulumi.azure.monitoring.inputs.SmartDetectorAlertRuleActionGroupArgs;
    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("example-resources")
                .location("West Europe")
                .build());
    
            var exampleInsights = new Insights("exampleInsights", InsightsArgs.builder()
                .name("example-appinsights")
                .location(example.location())
                .resourceGroupName(example.name())
                .applicationType("web")
                .build());
    
            var exampleActionGroup = new ActionGroup("exampleActionGroup", ActionGroupArgs.builder()
                .name("example-action-group")
                .resourceGroupName(example.name())
                .shortName("example")
                .build());
    
            var exampleSmartDetectorAlertRule = new SmartDetectorAlertRule("exampleSmartDetectorAlertRule", SmartDetectorAlertRuleArgs.builder()
                .name("example-smart-detector-alert-rule")
                .resourceGroupName(example.name())
                .severity("Sev0")
                .scopeResourceIds(exampleInsights.id())
                .frequency("PT1M")
                .detectorType("FailureAnomaliesDetector")
                .actionGroup(SmartDetectorAlertRuleActionGroupArgs.builder()
                    .ids(exampleActionGroup.id())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleInsights:
        type: azure:appinsights:Insights
        name: example
        properties:
          name: example-appinsights
          location: ${example.location}
          resourceGroupName: ${example.name}
          applicationType: web
      exampleActionGroup:
        type: azure:monitoring:ActionGroup
        name: example
        properties:
          name: example-action-group
          resourceGroupName: ${example.name}
          shortName: example
      exampleSmartDetectorAlertRule:
        type: azure:monitoring:SmartDetectorAlertRule
        name: example
        properties:
          name: example-smart-detector-alert-rule
          resourceGroupName: ${example.name}
          severity: Sev0
          scopeResourceIds:
            - ${exampleInsights.id}
          frequency: PT1M
          detectorType: FailureAnomaliesDetector
          actionGroup:
            ids:
              - ${exampleActionGroup.id}
    

    Create SmartDetectorAlertRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SmartDetectorAlertRule(name: string, args: SmartDetectorAlertRuleArgs, opts?: CustomResourceOptions);
    @overload
    def SmartDetectorAlertRule(resource_name: str,
                               args: SmartDetectorAlertRuleArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def SmartDetectorAlertRule(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               action_group: Optional[SmartDetectorAlertRuleActionGroupArgs] = None,
                               detector_type: Optional[str] = None,
                               frequency: Optional[str] = None,
                               resource_group_name: Optional[str] = None,
                               scope_resource_ids: Optional[Sequence[str]] = None,
                               severity: Optional[str] = None,
                               description: Optional[str] = None,
                               enabled: Optional[bool] = None,
                               name: Optional[str] = None,
                               tags: Optional[Mapping[str, str]] = None,
                               throttling_duration: Optional[str] = None)
    func NewSmartDetectorAlertRule(ctx *Context, name string, args SmartDetectorAlertRuleArgs, opts ...ResourceOption) (*SmartDetectorAlertRule, error)
    public SmartDetectorAlertRule(string name, SmartDetectorAlertRuleArgs args, CustomResourceOptions? opts = null)
    public SmartDetectorAlertRule(String name, SmartDetectorAlertRuleArgs args)
    public SmartDetectorAlertRule(String name, SmartDetectorAlertRuleArgs args, CustomResourceOptions options)
    
    type: azure:monitoring:SmartDetectorAlertRule
    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 SmartDetectorAlertRuleArgs
    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 SmartDetectorAlertRuleArgs
    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 SmartDetectorAlertRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SmartDetectorAlertRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SmartDetectorAlertRuleArgs
    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 smartDetectorAlertRuleResource = new Azure.Monitoring.SmartDetectorAlertRule("smartDetectorAlertRuleResource", new()
    {
        ActionGroup = new Azure.Monitoring.Inputs.SmartDetectorAlertRuleActionGroupArgs
        {
            Ids = new[]
            {
                "string",
            },
            EmailSubject = "string",
            WebhookPayload = "string",
        },
        DetectorType = "string",
        Frequency = "string",
        ResourceGroupName = "string",
        ScopeResourceIds = new[]
        {
            "string",
        },
        Severity = "string",
        Description = "string",
        Enabled = false,
        Name = "string",
        Tags = 
        {
            { "string", "string" },
        },
        ThrottlingDuration = "string",
    });
    
    example, err := monitoring.NewSmartDetectorAlertRule(ctx, "smartDetectorAlertRuleResource", &monitoring.SmartDetectorAlertRuleArgs{
    	ActionGroup: &monitoring.SmartDetectorAlertRuleActionGroupArgs{
    		Ids: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		EmailSubject:   pulumi.String("string"),
    		WebhookPayload: pulumi.String("string"),
    	},
    	DetectorType:      pulumi.String("string"),
    	Frequency:         pulumi.String("string"),
    	ResourceGroupName: pulumi.String("string"),
    	ScopeResourceIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Severity:    pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Enabled:     pulumi.Bool(false),
    	Name:        pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	ThrottlingDuration: pulumi.String("string"),
    })
    
    var smartDetectorAlertRuleResource = new SmartDetectorAlertRule("smartDetectorAlertRuleResource", SmartDetectorAlertRuleArgs.builder()
        .actionGroup(SmartDetectorAlertRuleActionGroupArgs.builder()
            .ids("string")
            .emailSubject("string")
            .webhookPayload("string")
            .build())
        .detectorType("string")
        .frequency("string")
        .resourceGroupName("string")
        .scopeResourceIds("string")
        .severity("string")
        .description("string")
        .enabled(false)
        .name("string")
        .tags(Map.of("string", "string"))
        .throttlingDuration("string")
        .build());
    
    smart_detector_alert_rule_resource = azure.monitoring.SmartDetectorAlertRule("smartDetectorAlertRuleResource",
        action_group={
            "ids": ["string"],
            "emailSubject": "string",
            "webhookPayload": "string",
        },
        detector_type="string",
        frequency="string",
        resource_group_name="string",
        scope_resource_ids=["string"],
        severity="string",
        description="string",
        enabled=False,
        name="string",
        tags={
            "string": "string",
        },
        throttling_duration="string")
    
    const smartDetectorAlertRuleResource = new azure.monitoring.SmartDetectorAlertRule("smartDetectorAlertRuleResource", {
        actionGroup: {
            ids: ["string"],
            emailSubject: "string",
            webhookPayload: "string",
        },
        detectorType: "string",
        frequency: "string",
        resourceGroupName: "string",
        scopeResourceIds: ["string"],
        severity: "string",
        description: "string",
        enabled: false,
        name: "string",
        tags: {
            string: "string",
        },
        throttlingDuration: "string",
    });
    
    type: azure:monitoring:SmartDetectorAlertRule
    properties:
        actionGroup:
            emailSubject: string
            ids:
                - string
            webhookPayload: string
        description: string
        detectorType: string
        enabled: false
        frequency: string
        name: string
        resourceGroupName: string
        scopeResourceIds:
            - string
        severity: string
        tags:
            string: string
        throttlingDuration: string
    

    SmartDetectorAlertRule 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 SmartDetectorAlertRule resource accepts the following input properties:

    ActionGroup SmartDetectorAlertRuleActionGroup
    An action_group block as defined below.
    DetectorType string
    Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are FailureAnomaliesDetector, RequestPerformanceDegradationDetector, DependencyPerformanceDegradationDetector, ExceptionVolumeChangedDetector, TraceSeverityDetector, MemoryLeakDetector.
    Frequency string
    Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format.
    ResourceGroupName string
    Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created.
    ScopeResourceIds List<string>
    Specifies the scopes of this Smart Detector Alert Rule.
    Severity string
    Specifies the severity of this Smart Detector Alert Rule. Possible values are Sev0, Sev1, Sev2, Sev3 or Sev4.
    Description string
    Specifies a description for the Smart Detector Alert Rule.
    Enabled bool
    Is the Smart Detector Alert Rule enabled? Defaults to true.
    Name string
    Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    ThrottlingDuration string
    Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again.
    ActionGroup SmartDetectorAlertRuleActionGroupArgs
    An action_group block as defined below.
    DetectorType string
    Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are FailureAnomaliesDetector, RequestPerformanceDegradationDetector, DependencyPerformanceDegradationDetector, ExceptionVolumeChangedDetector, TraceSeverityDetector, MemoryLeakDetector.
    Frequency string
    Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format.
    ResourceGroupName string
    Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created.
    ScopeResourceIds []string
    Specifies the scopes of this Smart Detector Alert Rule.
    Severity string
    Specifies the severity of this Smart Detector Alert Rule. Possible values are Sev0, Sev1, Sev2, Sev3 or Sev4.
    Description string
    Specifies a description for the Smart Detector Alert Rule.
    Enabled bool
    Is the Smart Detector Alert Rule enabled? Defaults to true.
    Name string
    Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    ThrottlingDuration string
    Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again.
    actionGroup SmartDetectorAlertRuleActionGroup
    An action_group block as defined below.
    detectorType String
    Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are FailureAnomaliesDetector, RequestPerformanceDegradationDetector, DependencyPerformanceDegradationDetector, ExceptionVolumeChangedDetector, TraceSeverityDetector, MemoryLeakDetector.
    frequency String
    Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format.
    resourceGroupName String
    Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created.
    scopeResourceIds List<String>
    Specifies the scopes of this Smart Detector Alert Rule.
    severity String
    Specifies the severity of this Smart Detector Alert Rule. Possible values are Sev0, Sev1, Sev2, Sev3 or Sev4.
    description String
    Specifies a description for the Smart Detector Alert Rule.
    enabled Boolean
    Is the Smart Detector Alert Rule enabled? Defaults to true.
    name String
    Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    throttlingDuration String
    Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again.
    actionGroup SmartDetectorAlertRuleActionGroup
    An action_group block as defined below.
    detectorType string
    Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are FailureAnomaliesDetector, RequestPerformanceDegradationDetector, DependencyPerformanceDegradationDetector, ExceptionVolumeChangedDetector, TraceSeverityDetector, MemoryLeakDetector.
    frequency string
    Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format.
    resourceGroupName string
    Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created.
    scopeResourceIds string[]
    Specifies the scopes of this Smart Detector Alert Rule.
    severity string
    Specifies the severity of this Smart Detector Alert Rule. Possible values are Sev0, Sev1, Sev2, Sev3 or Sev4.
    description string
    Specifies a description for the Smart Detector Alert Rule.
    enabled boolean
    Is the Smart Detector Alert Rule enabled? Defaults to true.
    name string
    Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    throttlingDuration string
    Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again.
    action_group SmartDetectorAlertRuleActionGroupArgs
    An action_group block as defined below.
    detector_type str
    Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are FailureAnomaliesDetector, RequestPerformanceDegradationDetector, DependencyPerformanceDegradationDetector, ExceptionVolumeChangedDetector, TraceSeverityDetector, MemoryLeakDetector.
    frequency str
    Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format.
    resource_group_name str
    Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created.
    scope_resource_ids Sequence[str]
    Specifies the scopes of this Smart Detector Alert Rule.
    severity str
    Specifies the severity of this Smart Detector Alert Rule. Possible values are Sev0, Sev1, Sev2, Sev3 or Sev4.
    description str
    Specifies a description for the Smart Detector Alert Rule.
    enabled bool
    Is the Smart Detector Alert Rule enabled? Defaults to true.
    name str
    Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    throttling_duration str
    Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again.
    actionGroup Property Map
    An action_group block as defined below.
    detectorType String
    Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are FailureAnomaliesDetector, RequestPerformanceDegradationDetector, DependencyPerformanceDegradationDetector, ExceptionVolumeChangedDetector, TraceSeverityDetector, MemoryLeakDetector.
    frequency String
    Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format.
    resourceGroupName String
    Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created.
    scopeResourceIds List<String>
    Specifies the scopes of this Smart Detector Alert Rule.
    severity String
    Specifies the severity of this Smart Detector Alert Rule. Possible values are Sev0, Sev1, Sev2, Sev3 or Sev4.
    description String
    Specifies a description for the Smart Detector Alert Rule.
    enabled Boolean
    Is the Smart Detector Alert Rule enabled? Defaults to true.
    name String
    Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created.
    tags Map<String>
    A mapping of tags to assign to the resource.
    throttlingDuration String
    Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SmartDetectorAlertRule 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 SmartDetectorAlertRule Resource

    Get an existing SmartDetectorAlertRule 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?: SmartDetectorAlertRuleState, opts?: CustomResourceOptions): SmartDetectorAlertRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action_group: Optional[SmartDetectorAlertRuleActionGroupArgs] = None,
            description: Optional[str] = None,
            detector_type: Optional[str] = None,
            enabled: Optional[bool] = None,
            frequency: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            scope_resource_ids: Optional[Sequence[str]] = None,
            severity: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            throttling_duration: Optional[str] = None) -> SmartDetectorAlertRule
    func GetSmartDetectorAlertRule(ctx *Context, name string, id IDInput, state *SmartDetectorAlertRuleState, opts ...ResourceOption) (*SmartDetectorAlertRule, error)
    public static SmartDetectorAlertRule Get(string name, Input<string> id, SmartDetectorAlertRuleState? state, CustomResourceOptions? opts = null)
    public static SmartDetectorAlertRule get(String name, Output<String> id, SmartDetectorAlertRuleState 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.
    The following state arguments are supported:
    ActionGroup SmartDetectorAlertRuleActionGroup
    An action_group block as defined below.
    Description string
    Specifies a description for the Smart Detector Alert Rule.
    DetectorType string
    Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are FailureAnomaliesDetector, RequestPerformanceDegradationDetector, DependencyPerformanceDegradationDetector, ExceptionVolumeChangedDetector, TraceSeverityDetector, MemoryLeakDetector.
    Enabled bool
    Is the Smart Detector Alert Rule enabled? Defaults to true.
    Frequency string
    Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format.
    Name string
    Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created.
    ResourceGroupName string
    Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created.
    ScopeResourceIds List<string>
    Specifies the scopes of this Smart Detector Alert Rule.
    Severity string
    Specifies the severity of this Smart Detector Alert Rule. Possible values are Sev0, Sev1, Sev2, Sev3 or Sev4.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    ThrottlingDuration string
    Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again.
    ActionGroup SmartDetectorAlertRuleActionGroupArgs
    An action_group block as defined below.
    Description string
    Specifies a description for the Smart Detector Alert Rule.
    DetectorType string
    Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are FailureAnomaliesDetector, RequestPerformanceDegradationDetector, DependencyPerformanceDegradationDetector, ExceptionVolumeChangedDetector, TraceSeverityDetector, MemoryLeakDetector.
    Enabled bool
    Is the Smart Detector Alert Rule enabled? Defaults to true.
    Frequency string
    Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format.
    Name string
    Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created.
    ResourceGroupName string
    Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created.
    ScopeResourceIds []string
    Specifies the scopes of this Smart Detector Alert Rule.
    Severity string
    Specifies the severity of this Smart Detector Alert Rule. Possible values are Sev0, Sev1, Sev2, Sev3 or Sev4.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    ThrottlingDuration string
    Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again.
    actionGroup SmartDetectorAlertRuleActionGroup
    An action_group block as defined below.
    description String
    Specifies a description for the Smart Detector Alert Rule.
    detectorType String
    Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are FailureAnomaliesDetector, RequestPerformanceDegradationDetector, DependencyPerformanceDegradationDetector, ExceptionVolumeChangedDetector, TraceSeverityDetector, MemoryLeakDetector.
    enabled Boolean
    Is the Smart Detector Alert Rule enabled? Defaults to true.
    frequency String
    Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format.
    name String
    Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created.
    resourceGroupName String
    Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created.
    scopeResourceIds List<String>
    Specifies the scopes of this Smart Detector Alert Rule.
    severity String
    Specifies the severity of this Smart Detector Alert Rule. Possible values are Sev0, Sev1, Sev2, Sev3 or Sev4.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    throttlingDuration String
    Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again.
    actionGroup SmartDetectorAlertRuleActionGroup
    An action_group block as defined below.
    description string
    Specifies a description for the Smart Detector Alert Rule.
    detectorType string
    Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are FailureAnomaliesDetector, RequestPerformanceDegradationDetector, DependencyPerformanceDegradationDetector, ExceptionVolumeChangedDetector, TraceSeverityDetector, MemoryLeakDetector.
    enabled boolean
    Is the Smart Detector Alert Rule enabled? Defaults to true.
    frequency string
    Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format.
    name string
    Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created.
    resourceGroupName string
    Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created.
    scopeResourceIds string[]
    Specifies the scopes of this Smart Detector Alert Rule.
    severity string
    Specifies the severity of this Smart Detector Alert Rule. Possible values are Sev0, Sev1, Sev2, Sev3 or Sev4.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    throttlingDuration string
    Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again.
    action_group SmartDetectorAlertRuleActionGroupArgs
    An action_group block as defined below.
    description str
    Specifies a description for the Smart Detector Alert Rule.
    detector_type str
    Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are FailureAnomaliesDetector, RequestPerformanceDegradationDetector, DependencyPerformanceDegradationDetector, ExceptionVolumeChangedDetector, TraceSeverityDetector, MemoryLeakDetector.
    enabled bool
    Is the Smart Detector Alert Rule enabled? Defaults to true.
    frequency str
    Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format.
    name str
    Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created.
    resource_group_name str
    Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created.
    scope_resource_ids Sequence[str]
    Specifies the scopes of this Smart Detector Alert Rule.
    severity str
    Specifies the severity of this Smart Detector Alert Rule. Possible values are Sev0, Sev1, Sev2, Sev3 or Sev4.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    throttling_duration str
    Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again.
    actionGroup Property Map
    An action_group block as defined below.
    description String
    Specifies a description for the Smart Detector Alert Rule.
    detectorType String
    Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are FailureAnomaliesDetector, RequestPerformanceDegradationDetector, DependencyPerformanceDegradationDetector, ExceptionVolumeChangedDetector, TraceSeverityDetector, MemoryLeakDetector.
    enabled Boolean
    Is the Smart Detector Alert Rule enabled? Defaults to true.
    frequency String
    Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format.
    name String
    Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created.
    resourceGroupName String
    Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created.
    scopeResourceIds List<String>
    Specifies the scopes of this Smart Detector Alert Rule.
    severity String
    Specifies the severity of this Smart Detector Alert Rule. Possible values are Sev0, Sev1, Sev2, Sev3 or Sev4.
    tags Map<String>
    A mapping of tags to assign to the resource.
    throttlingDuration String
    Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again.

    Supporting Types

    SmartDetectorAlertRuleActionGroup, SmartDetectorAlertRuleActionGroupArgs

    Ids List<string>
    Specifies the action group ids.
    EmailSubject string
    Specifies a custom email subject if Email Receiver is specified in Monitor Action Group resource.
    WebhookPayload string
    A JSON String which Specifies the custom webhook payload if Webhook Receiver is specified in Monitor Action Group resource.
    Ids []string
    Specifies the action group ids.
    EmailSubject string
    Specifies a custom email subject if Email Receiver is specified in Monitor Action Group resource.
    WebhookPayload string
    A JSON String which Specifies the custom webhook payload if Webhook Receiver is specified in Monitor Action Group resource.
    ids List<String>
    Specifies the action group ids.
    emailSubject String
    Specifies a custom email subject if Email Receiver is specified in Monitor Action Group resource.
    webhookPayload String
    A JSON String which Specifies the custom webhook payload if Webhook Receiver is specified in Monitor Action Group resource.
    ids string[]
    Specifies the action group ids.
    emailSubject string
    Specifies a custom email subject if Email Receiver is specified in Monitor Action Group resource.
    webhookPayload string
    A JSON String which Specifies the custom webhook payload if Webhook Receiver is specified in Monitor Action Group resource.
    ids Sequence[str]
    Specifies the action group ids.
    email_subject str
    Specifies a custom email subject if Email Receiver is specified in Monitor Action Group resource.
    webhook_payload str
    A JSON String which Specifies the custom webhook payload if Webhook Receiver is specified in Monitor Action Group resource.
    ids List<String>
    Specifies the action group ids.
    emailSubject String
    Specifies a custom email subject if Email Receiver is specified in Monitor Action Group resource.
    webhookPayload String
    A JSON String which Specifies the custom webhook payload if Webhook Receiver is specified in Monitor Action Group resource.

    Import

    Monitor Smart Detector Alert Rule can be imported using the resource id, e.g.

    $ pulumi import azure:monitoring/smartDetectorAlertRule:SmartDetectorAlertRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AlertsManagement/smartDetectorAlertRules/rule1
    

    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.
    azure logo

    We recommend using Azure Native.

    Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi