You need to enable JavaScript to run this app.
Volcengine Managed Service for Prometheus

Volcengine Managed Service for Prometheus

Copy page
Download PDF
Recording rule
UpdateRuleFile
Copy page
Download PDF
UpdateRuleFile
Update the RecordingRule file.​
Request description​
Volcengine Managed Service for Prometheus has been deployed in multiple regions worldwide to provide you with a more stable, lower-latency experience. You can choose an optimal access point for your service region by referring to the Service addresses topic.​
  • Request method: POST​
  • Request URL: https://vmp.cn-beijing.volcengineapi.com/?Action=UpdateRuleFile&Version=2021-03-03​
Request descriptions​
tip​
Use either Id or WorkspaceId + Name as parameters.​
  • Update a rule file by ID.​
  • or update a rule file by WorkspaceId + Name, i.e., a workspace ID and a file name in it.​
​
Parameters​
Types​
Required or Not​
Sample Values​
Descriptions​
Action​
String​
Yes​
UpdateRuleFile​
interface name. The API name is UpdateRuleFile.​
Version​
String​
Yes​
2021-03-03​
API version. The API version is 2021-03-03.​
Id​
String​
No​
e28ae750-bbb8-4ff4-abf4-1e0e0f88808c​
Rule file ID.​
WorkspaceId​
String​
No​
e28ae750-bbb8-4ff4-abf4-1e0e0f88808c​
Workspace ID. It is always used together with Name.​
Name​
String​
No​
test​
Rule file name. It is always used together with WorkspaceId.​
Description​
String​
No​
This is a description​
Description of rule file.​
Content​
String​
No​
{"groups": [{"name": "my_first_recording_rule", "rules": [{"expr": "up", "record": "up"}], "interval": "30s"}]}​
Rule file content.​
​
Sample requests​
​
POST https://vmp.cn-beijing.volcengineapi.com/?Action=UpdateRuleFile&Version=2021-03-03​
Content-Type: application/json​
{​
"Id": "e28ae750-bbb8-4ff4-abf4-1e0e0f88808c",​
"WorkspaceId": "e28ae750-bbb8-4ff4-abf4-1e0e0f88808c",​
"Name": "test",​
"Description": "This is a description",​
"Content": "{\"groups\": [{\"name\": \"my_first_recording_rule\", \"rules\": [{\"expr\": \"up\", \"record\": \"up\"}], \"interval\": \"30s\"}]}"​
}​
​
Request parameters​
​
Parameters​
Type​
Value examples​
Descriptions​
Id​
String​
e28ae750-bbb8-4ff4-abf4-1e0e0f88808c​
Rule file ID.​
​
Sample responses​
​
HTTP/1.1: 200 OK​
Content-Type: application/json​
{​
"ResponseMetadata": {​
"RequestId": "20230604110420****100232280022D31",​
"Action": "UpdateRuleFile",​
"Version": "2021-03-03",​
"Service": "vmp",​
"Region": "cn-beijing"​
},​
"Result": {​
"Id": "e28ae750-bbb8-4ff4-abf4-1e0e0f88808c"​
}​
}​
​
Error code ​
The following table lists the error codes specific to this API. For public error codes, see Public error codes.​
​
HTTP status codeS​
Error code​
Error messages​
DescriptionS​
400​
QuotaExceeded.RuleGroupCount​
Rule Group count has exceeded the quota.​
The number of rule files has reached the upper limit.​
400​
InvalidParameter.{{parameter}}​
The specified parameter {{parameter}} is invalid.​
An invalid parameter was found. For example, an invalid workspace name was included in requests.​
400​
MissingParameter.{{parameter}}​
The required parameter {{parameter}} is missing.​
Missing necessary parameters.​
403​
ProductUnsubscribed​
You are not subscribed to VMP. Please go to the VMP console web page to subscribe to the service​
The account is not subscribed to the VMP service.​
403​
OperationDenied.Create​
Operation is denied because RuleFile cannot be created in Workspace`s current status.​
It is not allowed to create any rule files on the current status of the workspace.​
404​
NotFound.Workspace​
The specified Workspace {{id}} is not found.​
The workspace with the ID was not found.​
404​
NotFound.Name​
The specified RuleFile {{name}} is not found in Workspace {{workspaceID}}.​
The rule file was not found in the specified workspace.​
​
​
Last updated: 2026.07.10 11:12:05