published on Thursday, Apr 23, 2026 by Volcengine
published on Thursday, Apr 23, 2026 by Volcengine
VMP alert rule configuration
Example Usage
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
vMPAlertingRuleDemo:
type: volcenginecc: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
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: volcenginecc:vmp:AlertingRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args 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 Volcenginecc.Vmp.AlertingRule("alertingRuleResource", new()
{
Name = "string",
Type = "string",
Annotations = new[]
{
new Volcenginecc.Vmp.Inputs.AlertingRuleAnnotationArgs
{
Name = "string",
Value = "string",
},
},
Description = "string",
Labels = new[]
{
new Volcenginecc.Vmp.Inputs.AlertingRuleLabelArgs
{
Name = "string",
Value = "string",
},
},
Levels = new[]
{
new Volcenginecc.Vmp.Inputs.AlertingRuleLevelArgs
{
Comparator = "string",
For = "string",
Level = "string",
Threshold = 0,
},
},
NotifyGroupPolicyId = "string",
NotifyPolicyId = "string",
Query = new Volcenginecc.Vmp.Inputs.AlertingRuleQueryArgs
{
PromQl = "string",
WorkspaceId = "string",
},
Status = "string",
Tags = new[]
{
new Volcenginecc.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"),
},
},
})
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 = volcenginecc.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 volcenginecc.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: volcenginecc: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<Volcengine.
Alerting Rule Annotation> - Description string
- Alert rule description
- Labels
List<Volcengine.
Alerting Rule Label> - Levels
List<Volcengine.
Alerting Rule Level> - Notify
Group stringPolicy Id - Alert aggregation policy ID
- Notify
Policy stringId - Alert notification policy ID
- Query
Volcengine.
Alerting Rule Query - Alert configuration
- Status string
- Alert rule status: Running (monitoring), Disabled (disabled)
-
List<Volcengine.
Alerting Rule Tag>
- Name string
- Alert rule name
- Type string
- Alert rule type. Allowed values: vmp/PromQL
- Annotations
[]Alerting
Rule Annotation Args - Description string
- Alert rule description
- Labels
[]Alerting
Rule Label Args - Levels
[]Alerting
Rule Level Args - 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
- name String
- Alert rule name
- type String
- Alert rule type. Allowed values: vmp/PromQL
- annotations
List<Alerting
Rule Annotation> - description String
- Alert rule description
- labels
List<Alerting
Rule Label> - levels
List<Alerting
Rule Level> - 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>
- name string
- Alert rule name
- type string
- Alert rule type. Allowed values: vmp/PromQL
- annotations
Alerting
Rule Annotation[] - description string
- Alert rule description
- labels
Alerting
Rule Label[] - levels
Alerting
Rule Level[] - 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[]
- name str
- Alert rule name
- type str
- Alert rule type. Allowed values: vmp/PromQL
- annotations
Sequence[Alerting
Rule Annotation Args] - description str
- Alert rule description
- labels
Sequence[Alerting
Rule Label Args] - levels
Sequence[Alerting
Rule Level Args] - 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]
- name String
- Alert rule name
- type String
- Alert rule type. Allowed values: vmp/PromQL
- annotations List<Property Map>
- description String
- Alert rule description
- labels List<Property Map>
- levels List<Property Map>
- 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>
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_ 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: volcenginecc:vmp:AlertingRule get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Alerting
Rule stringId - Alert rule ID
- Annotations
List<Volcengine.
Alerting Rule Annotation> - Create
Time string - Alert rule creation time
- Description string
- Alert rule description
- Labels
List<Volcengine.
Alerting Rule Label> - Levels
List<Volcengine.
Alerting Rule Level> - Name string
- Alert rule name
- Notify
Group stringPolicy Id - Alert aggregation policy ID
- Notify
Policy stringId - Alert notification policy ID
- Query
Volcengine.
Alerting Rule Query - Alert configuration
- Status string
- Alert rule status: Running (monitoring), Disabled (disabled)
-
List<Volcengine.
Alerting Rule Tag> - 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 - Create
Time string - Alert rule creation time
- Description string
- Alert rule description
- Labels
[]Alerting
Rule Label Args - Levels
[]Alerting
Rule Level Args - 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 - 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> - create
Time String - Alert rule creation time
- description String
- Alert rule description
- labels
List<Alerting
Rule Label> - levels
List<Alerting
Rule Level> - 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> - 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[] - create
Time string - Alert rule creation time
- description string
- Alert rule description
- labels
Alerting
Rule Label[] - levels
Alerting
Rule Level[] - 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[] - 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] - create_
time str - Alert rule creation time
- description str
- Alert rule description
- labels
Sequence[Alerting
Rule Label Args] - levels
Sequence[Alerting
Rule Level Args] - 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] - 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>
- create
Time String - Alert rule creation time
- description String
- Alert rule description
- labels List<Property Map>
- levels List<Property Map>
- 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>
- 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 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 str - Query statement
- workspace_
id str - Workspace ID
- prom
Ql String - Query statement
- workspace
Id String - Workspace ID
AlertingRuleTag, AlertingRuleTagArgs
Import
$ pulumi import volcenginecc:vmp/alertingRule:AlertingRule example "alerting_rule_id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcenginecc volcengine/pulumi-volcenginecc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
volcengineccTerraform Provider.
published on Thursday, Apr 23, 2026 by Volcengine
