Creates or updates a recording rule.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes AddRecordingRule

The operation that you want to perform. Set the value to AddRecordingRule.

ClusterId String Yes cc7a37ee31aea4ed1a059eff8034b****

The ID of the cluster.

RuleYaml String Yes groups: - name: "recording_demo" rules: - expr: "sum(jvm_memory_max_bytes)" record: "rate_coredns_demo"

The recording rule.

RegionId String Yes cn-hangzhou

The ID of the region.

Response parameters

Parameter Type Example Description
RequestId String 9FEA6D00-317F-45E3-9004-7FB8B0B7****

The ID of the request.

Data String success

The status of the response.


Sample requests

&RuleYaml=groups: - name: "recording_demo"   rules:   - expr: "sum(jvm_memory_max_bytes)"     record: "rate_coredns_demo"
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "9FEA6D00-317F-45E3-9004-7FB8B0B7****",
  "Data" : "success"