All Products
Search
Document Center

Managed Service for Prometheus:ManageRecordingRule

Last Updated:May 09, 2024

Edits the recording rule of a cluster monitored by Prometheus Service.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
QueryUserIdstringYes

The user ID.

87348589207
ClusterIdstringYes

The cluster ID.

cf09705f5a82f454db0d50420b6b4e904
RuleYamlstringYes

The recording rule.

groups:\n- interval: 60s\n name: auto_analyzer_recording_rule_60s\n rules:\n - expr: sum(node_cpu_seconds_total)\n record: sum:node_cpu_seconds_total:recording_rule_hash_f341458c0f7d\n
RegionIdstringYes

The region ID.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

The content of the response.

RequestIdstring

The request ID. You can use the ID to troubleshoot issues.

CD782AEC-A676-529F-8F26-0ED0FF0EF1EA
Datastring

The result of the operation.

success
Codeinteger

The HTTP status code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed.

200
Messagestring

The returned message.

success

Examples

Sample success responses

JSONformat

{
  "RequestId": "CD782AEC-A676-529F-8F26-0ED0FF0EF1EA",
  "Data": "success",
  "Code": 200,
  "Message": "success"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-03-20The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.