published on Monday, Jul 27, 2026 by Byteplus
published on Monday, Jul 27, 2026 by Byteplus
VMP alert rule configuration
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
const vMPAlertingRuleDemo = new bytepluscc.vmp.AlertingRule("VMPAlertingRuleDemo", {
name: "alert-rule-demo",
description: "this is a alert rule demo",
type: "vmp/PromQL",
query: {
prom_ql: "http_requests_total{method=\"PUT\", status=\"404\"}",
workspace_id: "e9e4b146-0ba9-41ac-af2b-xxxxxx",
},
levels: [
{
level: "P0",
"for": "1s",
comparator: "<",
threshold: 5,
},
{
level: "P1",
"for": "6m",
comparator: "<=",
threshold: 10,
},
{
level: "P2",
"for": "10m",
comparator: "!=",
threshold: 20,
},
],
notifyPolicyId: "2890eb5e-f383-4a7b-810f-xxxxxxx",
notifyGroupPolicyId: "a8490e9b-4e5d-4a86-xxxx-xxxxxxx",
annotations: [{
name: "Key",
value: "Value",
}],
labels: [{
name: "LabelsKey",
value: "LabelsValue",
}],
status: "Running",
tags: [{
key: "env",
value: "test",
}],
});
import pulumi
import pulumi_bytepluscc as bytepluscc
v_mp_alerting_rule_demo = bytepluscc.vmp.AlertingRule("VMPAlertingRuleDemo",
name="alert-rule-demo",
description="this is a alert rule demo",
type="vmp/PromQL",
query={
"prom_ql": "http_requests_total{method=\"PUT\", status=\"404\"}",
"workspace_id": "e9e4b146-0ba9-41ac-af2b-xxxxxx",
},
levels=[
{
"level": "P0",
"for_": "1s",
"comparator": "<",
"threshold": float(5),
},
{
"level": "P1",
"for_": "6m",
"comparator": "<=",
"threshold": float(10),
},
{
"level": "P2",
"for_": "10m",
"comparator": "!=",
"threshold": float(20),
},
],
notify_policy_id="2890eb5e-f383-4a7b-810f-xxxxxxx",
notify_group_policy_id="a8490e9b-4e5d-4a86-xxxx-xxxxxxx",
annotations=[{
"name": "Key",
"value": "Value",
}],
labels=[{
"name": "LabelsKey",
"value": "LabelsValue",
}],
status="Running",
tags=[{
"key": "env",
"value": "test",
}])
package main
import (
"github.com/byteplus-sdk/pulumi-bytepluscc/sdk/go/bytepluscc/vmp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vmp.NewAlertingRule(ctx, "VMPAlertingRuleDemo", &vmp.AlertingRuleArgs{
Name: pulumi.String("alert-rule-demo"),
Description: pulumi.String("this is a alert rule demo"),
Type: pulumi.String("vmp/PromQL"),
Query: &vmp.AlertingRuleQueryArgs{
Prom_ql: "http_requests_total{method=\"PUT\", status=\"404\"}",
Workspace_id: "e9e4b146-0ba9-41ac-af2b-xxxxxx",
},
Levels: vmp.AlertingRuleLevelArray{
&vmp.AlertingRuleLevelArgs{
Level: pulumi.String("P0"),
For: pulumi.String("1s"),
Comparator: pulumi.String("<"),
Threshold: pulumi.Float64(5),
},
&vmp.AlertingRuleLevelArgs{
Level: pulumi.String("P1"),
For: pulumi.String("6m"),
Comparator: pulumi.String("<="),
Threshold: pulumi.Float64(10),
},
&vmp.AlertingRuleLevelArgs{
Level: pulumi.String("P2"),
For: pulumi.String("10m"),
Comparator: pulumi.String("!="),
Threshold: pulumi.Float64(20),
},
},
NotifyPolicyId: pulumi.String("2890eb5e-f383-4a7b-810f-xxxxxxx"),
NotifyGroupPolicyId: pulumi.String("a8490e9b-4e5d-4a86-xxxx-xxxxxxx"),
Annotations: vmp.AlertingRuleAnnotationArray{
&vmp.AlertingRuleAnnotationArgs{
Name: pulumi.String("Key"),
Value: pulumi.String("Value"),
},
},
Labels: vmp.AlertingRuleLabelArray{
&vmp.AlertingRuleLabelArgs{
Name: pulumi.String("LabelsKey"),
Value: pulumi.String("LabelsValue"),
},
},
Status: pulumi.String("Running"),
Tags: vmp.AlertingRuleTagArray{
&vmp.AlertingRuleTagArgs{
Key: pulumi.String("env"),
Value: pulumi.String("test"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Bytepluscc = Byteplus.Pulumi.Bytepluscc;
return await Deployment.RunAsync(() =>
{
var vMPAlertingRuleDemo = new Bytepluscc.Vmp.AlertingRule("VMPAlertingRuleDemo", new()
{
Name = "alert-rule-demo",
Description = "this is a alert rule demo",
Type = "vmp/PromQL",
Query = new Bytepluscc.Vmp.Inputs.AlertingRuleQueryArgs
{
Prom_ql = "http_requests_total{method=\"PUT\", status=\"404\"}",
Workspace_id = "e9e4b146-0ba9-41ac-af2b-xxxxxx",
},
Levels = new[]
{
new Bytepluscc.Vmp.Inputs.AlertingRuleLevelArgs
{
Level = "P0",
For = "1s",
Comparator = "<",
Threshold = 5,
},
new Bytepluscc.Vmp.Inputs.AlertingRuleLevelArgs
{
Level = "P1",
For = "6m",
Comparator = "<=",
Threshold = 10,
},
new Bytepluscc.Vmp.Inputs.AlertingRuleLevelArgs
{
Level = "P2",
For = "10m",
Comparator = "!=",
Threshold = 20,
},
},
NotifyPolicyId = "2890eb5e-f383-4a7b-810f-xxxxxxx",
NotifyGroupPolicyId = "a8490e9b-4e5d-4a86-xxxx-xxxxxxx",
Annotations = new[]
{
new Bytepluscc.Vmp.Inputs.AlertingRuleAnnotationArgs
{
Name = "Key",
Value = "Value",
},
},
Labels = new[]
{
new Bytepluscc.Vmp.Inputs.AlertingRuleLabelArgs
{
Name = "LabelsKey",
Value = "LabelsValue",
},
},
Status = "Running",
Tags = new[]
{
new Bytepluscc.Vmp.Inputs.AlertingRuleTagArgs
{
Key = "env",
Value = "test",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.byteplus.bytepluscc.vmp.AlertingRule;
import com.byteplus.bytepluscc.vmp.AlertingRuleArgs;
import com.pulumi.bytepluscc.vmp.inputs.AlertingRuleQueryArgs;
import com.pulumi.bytepluscc.vmp.inputs.AlertingRuleLevelArgs;
import com.pulumi.bytepluscc.vmp.inputs.AlertingRuleAnnotationArgs;
import com.pulumi.bytepluscc.vmp.inputs.AlertingRuleLabelArgs;
import com.pulumi.bytepluscc.vmp.inputs.AlertingRuleTagArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 vMPAlertingRuleDemo = new AlertingRule("vMPAlertingRuleDemo", AlertingRuleArgs.builder()
.name("alert-rule-demo")
.description("this is a alert rule demo")
.type("vmp/PromQL")
.query(AlertingRuleQueryArgs.builder()
.prom_ql("http_requests_total{method=\"PUT\", status=\"404\"}")
.workspace_id("e9e4b146-0ba9-41ac-af2b-xxxxxx")
.build())
.levels(
AlertingRuleLevelArgs.builder()
.level("P0")
.for_("1s")
.comparator("<")
.threshold(5.0)
.build(),
AlertingRuleLevelArgs.builder()
.level("P1")
.for_("6m")
.comparator("<=")
.threshold(10.0)
.build(),
AlertingRuleLevelArgs.builder()
.level("P2")
.for_("10m")
.comparator("!=")
.threshold(20.0)
.build())
.notifyPolicyId("2890eb5e-f383-4a7b-810f-xxxxxxx")
.notifyGroupPolicyId("a8490e9b-4e5d-4a86-xxxx-xxxxxxx")
.annotations(AlertingRuleAnnotationArgs.builder()
.name("Key")
.value("Value")
.build())
.labels(AlertingRuleLabelArgs.builder()
.name("LabelsKey")
.value("LabelsValue")
.build())
.status("Running")
.tags(AlertingRuleTagArgs.builder()
.key("env")
.value("test")
.build())
.build());
}
}
resources:
vMPAlertingRuleDemo:
type: bytepluscc:vmp:AlertingRule
name: VMPAlertingRuleDemo
properties:
name: alert-rule-demo
description: this is a alert rule demo
type: vmp/PromQL
query:
prom_ql: http_requests_total{method="PUT", status="404"}
workspace_id: e9e4b146-0ba9-41ac-af2b-xxxxxx
levels:
- level: P0
for: 1s
comparator: <
threshold: 5
- level: P1
for: 6m
comparator: <=
threshold: 10
- level: P2
for: 10m
comparator: '!='
threshold: 20
notifyPolicyId: 2890eb5e-f383-4a7b-810f-xxxxxxx
notifyGroupPolicyId: a8490e9b-4e5d-4a86-xxxx-xxxxxxx
annotations:
- name: Key
value: Value
labels:
- name: LabelsKey
value: LabelsValue
status: Running
tags:
- key: env
value: test
pulumi {
required_providers {
bytepluscc = {
source = "pulumi/bytepluscc"
}
}
}
resource "bytepluscc_vmp_alertingrule" "VMPAlertingRuleDemo" {
name = "alert-rule-demo"
description = "this is a alert rule demo"
type = "vmp/PromQL"
query = {
prom_ql = "http_requests_total{method=\"PUT\", status=\"404\"}"
workspace_id = "e9e4b146-0ba9-41ac-af2b-xxxxxx"
}
levels {
level = "P0"
for = "1s"
comparator = "<"
threshold = 5
}
levels {
level = "P1"
for = "6m"
comparator = "<="
threshold = 10
}
levels {
level = "P2"
for = "10m"
comparator = "!="
threshold = 20
}
notify_policy_id = "2890eb5e-f383-4a7b-810f-xxxxxxx"
notify_group_policy_id = "a8490e9b-4e5d-4a86-xxxx-xxxxxxx"
annotations {
name = "Key"
value = "Value"
}
labels {
name = "LabelsKey"
value = "LabelsValue"
}
status = "Running"
tags {
key = "env"
value = "test"
}
}
Create AlertingRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AlertingRule(name: string, args: AlertingRuleArgs, opts?: CustomResourceOptions);@overload
def AlertingRule(resource_name: str,
args: AlertingRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AlertingRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
type: Optional[str] = None,
annotations: Optional[Sequence[AlertingRuleAnnotationArgs]] = None,
description: Optional[str] = None,
labels: Optional[Sequence[AlertingRuleLabelArgs]] = None,
levels: Optional[Sequence[AlertingRuleLevelArgs]] = None,
notify_group_policy_id: Optional[str] = None,
notify_policy_id: Optional[str] = None,
query: Optional[AlertingRuleQueryArgs] = None,
status: Optional[str] = None,
tags: Optional[Sequence[AlertingRuleTagArgs]] = None)func NewAlertingRule(ctx *Context, name string, args AlertingRuleArgs, opts ...ResourceOption) (*AlertingRule, error)public AlertingRule(string name, AlertingRuleArgs args, CustomResourceOptions? opts = null)
public AlertingRule(String name, AlertingRuleArgs args)
public AlertingRule(String name, AlertingRuleArgs args, CustomResourceOptions options)
type: bytepluscc:vmp:AlertingRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "bytepluscc_vmp_alerting_rule" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args AlertingRuleArgs
- 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 AlertingRuleArgs
- 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 AlertingRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlertingRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AlertingRuleArgs
- 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 alertingRuleResource = new Bytepluscc.Vmp.AlertingRule("alertingRuleResource", new()
{
Name = "string",
Type = "string",
Annotations = new[]
{
new Bytepluscc.Vmp.Inputs.AlertingRuleAnnotationArgs
{
Name = "string",
Value = "string",
},
},
Description = "string",
Labels = new[]
{
new Bytepluscc.Vmp.Inputs.AlertingRuleLabelArgs
{
Name = "string",
Value = "string",
},
},
Levels = new[]
{
new Bytepluscc.Vmp.Inputs.AlertingRuleLevelArgs
{
Comparator = "string",
For = "string",
Level = "string",
Threshold = 0,
},
},
NotifyGroupPolicyId = "string",
NotifyPolicyId = "string",
Query = new Bytepluscc.Vmp.Inputs.AlertingRuleQueryArgs
{
PromQl = "string",
WorkspaceId = "string",
},
Status = "string",
Tags = new[]
{
new Bytepluscc.Vmp.Inputs.AlertingRuleTagArgs
{
Key = "string",
Value = "string",
},
},
});
example, err := vmp.NewAlertingRule(ctx, "alertingRuleResource", &vmp.AlertingRuleArgs{
Name: pulumi.String("string"),
Type: pulumi.String("string"),
Annotations: vmp.AlertingRuleAnnotationArray{
&vmp.AlertingRuleAnnotationArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Description: pulumi.String("string"),
Labels: vmp.AlertingRuleLabelArray{
&vmp.AlertingRuleLabelArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Levels: vmp.AlertingRuleLevelArray{
&vmp.AlertingRuleLevelArgs{
Comparator: pulumi.String("string"),
For: pulumi.String("string"),
Level: pulumi.String("string"),
Threshold: pulumi.Float64(0),
},
},
NotifyGroupPolicyId: pulumi.String("string"),
NotifyPolicyId: pulumi.String("string"),
Query: &vmp.AlertingRuleQueryArgs{
PromQl: pulumi.String("string"),
WorkspaceId: pulumi.String("string"),
},
Status: pulumi.String("string"),
Tags: vmp.AlertingRuleTagArray{
&vmp.AlertingRuleTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
})
resource "bytepluscc_vmp_alerting_rule" "alertingRuleResource" {
lifecycle {
create_before_destroy = true
}
name = "string"
type = "string"
annotations {
name = "string"
value = "string"
}
description = "string"
labels {
name = "string"
value = "string"
}
levels {
comparator = "string"
for = "string"
level = "string"
threshold = 0
}
notify_group_policy_id = "string"
notify_policy_id = "string"
query = {
prom_ql = "string"
workspace_id = "string"
}
status = "string"
tags {
key = "string"
value = "string"
}
}
var alertingRuleResource = new AlertingRule("alertingRuleResource", AlertingRuleArgs.builder()
.name("string")
.type("string")
.annotations(AlertingRuleAnnotationArgs.builder()
.name("string")
.value("string")
.build())
.description("string")
.labels(AlertingRuleLabelArgs.builder()
.name("string")
.value("string")
.build())
.levels(AlertingRuleLevelArgs.builder()
.comparator("string")
.for_("string")
.level("string")
.threshold(0.0)
.build())
.notifyGroupPolicyId("string")
.notifyPolicyId("string")
.query(AlertingRuleQueryArgs.builder()
.promQl("string")
.workspaceId("string")
.build())
.status("string")
.tags(AlertingRuleTagArgs.builder()
.key("string")
.value("string")
.build())
.build());
alerting_rule_resource = bytepluscc.vmp.AlertingRule("alertingRuleResource",
name="string",
type="string",
annotations=[{
"name": "string",
"value": "string",
}],
description="string",
labels=[{
"name": "string",
"value": "string",
}],
levels=[{
"comparator": "string",
"for_": "string",
"level": "string",
"threshold": float(0),
}],
notify_group_policy_id="string",
notify_policy_id="string",
query={
"prom_ql": "string",
"workspace_id": "string",
},
status="string",
tags=[{
"key": "string",
"value": "string",
}])
const alertingRuleResource = new bytepluscc.vmp.AlertingRule("alertingRuleResource", {
name: "string",
type: "string",
annotations: [{
name: "string",
value: "string",
}],
description: "string",
labels: [{
name: "string",
value: "string",
}],
levels: [{
comparator: "string",
"for": "string",
level: "string",
threshold: 0,
}],
notifyGroupPolicyId: "string",
notifyPolicyId: "string",
query: {
promQl: "string",
workspaceId: "string",
},
status: "string",
tags: [{
key: "string",
value: "string",
}],
});
type: bytepluscc:vmp:AlertingRule
properties:
annotations:
- name: string
value: string
description: string
labels:
- name: string
value: string
levels:
- comparator: string
for: string
level: string
threshold: 0
name: string
notifyGroupPolicyId: string
notifyPolicyId: string
query:
promQl: string
workspaceId: string
status: string
tags:
- key: string
value: string
type: string
AlertingRule 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 AlertingRule resource accepts the following input properties:
- Name string
- Alert rule name
- Type string
- Alert rule type. Allowed values: vmp/PromQL
- Annotations
List<Byteplus.
Alerting Rule Annotation> - Annotation attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Description string
- Alert rule description
- Labels
List<Byteplus.
Alerting Rule Label> - Tags attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Levels
List<Byteplus.
Alerting Rule Level> - Alert severity Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Notify
Group stringPolicy Id - Alert aggregation policy ID
- Notify
Policy stringId - Alert notification policy ID
- Query
Byteplus.
Alerting Rule Query - Alert configuration
- Status string
- Alert rule status: Running (monitoring), Disabled (disabled)
-
List<Byteplus.
Alerting Rule Tag> - Tag Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Name string
- Alert rule name
- Type string
- Alert rule type. Allowed values: vmp/PromQL
- Annotations
[]Alerting
Rule Annotation Args - Annotation attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Description string
- Alert rule description
- Labels
[]Alerting
Rule Label Args - Tags attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Levels
[]Alerting
Rule Level Args - Alert severity Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Notify
Group stringPolicy Id - Alert aggregation policy ID
- Notify
Policy stringId - Alert notification policy ID
- Query
Alerting
Rule Query Args - Alert configuration
- Status string
- Alert rule status: Running (monitoring), Disabled (disabled)
-
[]Alerting
Rule Tag Args - Tag Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- name string
- Alert rule name
- type string
- Alert rule type. Allowed values: vmp/PromQL
- annotations list(object)
- Annotation attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- description string
- Alert rule description
- labels list(object)
- Tags attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- levels list(object)
- Alert severity Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- notify_
group_ stringpolicy_ id - Alert aggregation policy ID
- notify_
policy_ stringid - Alert notification policy ID
- query object
- Alert configuration
- status string
- Alert rule status: Running (monitoring), Disabled (disabled)
- list(object)
- Tag Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- name String
- Alert rule name
- type String
- Alert rule type. Allowed values: vmp/PromQL
- annotations
List<Alerting
Rule Annotation> - Annotation attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- description String
- Alert rule description
- labels
List<Alerting
Rule Label> - Tags attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- levels
List<Alerting
Rule Level> - Alert severity Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- notify
Group StringPolicy Id - Alert aggregation policy ID
- notify
Policy StringId - Alert notification policy ID
- query
Alerting
Rule Query - Alert configuration
- status String
- Alert rule status: Running (monitoring), Disabled (disabled)
-
List<Alerting
Rule Tag> - Tag Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- name string
- Alert rule name
- type string
- Alert rule type. Allowed values: vmp/PromQL
- annotations
Alerting
Rule Annotation[] - Annotation attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- description string
- Alert rule description
- labels
Alerting
Rule Label[] - Tags attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- levels
Alerting
Rule Level[] - Alert severity Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- notify
Group stringPolicy Id - Alert aggregation policy ID
- notify
Policy stringId - Alert notification policy ID
- query
Alerting
Rule Query - Alert configuration
- status string
- Alert rule status: Running (monitoring), Disabled (disabled)
-
Alerting
Rule Tag[] - Tag Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- name str
- Alert rule name
- type str
- Alert rule type. Allowed values: vmp/PromQL
- annotations
Sequence[Alerting
Rule Annotation Args] - Annotation attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- description str
- Alert rule description
- labels
Sequence[Alerting
Rule Label Args] - Tags attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- levels
Sequence[Alerting
Rule Level Args] - Alert severity Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- notify_
group_ strpolicy_ id - Alert aggregation policy ID
- notify_
policy_ strid - Alert notification policy ID
- query
Alerting
Rule Query Args - Alert configuration
- status str
- Alert rule status: Running (monitoring), Disabled (disabled)
-
Sequence[Alerting
Rule Tag Args] - Tag Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- name String
- Alert rule name
- type String
- Alert rule type. Allowed values: vmp/PromQL
- annotations List<Property Map>
- Annotation attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- description String
- Alert rule description
- labels List<Property Map>
- Tags attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- levels List<Property Map>
- Alert severity Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- notify
Group StringPolicy Id - Alert aggregation policy ID
- notify
Policy StringId - Alert notification policy ID
- query Property Map
- Alert configuration
- status String
- Alert rule status: Running (monitoring), Disabled (disabled)
- List<Property Map>
- Tag Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
Outputs
All input properties are implicitly available as output properties. Additionally, the AlertingRule resource produces the following output properties:
- Alerting
Rule stringId - Alert rule ID
- Create
Time string - Alert rule creation time
- Id string
- The provider-assigned unique ID for this managed resource.
- Update
Time string - Alert rule update time
- Alerting
Rule stringId - Alert rule ID
- Create
Time string - Alert rule creation time
- Id string
- The provider-assigned unique ID for this managed resource.
- Update
Time string - Alert rule update time
- alerting_
rule_ stringid - Alert rule ID
- create_
time string - Alert rule creation time
- id string
- The provider-assigned unique ID for this managed resource.
- update_
time string - Alert rule update time
- alerting
Rule StringId - Alert rule ID
- create
Time String - Alert rule creation time
- id String
- The provider-assigned unique ID for this managed resource.
- update
Time String - Alert rule update time
- alerting
Rule stringId - Alert rule ID
- create
Time string - Alert rule creation time
- id string
- The provider-assigned unique ID for this managed resource.
- update
Time string - Alert rule update time
- alerting_
rule_ strid - Alert rule ID
- create_
time str - Alert rule creation time
- id str
- The provider-assigned unique ID for this managed resource.
- update_
time str - Alert rule update time
- alerting
Rule StringId - Alert rule ID
- create
Time String - Alert rule creation time
- id String
- The provider-assigned unique ID for this managed resource.
- update
Time String - Alert rule update time
Look up Existing AlertingRule Resource
Get an existing AlertingRule 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?: AlertingRuleState, opts?: CustomResourceOptions): AlertingRule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alerting_rule_id: Optional[str] = None,
annotations: Optional[Sequence[AlertingRuleAnnotationArgs]] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
labels: Optional[Sequence[AlertingRuleLabelArgs]] = None,
levels: Optional[Sequence[AlertingRuleLevelArgs]] = None,
name: Optional[str] = None,
notify_group_policy_id: Optional[str] = None,
notify_policy_id: Optional[str] = None,
query: Optional[AlertingRuleQueryArgs] = None,
status: Optional[str] = None,
tags: Optional[Sequence[AlertingRuleTagArgs]] = None,
type: Optional[str] = None,
update_time: Optional[str] = None) -> AlertingRulefunc GetAlertingRule(ctx *Context, name string, id IDInput, state *AlertingRuleState, opts ...ResourceOption) (*AlertingRule, error)public static AlertingRule Get(string name, Input<string> id, AlertingRuleState? state, CustomResourceOptions? opts = null)public static AlertingRule get(String name, Output<String> id, AlertingRuleState state, CustomResourceOptions options)resources: _: type: bytepluscc:vmp:AlertingRule get: id: ${id}import {
to = bytepluscc_vmp_alerting_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.
- Alerting
Rule stringId - Alert rule ID
- Annotations
List<Byteplus.
Alerting Rule Annotation> - Annotation attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Create
Time string - Alert rule creation time
- Description string
- Alert rule description
- Labels
List<Byteplus.
Alerting Rule Label> - Tags attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Levels
List<Byteplus.
Alerting Rule Level> - Alert severity Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Name string
- Alert rule name
- Notify
Group stringPolicy Id - Alert aggregation policy ID
- Notify
Policy stringId - Alert notification policy ID
- Query
Byteplus.
Alerting Rule Query - Alert configuration
- Status string
- Alert rule status: Running (monitoring), Disabled (disabled)
-
List<Byteplus.
Alerting Rule Tag> - Tag Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Type string
- Alert rule type. Allowed values: vmp/PromQL
- Update
Time string - Alert rule update time
- Alerting
Rule stringId - Alert rule ID
- Annotations
[]Alerting
Rule Annotation Args - Annotation attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Create
Time string - Alert rule creation time
- Description string
- Alert rule description
- Labels
[]Alerting
Rule Label Args - Tags attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Levels
[]Alerting
Rule Level Args - Alert severity Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Name string
- Alert rule name
- Notify
Group stringPolicy Id - Alert aggregation policy ID
- Notify
Policy stringId - Alert notification policy ID
- Query
Alerting
Rule Query Args - Alert configuration
- Status string
- Alert rule status: Running (monitoring), Disabled (disabled)
-
[]Alerting
Rule Tag Args - Tag Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- Type string
- Alert rule type. Allowed values: vmp/PromQL
- Update
Time string - Alert rule update time
- alerting_
rule_ stringid - Alert rule ID
- annotations list(object)
- Annotation attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- create_
time string - Alert rule creation time
- description string
- Alert rule description
- labels list(object)
- Tags attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- levels list(object)
- Alert severity Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- name string
- Alert rule name
- notify_
group_ stringpolicy_ id - Alert aggregation policy ID
- notify_
policy_ stringid - Alert notification policy ID
- query object
- Alert configuration
- status string
- Alert rule status: Running (monitoring), Disabled (disabled)
- list(object)
- Tag Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- type string
- Alert rule type. Allowed values: vmp/PromQL
- update_
time string - Alert rule update time
- alerting
Rule StringId - Alert rule ID
- annotations
List<Alerting
Rule Annotation> - Annotation attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- create
Time String - Alert rule creation time
- description String
- Alert rule description
- labels
List<Alerting
Rule Label> - Tags attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- levels
List<Alerting
Rule Level> - Alert severity Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- name String
- Alert rule name
- notify
Group StringPolicy Id - Alert aggregation policy ID
- notify
Policy StringId - Alert notification policy ID
- query
Alerting
Rule Query - Alert configuration
- status String
- Alert rule status: Running (monitoring), Disabled (disabled)
-
List<Alerting
Rule Tag> - Tag Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- type String
- Alert rule type. Allowed values: vmp/PromQL
- update
Time String - Alert rule update time
- alerting
Rule stringId - Alert rule ID
- annotations
Alerting
Rule Annotation[] - Annotation attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- create
Time string - Alert rule creation time
- description string
- Alert rule description
- labels
Alerting
Rule Label[] - Tags attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- levels
Alerting
Rule Level[] - Alert severity Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- name string
- Alert rule name
- notify
Group stringPolicy Id - Alert aggregation policy ID
- notify
Policy stringId - Alert notification policy ID
- query
Alerting
Rule Query - Alert configuration
- status string
- Alert rule status: Running (monitoring), Disabled (disabled)
-
Alerting
Rule Tag[] - Tag Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- type string
- Alert rule type. Allowed values: vmp/PromQL
- update
Time string - Alert rule update time
- alerting_
rule_ strid - Alert rule ID
- annotations
Sequence[Alerting
Rule Annotation Args] - Annotation attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- create_
time str - Alert rule creation time
- description str
- Alert rule description
- labels
Sequence[Alerting
Rule Label Args] - Tags attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- levels
Sequence[Alerting
Rule Level Args] - Alert severity Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- name str
- Alert rule name
- notify_
group_ strpolicy_ id - Alert aggregation policy ID
- notify_
policy_ strid - Alert notification policy ID
- query
Alerting
Rule Query Args - Alert configuration
- status str
- Alert rule status: Running (monitoring), Disabled (disabled)
-
Sequence[Alerting
Rule Tag Args] - Tag Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- type str
- Alert rule type. Allowed values: vmp/PromQL
- update_
time str - Alert rule update time
- alerting
Rule StringId - Alert rule ID
- annotations List<Property Map>
- Annotation attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- create
Time String - Alert rule creation time
- description String
- Alert rule description
- labels List<Property Map>
- Tags attached to the alert Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- levels List<Property Map>
- Alert severity Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- name String
- Alert rule name
- notify
Group StringPolicy Id - Alert aggregation policy ID
- notify
Policy StringId - Alert notification policy ID
- query Property Map
- Alert configuration
- status String
- Alert rule status: Running (monitoring), Disabled (disabled)
- List<Property Map>
- Tag Important Note: When using SetNestedAttribute, you must fully define all attributes of its nested structure. Incomplete definitions may cause Terraform to detect unexpected differences during plan comparison, triggering unnecessary resource updates and affecting resource stability and predictability.
- type String
- Alert rule type. Allowed values: vmp/PromQL
- update
Time String - Alert rule update time
Supporting Types
AlertingRuleAnnotation, AlertingRuleAnnotationArgs
AlertingRuleLabel, AlertingRuleLabelArgs
AlertingRuleLevel, AlertingRuleLevelArgs
- Comparator string
- Alert rule comparison condition. Options: >, >=, <, <=, ==, !=
- For string
- Alert duration. Possible values: 0s, 1m, 2m, 5m, 10m
- Level string
- Alert rule severity. Currently supports P0, P1, or P2
- Threshold double
- Alert rule threshold
- Comparator string
- Alert rule comparison condition. Options: >, >=, <, <=, ==, !=
- For string
- Alert duration. Possible values: 0s, 1m, 2m, 5m, 10m
- Level string
- Alert rule severity. Currently supports P0, P1, or P2
- Threshold float64
- Alert rule threshold
- comparator string
- Alert rule comparison condition. Options: >, >=, <, <=, ==, !=
- for string
- Alert duration. Possible values: 0s, 1m, 2m, 5m, 10m
- level string
- Alert rule severity. Currently supports P0, P1, or P2
- threshold number
- Alert rule threshold
- comparator String
- Alert rule comparison condition. Options: >, >=, <, <=, ==, !=
- for_ String
- Alert duration. Possible values: 0s, 1m, 2m, 5m, 10m
- level String
- Alert rule severity. Currently supports P0, P1, or P2
- threshold Double
- Alert rule threshold
- comparator string
- Alert rule comparison condition. Options: >, >=, <, <=, ==, !=
- for string
- Alert duration. Possible values: 0s, 1m, 2m, 5m, 10m
- level string
- Alert rule severity. Currently supports P0, P1, or P2
- threshold number
- Alert rule threshold
- comparator str
- Alert rule comparison condition. Options: >, >=, <, <=, ==, !=
- for_ str
- Alert duration. Possible values: 0s, 1m, 2m, 5m, 10m
- level str
- Alert rule severity. Currently supports P0, P1, or P2
- threshold float
- Alert rule threshold
- comparator String
- Alert rule comparison condition. Options: >, >=, <, <=, ==, !=
- for String
- Alert duration. Possible values: 0s, 1m, 2m, 5m, 10m
- level String
- Alert rule severity. Currently supports P0, P1, or P2
- threshold Number
- Alert rule threshold
AlertingRuleQuery, AlertingRuleQueryArgs
- Prom
Ql string - Query statement
- Workspace
Id string - Workspace ID
- Prom
Ql string - Query statement
- Workspace
Id string - Workspace ID
- prom_
ql string - Query statement
- workspace_
id string - Workspace ID
- prom
Ql String - Query statement
- workspace
Id String - Workspace ID
- prom
Ql string - Query statement
- workspace
Id string - Workspace ID
- prom_
ql str - Query statement
- workspace_
id str - Workspace ID
- prom
Ql String - Query statement
- workspace
Id String - Workspace ID
AlertingRuleTag, AlertingRuleTagArgs
Import
$ pulumi import bytepluscc:vmp/alertingRule:AlertingRule example "alerting_rule_id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- bytepluscc byteplus-sdk/pulumi-bytepluscc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
byteplusccTerraform Provider.
published on Monday, Jul 27, 2026 by Byteplus