All Products
Search
Document Center

Managed Service for Prometheus:GetRecordingRule

Last Updated:May 09, 2024

Obtains the recording rule of a cluster.

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
ClusterIdstringYes

The ID of the cluster.

cc7a37ee31aea4ed1a059eff8034b****
RegionIdstringYes

The region ID.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

9FEA6D00-317F-45E3-9004-7FB8B0B7****
Datastring

The recording rule.

--- groups: - name: "recording_demo" rules: - expr: "sum(jvm_memory_max_bytes)" record: "rate_coredns_demo"
Codeinteger

Status code. 200 is success, other status codes are exceptions.

200
Messagestring

Returns a hint message for the result.

success

Examples

Sample success responses

JSONformat

{
  "RequestId": "9FEA6D00-317F-45E3-9004-7FB8B0B7****",
  "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.