All Products
Search
Document Center

Managed Service for Prometheus:AddRecordingRule

Last Updated:May 09, 2024

Creates or updates a recording rule of Managed Service for Prometheus.

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 cluster ID.

cc7a37ee31aea4ed1a059eff8034b****
RuleYamlstringYes

The custom recording rule. The value is in the YAML format.

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

The region ID.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

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

The status of the response.

success

Examples

Sample success responses

JSONformat

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