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. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetRecordingRule

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

ClusterId String Yes cc7a37ee31aea4ed1a059eff8034b****

The ID of the cluster.

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 --- groups: - name: "recording_demo" rules: - expr: "sum(jvm_memory_max_bytes)" record: "rate_coredns_demo"

The recording rule.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetRecordingRule
&ClusterId=cc7a37ee31aea4ed1a059eff8034b****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetRecordingRuleResponse>
    <RequestId>9FEA6D00-317F-45E3-9004-7FB8B0B7****</RequestId>
    <Data>--- groups: - name: "recording_demo"   rules:   - expr: "sum(jvm_memory_max_bytes)"     record: "rate_coredns_demo"</Data>
</GetRecordingRuleResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "9FEA6D00-317F-45E3-9004-7FB8B0B7****",
  "Data" : "--- groups: - name: \"recording_demo\"   rules:   - expr: \"sum(jvm_memory_max_bytes)\"     record: \"rate_coredns_demo\""
}