published on Thursday, Oct 15, 2026 by Pulumiverse
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 type | Filter support | Allowed fields |
|---|---|---|
error_anomaly | Required | statusGroup, route |
usage_anomaly | Optional | metrics |
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_durationfluid_durationfast_data_transferedge_requestsfunction_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:
- Match
Minimum stringSeverity Level - The minimum severity matched by a built-in rule. Must be
low,medium, orhigh;highmatches High and Critical alerts. To notify a destination only for Critical alerts, setminimum_severity_level = "critical"on the notification link. Existing rules that already usecriticalcan still be read and imported, butcriticalcannot be newly written. - Rule
Scope Pulumiverse.Vercel. Inputs. Alert Rule Rule Scope - The projects affected by the rule. Use
all,include, orexclude. - Type string
- The alert rule type. Currently only
built-inis supported. - Name string
- A human-readable name for the alert rule.
- Notification
Settings Pulumiverse.Vercel. Inputs. Alert Rule Notification Settings - Notification delivery settings stored on the rule. Notification destination links are managed with the
vercel.AlertRuleSlackNotificationandvercel.AlertRuleWebhookNotificationresources. - 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<Pulumiverse.
Vercel. Inputs. Alert Rule Trigger> - 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 stringSeverity Level - The minimum severity matched by a built-in rule. Must be
low,medium, orhigh;highmatches High and Critical alerts. To notify a destination only for Critical alerts, setminimum_severity_level = "critical"on the notification link. Existing rules that already usecriticalcan still be read and imported, butcriticalcannot be newly written. - Rule
Scope AlertRule Rule Scope Args - The projects affected by the rule. Use
all,include, orexclude. - Type string
- The alert rule type. Currently only
built-inis supported. - Name string
- A human-readable name for the alert rule.
- Notification
Settings AlertRule Notification Settings Args - Notification delivery settings stored on the rule. Notification destination links are managed with the
vercel.AlertRuleSlackNotificationandvercel.AlertRuleWebhookNotificationresources. - []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
[]Alert
Rule Trigger Args - 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_ stringseverity_ level - The minimum severity matched by a built-in rule. Must be
low,medium, orhigh;highmatches High and Critical alerts. To notify a destination only for Critical alerts, setminimum_severity_level = "critical"on the notification link. Existing rules that already usecriticalcan still be read and imported, butcriticalcannot be newly written. - rule_
scope object - The projects affected by the rule. Use
all,include, orexclude. - type string
- The alert rule type. Currently only
built-inis 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.AlertRuleSlackNotificationandvercel.AlertRuleWebhookNotificationresources. - 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.
- match
Minimum StringSeverity Level - The minimum severity matched by a built-in rule. Must be
low,medium, orhigh;highmatches High and Critical alerts. To notify a destination only for Critical alerts, setminimum_severity_level = "critical"on the notification link. Existing rules that already usecriticalcan still be read and imported, butcriticalcannot be newly written. - rule
Scope AlertRule Rule Scope - The projects affected by the rule. Use
all,include, orexclude. - type String
- The alert rule type. Currently only
built-inis supported. - name String
- A human-readable name for the alert rule.
- notification
Settings AlertRule Notification Settings - Notification delivery settings stored on the rule. Notification destination links are managed with the
vercel.AlertRuleSlackNotificationandvercel.AlertRuleWebhookNotificationresources. - 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<Alert
Rule Trigger> - 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 stringSeverity Level - The minimum severity matched by a built-in rule. Must be
low,medium, orhigh;highmatches High and Critical alerts. To notify a destination only for Critical alerts, setminimum_severity_level = "critical"on the notification link. Existing rules that already usecriticalcan still be read and imported, butcriticalcannot be newly written. - rule
Scope AlertRule Rule Scope - The projects affected by the rule. Use
all,include, orexclude. - type string
- The alert rule type. Currently only
built-inis supported. - name string
- A human-readable name for the alert rule.
- notification
Settings AlertRule Notification Settings - Notification delivery settings stored on the rule. Notification destination links are managed with the
vercel.AlertRuleSlackNotificationandvercel.AlertRuleWebhookNotificationresources. - 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
Alert
Rule Trigger[] - 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_ strseverity_ level - The minimum severity matched by a built-in rule. Must be
low,medium, orhigh;highmatches High and Critical alerts. To notify a destination only for Critical alerts, setminimum_severity_level = "critical"on the notification link. Existing rules that already usecriticalcan still be read and imported, butcriticalcannot be newly written. - rule_
scope AlertRule Rule Scope Args - The projects affected by the rule. Use
all,include, orexclude. - type str
- The alert rule type. Currently only
built-inis supported. - name str
- A human-readable name for the alert rule.
- notification_
settings AlertRule Notification Settings Args - Notification delivery settings stored on the rule. Notification destination links are managed with the
vercel.AlertRuleSlackNotificationandvercel.AlertRuleWebhookNotificationresources. - 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[Alert
Rule Trigger Args] - 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 StringSeverity Level - The minimum severity matched by a built-in rule. Must be
low,medium, orhigh;highmatches High and Critical alerts. To notify a destination only for Critical alerts, setminimum_severity_level = "critical"on the notification link. Existing rules that already usecriticalcan still be read and imported, butcriticalcannot be newly written. - rule
Scope Property Map - The projects affected by the rule. Use
all,include, orexclude. - type String
- The alert rule type. Currently only
built-inis supported. - name String
- A human-readable name for the alert rule.
- notification
Settings Property Map - Notification delivery settings stored on the rule. Notification destination links are managed with the
vercel.AlertRuleSlackNotificationandvercel.AlertRuleWebhookNotificationresources. - 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<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:
- Created
At int - 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.
alland an emptyselectedset are response-only legacy states; omittriggersto preserve either state after import. - Updated
At int - Last update time as a Unix epoch timestamp in milliseconds.
- Created
At int - 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.
alland an emptyselectedset are response-only legacy states; omittriggersto preserve either state after import. - Updated
At 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.
alland an emptyselectedset are response-only legacy states; omittriggersto preserve either state after import. - updated_
at number - Last update time as a Unix epoch timestamp in milliseconds.
- created
At Integer - Creation time as a Unix epoch timestamp in milliseconds.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Default Boolean - Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
- trigger
Mode String - The API trigger selection mode.
alland an emptyselectedset are response-only legacy states; omittriggersto preserve either state after import. - updated
At Integer - 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 boolean - Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
- trigger
Mode string - The API trigger selection mode.
alland an emptyselectedset are response-only legacy states; omittriggersto preserve either state after import. - updated
At 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.
alland an emptyselectedset are response-only legacy states; omittriggersto preserve either state after import. - updated_
at 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 Boolean - Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
- trigger
Mode String - The API trigger selection mode.
alland an emptyselectedset are response-only legacy states; omittriggersto preserve either state after import. - updated
At 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) -> AlertRulefunc 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.
- 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 stringSeverity Level - The minimum severity matched by a built-in rule. Must be
low,medium, orhigh;highmatches High and Critical alerts. To notify a destination only for Critical alerts, setminimum_severity_level = "critical"on the notification link. Existing rules that already usecriticalcan still be read and imported, butcriticalcannot be newly written. - Name string
- A human-readable name for the alert rule.
- Notification
Settings Pulumiverse.Vercel. Inputs. Alert Rule Notification Settings - Notification delivery settings stored on the rule. Notification destination links are managed with the
vercel.AlertRuleSlackNotificationandvercel.AlertRuleWebhookNotificationresources. - Rule
Scope Pulumiverse.Vercel. Inputs. Alert Rule Rule Scope - The projects affected by the rule. Use
all,include, orexclude. - 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.
alland an emptyselectedset are response-only legacy states; omittriggersto preserve either state after import. - Triggers
List<Pulumiverse.
Vercel. Inputs. Alert Rule Trigger> - 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-inis supported. - Updated
At int - 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 stringSeverity Level - The minimum severity matched by a built-in rule. Must be
low,medium, orhigh;highmatches High and Critical alerts. To notify a destination only for Critical alerts, setminimum_severity_level = "critical"on the notification link. Existing rules that already usecriticalcan still be read and imported, butcriticalcannot be newly written. - Name string
- A human-readable name for the alert rule.
- Notification
Settings AlertRule Notification Settings Args - Notification delivery settings stored on the rule. Notification destination links are managed with the
vercel.AlertRuleSlackNotificationandvercel.AlertRuleWebhookNotificationresources. - Rule
Scope AlertRule Rule Scope Args - The projects affected by the rule. Use
all,include, orexclude. - []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.
alland an emptyselectedset are response-only legacy states; omittriggersto preserve either state after import. - Triggers
[]Alert
Rule Trigger Args - 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-inis supported. - Updated
At 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_ stringseverity_ level - The minimum severity matched by a built-in rule. Must be
low,medium, orhigh;highmatches High and Critical alerts. To notify a destination only for Critical alerts, setminimum_severity_level = "critical"on the notification link. Existing rules that already usecriticalcan still be read and imported, butcriticalcannot 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.AlertRuleSlackNotificationandvercel.AlertRuleWebhookNotificationresources. - rule_
scope object - The projects affected by the rule. Use
all,include, orexclude. - 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.
alland an emptyselectedset are response-only legacy states; omittriggersto 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-inis supported. - updated_
at number - Last update time as a Unix epoch timestamp in milliseconds.
- created
At Integer - Creation time as a Unix epoch timestamp in milliseconds.
- is
Default Boolean - Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
- match
Minimum StringSeverity Level - The minimum severity matched by a built-in rule. Must be
low,medium, orhigh;highmatches High and Critical alerts. To notify a destination only for Critical alerts, setminimum_severity_level = "critical"on the notification link. Existing rules that already usecriticalcan still be read and imported, butcriticalcannot be newly written. - name String
- A human-readable name for the alert rule.
- notification
Settings AlertRule Notification Settings - Notification delivery settings stored on the rule. Notification destination links are managed with the
vercel.AlertRuleSlackNotificationandvercel.AlertRuleWebhookNotificationresources. - rule
Scope AlertRule Rule Scope - The projects affected by the rule. Use
all,include, orexclude. - 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.
alland an emptyselectedset are response-only legacy states; omittriggersto preserve either state after import. - triggers
List<Alert
Rule Trigger> - 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-inis supported. - updated
At Integer - Last update time as a Unix epoch timestamp in milliseconds.
- created
At number - Creation time as a Unix epoch timestamp in milliseconds.
- is
Default boolean - Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
- match
Minimum stringSeverity Level - The minimum severity matched by a built-in rule. Must be
low,medium, orhigh;highmatches High and Critical alerts. To notify a destination only for Critical alerts, setminimum_severity_level = "critical"on the notification link. Existing rules that already usecriticalcan still be read and imported, butcriticalcannot be newly written. - name string
- A human-readable name for the alert rule.
- notification
Settings AlertRule Notification Settings - Notification delivery settings stored on the rule. Notification destination links are managed with the
vercel.AlertRuleSlackNotificationandvercel.AlertRuleWebhookNotificationresources. - rule
Scope AlertRule Rule Scope - The projects affected by the rule. Use
all,include, orexclude. - 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.
alland an emptyselectedset are response-only legacy states; omittriggersto preserve either state after import. - triggers
Alert
Rule Trigger[] - 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-inis supported. - updated
At 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_ strseverity_ level - The minimum severity matched by a built-in rule. Must be
low,medium, orhigh;highmatches High and Critical alerts. To notify a destination only for Critical alerts, setminimum_severity_level = "critical"on the notification link. Existing rules that already usecriticalcan still be read and imported, butcriticalcannot be newly written. - name str
- A human-readable name for the alert rule.
- notification_
settings AlertRule Notification Settings Args - Notification delivery settings stored on the rule. Notification destination links are managed with the
vercel.AlertRuleSlackNotificationandvercel.AlertRuleWebhookNotificationresources. - rule_
scope AlertRule Rule Scope Args - The projects affected by the rule. Use
all,include, orexclude. - 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.
alland an emptyselectedset are response-only legacy states; omittriggersto preserve either state after import. - triggers
Sequence[Alert
Rule Trigger Args] - 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-inis supported. - updated_
at 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 Boolean - Whether this is the immutable team default rule. Default rules cannot be managed by this resource.
- match
Minimum StringSeverity Level - The minimum severity matched by a built-in rule. Must be
low,medium, orhigh;highmatches High and Critical alerts. To notify a destination only for Critical alerts, setminimum_severity_level = "critical"on the notification link. Existing rules that already usecriticalcan still be read and imported, butcriticalcannot be newly written. - name String
- A human-readable name for the alert rule.
- notification
Settings Property Map - Notification delivery settings stored on the rule. Notification destination links are managed with the
vercel.AlertRuleSlackNotificationandvercel.AlertRuleWebhookNotificationresources. - rule
Scope Property Map - The projects affected by the rule. Use
all,include, orexclude. - 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.
alland an emptyselectedset are response-only legacy states; omittriggersto 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-inis supported. - updated
At Number - Last update time as a Unix epoch timestamp in milliseconds.
Supporting Types
AlertRuleNotificationSettings, AlertRuleNotificationSettingsArgs
- Enable
Team boolOwner Notifications - Incident
Io stringRouting Key - Vercel
Notifications stringMinimum Severity Level - Set to
criticalto send Vercel notifications only for alerts classified as Critical. Omit to send Vercel notifications for every severity.
- Enable
Team boolOwner Notifications - Incident
Io stringRouting Key - Vercel
Notifications stringMinimum Severity Level - Set to
criticalto send Vercel notifications only for alerts classified as Critical. Omit to send Vercel notifications for every severity.
- enable_
team_ boolowner_ notifications - incident_
io_ stringrouting_ key - vercel_
notifications_ stringminimum_ severity_ level - Set to
criticalto send Vercel notifications only for alerts classified as Critical. Omit to send Vercel notifications for every severity.
- enable
Team BooleanOwner Notifications - incident
Io StringRouting Key - vercel
Notifications StringMinimum Severity Level - Set to
criticalto send Vercel notifications only for alerts classified as Critical. Omit to send Vercel notifications for every severity.
- enable
Team booleanOwner Notifications - incident
Io stringRouting Key - vercel
Notifications stringMinimum Severity Level - Set to
criticalto send Vercel notifications only for alerts classified as Critical. Omit to send Vercel notifications for every severity.
- enable_
team_ boolowner_ notifications - incident_
io_ strrouting_ key - vercel_
notifications_ strminimum_ severity_ level - Set to
criticalto send Vercel notifications only for alerts classified as Critical. Omit to send Vercel notifications for every severity.
- enable
Team BooleanOwner Notifications - incident
Io StringRouting Key - vercel
Notifications StringMinimum Severity Level - Set to
criticalto send Vercel notifications only for alerts classified as Critical. Omit to send Vercel notifications for every severity.
AlertRuleRuleScope, AlertRuleRuleScopeArgs
- Type string
- Project
Ids List<string> - The project IDs included in or excluded from a built-in rule.
- Type string
- Project
Ids []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
- project
Ids List<String> - The project IDs included in or excluded from a built-in rule.
- type string
- project
Ids 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
- project
Ids List<String> - The project IDs included in or excluded from a built-in rule.
AlertRuleTrigger, AlertRuleTriggerArgs
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
vercelTerraform Provider.
published on Thursday, Oct 15, 2026 by Pulumiverse