1. Registry
  2. Packages
  3. Vercel Provider
  4. API Docs
  5. AlertRule
Viewing docs for Vercel v5.21.1
published on Thursday, Oct 15, 2026 by Pulumiverse
vercel logo vercel logo
Viewing docs for Vercel v5.21.1
published on Thursday, Oct 15, 2026 by Pulumiverse

    Creates a built-in Vercel alert rule using the Alerts v3 API. Built-in rules select anomaly triggers across a team scope. Notification destination links are managed with the vercel.AlertRuleSlackNotification and vercel.AlertRuleWebhookNotification resources.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vercel from "@pulumiverse/vercel";
    
    const example = new vercel.Project("example", {name: "example-project"});
    const checkoutErrors = new vercel.AlertRule("checkout_errors", {
        type: "built-in",
        name: "Checkout 5xx anomalies",
        ruleScope: {
            type: "include",
            projectIds: [example.id],
        },
        triggers: [{
            type: "error_anomaly",
            filter: "statusGroup:5xx AND route:/api/checkout",
        }],
        matchMinimumSeverityLevel: "high",
        tags: ["checkout"],
        notificationSettings: {
            enableTeamOwnerNotifications: true,
        },
    });
    
    import pulumi
    import pulumiverse_vercel as vercel
    
    example = vercel.Project("example", name="example-project")
    checkout_errors = vercel.AlertRule("checkout_errors",
        type="built-in",
        name="Checkout 5xx anomalies",
        rule_scope={
            "type": "include",
            "project_ids": [example.id],
        },
        triggers=[{
            "type": "error_anomaly",
            "filter": "statusGroup:5xx AND route:/api/checkout",
        }],
        match_minimum_severity_level="high",
        tags=["checkout"],
        notification_settings={
            "enable_team_owner_notifications": True,
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-vercel/sdk/v5/go/vercel"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := vercel.NewProject(ctx, "example", &vercel.ProjectArgs{
    			Name: pulumi.String("example-project"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vercel.NewAlertRule(ctx, "checkout_errors", &vercel.AlertRuleArgs{
    			Type: pulumi.String("built-in"),
    			Name: pulumi.String("Checkout 5xx anomalies"),
    			RuleScope: &vercel.AlertRuleRuleScopeArgs{
    				Type: pulumi.String("include"),
    				ProjectIds: pulumi.StringArray{
    					example.ID(),
    				},
    			},
    			Triggers: vercel.AlertRuleTriggerArray{
    				&vercel.AlertRuleTriggerArgs{
    					Type:   pulumi.String("error_anomaly"),
    					Filter: pulumi.String("statusGroup:5xx AND route:/api/checkout"),
    				},
    			},
    			MatchMinimumSeverityLevel: pulumi.String("high"),
    			Tags: pulumi.StringArray{
    				pulumi.String("checkout"),
    			},
    			NotificationSettings: &vercel.AlertRuleNotificationSettingsArgs{
    				EnableTeamOwnerNotifications: pulumi.Bool(true),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vercel = Pulumiverse.Vercel;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Vercel.Project("example", new()
        {
            Name = "example-project",
        });
    
        var checkoutErrors = new Vercel.AlertRule("checkout_errors", new()
        {
            Type = "built-in",
            Name = "Checkout 5xx anomalies",
            RuleScope = new Vercel.Inputs.AlertRuleRuleScopeArgs
            {
                Type = "include",
                ProjectIds = new[]
                {
                    example.Id,
                },
            },
            Triggers = new[]
            {
                new Vercel.Inputs.AlertRuleTriggerArgs
                {
                    Type = "error_anomaly",
                    Filter = "statusGroup:5xx AND route:/api/checkout",
                },
            },
            MatchMinimumSeverityLevel = "high",
            Tags = new[]
            {
                "checkout",
            },
            NotificationSettings = new Vercel.Inputs.AlertRuleNotificationSettingsArgs
            {
                EnableTeamOwnerNotifications = true,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumiverse.vercel.Project;
    import com.pulumiverse.vercel.ProjectArgs;
    import com.pulumiverse.vercel.AlertRule;
    import com.pulumiverse.vercel.AlertRuleArgs;
    import com.pulumi.vercel.inputs.AlertRuleRuleScopeArgs;
    import com.pulumi.vercel.inputs.AlertRuleTriggerArgs;
    import com.pulumi.vercel.inputs.AlertRuleNotificationSettingsArgs;
    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 Project("example", ProjectArgs.builder()
                .name("example-project")
                .build());
    
            var checkoutErrors = new AlertRule("checkoutErrors", AlertRuleArgs.builder()
                .type("built-in")
                .name("Checkout 5xx anomalies")
                .ruleScope(AlertRuleRuleScopeArgs.builder()
                    .type("include")
                    .projectIds(example.id())
                    .build())
                .triggers(AlertRuleTriggerArgs.builder()
                    .type("error_anomaly")
                    .filter("statusGroup:5xx AND route:/api/checkout")
                    .build())
                .matchMinimumSeverityLevel("high")
                .tags("checkout")
                .notificationSettings(AlertRuleNotificationSettingsArgs.builder()
                    .enableTeamOwnerNotifications(true)
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: vercel:Project
        properties:
          name: example-project
      checkoutErrors:
        type: vercel:AlertRule
        name: checkout_errors
        properties:
          type: built-in
          name: Checkout 5xx anomalies
          ruleScope:
            type: include
            projectIds:
              - ${example.id}
          triggers:
            - type: error_anomaly
              filter: statusGroup:5xx AND route:/api/checkout
          matchMinimumSeverityLevel: high
          tags:
            - checkout
          notificationSettings:
            enableTeamOwnerNotifications: true
    
    Example coming soon!
    

    Use vercel.CustomAlertRule for project-scoped metric thresholds and anomalies.

    Trigger filters

    Filter support depends on the trigger type.

    Trigger typeFilter supportAllowed fields
    error_anomalyRequiredstatusGroup, route
    usage_anomalyOptionalmetrics

    Error anomaly filters

    An error_anomaly filter must contain statusGroup with the value 4xx or 5xx. The optional route field supports exact values, wildcards, and regular expressions.

    Valid examples:

    statusGroup:5xx
    statusGroup:5xx AND route:/api/*
    statusGroup:(4xx OR 5xx) AND route =~ "^/api/[a-z]+$"
    NOT statusGroup:4xx
    

    AND can combine statusGroup and route, but OR and NOT cannot contain different fields. Consequently, statusGroup:5xx OR route:/api/* is invalid. A route-only filter is also invalid because statusGroup is required.

    Usage anomaly filters

    A usage_anomaly filter may contain only the metrics field with these values:

    • fluid_cpu_duration
    • fluid_duration
    • fast_data_transfer
    • edge_requests
    • function_invocations

    Valid examples:

    metrics:edge_requests
    metrics:(edge_requests OR function_invocations)
    NOT metrics:fast_data_transfer
    

    Wildcards and regular expressions are not supported for metric names, so metrics:edge* is invalid.

    Create AlertRule Resource

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

    Constructor syntax

    new AlertRule(name: string, args: AlertRuleArgs, opts?: CustomResourceOptions);
    @overload
    def AlertRule(resource_name: str,
                  args: AlertRuleArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def AlertRule(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  match_minimum_severity_level: Optional[str] = None,
                  rule_scope: Optional[AlertRuleRuleScopeArgs] = None,
                  type: Optional[str] = None,
                  name: Optional[str] = None,
                  notification_settings: Optional[AlertRuleNotificationSettingsArgs] = None,
                  tags: Optional[Sequence[str]] = None,
                  team_id: Optional[str] = None,
                  triggers: Optional[Sequence[AlertRuleTriggerArgs]] = None)
    func NewAlertRule(ctx *Context, name string, args AlertRuleArgs, opts ...ResourceOption) (*AlertRule, error)
    public AlertRule(string name, AlertRuleArgs args, CustomResourceOptions? opts = null)
    public AlertRule(String name, AlertRuleArgs args)
    public AlertRule(String name, AlertRuleArgs args, CustomResourceOptions options)
    
    type: vercel:AlertRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "vercel_alert_rule" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args AlertRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AlertRuleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AlertRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AlertRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AlertRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var alertRuleResource = new Vercel.AlertRule("alertRuleResource", new()
    {
        MatchMinimumSeverityLevel = "string",
        RuleScope = new Vercel.Inputs.AlertRuleRuleScopeArgs
        {
            Type = "string",
            ProjectIds = new[]
            {
                "string",
            },
        },
        Type = "string",
        Name = "string",
        NotificationSettings = new Vercel.Inputs.AlertRuleNotificationSettingsArgs
        {
            EnableTeamOwnerNotifications = false,
            IncidentIoRoutingKey = "string",
            VercelNotificationsMinimumSeverityLevel = "string",
        },
        Tags = new[]
        {
            "string",
        },
        TeamId = "string",
        Triggers = new[]
        {
            new Vercel.Inputs.AlertRuleTriggerArgs
            {
                Type = "string",
                Filter = "string",
            },
        },
    });
    
    example, err := vercel.NewAlertRule(ctx, "alertRuleResource", &vercel.AlertRuleArgs{
    	MatchMinimumSeverityLevel: pulumi.String("string"),
    	RuleScope: &vercel.AlertRuleRuleScopeArgs{
    		Type: pulumi.String("string"),
    		ProjectIds: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	Type: pulumi.String("string"),
    	Name: pulumi.String("string"),
    	NotificationSettings: &vercel.AlertRuleNotificationSettingsArgs{
    		EnableTeamOwnerNotifications:            pulumi.Bool(false),
    		IncidentIoRoutingKey:                    pulumi.String("string"),
    		VercelNotificationsMinimumSeverityLevel: pulumi.String("string"),
    	},
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	TeamId: pulumi.String("string"),
    	Triggers: vercel.AlertRuleTriggerArray{
    		&vercel.AlertRuleTriggerArgs{
    			Type:   pulumi.String("string"),
    			Filter: pulumi.String("string"),
    		},
    	},
    })
    
    resource "vercel_alert_rule" "alertRuleResource" {
      lifecycle {
        create_before_destroy = true
      }
      match_minimum_severity_level = "string"
      rule_scope = {
        type        = "string"
        project_ids = ["string"]
      }
      type = "string"
      name = "string"
      notification_settings = {
        enable_team_owner_notifications             = false
        incident_io_routing_key                     = "string"
        vercel_notifications_minimum_severity_level = "string"
      }
      tags    = ["string"]
      team_id = "string"
      triggers {
        type   = "string"
        filter = "string"
      }
    }
    
    var alertRuleResource = new AlertRule("alertRuleResource", AlertRuleArgs.builder()
        .matchMinimumSeverityLevel("string")
        .ruleScope(AlertRuleRuleScopeArgs.builder()
            .type("string")
            .projectIds("string")
            .build())
        .type("string")
        .name("string")
        .notificationSettings(AlertRuleNotificationSettingsArgs.builder()
            .enableTeamOwnerNotifications(false)
            .incidentIoRoutingKey("string")
            .vercelNotificationsMinimumSeverityLevel("string")
            .build())
        .tags("string")
        .teamId("string")
        .triggers(AlertRuleTriggerArgs.builder()
            .type("string")
            .filter("string")
            .build())
        .build());
    
    alert_rule_resource = vercel.AlertRule("alertRuleResource",
        match_minimum_severity_level="string",
        rule_scope={
            "type": "string",
            "project_ids": ["string"],
        },
        type="string",
        name="string",
        notification_settings={
            "enable_team_owner_notifications": False,
            "incident_io_routing_key": "string",
            "vercel_notifications_minimum_severity_level": "string",
        },
        tags=["string"],
        team_id="string",
        triggers=[{
            "type": "string",
            "filter": "string",
        }])
    
    const alertRuleResource = new vercel.AlertRule("alertRuleResource", {
        matchMinimumSeverityLevel: "string",
        ruleScope: {
            type: "string",
            projectIds: ["string"],
        },
        type: "string",
        name: "string",
        notificationSettings: {
            enableTeamOwnerNotifications: false,
            incidentIoRoutingKey: "string",
            vercelNotificationsMinimumSeverityLevel: "string",
        },
        tags: ["string"],
        teamId: "string",
        triggers: [{
            type: "string",
            filter: "string",
        }],
    });
    
    type: vercel:AlertRule
    properties:
        matchMinimumSeverityLevel: string
        name: string
        notificationSettings:
            enableTeamOwnerNotifications: false
            incidentIoRoutingKey: string
            vercelNotificationsMinimumSeverityLevel: string
        ruleScope:
            projectIds:
                - string
            type: string
        tags:
            - string
        teamId: string
        triggers:
            - filter: string
              type: string
        type: string
    

    AlertRule Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The AlertRule resource accepts the following input properties:

    MatchMinimumSeverityLevel string
    The minimum severity matched by a built-in rule. Must be low, medium, or high; high matches High and Critical alerts. To notify a destination only for Critical alerts, set minimum_severity_level = "critical" on the notification link. Existing rules that already use critical can still be read and imported, but critical cannot be newly written.
    RuleScope Pulumiverse.Vercel.Inputs.AlertRuleRuleScope
    The projects affected by the rule. Use all, include, or exclude.
    Type string
    The alert rule type. Currently only built-in is supported.
    Name string
    A human-readable name for the alert rule.
    NotificationSettings Pulumiverse.Vercel.Inputs.AlertRuleNotificationSettings
    Notification delivery settings stored on the rule. Notification destination links are managed with the vercel.AlertRuleSlackNotification and vercel.AlertRuleWebhookNotification resources.
    Tags List<string>
    Up to 10 unique tags used to organize the rule. Removing all tags clears them.
    TeamId string
    The ID of the team that owns the alert rule. Required if a default team is not configured in the provider.
    Triggers List<Pulumiverse.Vercel.Inputs.AlertRuleTrigger>
    The built-in anomaly triggers enabled for a built-in rule. A nonempty set is required when creating a rule. Omit this attribute to preserve a response-only legacy trigger mode after import.
    MatchMinimumSeverityLevel string
    The minimum severity matched by a built-in rule. Must be low, medium, or high; high matches High and Critical alerts. To notify a destination only for Critical alerts, set minimum_severity_level = "critical" on the notification link. Existing rules that already use critical can still be read and imported, but critical cannot be newly written.
    RuleScope AlertRuleRuleScopeArgs
    The projects affected by the rule. Use all, include, or exclude.
    Type string
    The alert rule type. Currently only built-in is supported.
    Name string
    A human-readable name for the alert rule.
    NotificationSettings AlertRuleNotificationSettingsArgs
    Notification delivery settings stored on the rule. Notification destination links are managed with the vercel.AlertRuleSlackNotification and vercel.AlertRuleWebhookNotification resources.
    Tags []string
    Up to 10 unique tags used to organize the rule. Removing all tags clears them.
    TeamId string
    The ID of the team that owns the alert rule. Required if a default team is not configured in the provider.
    Triggers []AlertRuleTriggerArgs
    The built-in anomaly triggers enabled for a built-in rule. A nonempty set is required when creating a rule. Omit this attribute to preserve a response-only legacy trigger mode after import.
    match_minimum_severity_level string
    The minimum severity matched by a built-in rule. Must be low, medium, or high; high matches High and Critical alerts. To notify a destination only for Critical alerts, set minimum_severity_level = "critical" on the notification link. Existing rules that already use critical can still be read and imported, but critical cannot be newly written.
    rule_scope object
    The projects affected by the rule. Use all, include, or exclude.
    type string
    The alert rule type. Currently only built-in is supported.
    name string
    A human-readable name for the alert rule.
    notification_settings object
    Notification delivery settings stored on the rule. Notification destination links are managed with the vercel.AlertRuleSlackNotification and vercel.AlertRuleWebhookNotification resources.
    tags list(string)
    Up to 10 unique tags used to organize the rule. Removing all tags clears them.
    team_id string
    The ID of the team that owns the alert rule. Required if a default team is not configured in the provider.
    triggers list(object)
    The built-in anomaly triggers enabled for a built-in rule. A nonempty set is required when creating a rule. Omit this attribute to preserve a response-only legacy trigger mode after import.
    matchMinimumSeverityLevel String
    The minimum severity matched by a built-in rule. Must be low, medium, or high; high matches High and Critical alerts. To notify a destination only for Critical alerts, set minimum_severity_level = "critical" on the notification link. Existing rules that already use critical can still be read and imported, but critical cannot be newly written.
    ruleScope AlertRuleRuleScope
    The projects affected by the rule. Use all, include, or exclude.
    type String
    The alert rule type. Currently only built-in is supported.
    name String
    A human-readable name for the alert rule.
    notificationSettings AlertRuleNotificationSettings
    Notification delivery settings stored on the rule. Notification destination links are managed with the vercel.AlertRuleSlackNotification and vercel.AlertRuleWebhookNotification resources.
    tags List<String>
    Up to 10 unique tags used to organize the rule. Removing all tags clears them.
    teamId String
    The ID of the team that owns the alert rule. Required if a default team is not configured in the provider.
    triggers List<AlertRuleTrigger>
    The built-in anomaly triggers enabled for a built-in rule. A nonempty set is required when creating a rule. Omit this attribute to preserve a response-only legacy trigger mode after import.
    matchMinimumSeverityLevel string
    The minimum severity matched by a built-in rule. Must be low, medium, or high; high matches High and Critical alerts. To notify a destination only for Critical alerts, set minimum_severity_level = "critical" on the notification link. Existing rules that already use critical can still be read and imported, but critical cannot be newly written.
    ruleScope AlertRuleRuleScope
    The projects affected by the rule. Use all, include, or exclude.
    type string
    The alert rule type. Currently only built-in is supported.
    name string
    A human-readable name for the alert rule.
    notificationSettings AlertRuleNotificationSettings
    Notification delivery settings stored on the rule. Notification destination links are managed with the vercel.AlertRuleSlackNotification and vercel.AlertRuleWebhookNotification resources.
    tags string[]
    Up to 10 unique tags used to organize the rule. Removing all tags clears them.
    teamId string
    The ID of the team that owns the alert rule. Required if a default team is not configured in the provider.
    triggers AlertRuleTrigger[]
    The built-in anomaly triggers enabled for a built-in rule. A nonempty set is required when creating a rule. Omit this attribute to preserve a response-only legacy trigger mode after import.
    match_minimum_severity_level str
    The minimum severity matched by a built-in rule. Must be low, medium, or high; high matches High and Critical alerts. To notify a destination only for Critical alerts, set minimum_severity_level = "critical" on the notification link. Existing rules that already use critical can still be read and imported, but critical cannot be newly written.
    rule_scope AlertRuleRuleScopeArgs
    The projects affected by the rule. Use all, include, or exclude.
    type str
    The alert rule type. Currently only built-in is supported.
    name str
    A human-readable name for the alert rule.
    notification_settings AlertRuleNotificationSettingsArgs
    Notification delivery settings stored on the rule. Notification destination links are managed with the vercel.AlertRuleSlackNotification and vercel.AlertRuleWebhookNotification resources.
    tags Sequence[str]
    Up to 10 unique tags used to organize the rule. Removing all tags clears them.
    team_id str
    The ID of the team that owns the alert rule. Required if a default team is not configured in the provider.
    triggers Sequence[AlertRuleTriggerArgs]
    The built-in anomaly triggers enabled for a built-in rule. A nonempty set is required when creating a rule. Omit this attribute to preserve a response-only legacy trigger mode after import.
    matchMinimumSeverityLevel String
    The minimum severity matched by a built-in rule. Must be low, medium, or high; high matches High and Critical alerts. To notify a destination only for Critical alerts, set minimum_severity_level = "critical" on the notification link. Existing rules that already use critical can still be read and imported, but critical cannot be newly written.
    ruleScope Property Map
    The projects affected by the rule. Use all, include, or exclude.
    type String
    The alert rule type. Currently only built-in is supported.
    name String
    A human-readable name for the alert rule.
    notificationSettings Property Map
    Notification delivery settings stored on the rule. Notification destination links are managed with the vercel.AlertRuleSlackNotification and vercel.AlertRuleWebhookNotification resources.
    tags List<String>
    Up to 10 unique tags used to organize the rule. Removing all tags clears them.
    teamId String
    The ID of the team that owns the alert rule. Required if a default team is not configured in the provider.
    triggers List<Property Map>
    The built-in anomaly triggers enabled for a built-in rule. A nonempty set is required when creating a rule. Omit this attribute to preserve a response-only legacy trigger mode after import.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AlertRule resource produces the following output properties:

    CreatedAt int
    Creation time as a Unix epoch timestamp in milliseconds.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsDefault bool
    Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
    TriggerMode string
    The API trigger selection mode. all and an empty selected set are response-only legacy states; omit triggers to preserve either state after import.
    UpdatedAt int
    Last update time as a Unix epoch timestamp in milliseconds.
    CreatedAt int
    Creation time as a Unix epoch timestamp in milliseconds.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsDefault bool
    Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
    TriggerMode string
    The API trigger selection mode. all and an empty selected set are response-only legacy states; omit triggers to preserve either state after import.
    UpdatedAt int
    Last update time as a Unix epoch timestamp in milliseconds.
    created_at number
    Creation time as a Unix epoch timestamp in milliseconds.
    id string
    The provider-assigned unique ID for this managed resource.
    is_default bool
    Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
    trigger_mode string
    The API trigger selection mode. all and an empty selected set are response-only legacy states; omit triggers to preserve either state after import.
    updated_at number
    Last update time as a Unix epoch timestamp in milliseconds.
    createdAt Integer
    Creation time as a Unix epoch timestamp in milliseconds.
    id String
    The provider-assigned unique ID for this managed resource.
    isDefault Boolean
    Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
    triggerMode String
    The API trigger selection mode. all and an empty selected set are response-only legacy states; omit triggers to preserve either state after import.
    updatedAt Integer
    Last update time as a Unix epoch timestamp in milliseconds.
    createdAt number
    Creation time as a Unix epoch timestamp in milliseconds.
    id string
    The provider-assigned unique ID for this managed resource.
    isDefault boolean
    Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
    triggerMode string
    The API trigger selection mode. all and an empty selected set are response-only legacy states; omit triggers to preserve either state after import.
    updatedAt number
    Last update time as a Unix epoch timestamp in milliseconds.
    created_at int
    Creation time as a Unix epoch timestamp in milliseconds.
    id str
    The provider-assigned unique ID for this managed resource.
    is_default bool
    Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
    trigger_mode str
    The API trigger selection mode. all and an empty selected set are response-only legacy states; omit triggers to preserve either state after import.
    updated_at int
    Last update time as a Unix epoch timestamp in milliseconds.
    createdAt Number
    Creation time as a Unix epoch timestamp in milliseconds.
    id String
    The provider-assigned unique ID for this managed resource.
    isDefault Boolean
    Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
    triggerMode String
    The API trigger selection mode. all and an empty selected set are response-only legacy states; omit triggers to preserve either state after import.
    updatedAt Number
    Last update time as a Unix epoch timestamp in milliseconds.

    Look up Existing AlertRule Resource

    Get an existing AlertRule 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?: AlertRuleState, opts?: CustomResourceOptions): AlertRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[int] = None,
            is_default: Optional[bool] = None,
            match_minimum_severity_level: Optional[str] = None,
            name: Optional[str] = None,
            notification_settings: Optional[AlertRuleNotificationSettingsArgs] = None,
            rule_scope: Optional[AlertRuleRuleScopeArgs] = None,
            tags: Optional[Sequence[str]] = None,
            team_id: Optional[str] = None,
            trigger_mode: Optional[str] = None,
            triggers: Optional[Sequence[AlertRuleTriggerArgs]] = None,
            type: Optional[str] = None,
            updated_at: Optional[int] = None) -> AlertRule
    func GetAlertRule(ctx *Context, name string, id IDInput, state *AlertRuleState, opts ...ResourceOption) (*AlertRule, error)
    public static AlertRule Get(string name, Input<string> id, AlertRuleState? state, CustomResourceOptions? opts = null)
    public static AlertRule get(String name, Output<String> id, AlertRuleState state, CustomResourceOptions options)
    resources:  _:    type: vercel:AlertRule    get:      id: ${id}
    import {
      to = vercel_alert_rule.example
      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:
    CreatedAt int
    Creation time as a Unix epoch timestamp in milliseconds.
    IsDefault bool
    Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
    MatchMinimumSeverityLevel string
    The minimum severity matched by a built-in rule. Must be low, medium, or high; high matches High and Critical alerts. To notify a destination only for Critical alerts, set minimum_severity_level = "critical" on the notification link. Existing rules that already use critical can still be read and imported, but critical cannot be newly written.
    Name string
    A human-readable name for the alert rule.
    NotificationSettings Pulumiverse.Vercel.Inputs.AlertRuleNotificationSettings
    Notification delivery settings stored on the rule. Notification destination links are managed with the vercel.AlertRuleSlackNotification and vercel.AlertRuleWebhookNotification resources.
    RuleScope Pulumiverse.Vercel.Inputs.AlertRuleRuleScope
    The projects affected by the rule. Use all, include, or exclude.
    Tags List<string>
    Up to 10 unique tags used to organize the rule. Removing all tags clears them.
    TeamId string
    The ID of the team that owns the alert rule. Required if a default team is not configured in the provider.
    TriggerMode string
    The API trigger selection mode. all and an empty selected set are response-only legacy states; omit triggers to preserve either state after import.
    Triggers List<Pulumiverse.Vercel.Inputs.AlertRuleTrigger>
    The built-in anomaly triggers enabled for a built-in rule. A nonempty set is required when creating a rule. Omit this attribute to preserve a response-only legacy trigger mode after import.
    Type string
    The alert rule type. Currently only built-in is supported.
    UpdatedAt int
    Last update time as a Unix epoch timestamp in milliseconds.
    CreatedAt int
    Creation time as a Unix epoch timestamp in milliseconds.
    IsDefault bool
    Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
    MatchMinimumSeverityLevel string
    The minimum severity matched by a built-in rule. Must be low, medium, or high; high matches High and Critical alerts. To notify a destination only for Critical alerts, set minimum_severity_level = "critical" on the notification link. Existing rules that already use critical can still be read and imported, but critical cannot be newly written.
    Name string
    A human-readable name for the alert rule.
    NotificationSettings AlertRuleNotificationSettingsArgs
    Notification delivery settings stored on the rule. Notification destination links are managed with the vercel.AlertRuleSlackNotification and vercel.AlertRuleWebhookNotification resources.
    RuleScope AlertRuleRuleScopeArgs
    The projects affected by the rule. Use all, include, or exclude.
    Tags []string
    Up to 10 unique tags used to organize the rule. Removing all tags clears them.
    TeamId string
    The ID of the team that owns the alert rule. Required if a default team is not configured in the provider.
    TriggerMode string
    The API trigger selection mode. all and an empty selected set are response-only legacy states; omit triggers to preserve either state after import.
    Triggers []AlertRuleTriggerArgs
    The built-in anomaly triggers enabled for a built-in rule. A nonempty set is required when creating a rule. Omit this attribute to preserve a response-only legacy trigger mode after import.
    Type string
    The alert rule type. Currently only built-in is supported.
    UpdatedAt int
    Last update time as a Unix epoch timestamp in milliseconds.
    created_at number
    Creation time as a Unix epoch timestamp in milliseconds.
    is_default bool
    Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
    match_minimum_severity_level string
    The minimum severity matched by a built-in rule. Must be low, medium, or high; high matches High and Critical alerts. To notify a destination only for Critical alerts, set minimum_severity_level = "critical" on the notification link. Existing rules that already use critical can still be read and imported, but critical cannot be newly written.
    name string
    A human-readable name for the alert rule.
    notification_settings object
    Notification delivery settings stored on the rule. Notification destination links are managed with the vercel.AlertRuleSlackNotification and vercel.AlertRuleWebhookNotification resources.
    rule_scope object
    The projects affected by the rule. Use all, include, or exclude.
    tags list(string)
    Up to 10 unique tags used to organize the rule. Removing all tags clears them.
    team_id string
    The ID of the team that owns the alert rule. Required if a default team is not configured in the provider.
    trigger_mode string
    The API trigger selection mode. all and an empty selected set are response-only legacy states; omit triggers to preserve either state after import.
    triggers list(object)
    The built-in anomaly triggers enabled for a built-in rule. A nonempty set is required when creating a rule. Omit this attribute to preserve a response-only legacy trigger mode after import.
    type string
    The alert rule type. Currently only built-in is supported.
    updated_at number
    Last update time as a Unix epoch timestamp in milliseconds.
    createdAt Integer
    Creation time as a Unix epoch timestamp in milliseconds.
    isDefault Boolean
    Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
    matchMinimumSeverityLevel String
    The minimum severity matched by a built-in rule. Must be low, medium, or high; high matches High and Critical alerts. To notify a destination only for Critical alerts, set minimum_severity_level = "critical" on the notification link. Existing rules that already use critical can still be read and imported, but critical cannot be newly written.
    name String
    A human-readable name for the alert rule.
    notificationSettings AlertRuleNotificationSettings
    Notification delivery settings stored on the rule. Notification destination links are managed with the vercel.AlertRuleSlackNotification and vercel.AlertRuleWebhookNotification resources.
    ruleScope AlertRuleRuleScope
    The projects affected by the rule. Use all, include, or exclude.
    tags List<String>
    Up to 10 unique tags used to organize the rule. Removing all tags clears them.
    teamId String
    The ID of the team that owns the alert rule. Required if a default team is not configured in the provider.
    triggerMode String
    The API trigger selection mode. all and an empty selected set are response-only legacy states; omit triggers to preserve either state after import.
    triggers List<AlertRuleTrigger>
    The built-in anomaly triggers enabled for a built-in rule. A nonempty set is required when creating a rule. Omit this attribute to preserve a response-only legacy trigger mode after import.
    type String
    The alert rule type. Currently only built-in is supported.
    updatedAt Integer
    Last update time as a Unix epoch timestamp in milliseconds.
    createdAt number
    Creation time as a Unix epoch timestamp in milliseconds.
    isDefault boolean
    Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
    matchMinimumSeverityLevel string
    The minimum severity matched by a built-in rule. Must be low, medium, or high; high matches High and Critical alerts. To notify a destination only for Critical alerts, set minimum_severity_level = "critical" on the notification link. Existing rules that already use critical can still be read and imported, but critical cannot be newly written.
    name string
    A human-readable name for the alert rule.
    notificationSettings AlertRuleNotificationSettings
    Notification delivery settings stored on the rule. Notification destination links are managed with the vercel.AlertRuleSlackNotification and vercel.AlertRuleWebhookNotification resources.
    ruleScope AlertRuleRuleScope
    The projects affected by the rule. Use all, include, or exclude.
    tags string[]
    Up to 10 unique tags used to organize the rule. Removing all tags clears them.
    teamId string
    The ID of the team that owns the alert rule. Required if a default team is not configured in the provider.
    triggerMode string
    The API trigger selection mode. all and an empty selected set are response-only legacy states; omit triggers to preserve either state after import.
    triggers AlertRuleTrigger[]
    The built-in anomaly triggers enabled for a built-in rule. A nonempty set is required when creating a rule. Omit this attribute to preserve a response-only legacy trigger mode after import.
    type string
    The alert rule type. Currently only built-in is supported.
    updatedAt number
    Last update time as a Unix epoch timestamp in milliseconds.
    created_at int
    Creation time as a Unix epoch timestamp in milliseconds.
    is_default bool
    Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
    match_minimum_severity_level str
    The minimum severity matched by a built-in rule. Must be low, medium, or high; high matches High and Critical alerts. To notify a destination only for Critical alerts, set minimum_severity_level = "critical" on the notification link. Existing rules that already use critical can still be read and imported, but critical cannot be newly written.
    name str
    A human-readable name for the alert rule.
    notification_settings AlertRuleNotificationSettingsArgs
    Notification delivery settings stored on the rule. Notification destination links are managed with the vercel.AlertRuleSlackNotification and vercel.AlertRuleWebhookNotification resources.
    rule_scope AlertRuleRuleScopeArgs
    The projects affected by the rule. Use all, include, or exclude.
    tags Sequence[str]
    Up to 10 unique tags used to organize the rule. Removing all tags clears them.
    team_id str
    The ID of the team that owns the alert rule. Required if a default team is not configured in the provider.
    trigger_mode str
    The API trigger selection mode. all and an empty selected set are response-only legacy states; omit triggers to preserve either state after import.
    triggers Sequence[AlertRuleTriggerArgs]
    The built-in anomaly triggers enabled for a built-in rule. A nonempty set is required when creating a rule. Omit this attribute to preserve a response-only legacy trigger mode after import.
    type str
    The alert rule type. Currently only built-in is supported.
    updated_at int
    Last update time as a Unix epoch timestamp in milliseconds.
    createdAt Number
    Creation time as a Unix epoch timestamp in milliseconds.
    isDefault Boolean
    Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
    matchMinimumSeverityLevel String
    The minimum severity matched by a built-in rule. Must be low, medium, or high; high matches High and Critical alerts. To notify a destination only for Critical alerts, set minimum_severity_level = "critical" on the notification link. Existing rules that already use critical can still be read and imported, but critical cannot be newly written.
    name String
    A human-readable name for the alert rule.
    notificationSettings Property Map
    Notification delivery settings stored on the rule. Notification destination links are managed with the vercel.AlertRuleSlackNotification and vercel.AlertRuleWebhookNotification resources.
    ruleScope Property Map
    The projects affected by the rule. Use all, include, or exclude.
    tags List<String>
    Up to 10 unique tags used to organize the rule. Removing all tags clears them.
    teamId String
    The ID of the team that owns the alert rule. Required if a default team is not configured in the provider.
    triggerMode String
    The API trigger selection mode. all and an empty selected set are response-only legacy states; omit triggers to preserve either state after import.
    triggers List<Property Map>
    The built-in anomaly triggers enabled for a built-in rule. A nonempty set is required when creating a rule. Omit this attribute to preserve a response-only legacy trigger mode after import.
    type String
    The alert rule type. Currently only built-in is supported.
    updatedAt Number
    Last update time as a Unix epoch timestamp in milliseconds.

    Supporting Types

    AlertRuleNotificationSettings, AlertRuleNotificationSettingsArgs

    EnableTeamOwnerNotifications bool
    IncidentIoRoutingKey string
    VercelNotificationsMinimumSeverityLevel string
    Set to critical to send Vercel notifications only for alerts classified as Critical. Omit to send Vercel notifications for every severity.
    EnableTeamOwnerNotifications bool
    IncidentIoRoutingKey string
    VercelNotificationsMinimumSeverityLevel string
    Set to critical to send Vercel notifications only for alerts classified as Critical. Omit to send Vercel notifications for every severity.
    enable_team_owner_notifications bool
    incident_io_routing_key string
    vercel_notifications_minimum_severity_level string
    Set to critical to send Vercel notifications only for alerts classified as Critical. Omit to send Vercel notifications for every severity.
    enableTeamOwnerNotifications Boolean
    incidentIoRoutingKey String
    vercelNotificationsMinimumSeverityLevel String
    Set to critical to send Vercel notifications only for alerts classified as Critical. Omit to send Vercel notifications for every severity.
    enableTeamOwnerNotifications boolean
    incidentIoRoutingKey string
    vercelNotificationsMinimumSeverityLevel string
    Set to critical to send Vercel notifications only for alerts classified as Critical. Omit to send Vercel notifications for every severity.
    enable_team_owner_notifications bool
    incident_io_routing_key str
    vercel_notifications_minimum_severity_level str
    Set to critical to send Vercel notifications only for alerts classified as Critical. Omit to send Vercel notifications for every severity.
    enableTeamOwnerNotifications Boolean
    incidentIoRoutingKey String
    vercelNotificationsMinimumSeverityLevel String
    Set to critical to send Vercel notifications only for alerts classified as Critical. Omit to send Vercel notifications for every severity.

    AlertRuleRuleScope, AlertRuleRuleScopeArgs

    Type string
    ProjectIds List<string>
    The project IDs included in or excluded from a built-in rule.
    Type string
    ProjectIds []string
    The project IDs included in or excluded from a built-in rule.
    type string
    project_ids list(string)
    The project IDs included in or excluded from a built-in rule.
    type String
    projectIds List<String>
    The project IDs included in or excluded from a built-in rule.
    type string
    projectIds string[]
    The project IDs included in or excluded from a built-in rule.
    type str
    project_ids Sequence[str]
    The project IDs included in or excluded from a built-in rule.
    type String
    projectIds List<String>
    The project IDs included in or excluded from a built-in rule.

    AlertRuleTrigger, AlertRuleTriggerArgs

    Type string
    The built-in anomaly trigger type.
    Filter string
    A KQL filter for error_anomaly or usage_anomaly. See the trigger filter documentation above for supported fields and values.
    Type string
    The built-in anomaly trigger type.
    Filter string
    A KQL filter for error_anomaly or usage_anomaly. See the trigger filter documentation above for supported fields and values.
    type string
    The built-in anomaly trigger type.
    filter string
    A KQL filter for error_anomaly or usage_anomaly. See the trigger filter documentation above for supported fields and values.
    type String
    The built-in anomaly trigger type.
    filter String
    A KQL filter for error_anomaly or usage_anomaly. See the trigger filter documentation above for supported fields and values.
    type string
    The built-in anomaly trigger type.
    filter string
    A KQL filter for error_anomaly or usage_anomaly. See the trigger filter documentation above for supported fields and values.
    type str
    The built-in anomaly trigger type.
    filter str
    A KQL filter for error_anomaly or usage_anomaly. See the trigger filter documentation above for supported fields and values.
    type String
    The built-in anomaly trigger type.
    filter String
    A KQL filter for error_anomaly or usage_anomaly. See the trigger filter documentation above for supported fields and values.

    Import

    The pulumi import command can be used, for example:

    If a default team is configured in the provider, use the alert_rule_id.

    $ pulumi import vercel:index/alertRule:AlertRule example ar_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    

    Otherwise, import via team_id/alert_rule_id.

    $ pulumi import vercel:index/alertRule:AlertRule example team_xxxxxxxxxxxxxxxxxxxxxxxx/ar_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    vercel pulumiverse/pulumi-vercel
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vercel Terraform Provider.
    vercel logo vercel logo
    Viewing docs for Vercel v5.21.1
    published on Thursday, Oct 15, 2026 by Pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial