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

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages an Activity Log Alert within Azure Monitor.

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var mainResourceGroup = new Azure.Core.ResourceGroup("mainResourceGroup", new Azure.Core.ResourceGroupArgs
            {
                Location = "West Europe",
            });
            var mainActionGroup = new Azure.Monitoring.ActionGroup("mainActionGroup", new Azure.Monitoring.ActionGroupArgs
            {
                ResourceGroupName = mainResourceGroup.Name,
                ShortName = "p0action",
                WebhookReceivers = 
                {
                    new Azure.Monitoring.Inputs.ActionGroupWebhookReceiverArgs
                    {
                        Name = "callmyapi",
                        ServiceUri = "http://example.com/alert",
                    },
                },
            });
            var toMonitor = new Azure.Storage.Account("toMonitor", new Azure.Storage.AccountArgs
            {
                ResourceGroupName = mainResourceGroup.Name,
                Location = mainResourceGroup.Location,
                AccountTier = "Standard",
                AccountReplicationType = "GRS",
            });
            var mainActivityLogAlert = new Azure.Monitoring.ActivityLogAlert("mainActivityLogAlert", new Azure.Monitoring.ActivityLogAlertArgs
            {
                ResourceGroupName = mainResourceGroup.Name,
                Scopes = 
                {
                    mainResourceGroup.Id,
                },
                Description = "This alert will monitor a specific storage account updates.",
                Criteria = new Azure.Monitoring.Inputs.ActivityLogAlertCriteriaArgs
                {
                    ResourceId = toMonitor.Id,
                    OperationName = "Microsoft.Storage/storageAccounts/write",
                    Category = "Recommendation",
                },
                Actions = 
                {
                    new Azure.Monitoring.Inputs.ActivityLogAlertActionArgs
                    {
                        ActionGroupId = mainActionGroup.Id,
                        WebhookProperties = 
                        {
                            { "from", "source" },
                        },
                    },
                },
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/monitoring"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/storage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		mainResourceGroup, err := core.NewResourceGroup(ctx, "mainResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		mainActionGroup, err := monitoring.NewActionGroup(ctx, "mainActionGroup", &monitoring.ActionGroupArgs{
    			ResourceGroupName: mainResourceGroup.Name,
    			ShortName:         pulumi.String("p0action"),
    			WebhookReceivers: monitoring.ActionGroupWebhookReceiverArray{
    				&monitoring.ActionGroupWebhookReceiverArgs{
    					Name:       pulumi.String("callmyapi"),
    					ServiceUri: pulumi.String("http://example.com/alert"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		toMonitor, err := storage.NewAccount(ctx, "toMonitor", &storage.AccountArgs{
    			ResourceGroupName:      mainResourceGroup.Name,
    			Location:               mainResourceGroup.Location,
    			AccountTier:            pulumi.String("Standard"),
    			AccountReplicationType: pulumi.String("GRS"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = monitoring.NewActivityLogAlert(ctx, "mainActivityLogAlert", &monitoring.ActivityLogAlertArgs{
    			ResourceGroupName: mainResourceGroup.Name,
    			Scopes: pulumi.StringArray{
    				mainResourceGroup.ID(),
    			},
    			Description: pulumi.String("This alert will monitor a specific storage account updates."),
    			Criteria: &monitoring.ActivityLogAlertCriteriaArgs{
    				ResourceId:    toMonitor.ID(),
    				OperationName: pulumi.String("Microsoft.Storage/storageAccounts/write"),
    				Category:      pulumi.String("Recommendation"),
    			},
    			Actions: monitoring.ActivityLogAlertActionArray{
    				&monitoring.ActivityLogAlertActionArgs{
    					ActionGroupId: mainActionGroup.ID(),
    					WebhookProperties: pulumi.StringMap{
    						"from": pulumi.String("source"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const mainResourceGroup = new azure.core.ResourceGroup("mainResourceGroup", {location: "West Europe"});
    const mainActionGroup = new azure.monitoring.ActionGroup("mainActionGroup", {
        resourceGroupName: mainResourceGroup.name,
        shortName: "p0action",
        webhookReceivers: [{
            name: "callmyapi",
            serviceUri: "http://example.com/alert",
        }],
    });
    const toMonitor = new azure.storage.Account("toMonitor", {
        resourceGroupName: mainResourceGroup.name,
        location: mainResourceGroup.location,
        accountTier: "Standard",
        accountReplicationType: "GRS",
    });
    const mainActivityLogAlert = new azure.monitoring.ActivityLogAlert("mainActivityLogAlert", {
        resourceGroupName: mainResourceGroup.name,
        scopes: [mainResourceGroup.id],
        description: "This alert will monitor a specific storage account updates.",
        criteria: {
            resourceId: toMonitor.id,
            operationName: "Microsoft.Storage/storageAccounts/write",
            category: "Recommendation",
        },
        actions: [{
            actionGroupId: mainActionGroup.id,
            webhookProperties: {
                from: "source",
            },
        }],
    });
    
    import pulumi
    import pulumi_azure as azure
    
    main_resource_group = azure.core.ResourceGroup("mainResourceGroup", location="West Europe")
    main_action_group = azure.monitoring.ActionGroup("mainActionGroup",
        resource_group_name=main_resource_group.name,
        short_name="p0action",
        webhook_receivers=[azure.monitoring.ActionGroupWebhookReceiverArgs(
            name="callmyapi",
            service_uri="http://example.com/alert",
        )])
    to_monitor = azure.storage.Account("toMonitor",
        resource_group_name=main_resource_group.name,
        location=main_resource_group.location,
        account_tier="Standard",
        account_replication_type="GRS")
    main_activity_log_alert = azure.monitoring.ActivityLogAlert("mainActivityLogAlert",
        resource_group_name=main_resource_group.name,
        scopes=[main_resource_group.id],
        description="This alert will monitor a specific storage account updates.",
        criteria=azure.monitoring.ActivityLogAlertCriteriaArgs(
            resource_id=to_monitor.id,
            operation_name="Microsoft.Storage/storageAccounts/write",
            category="Recommendation",
        ),
        actions=[azure.monitoring.ActivityLogAlertActionArgs(
            action_group_id=main_action_group.id,
            webhook_properties={
                "from": "source",
            },
        )])
    

    Example coming soon!

    Create ActivityLogAlert Resource

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

    Constructor syntax

    new ActivityLogAlert(name: string, args: ActivityLogAlertArgs, opts?: CustomResourceOptions);
    @overload
    def ActivityLogAlert(resource_name: str,
                         args: ActivityLogAlertArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def ActivityLogAlert(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         criteria: Optional[ActivityLogAlertCriteriaArgs] = None,
                         resource_group_name: Optional[str] = None,
                         scopes: Optional[Sequence[str]] = None,
                         actions: Optional[Sequence[ActivityLogAlertActionArgs]] = None,
                         description: Optional[str] = None,
                         enabled: Optional[bool] = None,
                         name: Optional[str] = None,
                         tags: Optional[Mapping[str, str]] = None)
    func NewActivityLogAlert(ctx *Context, name string, args ActivityLogAlertArgs, opts ...ResourceOption) (*ActivityLogAlert, error)
    public ActivityLogAlert(string name, ActivityLogAlertArgs args, CustomResourceOptions? opts = null)
    public ActivityLogAlert(String name, ActivityLogAlertArgs args)
    public ActivityLogAlert(String name, ActivityLogAlertArgs args, CustomResourceOptions options)
    
    type: azure:monitoring:ActivityLogAlert
    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 ActivityLogAlertArgs
    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 ActivityLogAlertArgs
    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 ActivityLogAlertArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ActivityLogAlertArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ActivityLogAlertArgs
    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 activityLogAlertResource = new Azure.Monitoring.ActivityLogAlert("activityLogAlertResource", new()
    {
        Criteria = new Azure.Monitoring.Inputs.ActivityLogAlertCriteriaArgs
        {
            Category = "string",
            RecommendationType = "string",
            Level = "string",
            OperationName = "string",
            RecommendationCategory = "string",
            RecommendationImpact = "string",
            Caller = "string",
            ResourceGroup = "string",
            ResourceHealths = new[]
            {
                new Azure.Monitoring.Inputs.ActivityLogAlertCriteriaResourceHealthArgs
                {
                    Currents = new[]
                    {
                        "string",
                    },
                    Previouses = new[]
                    {
                        "string",
                    },
                    Reasons = new[]
                    {
                        "string",
                    },
                },
            },
            ResourceId = "string",
            ResourceProvider = "string",
            ResourceType = "string",
            ServiceHealths = new[]
            {
                new Azure.Monitoring.Inputs.ActivityLogAlertCriteriaServiceHealthArgs
                {
                    Events = new[]
                    {
                        "string",
                    },
                    Locations = new[]
                    {
                        "string",
                    },
                    Services = new[]
                    {
                        "string",
                    },
                },
            },
            Status = "string",
            SubStatus = "string",
        },
        ResourceGroupName = "string",
        Scopes = new[]
        {
            "string",
        },
        Actions = new[]
        {
            new Azure.Monitoring.Inputs.ActivityLogAlertActionArgs
            {
                ActionGroupId = "string",
                WebhookProperties = 
                {
                    { "string", "string" },
                },
            },
        },
        Description = "string",
        Enabled = false,
        Name = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := monitoring.NewActivityLogAlert(ctx, "activityLogAlertResource", &monitoring.ActivityLogAlertArgs{
    	Criteria: &monitoring.ActivityLogAlertCriteriaArgs{
    		Category:               pulumi.String("string"),
    		RecommendationType:     pulumi.String("string"),
    		Level:                  pulumi.String("string"),
    		OperationName:          pulumi.String("string"),
    		RecommendationCategory: pulumi.String("string"),
    		RecommendationImpact:   pulumi.String("string"),
    		Caller:                 pulumi.String("string"),
    		ResourceGroup:          pulumi.String("string"),
    		ResourceHealths: monitoring.ActivityLogAlertCriteriaResourceHealthArray{
    			&monitoring.ActivityLogAlertCriteriaResourceHealthArgs{
    				Currents: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    				Previouses: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    				Reasons: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    		},
    		ResourceId:       pulumi.String("string"),
    		ResourceProvider: pulumi.String("string"),
    		ResourceType:     pulumi.String("string"),
    		ServiceHealths: monitoring.ActivityLogAlertCriteriaServiceHealthArray{
    			&monitoring.ActivityLogAlertCriteriaServiceHealthArgs{
    				Events: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    				Locations: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    				Services: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    		},
    		Status:    pulumi.String("string"),
    		SubStatus: pulumi.String("string"),
    	},
    	ResourceGroupName: pulumi.String("string"),
    	Scopes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Actions: monitoring.ActivityLogAlertActionArray{
    		&monitoring.ActivityLogAlertActionArgs{
    			ActionGroupId: pulumi.String("string"),
    			WebhookProperties: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    		},
    	},
    	Description: pulumi.String("string"),
    	Enabled:     pulumi.Bool(false),
    	Name:        pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var activityLogAlertResource = new ActivityLogAlert("activityLogAlertResource", ActivityLogAlertArgs.builder()
        .criteria(ActivityLogAlertCriteriaArgs.builder()
            .category("string")
            .recommendationType("string")
            .level("string")
            .operationName("string")
            .recommendationCategory("string")
            .recommendationImpact("string")
            .caller("string")
            .resourceGroup("string")
            .resourceHealths(ActivityLogAlertCriteriaResourceHealthArgs.builder()
                .currents("string")
                .previouses("string")
                .reasons("string")
                .build())
            .resourceId("string")
            .resourceProvider("string")
            .resourceType("string")
            .serviceHealths(ActivityLogAlertCriteriaServiceHealthArgs.builder()
                .events("string")
                .locations("string")
                .services("string")
                .build())
            .status("string")
            .subStatus("string")
            .build())
        .resourceGroupName("string")
        .scopes("string")
        .actions(ActivityLogAlertActionArgs.builder()
            .actionGroupId("string")
            .webhookProperties(Map.of("string", "string"))
            .build())
        .description("string")
        .enabled(false)
        .name("string")
        .tags(Map.of("string", "string"))
        .build());
    
    activity_log_alert_resource = azure.monitoring.ActivityLogAlert("activityLogAlertResource",
        criteria={
            "category": "string",
            "recommendation_type": "string",
            "level": "string",
            "operation_name": "string",
            "recommendation_category": "string",
            "recommendation_impact": "string",
            "caller": "string",
            "resource_group": "string",
            "resource_healths": [{
                "currents": ["string"],
                "previouses": ["string"],
                "reasons": ["string"],
            }],
            "resource_id": "string",
            "resource_provider": "string",
            "resource_type": "string",
            "service_healths": [{
                "events": ["string"],
                "locations": ["string"],
                "services": ["string"],
            }],
            "status": "string",
            "sub_status": "string",
        },
        resource_group_name="string",
        scopes=["string"],
        actions=[{
            "action_group_id": "string",
            "webhook_properties": {
                "string": "string",
            },
        }],
        description="string",
        enabled=False,
        name="string",
        tags={
            "string": "string",
        })
    
    const activityLogAlertResource = new azure.monitoring.ActivityLogAlert("activityLogAlertResource", {
        criteria: {
            category: "string",
            recommendationType: "string",
            level: "string",
            operationName: "string",
            recommendationCategory: "string",
            recommendationImpact: "string",
            caller: "string",
            resourceGroup: "string",
            resourceHealths: [{
                currents: ["string"],
                previouses: ["string"],
                reasons: ["string"],
            }],
            resourceId: "string",
            resourceProvider: "string",
            resourceType: "string",
            serviceHealths: [{
                events: ["string"],
                locations: ["string"],
                services: ["string"],
            }],
            status: "string",
            subStatus: "string",
        },
        resourceGroupName: "string",
        scopes: ["string"],
        actions: [{
            actionGroupId: "string",
            webhookProperties: {
                string: "string",
            },
        }],
        description: "string",
        enabled: false,
        name: "string",
        tags: {
            string: "string",
        },
    });
    
    type: azure:monitoring:ActivityLogAlert
    properties:
        actions:
            - actionGroupId: string
              webhookProperties:
                string: string
        criteria:
            caller: string
            category: string
            level: string
            operationName: string
            recommendationCategory: string
            recommendationImpact: string
            recommendationType: string
            resourceGroup: string
            resourceHealths:
                - currents:
                    - string
                  previouses:
                    - string
                  reasons:
                    - string
            resourceId: string
            resourceProvider: string
            resourceType: string
            serviceHealths:
                - events:
                    - string
                  locations:
                    - string
                  services:
                    - string
            status: string
            subStatus: string
        description: string
        enabled: false
        name: string
        resourceGroupName: string
        scopes:
            - string
        tags:
            string: string
    

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

    Criteria ActivityLogAlertCriteria
    A criteria block as defined below.
    ResourceGroupName string
    The name of the resource group in which to create the activity log alert instance.
    Scopes List<string>
    The Scope at which the Activity Log should be applied, for example a the Resource ID of a Subscription or a Resource (such as a Storage Account).
    Actions List<ActivityLogAlertAction>
    One or more action blocks as defined below.
    Description string
    The description of this activity log alert.
    Enabled bool
    Should this Activity Log Alert be enabled? Defaults to true.
    Name string
    The name of the activity log alert. Changing this forces a new resource to be created.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    Criteria ActivityLogAlertCriteriaArgs
    A criteria block as defined below.
    ResourceGroupName string
    The name of the resource group in which to create the activity log alert instance.
    Scopes []string
    The Scope at which the Activity Log should be applied, for example a the Resource ID of a Subscription or a Resource (such as a Storage Account).
    Actions []ActivityLogAlertActionArgs
    One or more action blocks as defined below.
    Description string
    The description of this activity log alert.
    Enabled bool
    Should this Activity Log Alert be enabled? Defaults to true.
    Name string
    The name of the activity log alert. Changing this forces a new resource to be created.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    criteria ActivityLogAlertCriteria
    A criteria block as defined below.
    resourceGroupName String
    The name of the resource group in which to create the activity log alert instance.
    scopes List<String>
    The Scope at which the Activity Log should be applied, for example a the Resource ID of a Subscription or a Resource (such as a Storage Account).
    actions List<ActivityLogAlertAction>
    One or more action blocks as defined below.
    description String
    The description of this activity log alert.
    enabled Boolean
    Should this Activity Log Alert be enabled? Defaults to true.
    name String
    The name of the activity log alert. Changing this forces a new resource to be created.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    criteria ActivityLogAlertCriteria
    A criteria block as defined below.
    resourceGroupName string
    The name of the resource group in which to create the activity log alert instance.
    scopes string[]
    The Scope at which the Activity Log should be applied, for example a the Resource ID of a Subscription or a Resource (such as a Storage Account).
    actions ActivityLogAlertAction[]
    One or more action blocks as defined below.
    description string
    The description of this activity log alert.
    enabled boolean
    Should this Activity Log Alert be enabled? Defaults to true.
    name string
    The name of the activity log alert. Changing this forces a new resource to be created.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    criteria ActivityLogAlertCriteriaArgs
    A criteria block as defined below.
    resource_group_name str
    The name of the resource group in which to create the activity log alert instance.
    scopes Sequence[str]
    The Scope at which the Activity Log should be applied, for example a the Resource ID of a Subscription or a Resource (such as a Storage Account).
    actions Sequence[ActivityLogAlertActionArgs]
    One or more action blocks as defined below.
    description str
    The description of this activity log alert.
    enabled bool
    Should this Activity Log Alert be enabled? Defaults to true.
    name str
    The name of the activity log alert. Changing this forces a new resource to be created.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    criteria Property Map
    A criteria block as defined below.
    resourceGroupName String
    The name of the resource group in which to create the activity log alert instance.
    scopes List<String>
    The Scope at which the Activity Log should be applied, for example a the Resource ID of a Subscription or a Resource (such as a Storage Account).
    actions List<Property Map>
    One or more action blocks as defined below.
    description String
    The description of this activity log alert.
    enabled Boolean
    Should this Activity Log Alert be enabled? Defaults to true.
    name String
    The name of the activity log alert. Changing this forces a new resource to be created.
    tags Map<String>
    A mapping of tags to assign to the resource.

    Outputs

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

    Get an existing ActivityLogAlert 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?: ActivityLogAlertState, opts?: CustomResourceOptions): ActivityLogAlert
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            actions: Optional[Sequence[ActivityLogAlertActionArgs]] = None,
            criteria: Optional[ActivityLogAlertCriteriaArgs] = None,
            description: Optional[str] = None,
            enabled: Optional[bool] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            scopes: Optional[Sequence[str]] = None,
            tags: Optional[Mapping[str, str]] = None) -> ActivityLogAlert
    func GetActivityLogAlert(ctx *Context, name string, id IDInput, state *ActivityLogAlertState, opts ...ResourceOption) (*ActivityLogAlert, error)
    public static ActivityLogAlert Get(string name, Input<string> id, ActivityLogAlertState? state, CustomResourceOptions? opts = null)
    public static ActivityLogAlert get(String name, Output<String> id, ActivityLogAlertState state, CustomResourceOptions options)
    resources:  _:    type: azure:monitoring:ActivityLogAlert    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.
    The following state arguments are supported:
    Actions List<ActivityLogAlertAction>
    One or more action blocks as defined below.
    Criteria ActivityLogAlertCriteria
    A criteria block as defined below.
    Description string
    The description of this activity log alert.
    Enabled bool
    Should this Activity Log Alert be enabled? Defaults to true.
    Name string
    The name of the activity log alert. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the activity log alert instance.
    Scopes List<string>
    The Scope at which the Activity Log should be applied, for example a the Resource ID of a Subscription or a Resource (such as a Storage Account).
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    Actions []ActivityLogAlertActionArgs
    One or more action blocks as defined below.
    Criteria ActivityLogAlertCriteriaArgs
    A criteria block as defined below.
    Description string
    The description of this activity log alert.
    Enabled bool
    Should this Activity Log Alert be enabled? Defaults to true.
    Name string
    The name of the activity log alert. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the activity log alert instance.
    Scopes []string
    The Scope at which the Activity Log should be applied, for example a the Resource ID of a Subscription or a Resource (such as a Storage Account).
    Tags map[string]string
    A mapping of tags to assign to the resource.
    actions List<ActivityLogAlertAction>
    One or more action blocks as defined below.
    criteria ActivityLogAlertCriteria
    A criteria block as defined below.
    description String
    The description of this activity log alert.
    enabled Boolean
    Should this Activity Log Alert be enabled? Defaults to true.
    name String
    The name of the activity log alert. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the activity log alert instance.
    scopes List<String>
    The Scope at which the Activity Log should be applied, for example a the Resource ID of a Subscription or a Resource (such as a Storage Account).
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    actions ActivityLogAlertAction[]
    One or more action blocks as defined below.
    criteria ActivityLogAlertCriteria
    A criteria block as defined below.
    description string
    The description of this activity log alert.
    enabled boolean
    Should this Activity Log Alert be enabled? Defaults to true.
    name string
    The name of the activity log alert. Changing this forces a new resource to be created.
    resourceGroupName string
    The name of the resource group in which to create the activity log alert instance.
    scopes string[]
    The Scope at which the Activity Log should be applied, for example a the Resource ID of a Subscription or a Resource (such as a Storage Account).
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    actions Sequence[ActivityLogAlertActionArgs]
    One or more action blocks as defined below.
    criteria ActivityLogAlertCriteriaArgs
    A criteria block as defined below.
    description str
    The description of this activity log alert.
    enabled bool
    Should this Activity Log Alert be enabled? Defaults to true.
    name str
    The name of the activity log alert. Changing this forces a new resource to be created.
    resource_group_name str
    The name of the resource group in which to create the activity log alert instance.
    scopes Sequence[str]
    The Scope at which the Activity Log should be applied, for example a the Resource ID of a Subscription or a Resource (such as a Storage Account).
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    actions List<Property Map>
    One or more action blocks as defined below.
    criteria Property Map
    A criteria block as defined below.
    description String
    The description of this activity log alert.
    enabled Boolean
    Should this Activity Log Alert be enabled? Defaults to true.
    name String
    The name of the activity log alert. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the activity log alert instance.
    scopes List<String>
    The Scope at which the Activity Log should be applied, for example a the Resource ID of a Subscription or a Resource (such as a Storage Account).
    tags Map<String>
    A mapping of tags to assign to the resource.

    Supporting Types

    ActivityLogAlertAction, ActivityLogAlertActionArgs

    ActionGroupId string
    The ID of the Action Group can be sourced from the azure.monitoring.ActionGroup resource.
    WebhookProperties Dictionary<string, string>
    The map of custom string properties to include with the post operation. These data are appended to the webhook payload.
    ActionGroupId string
    The ID of the Action Group can be sourced from the azure.monitoring.ActionGroup resource.
    WebhookProperties map[string]string
    The map of custom string properties to include with the post operation. These data are appended to the webhook payload.
    actionGroupId String
    The ID of the Action Group can be sourced from the azure.monitoring.ActionGroup resource.
    webhookProperties Map<String,String>
    The map of custom string properties to include with the post operation. These data are appended to the webhook payload.
    actionGroupId string
    The ID of the Action Group can be sourced from the azure.monitoring.ActionGroup resource.
    webhookProperties {[key: string]: string}
    The map of custom string properties to include with the post operation. These data are appended to the webhook payload.
    action_group_id str
    The ID of the Action Group can be sourced from the azure.monitoring.ActionGroup resource.
    webhook_properties Mapping[str, str]
    The map of custom string properties to include with the post operation. These data are appended to the webhook payload.
    actionGroupId String
    The ID of the Action Group can be sourced from the azure.monitoring.ActionGroup resource.
    webhookProperties Map<String>
    The map of custom string properties to include with the post operation. These data are appended to the webhook payload.

    ActivityLogAlertCriteria, ActivityLogAlertCriteriaArgs

    Category string
    The category of the operation. Possible values are Administrative, Autoscale, Policy, Recommendation, ResourceHealth, Security and ServiceHealth.
    Caller string
    The email address or Azure Active Directory identifier of the user who performed the operation.
    Level string
    The severity level of the event. Possible values are Verbose, Informational, Warning, Error, and Critical.
    OperationName string
    The Resource Manager Role-Based Access Control operation name. Supported operation should be of the form: <resourceProvider>/<resourceType>/<operation>.
    RecommendationCategory string
    The recommendation category of the event. Possible values are Cost, Reliability, OperationalExcellence and Performance. It is only allowed when category is Recommendation.
    RecommendationImpact string
    The recommendation impact of the event. Possible values are High, Medium and Low. It is only allowed when category is Recommendation.
    RecommendationType string
    The recommendation type of the event. It is only allowed when category is Recommendation.
    ResourceGroup string
    The name of resource group monitored by the activity log alert.
    ResourceHealths List<ActivityLogAlertCriteriaResourceHealth>
    A block to define fine grain resource health settings.
    ResourceId string
    The specific resource monitored by the activity log alert. It should be within one of the scopes.
    ResourceProvider string
    The name of the resource provider monitored by the activity log alert.
    ResourceType string
    The resource type monitored by the activity log alert.
    ServiceHealths List<ActivityLogAlertCriteriaServiceHealth>
    A block to define fine grain service health settings.
    Status string
    The status of the event. For example, Started, Failed, or Succeeded.
    SubStatus string
    The sub status of the event.
    Category string
    The category of the operation. Possible values are Administrative, Autoscale, Policy, Recommendation, ResourceHealth, Security and ServiceHealth.
    Caller string
    The email address or Azure Active Directory identifier of the user who performed the operation.
    Level string
    The severity level of the event. Possible values are Verbose, Informational, Warning, Error, and Critical.
    OperationName string
    The Resource Manager Role-Based Access Control operation name. Supported operation should be of the form: <resourceProvider>/<resourceType>/<operation>.
    RecommendationCategory string
    The recommendation category of the event. Possible values are Cost, Reliability, OperationalExcellence and Performance. It is only allowed when category is Recommendation.
    RecommendationImpact string
    The recommendation impact of the event. Possible values are High, Medium and Low. It is only allowed when category is Recommendation.
    RecommendationType string
    The recommendation type of the event. It is only allowed when category is Recommendation.
    ResourceGroup string
    The name of resource group monitored by the activity log alert.
    ResourceHealths []ActivityLogAlertCriteriaResourceHealth
    A block to define fine grain resource health settings.
    ResourceId string
    The specific resource monitored by the activity log alert. It should be within one of the scopes.
    ResourceProvider string
    The name of the resource provider monitored by the activity log alert.
    ResourceType string
    The resource type monitored by the activity log alert.
    ServiceHealths []ActivityLogAlertCriteriaServiceHealth
    A block to define fine grain service health settings.
    Status string
    The status of the event. For example, Started, Failed, or Succeeded.
    SubStatus string
    The sub status of the event.
    category String
    The category of the operation. Possible values are Administrative, Autoscale, Policy, Recommendation, ResourceHealth, Security and ServiceHealth.
    caller String
    The email address or Azure Active Directory identifier of the user who performed the operation.
    level String
    The severity level of the event. Possible values are Verbose, Informational, Warning, Error, and Critical.
    operationName String
    The Resource Manager Role-Based Access Control operation name. Supported operation should be of the form: <resourceProvider>/<resourceType>/<operation>.
    recommendationCategory String
    The recommendation category of the event. Possible values are Cost, Reliability, OperationalExcellence and Performance. It is only allowed when category is Recommendation.
    recommendationImpact String
    The recommendation impact of the event. Possible values are High, Medium and Low. It is only allowed when category is Recommendation.
    recommendationType String
    The recommendation type of the event. It is only allowed when category is Recommendation.
    resourceGroup String
    The name of resource group monitored by the activity log alert.
    resourceHealths List<ActivityLogAlertCriteriaResourceHealth>
    A block to define fine grain resource health settings.
    resourceId String
    The specific resource monitored by the activity log alert. It should be within one of the scopes.
    resourceProvider String
    The name of the resource provider monitored by the activity log alert.
    resourceType String
    The resource type monitored by the activity log alert.
    serviceHealths List<ActivityLogAlertCriteriaServiceHealth>
    A block to define fine grain service health settings.
    status String
    The status of the event. For example, Started, Failed, or Succeeded.
    subStatus String
    The sub status of the event.
    category string
    The category of the operation. Possible values are Administrative, Autoscale, Policy, Recommendation, ResourceHealth, Security and ServiceHealth.
    caller string
    The email address or Azure Active Directory identifier of the user who performed the operation.
    level string
    The severity level of the event. Possible values are Verbose, Informational, Warning, Error, and Critical.
    operationName string
    The Resource Manager Role-Based Access Control operation name. Supported operation should be of the form: <resourceProvider>/<resourceType>/<operation>.
    recommendationCategory string
    The recommendation category of the event. Possible values are Cost, Reliability, OperationalExcellence and Performance. It is only allowed when category is Recommendation.
    recommendationImpact string
    The recommendation impact of the event. Possible values are High, Medium and Low. It is only allowed when category is Recommendation.
    recommendationType string
    The recommendation type of the event. It is only allowed when category is Recommendation.
    resourceGroup string
    The name of resource group monitored by the activity log alert.
    resourceHealths ActivityLogAlertCriteriaResourceHealth[]
    A block to define fine grain resource health settings.
    resourceId string
    The specific resource monitored by the activity log alert. It should be within one of the scopes.
    resourceProvider string
    The name of the resource provider monitored by the activity log alert.
    resourceType string
    The resource type monitored by the activity log alert.
    serviceHealths ActivityLogAlertCriteriaServiceHealth[]
    A block to define fine grain service health settings.
    status string
    The status of the event. For example, Started, Failed, or Succeeded.
    subStatus string
    The sub status of the event.
    category str
    The category of the operation. Possible values are Administrative, Autoscale, Policy, Recommendation, ResourceHealth, Security and ServiceHealth.
    caller str
    The email address or Azure Active Directory identifier of the user who performed the operation.
    level str
    The severity level of the event. Possible values are Verbose, Informational, Warning, Error, and Critical.
    operation_name str
    The Resource Manager Role-Based Access Control operation name. Supported operation should be of the form: <resourceProvider>/<resourceType>/<operation>.
    recommendation_category str
    The recommendation category of the event. Possible values are Cost, Reliability, OperationalExcellence and Performance. It is only allowed when category is Recommendation.
    recommendation_impact str
    The recommendation impact of the event. Possible values are High, Medium and Low. It is only allowed when category is Recommendation.
    recommendation_type str
    The recommendation type of the event. It is only allowed when category is Recommendation.
    resource_group str
    The name of resource group monitored by the activity log alert.
    resource_healths Sequence[ActivityLogAlertCriteriaResourceHealth]
    A block to define fine grain resource health settings.
    resource_id str
    The specific resource monitored by the activity log alert. It should be within one of the scopes.
    resource_provider str
    The name of the resource provider monitored by the activity log alert.
    resource_type str
    The resource type monitored by the activity log alert.
    service_healths Sequence[ActivityLogAlertCriteriaServiceHealth]
    A block to define fine grain service health settings.
    status str
    The status of the event. For example, Started, Failed, or Succeeded.
    sub_status str
    The sub status of the event.
    category String
    The category of the operation. Possible values are Administrative, Autoscale, Policy, Recommendation, ResourceHealth, Security and ServiceHealth.
    caller String
    The email address or Azure Active Directory identifier of the user who performed the operation.
    level String
    The severity level of the event. Possible values are Verbose, Informational, Warning, Error, and Critical.
    operationName String
    The Resource Manager Role-Based Access Control operation name. Supported operation should be of the form: <resourceProvider>/<resourceType>/<operation>.
    recommendationCategory String
    The recommendation category of the event. Possible values are Cost, Reliability, OperationalExcellence and Performance. It is only allowed when category is Recommendation.
    recommendationImpact String
    The recommendation impact of the event. Possible values are High, Medium and Low. It is only allowed when category is Recommendation.
    recommendationType String
    The recommendation type of the event. It is only allowed when category is Recommendation.
    resourceGroup String
    The name of resource group monitored by the activity log alert.
    resourceHealths List<Property Map>
    A block to define fine grain resource health settings.
    resourceId String
    The specific resource monitored by the activity log alert. It should be within one of the scopes.
    resourceProvider String
    The name of the resource provider monitored by the activity log alert.
    resourceType String
    The resource type monitored by the activity log alert.
    serviceHealths List<Property Map>
    A block to define fine grain service health settings.
    status String
    The status of the event. For example, Started, Failed, or Succeeded.
    subStatus String
    The sub status of the event.

    ActivityLogAlertCriteriaResourceHealth, ActivityLogAlertCriteriaResourceHealthArgs

    Currents List<string>
    The current resource health statuses that will log an alert. Possible values are Available, Degraded, Unavailable and Unknown.
    Previouses List<string>
    The previous resource health statuses that will log an alert. Possible values are Available, Degraded, Unavailable and Unknown.
    Reasons List<string>
    The reason that will log an alert. Possible values are PlatformInitiated (such as a problem with the resource in an affected region of an Azure incident), UserInitiated (such as a shutdown request of a VM) and Unknown.
    Currents []string
    The current resource health statuses that will log an alert. Possible values are Available, Degraded, Unavailable and Unknown.
    Previouses []string
    The previous resource health statuses that will log an alert. Possible values are Available, Degraded, Unavailable and Unknown.
    Reasons []string
    The reason that will log an alert. Possible values are PlatformInitiated (such as a problem with the resource in an affected region of an Azure incident), UserInitiated (such as a shutdown request of a VM) and Unknown.
    currents List<String>
    The current resource health statuses that will log an alert. Possible values are Available, Degraded, Unavailable and Unknown.
    previouses List<String>
    The previous resource health statuses that will log an alert. Possible values are Available, Degraded, Unavailable and Unknown.
    reasons List<String>
    The reason that will log an alert. Possible values are PlatformInitiated (such as a problem with the resource in an affected region of an Azure incident), UserInitiated (such as a shutdown request of a VM) and Unknown.
    currents string[]
    The current resource health statuses that will log an alert. Possible values are Available, Degraded, Unavailable and Unknown.
    previouses string[]
    The previous resource health statuses that will log an alert. Possible values are Available, Degraded, Unavailable and Unknown.
    reasons string[]
    The reason that will log an alert. Possible values are PlatformInitiated (such as a problem with the resource in an affected region of an Azure incident), UserInitiated (such as a shutdown request of a VM) and Unknown.
    currents Sequence[str]
    The current resource health statuses that will log an alert. Possible values are Available, Degraded, Unavailable and Unknown.
    previouses Sequence[str]
    The previous resource health statuses that will log an alert. Possible values are Available, Degraded, Unavailable and Unknown.
    reasons Sequence[str]
    The reason that will log an alert. Possible values are PlatformInitiated (such as a problem with the resource in an affected region of an Azure incident), UserInitiated (such as a shutdown request of a VM) and Unknown.
    currents List<String>
    The current resource health statuses that will log an alert. Possible values are Available, Degraded, Unavailable and Unknown.
    previouses List<String>
    The previous resource health statuses that will log an alert. Possible values are Available, Degraded, Unavailable and Unknown.
    reasons List<String>
    The reason that will log an alert. Possible values are PlatformInitiated (such as a problem with the resource in an affected region of an Azure incident), UserInitiated (such as a shutdown request of a VM) and Unknown.

    ActivityLogAlertCriteriaServiceHealth, ActivityLogAlertCriteriaServiceHealthArgs

    Events List<string>
    Events this alert will monitor Possible values are Incident, Maintenance, Informational, ActionRequired and Security.
    Locations List<string>
    Locations this alert will monitor. For example, West Europe. Defaults to Global.
    Services List<string>
    Services this alert will monitor. For example, Activity Logs & Alerts, Action Groups. Defaults to all Services.
    Events []string
    Events this alert will monitor Possible values are Incident, Maintenance, Informational, ActionRequired and Security.
    Locations []string
    Locations this alert will monitor. For example, West Europe. Defaults to Global.
    Services []string
    Services this alert will monitor. For example, Activity Logs & Alerts, Action Groups. Defaults to all Services.
    events List<String>
    Events this alert will monitor Possible values are Incident, Maintenance, Informational, ActionRequired and Security.
    locations List<String>
    Locations this alert will monitor. For example, West Europe. Defaults to Global.
    services List<String>
    Services this alert will monitor. For example, Activity Logs & Alerts, Action Groups. Defaults to all Services.
    events string[]
    Events this alert will monitor Possible values are Incident, Maintenance, Informational, ActionRequired and Security.
    locations string[]
    Locations this alert will monitor. For example, West Europe. Defaults to Global.
    services string[]
    Services this alert will monitor. For example, Activity Logs & Alerts, Action Groups. Defaults to all Services.
    events Sequence[str]
    Events this alert will monitor Possible values are Incident, Maintenance, Informational, ActionRequired and Security.
    locations Sequence[str]
    Locations this alert will monitor. For example, West Europe. Defaults to Global.
    services Sequence[str]
    Services this alert will monitor. For example, Activity Logs & Alerts, Action Groups. Defaults to all Services.
    events List<String>
    Events this alert will monitor Possible values are Incident, Maintenance, Informational, ActionRequired and Security.
    locations List<String>
    Locations this alert will monitor. For example, West Europe. Defaults to Global.
    services List<String>
    Services this alert will monitor. For example, Activity Logs & Alerts, Action Groups. Defaults to all Services.

    Import

    Activity log alerts can be imported using the resource id, e.g.

     $ pulumi import azure:monitoring/activityLogAlert:ActivityLogAlert example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Insights/activityLogAlerts/myalertname
    

    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.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial