Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Use this data source to query detailed information of vmp alerting rules
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooWorkspace = new volcengine.vmp.Workspace("fooWorkspace", {
instanceTypeId: "vmp.standard.15d",
deleteProtectionEnabled: false,
description: "acc-test-1",
username: "admin123",
password: "***********",
});
const fooContact = new volcengine.vmp.Contact("fooContact", {
email: "acctest1@tftest.com",
webhook: {
address: "https://www.acctest1.com",
},
larkBotWebhook: {
address: "https://www.acctest1.com",
},
dingTalkBotWebhook: {
address: "https://www.dingacctest1.com",
atMobiles: ["18046891812"],
},
phoneNumber: {
countryCode: "+86",
number: "18310101010",
},
});
const foo1Contact = new volcengine.vmp.Contact("foo1Contact", {
email: "acctest2@tftest.com",
webhook: {
address: "https://www.acctest2.com",
},
larkBotWebhook: {
address: "https://www.acctest2.com",
},
dingTalkBotWebhook: {
address: "https://www.dingacctest2.com",
atMobiles: ["18046891813"],
},
phoneNumber: {
countryCode: "+86",
number: "18310101011",
},
});
const fooContactGroup = new volcengine.vmp.ContactGroup("fooContactGroup", {contactIds: [fooContact.id]});
const foo1ContactGroup = new volcengine.vmp.ContactGroup("foo1ContactGroup", {contactIds: [foo1Contact.id]});
const fooNotifyPolicy = new volcengine.vmp.NotifyPolicy("fooNotifyPolicy", {
description: "acc-test-1",
levels: [
{
level: "P1",
contactGroupIds: [fooContactGroup.id],
channels: [
"Email",
"Webhook",
],
},
{
level: "P0",
contactGroupIds: [foo1ContactGroup.id],
channels: ["LarkBotWebhook"],
},
],
});
const fooNotifyGroupPolicy = new volcengine.vmp.NotifyGroupPolicy("fooNotifyGroupPolicy", {
description: "acc-test-1",
levels: [
{
level: "P2",
groupBies: ["__rule__"],
groupWait: "35",
groupInterval: "30",
repeatInterval: "30",
},
{
level: "P0",
groupBies: ["__rule__"],
groupWait: "30",
groupInterval: "30",
repeatInterval: "30",
},
{
level: "P1",
groupBies: ["__rule__"],
groupWait: "40",
groupInterval: "45",
repeatInterval: "30",
},
],
});
const fooAlertingRule = new volcengine.vmp.AlertingRule("fooAlertingRule", {
description: "acc-test-1",
notifyPolicyId: fooNotifyPolicy.id,
notifyGroupPolicyId: fooNotifyGroupPolicy.id,
query: {
workspaceId: fooWorkspace.id,
promQl: "sum(up)",
},
levels: [
{
level: "P0",
"for": "0s",
comparator: ">=",
threshold: 2,
},
{
level: "P1",
"for": "0s",
comparator: ">=",
threshold: 1,
},
{
level: "P2",
"for": "0s",
comparator: ">=",
threshold: 0.5,
},
],
});
const fooAlertingRules = volcengine.vmp.getAlertingRulesOutput({
ids: [fooAlertingRule.id],
});
import pulumi
import pulumi_volcengine as volcengine
foo_workspace = volcengine.vmp.Workspace("fooWorkspace",
instance_type_id="vmp.standard.15d",
delete_protection_enabled=False,
description="acc-test-1",
username="admin123",
password="***********")
foo_contact = volcengine.vmp.Contact("fooContact",
email="acctest1@tftest.com",
webhook=volcengine.vmp.ContactWebhookArgs(
address="https://www.acctest1.com",
),
lark_bot_webhook=volcengine.vmp.ContactLarkBotWebhookArgs(
address="https://www.acctest1.com",
),
ding_talk_bot_webhook=volcengine.vmp.ContactDingTalkBotWebhookArgs(
address="https://www.dingacctest1.com",
at_mobiles=["18046891812"],
),
phone_number=volcengine.vmp.ContactPhoneNumberArgs(
country_code="+86",
number="18310101010",
))
foo1_contact = volcengine.vmp.Contact("foo1Contact",
email="acctest2@tftest.com",
webhook=volcengine.vmp.ContactWebhookArgs(
address="https://www.acctest2.com",
),
lark_bot_webhook=volcengine.vmp.ContactLarkBotWebhookArgs(
address="https://www.acctest2.com",
),
ding_talk_bot_webhook=volcengine.vmp.ContactDingTalkBotWebhookArgs(
address="https://www.dingacctest2.com",
at_mobiles=["18046891813"],
),
phone_number=volcengine.vmp.ContactPhoneNumberArgs(
country_code="+86",
number="18310101011",
))
foo_contact_group = volcengine.vmp.ContactGroup("fooContactGroup", contact_ids=[foo_contact.id])
foo1_contact_group = volcengine.vmp.ContactGroup("foo1ContactGroup", contact_ids=[foo1_contact.id])
foo_notify_policy = volcengine.vmp.NotifyPolicy("fooNotifyPolicy",
description="acc-test-1",
levels=[
volcengine.vmp.NotifyPolicyLevelArgs(
level="P1",
contact_group_ids=[foo_contact_group.id],
channels=[
"Email",
"Webhook",
],
),
volcengine.vmp.NotifyPolicyLevelArgs(
level="P0",
contact_group_ids=[foo1_contact_group.id],
channels=["LarkBotWebhook"],
),
])
foo_notify_group_policy = volcengine.vmp.NotifyGroupPolicy("fooNotifyGroupPolicy",
description="acc-test-1",
levels=[
volcengine.vmp.NotifyGroupPolicyLevelArgs(
level="P2",
group_bies=["__rule__"],
group_wait="35",
group_interval="30",
repeat_interval="30",
),
volcengine.vmp.NotifyGroupPolicyLevelArgs(
level="P0",
group_bies=["__rule__"],
group_wait="30",
group_interval="30",
repeat_interval="30",
),
volcengine.vmp.NotifyGroupPolicyLevelArgs(
level="P1",
group_bies=["__rule__"],
group_wait="40",
group_interval="45",
repeat_interval="30",
),
])
foo_alerting_rule = volcengine.vmp.AlertingRule("fooAlertingRule",
description="acc-test-1",
notify_policy_id=foo_notify_policy.id,
notify_group_policy_id=foo_notify_group_policy.id,
query=volcengine.vmp.AlertingRuleQueryArgs(
workspace_id=foo_workspace.id,
prom_ql="sum(up)",
),
levels=[
volcengine.vmp.AlertingRuleLevelArgs(
level="P0",
for_="0s",
comparator=">=",
threshold=2,
),
volcengine.vmp.AlertingRuleLevelArgs(
level="P1",
for_="0s",
comparator=">=",
threshold=1,
),
volcengine.vmp.AlertingRuleLevelArgs(
level="P2",
for_="0s",
comparator=">=",
threshold=0.5,
),
])
foo_alerting_rules = volcengine.vmp.get_alerting_rules_output(ids=[foo_alerting_rule.id])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vmp"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooWorkspace, err := vmp.NewWorkspace(ctx, "fooWorkspace", &vmp.WorkspaceArgs{
InstanceTypeId: pulumi.String("vmp.standard.15d"),
DeleteProtectionEnabled: pulumi.Bool(false),
Description: pulumi.String("acc-test-1"),
Username: pulumi.String("admin123"),
Password: pulumi.String("***********"),
})
if err != nil {
return err
}
fooContact, err := vmp.NewContact(ctx, "fooContact", &vmp.ContactArgs{
Email: pulumi.String("acctest1@tftest.com"),
Webhook: &vmp.ContactWebhookArgs{
Address: pulumi.String("https://www.acctest1.com"),
},
LarkBotWebhook: &vmp.ContactLarkBotWebhookArgs{
Address: pulumi.String("https://www.acctest1.com"),
},
DingTalkBotWebhook: &vmp.ContactDingTalkBotWebhookArgs{
Address: pulumi.String("https://www.dingacctest1.com"),
AtMobiles: pulumi.StringArray{
pulumi.String("18046891812"),
},
},
PhoneNumber: &vmp.ContactPhoneNumberArgs{
CountryCode: pulumi.String("+86"),
Number: pulumi.String("18310101010"),
},
})
if err != nil {
return err
}
foo1Contact, err := vmp.NewContact(ctx, "foo1Contact", &vmp.ContactArgs{
Email: pulumi.String("acctest2@tftest.com"),
Webhook: &vmp.ContactWebhookArgs{
Address: pulumi.String("https://www.acctest2.com"),
},
LarkBotWebhook: &vmp.ContactLarkBotWebhookArgs{
Address: pulumi.String("https://www.acctest2.com"),
},
DingTalkBotWebhook: &vmp.ContactDingTalkBotWebhookArgs{
Address: pulumi.String("https://www.dingacctest2.com"),
AtMobiles: pulumi.StringArray{
pulumi.String("18046891813"),
},
},
PhoneNumber: &vmp.ContactPhoneNumberArgs{
CountryCode: pulumi.String("+86"),
Number: pulumi.String("18310101011"),
},
})
if err != nil {
return err
}
fooContactGroup, err := vmp.NewContactGroup(ctx, "fooContactGroup", &vmp.ContactGroupArgs{
ContactIds: pulumi.StringArray{
fooContact.ID(),
},
})
if err != nil {
return err
}
foo1ContactGroup, err := vmp.NewContactGroup(ctx, "foo1ContactGroup", &vmp.ContactGroupArgs{
ContactIds: pulumi.StringArray{
foo1Contact.ID(),
},
})
if err != nil {
return err
}
fooNotifyPolicy, err := vmp.NewNotifyPolicy(ctx, "fooNotifyPolicy", &vmp.NotifyPolicyArgs{
Description: pulumi.String("acc-test-1"),
Levels: vmp.NotifyPolicyLevelArray{
&vmp.NotifyPolicyLevelArgs{
Level: pulumi.String("P1"),
ContactGroupIds: pulumi.StringArray{
fooContactGroup.ID(),
},
Channels: pulumi.StringArray{
pulumi.String("Email"),
pulumi.String("Webhook"),
},
},
&vmp.NotifyPolicyLevelArgs{
Level: pulumi.String("P0"),
ContactGroupIds: pulumi.StringArray{
foo1ContactGroup.ID(),
},
Channels: pulumi.StringArray{
pulumi.String("LarkBotWebhook"),
},
},
},
})
if err != nil {
return err
}
fooNotifyGroupPolicy, err := vmp.NewNotifyGroupPolicy(ctx, "fooNotifyGroupPolicy", &vmp.NotifyGroupPolicyArgs{
Description: pulumi.String("acc-test-1"),
Levels: vmp.NotifyGroupPolicyLevelArray{
&vmp.NotifyGroupPolicyLevelArgs{
Level: pulumi.String("P2"),
GroupBies: pulumi.StringArray{
pulumi.String("__rule__"),
},
GroupWait: pulumi.String("35"),
GroupInterval: pulumi.String("30"),
RepeatInterval: pulumi.String("30"),
},
&vmp.NotifyGroupPolicyLevelArgs{
Level: pulumi.String("P0"),
GroupBies: pulumi.StringArray{
pulumi.String("__rule__"),
},
GroupWait: pulumi.String("30"),
GroupInterval: pulumi.String("30"),
RepeatInterval: pulumi.String("30"),
},
&vmp.NotifyGroupPolicyLevelArgs{
Level: pulumi.String("P1"),
GroupBies: pulumi.StringArray{
pulumi.String("__rule__"),
},
GroupWait: pulumi.String("40"),
GroupInterval: pulumi.String("45"),
RepeatInterval: pulumi.String("30"),
},
},
})
if err != nil {
return err
}
fooAlertingRule, err := vmp.NewAlertingRule(ctx, "fooAlertingRule", &vmp.AlertingRuleArgs{
Description: pulumi.String("acc-test-1"),
NotifyPolicyId: fooNotifyPolicy.ID(),
NotifyGroupPolicyId: fooNotifyGroupPolicy.ID(),
Query: &vmp.AlertingRuleQueryArgs{
WorkspaceId: fooWorkspace.ID(),
PromQl: pulumi.String("sum(up)"),
},
Levels: vmp.AlertingRuleLevelArray{
&vmp.AlertingRuleLevelArgs{
Level: pulumi.String("P0"),
For: pulumi.String("0s"),
Comparator: pulumi.String(">="),
Threshold: pulumi.Float64(2),
},
&vmp.AlertingRuleLevelArgs{
Level: pulumi.String("P1"),
For: pulumi.String("0s"),
Comparator: pulumi.String(">="),
Threshold: pulumi.Float64(1),
},
&vmp.AlertingRuleLevelArgs{
Level: pulumi.String("P2"),
For: pulumi.String("0s"),
Comparator: pulumi.String(">="),
Threshold: pulumi.Float64(0.5),
},
},
})
if err != nil {
return err
}
_ = vmp.GetAlertingRulesOutput(ctx, vmp.GetAlertingRulesOutputArgs{
Ids: pulumi.StringArray{
fooAlertingRule.ID(),
},
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooWorkspace = new Volcengine.Vmp.Workspace("fooWorkspace", new()
{
InstanceTypeId = "vmp.standard.15d",
DeleteProtectionEnabled = false,
Description = "acc-test-1",
Username = "admin123",
Password = "***********",
});
var fooContact = new Volcengine.Vmp.Contact("fooContact", new()
{
Email = "acctest1@tftest.com",
Webhook = new Volcengine.Vmp.Inputs.ContactWebhookArgs
{
Address = "https://www.acctest1.com",
},
LarkBotWebhook = new Volcengine.Vmp.Inputs.ContactLarkBotWebhookArgs
{
Address = "https://www.acctest1.com",
},
DingTalkBotWebhook = new Volcengine.Vmp.Inputs.ContactDingTalkBotWebhookArgs
{
Address = "https://www.dingacctest1.com",
AtMobiles = new[]
{
"18046891812",
},
},
PhoneNumber = new Volcengine.Vmp.Inputs.ContactPhoneNumberArgs
{
CountryCode = "+86",
Number = "18310101010",
},
});
var foo1Contact = new Volcengine.Vmp.Contact("foo1Contact", new()
{
Email = "acctest2@tftest.com",
Webhook = new Volcengine.Vmp.Inputs.ContactWebhookArgs
{
Address = "https://www.acctest2.com",
},
LarkBotWebhook = new Volcengine.Vmp.Inputs.ContactLarkBotWebhookArgs
{
Address = "https://www.acctest2.com",
},
DingTalkBotWebhook = new Volcengine.Vmp.Inputs.ContactDingTalkBotWebhookArgs
{
Address = "https://www.dingacctest2.com",
AtMobiles = new[]
{
"18046891813",
},
},
PhoneNumber = new Volcengine.Vmp.Inputs.ContactPhoneNumberArgs
{
CountryCode = "+86",
Number = "18310101011",
},
});
var fooContactGroup = new Volcengine.Vmp.ContactGroup("fooContactGroup", new()
{
ContactIds = new[]
{
fooContact.Id,
},
});
var foo1ContactGroup = new Volcengine.Vmp.ContactGroup("foo1ContactGroup", new()
{
ContactIds = new[]
{
foo1Contact.Id,
},
});
var fooNotifyPolicy = new Volcengine.Vmp.NotifyPolicy("fooNotifyPolicy", new()
{
Description = "acc-test-1",
Levels = new[]
{
new Volcengine.Vmp.Inputs.NotifyPolicyLevelArgs
{
Level = "P1",
ContactGroupIds = new[]
{
fooContactGroup.Id,
},
Channels = new[]
{
"Email",
"Webhook",
},
},
new Volcengine.Vmp.Inputs.NotifyPolicyLevelArgs
{
Level = "P0",
ContactGroupIds = new[]
{
foo1ContactGroup.Id,
},
Channels = new[]
{
"LarkBotWebhook",
},
},
},
});
var fooNotifyGroupPolicy = new Volcengine.Vmp.NotifyGroupPolicy("fooNotifyGroupPolicy", new()
{
Description = "acc-test-1",
Levels = new[]
{
new Volcengine.Vmp.Inputs.NotifyGroupPolicyLevelArgs
{
Level = "P2",
GroupBies = new[]
{
"__rule__",
},
GroupWait = "35",
GroupInterval = "30",
RepeatInterval = "30",
},
new Volcengine.Vmp.Inputs.NotifyGroupPolicyLevelArgs
{
Level = "P0",
GroupBies = new[]
{
"__rule__",
},
GroupWait = "30",
GroupInterval = "30",
RepeatInterval = "30",
},
new Volcengine.Vmp.Inputs.NotifyGroupPolicyLevelArgs
{
Level = "P1",
GroupBies = new[]
{
"__rule__",
},
GroupWait = "40",
GroupInterval = "45",
RepeatInterval = "30",
},
},
});
var fooAlertingRule = new Volcengine.Vmp.AlertingRule("fooAlertingRule", new()
{
Description = "acc-test-1",
NotifyPolicyId = fooNotifyPolicy.Id,
NotifyGroupPolicyId = fooNotifyGroupPolicy.Id,
Query = new Volcengine.Vmp.Inputs.AlertingRuleQueryArgs
{
WorkspaceId = fooWorkspace.Id,
PromQl = "sum(up)",
},
Levels = new[]
{
new Volcengine.Vmp.Inputs.AlertingRuleLevelArgs
{
Level = "P0",
For = "0s",
Comparator = ">=",
Threshold = 2,
},
new Volcengine.Vmp.Inputs.AlertingRuleLevelArgs
{
Level = "P1",
For = "0s",
Comparator = ">=",
Threshold = 1,
},
new Volcengine.Vmp.Inputs.AlertingRuleLevelArgs
{
Level = "P2",
For = "0s",
Comparator = ">=",
Threshold = 0.5,
},
},
});
var fooAlertingRules = Volcengine.Vmp.GetAlertingRules.Invoke(new()
{
Ids = new[]
{
fooAlertingRule.Id,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.vmp.Workspace;
import com.pulumi.volcengine.vmp.WorkspaceArgs;
import com.pulumi.volcengine.vmp.Contact;
import com.pulumi.volcengine.vmp.ContactArgs;
import com.pulumi.volcengine.vmp.inputs.ContactWebhookArgs;
import com.pulumi.volcengine.vmp.inputs.ContactLarkBotWebhookArgs;
import com.pulumi.volcengine.vmp.inputs.ContactDingTalkBotWebhookArgs;
import com.pulumi.volcengine.vmp.inputs.ContactPhoneNumberArgs;
import com.pulumi.volcengine.vmp.ContactGroup;
import com.pulumi.volcengine.vmp.ContactGroupArgs;
import com.pulumi.volcengine.vmp.NotifyPolicy;
import com.pulumi.volcengine.vmp.NotifyPolicyArgs;
import com.pulumi.volcengine.vmp.inputs.NotifyPolicyLevelArgs;
import com.pulumi.volcengine.vmp.NotifyGroupPolicy;
import com.pulumi.volcengine.vmp.NotifyGroupPolicyArgs;
import com.pulumi.volcengine.vmp.inputs.NotifyGroupPolicyLevelArgs;
import com.pulumi.volcengine.vmp.AlertingRule;
import com.pulumi.volcengine.vmp.AlertingRuleArgs;
import com.pulumi.volcengine.vmp.inputs.AlertingRuleQueryArgs;
import com.pulumi.volcengine.vmp.inputs.AlertingRuleLevelArgs;
import com.pulumi.volcengine.vmp.VmpFunctions;
import com.pulumi.volcengine.vmp.inputs.GetAlertingRulesArgs;
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 fooWorkspace = new Workspace("fooWorkspace", WorkspaceArgs.builder()
.instanceTypeId("vmp.standard.15d")
.deleteProtectionEnabled(false)
.description("acc-test-1")
.username("admin123")
.password("***********")
.build());
var fooContact = new Contact("fooContact", ContactArgs.builder()
.email("acctest1@tftest.com")
.webhook(ContactWebhookArgs.builder()
.address("https://www.acctest1.com")
.build())
.larkBotWebhook(ContactLarkBotWebhookArgs.builder()
.address("https://www.acctest1.com")
.build())
.dingTalkBotWebhook(ContactDingTalkBotWebhookArgs.builder()
.address("https://www.dingacctest1.com")
.atMobiles("18046891812")
.build())
.phoneNumber(ContactPhoneNumberArgs.builder()
.countryCode("+86")
.number("18310101010")
.build())
.build());
var foo1Contact = new Contact("foo1Contact", ContactArgs.builder()
.email("acctest2@tftest.com")
.webhook(ContactWebhookArgs.builder()
.address("https://www.acctest2.com")
.build())
.larkBotWebhook(ContactLarkBotWebhookArgs.builder()
.address("https://www.acctest2.com")
.build())
.dingTalkBotWebhook(ContactDingTalkBotWebhookArgs.builder()
.address("https://www.dingacctest2.com")
.atMobiles("18046891813")
.build())
.phoneNumber(ContactPhoneNumberArgs.builder()
.countryCode("+86")
.number("18310101011")
.build())
.build());
var fooContactGroup = new ContactGroup("fooContactGroup", ContactGroupArgs.builder()
.contactIds(fooContact.id())
.build());
var foo1ContactGroup = new ContactGroup("foo1ContactGroup", ContactGroupArgs.builder()
.contactIds(foo1Contact.id())
.build());
var fooNotifyPolicy = new NotifyPolicy("fooNotifyPolicy", NotifyPolicyArgs.builder()
.description("acc-test-1")
.levels(
NotifyPolicyLevelArgs.builder()
.level("P1")
.contactGroupIds(fooContactGroup.id())
.channels(
"Email",
"Webhook")
.build(),
NotifyPolicyLevelArgs.builder()
.level("P0")
.contactGroupIds(foo1ContactGroup.id())
.channels("LarkBotWebhook")
.build())
.build());
var fooNotifyGroupPolicy = new NotifyGroupPolicy("fooNotifyGroupPolicy", NotifyGroupPolicyArgs.builder()
.description("acc-test-1")
.levels(
NotifyGroupPolicyLevelArgs.builder()
.level("P2")
.groupBies("__rule__")
.groupWait("35")
.groupInterval("30")
.repeatInterval("30")
.build(),
NotifyGroupPolicyLevelArgs.builder()
.level("P0")
.groupBies("__rule__")
.groupWait("30")
.groupInterval("30")
.repeatInterval("30")
.build(),
NotifyGroupPolicyLevelArgs.builder()
.level("P1")
.groupBies("__rule__")
.groupWait("40")
.groupInterval("45")
.repeatInterval("30")
.build())
.build());
var fooAlertingRule = new AlertingRule("fooAlertingRule", AlertingRuleArgs.builder()
.description("acc-test-1")
.notifyPolicyId(fooNotifyPolicy.id())
.notifyGroupPolicyId(fooNotifyGroupPolicy.id())
.query(AlertingRuleQueryArgs.builder()
.workspaceId(fooWorkspace.id())
.promQl("sum(up)")
.build())
.levels(
AlertingRuleLevelArgs.builder()
.level("P0")
.for_("0s")
.comparator(">=")
.threshold(2)
.build(),
AlertingRuleLevelArgs.builder()
.level("P1")
.for_("0s")
.comparator(">=")
.threshold(1)
.build(),
AlertingRuleLevelArgs.builder()
.level("P2")
.for_("0s")
.comparator(">=")
.threshold(0.5)
.build())
.build());
final var fooAlertingRules = VmpFunctions.getAlertingRules(GetAlertingRulesArgs.builder()
.ids(fooAlertingRule.id())
.build());
}
}
resources:
fooWorkspace:
type: volcengine:vmp:Workspace
properties:
instanceTypeId: vmp.standard.15d
deleteProtectionEnabled: false
description: acc-test-1
username: admin123
password: '***********'
fooContact:
type: volcengine:vmp:Contact
properties:
email: acctest1@tftest.com
webhook:
address: https://www.acctest1.com
larkBotWebhook:
address: https://www.acctest1.com
dingTalkBotWebhook:
address: https://www.dingacctest1.com
atMobiles:
- '18046891812'
phoneNumber:
countryCode: '+86'
number: '18310101010'
foo1Contact:
type: volcengine:vmp:Contact
properties:
email: acctest2@tftest.com
webhook:
address: https://www.acctest2.com
larkBotWebhook:
address: https://www.acctest2.com
dingTalkBotWebhook:
address: https://www.dingacctest2.com
atMobiles:
- '18046891813'
phoneNumber:
countryCode: '+86'
number: '18310101011'
fooContactGroup:
type: volcengine:vmp:ContactGroup
properties:
contactIds:
- ${fooContact.id}
foo1ContactGroup:
type: volcengine:vmp:ContactGroup
properties:
contactIds:
- ${foo1Contact.id}
fooNotifyPolicy:
type: volcengine:vmp:NotifyPolicy
properties:
description: acc-test-1
levels:
- level: P1
contactGroupIds:
- ${fooContactGroup.id}
channels:
- Email
- Webhook
- level: P0
contactGroupIds:
- ${foo1ContactGroup.id}
channels:
- LarkBotWebhook
fooNotifyGroupPolicy:
type: volcengine:vmp:NotifyGroupPolicy
properties:
description: acc-test-1
levels:
- level: P2
groupBies:
- __rule__
groupWait: '35'
groupInterval: '30'
repeatInterval: '30'
- level: P0
groupBies:
- __rule__
groupWait: '30'
groupInterval: '30'
repeatInterval: '30'
- level: P1
groupBies:
- __rule__
groupWait: '40'
groupInterval: '45'
repeatInterval: '30'
fooAlertingRule:
type: volcengine:vmp:AlertingRule
properties:
description: acc-test-1
notifyPolicyId: ${fooNotifyPolicy.id}
notifyGroupPolicyId: ${fooNotifyGroupPolicy.id}
query:
workspaceId: ${fooWorkspace.id}
promQl: sum(up)
levels:
- level: P0
for: 0s
comparator: '>='
threshold: 2
- level: P1
for: 0s
comparator: '>='
threshold: 1
- level: P2
for: 0s
comparator: '>='
threshold: 0.5
variables:
fooAlertingRules:
fn::invoke:
Function: volcengine:vmp:getAlertingRules
Arguments:
ids:
- ${fooAlertingRule.id}
Using getAlertingRules
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAlertingRules(args: GetAlertingRulesArgs, opts?: InvokeOptions): Promise<GetAlertingRulesResult>
function getAlertingRulesOutput(args: GetAlertingRulesOutputArgs, opts?: InvokeOptions): Output<GetAlertingRulesResult>def get_alerting_rules(ids: Optional[Sequence[str]] = None,
name: Optional[str] = None,
name_regex: Optional[str] = None,
notify_group_policy_ids: Optional[Sequence[str]] = None,
notify_policy_ids: Optional[Sequence[str]] = None,
output_file: Optional[str] = None,
status: Optional[str] = None,
type: Optional[str] = None,
workspace_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAlertingRulesResult
def get_alerting_rules_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
notify_group_policy_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
notify_policy_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
output_file: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[str]] = None,
workspace_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAlertingRulesResult]func GetAlertingRules(ctx *Context, args *GetAlertingRulesArgs, opts ...InvokeOption) (*GetAlertingRulesResult, error)
func GetAlertingRulesOutput(ctx *Context, args *GetAlertingRulesOutputArgs, opts ...InvokeOption) GetAlertingRulesResultOutput> Note: This function is named GetAlertingRules in the Go SDK.
public static class GetAlertingRules
{
public static Task<GetAlertingRulesResult> InvokeAsync(GetAlertingRulesArgs args, InvokeOptions? opts = null)
public static Output<GetAlertingRulesResult> Invoke(GetAlertingRulesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAlertingRulesResult> getAlertingRules(GetAlertingRulesArgs args, InvokeOptions options)
public static Output<GetAlertingRulesResult> getAlertingRules(GetAlertingRulesArgs args, InvokeOptions options)
fn::invoke:
function: volcengine:vmp/getAlertingRules:getAlertingRules
arguments:
# arguments dictionaryThe following arguments are supported:
- Ids List<string>
- A list of vmp alerting rule IDs.
- Name string
- The name of vmp alerting rule. This field support fuzzy query.
- Name
Regex string - A Name Regex of Resource.
- Notify
Group List<string>Policy Ids - A list of notify group policy IDs.
- Notify
Policy List<string>Ids - A list of notify policy IDs.
- Output
File string - File name where to save data source results.
- Status string
- The status of vmp alerting rule. Valid values:
Running,Disabled. - Type string
- The type of vmp alerting rule. Valid values:
vmp/PromQL. - Workspace
Id string - The workspace id of vmp alerting rule.
- Ids []string
- A list of vmp alerting rule IDs.
- Name string
- The name of vmp alerting rule. This field support fuzzy query.
- Name
Regex string - A Name Regex of Resource.
- Notify
Group []stringPolicy Ids - A list of notify group policy IDs.
- Notify
Policy []stringIds - A list of notify policy IDs.
- Output
File string - File name where to save data source results.
- Status string
- The status of vmp alerting rule. Valid values:
Running,Disabled. - Type string
- The type of vmp alerting rule. Valid values:
vmp/PromQL. - Workspace
Id string - The workspace id of vmp alerting rule.
- ids List<String>
- A list of vmp alerting rule IDs.
- name String
- The name of vmp alerting rule. This field support fuzzy query.
- name
Regex String - A Name Regex of Resource.
- notify
Group List<String>Policy Ids - A list of notify group policy IDs.
- notify
Policy List<String>Ids - A list of notify policy IDs.
- output
File String - File name where to save data source results.
- status String
- The status of vmp alerting rule. Valid values:
Running,Disabled. - type String
- The type of vmp alerting rule. Valid values:
vmp/PromQL. - workspace
Id String - The workspace id of vmp alerting rule.
- ids string[]
- A list of vmp alerting rule IDs.
- name string
- The name of vmp alerting rule. This field support fuzzy query.
- name
Regex string - A Name Regex of Resource.
- notify
Group string[]Policy Ids - A list of notify group policy IDs.
- notify
Policy string[]Ids - A list of notify policy IDs.
- output
File string - File name where to save data source results.
- status string
- The status of vmp alerting rule. Valid values:
Running,Disabled. - type string
- The type of vmp alerting rule. Valid values:
vmp/PromQL. - workspace
Id string - The workspace id of vmp alerting rule.
- ids Sequence[str]
- A list of vmp alerting rule IDs.
- name str
- The name of vmp alerting rule. This field support fuzzy query.
- name_
regex str - A Name Regex of Resource.
- notify_
group_ Sequence[str]policy_ ids - A list of notify group policy IDs.
- notify_
policy_ Sequence[str]ids - A list of notify policy IDs.
- output_
file str - File name where to save data source results.
- status str
- The status of vmp alerting rule. Valid values:
Running,Disabled. - type str
- The type of vmp alerting rule. Valid values:
vmp/PromQL. - workspace_
id str - The workspace id of vmp alerting rule.
- ids List<String>
- A list of vmp alerting rule IDs.
- name String
- The name of vmp alerting rule. This field support fuzzy query.
- name
Regex String - A Name Regex of Resource.
- notify
Group List<String>Policy Ids - A list of notify group policy IDs.
- notify
Policy List<String>Ids - A list of notify policy IDs.
- output
File String - File name where to save data source results.
- status String
- The status of vmp alerting rule. Valid values:
Running,Disabled. - type String
- The type of vmp alerting rule. Valid values:
vmp/PromQL. - workspace
Id String - The workspace id of vmp alerting rule.
getAlertingRules Result
The following output properties are available:
- Alerting
Rules List<GetAlerting Rules Alerting Rule> - The collection of query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of query.
- Ids List<string>
- Name string
- The name of the vmp alerting rule.
- Name
Regex string - Notify
Group List<string>Policy Ids - Notify
Policy List<string>Ids - Output
File string - Status string
- The status of the vmp alerting rule.
- Type string
- The type of the vmp alerting rule.
- Workspace
Id string - The id of the workspace.
- Alerting
Rules []GetAlerting Rules Alerting Rule - The collection of query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of query.
- Ids []string
- Name string
- The name of the vmp alerting rule.
- Name
Regex string - Notify
Group []stringPolicy Ids - Notify
Policy []stringIds - Output
File string - Status string
- The status of the vmp alerting rule.
- Type string
- The type of the vmp alerting rule.
- Workspace
Id string - The id of the workspace.
- alerting
Rules List<GetAlerting Rules Alerting Rule> - The collection of query.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Integer - The total count of query.
- ids List<String>
- name String
- The name of the vmp alerting rule.
- name
Regex String - notify
Group List<String>Policy Ids - notify
Policy List<String>Ids - output
File String - status String
- The status of the vmp alerting rule.
- type String
- The type of the vmp alerting rule.
- workspace
Id String - The id of the workspace.
- alerting
Rules GetAlerting Rules Alerting Rule[] - The collection of query.
- id string
- The provider-assigned unique ID for this managed resource.
- total
Count number - The total count of query.
- ids string[]
- name string
- The name of the vmp alerting rule.
- name
Regex string - notify
Group string[]Policy Ids - notify
Policy string[]Ids - output
File string - status string
- The status of the vmp alerting rule.
- type string
- The type of the vmp alerting rule.
- workspace
Id string - The id of the workspace.
- alerting_
rules Sequence[GetAlerting Rules Alerting Rule] - The collection of query.
- id str
- The provider-assigned unique ID for this managed resource.
- total_
count int - The total count of query.
- ids Sequence[str]
- name str
- The name of the vmp alerting rule.
- name_
regex str - notify_
group_ Sequence[str]policy_ ids - notify_
policy_ Sequence[str]ids - output_
file str - status str
- The status of the vmp alerting rule.
- type str
- The type of the vmp alerting rule.
- workspace_
id str - The id of the workspace.
- alerting
Rules List<Property Map> - The collection of query.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Number - The total count of query.
- ids List<String>
- name String
- The name of the vmp alerting rule.
- name
Regex String - notify
Group List<String>Policy Ids - notify
Policy List<String>Ids - output
File String - status String
- The status of the vmp alerting rule.
- type String
- The type of the vmp alerting rule.
- workspace
Id String - The id of the workspace.
Supporting Types
GetAlertingRulesAlertingRule
- Annotations
List<Get
Alerting Rules Alerting Rule Annotation> - The annotations of the vmp alerting rule.
- Create
Time string - The create time of the vmp alerting rule.
- Description string
- The description of the vmp alerting rule.
- Id string
- The id of the vmp alerting rule.
- Labels
List<Get
Alerting Rules Alerting Rule Label> - The labels of the vmp alerting rule.
- Levels
List<Get
Alerting Rules Alerting Rule Level> - The alerting levels of the vmp alerting rule.
- Name string
- The name of vmp alerting rule. This field support fuzzy query.
- Notify
Group stringPolicy Id - The notify group policy id of the vmp alerting rule.
- Notify
Policy stringId - The notify policy id of the vmp alerting rule.
- Queries
List<Get
Alerting Rules Alerting Rule Query> - The alerting query of the vmp alerting rule.
- Status string
- The status of vmp alerting rule. Valid values:
Running,Disabled. - Type string
- The type of vmp alerting rule. Valid values:
vmp/PromQL. - Update
Time string - The update time of the vmp alerting rule.
- Annotations
[]Get
Alerting Rules Alerting Rule Annotation - The annotations of the vmp alerting rule.
- Create
Time string - The create time of the vmp alerting rule.
- Description string
- The description of the vmp alerting rule.
- Id string
- The id of the vmp alerting rule.
- Labels
[]Get
Alerting Rules Alerting Rule Label - The labels of the vmp alerting rule.
- Levels
[]Get
Alerting Rules Alerting Rule Level - The alerting levels of the vmp alerting rule.
- Name string
- The name of vmp alerting rule. This field support fuzzy query.
- Notify
Group stringPolicy Id - The notify group policy id of the vmp alerting rule.
- Notify
Policy stringId - The notify policy id of the vmp alerting rule.
- Queries
[]Get
Alerting Rules Alerting Rule Query - The alerting query of the vmp alerting rule.
- Status string
- The status of vmp alerting rule. Valid values:
Running,Disabled. - Type string
- The type of vmp alerting rule. Valid values:
vmp/PromQL. - Update
Time string - The update time of the vmp alerting rule.
- annotations
List<Get
Alerting Rules Alerting Rule Annotation> - The annotations of the vmp alerting rule.
- create
Time String - The create time of the vmp alerting rule.
- description String
- The description of the vmp alerting rule.
- id String
- The id of the vmp alerting rule.
- labels
List<Get
Alerting Rules Alerting Rule Label> - The labels of the vmp alerting rule.
- levels
List<Get
Alerting Rules Alerting Rule Level> - The alerting levels of the vmp alerting rule.
- name String
- The name of vmp alerting rule. This field support fuzzy query.
- notify
Group StringPolicy Id - The notify group policy id of the vmp alerting rule.
- notify
Policy StringId - The notify policy id of the vmp alerting rule.
- queries
List<Get
Alerting Rules Alerting Rule Query> - The alerting query of the vmp alerting rule.
- status String
- The status of vmp alerting rule. Valid values:
Running,Disabled. - type String
- The type of vmp alerting rule. Valid values:
vmp/PromQL. - update
Time String - The update time of the vmp alerting rule.
- annotations
Get
Alerting Rules Alerting Rule Annotation[] - The annotations of the vmp alerting rule.
- create
Time string - The create time of the vmp alerting rule.
- description string
- The description of the vmp alerting rule.
- id string
- The id of the vmp alerting rule.
- labels
Get
Alerting Rules Alerting Rule Label[] - The labels of the vmp alerting rule.
- levels
Get
Alerting Rules Alerting Rule Level[] - The alerting levels of the vmp alerting rule.
- name string
- The name of vmp alerting rule. This field support fuzzy query.
- notify
Group stringPolicy Id - The notify group policy id of the vmp alerting rule.
- notify
Policy stringId - The notify policy id of the vmp alerting rule.
- queries
Get
Alerting Rules Alerting Rule Query[] - The alerting query of the vmp alerting rule.
- status string
- The status of vmp alerting rule. Valid values:
Running,Disabled. - type string
- The type of vmp alerting rule. Valid values:
vmp/PromQL. - update
Time string - The update time of the vmp alerting rule.
- annotations
Sequence[Get
Alerting Rules Alerting Rule Annotation] - The annotations of the vmp alerting rule.
- create_
time str - The create time of the vmp alerting rule.
- description str
- The description of the vmp alerting rule.
- id str
- The id of the vmp alerting rule.
- labels
Sequence[Get
Alerting Rules Alerting Rule Label] - The labels of the vmp alerting rule.
- levels
Sequence[Get
Alerting Rules Alerting Rule Level] - The alerting levels of the vmp alerting rule.
- name str
- The name of vmp alerting rule. This field support fuzzy query.
- notify_
group_ strpolicy_ id - The notify group policy id of the vmp alerting rule.
- notify_
policy_ strid - The notify policy id of the vmp alerting rule.
- queries
Sequence[Get
Alerting Rules Alerting Rule Query] - The alerting query of the vmp alerting rule.
- status str
- The status of vmp alerting rule. Valid values:
Running,Disabled. - type str
- The type of vmp alerting rule. Valid values:
vmp/PromQL. - update_
time str - The update time of the vmp alerting rule.
- annotations List<Property Map>
- The annotations of the vmp alerting rule.
- create
Time String - The create time of the vmp alerting rule.
- description String
- The description of the vmp alerting rule.
- id String
- The id of the vmp alerting rule.
- labels List<Property Map>
- The labels of the vmp alerting rule.
- levels List<Property Map>
- The alerting levels of the vmp alerting rule.
- name String
- The name of vmp alerting rule. This field support fuzzy query.
- notify
Group StringPolicy Id - The notify group policy id of the vmp alerting rule.
- notify
Policy StringId - The notify policy id of the vmp alerting rule.
- queries List<Property Map>
- The alerting query of the vmp alerting rule.
- status String
- The status of vmp alerting rule. Valid values:
Running,Disabled. - type String
- The type of vmp alerting rule. Valid values:
vmp/PromQL. - update
Time String - The update time of the vmp alerting rule.
GetAlertingRulesAlertingRuleAnnotation
GetAlertingRulesAlertingRuleLabel
GetAlertingRulesAlertingRuleLevel
- Comparator string
- The comparator of the vmp alerting rule.
- For string
- The duration of the alerting rule.
- Level string
- The level of the vmp alerting rule.
- Threshold double
- The threshold of the vmp alerting rule.
- Comparator string
- The comparator of the vmp alerting rule.
- For string
- The duration of the alerting rule.
- Level string
- The level of the vmp alerting rule.
- Threshold float64
- The threshold of the vmp alerting rule.
- comparator String
- The comparator of the vmp alerting rule.
- for_ String
- The duration of the alerting rule.
- level String
- The level of the vmp alerting rule.
- threshold Double
- The threshold of the vmp alerting rule.
- comparator string
- The comparator of the vmp alerting rule.
- for string
- The duration of the alerting rule.
- level string
- The level of the vmp alerting rule.
- threshold number
- The threshold of the vmp alerting rule.
- comparator str
- The comparator of the vmp alerting rule.
- for_ str
- The duration of the alerting rule.
- level str
- The level of the vmp alerting rule.
- threshold float
- The threshold of the vmp alerting rule.
- comparator String
- The comparator of the vmp alerting rule.
- for String
- The duration of the alerting rule.
- level String
- The level of the vmp alerting rule.
- threshold Number
- The threshold of the vmp alerting rule.
GetAlertingRulesAlertingRuleQuery
- Prom
Ql string - The prom ql of query.
- Workspace
Id string - The workspace id of vmp alerting rule.
- Prom
Ql string - The prom ql of query.
- Workspace
Id string - The workspace id of vmp alerting rule.
- prom
Ql String - The prom ql of query.
- workspace
Id String - The workspace id of vmp alerting rule.
- prom
Ql string - The prom ql of query.
- workspace
Id string - The workspace id of vmp alerting rule.
- prom_
ql str - The prom ql of query.
- workspace_
id str - The workspace id of vmp alerting rule.
- prom
Ql String - The prom ql of query.
- workspace
Id String - The workspace id of vmp alerting rule.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengineTerraform Provider.
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
