All Products
Search
Document Center

Managed Service for Prometheus:ManageGetRecordingRule

Last Updated:May 09, 2024

Obtains 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.

876345234
ClusterIdstringYes

The cluster ID.

cc7a37ee31aea4ed1a059eff8034b****
RegionIdstringYes

The region ID.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID. You can use the ID to query logs and troubleshoot issues.

34ED024E-9E31-434A-9E4E-D9D15C3****
Datastring

The returned message.

--- groups: - name: "recording_demo" rules: - expr: "sum(jvm_memory_max_bytes)" record: "rate_coredns_demo"
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": "34ED024E-9E31-434A-9E4E-D9D15C3****",
  "Data": "--- groups: - name: \"recording_demo\"   rules:   - expr: \"sum(jvm_memory_max_bytes)\"     record: \"rate_coredns_demo\"",
  "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.