All Products
Search
Document Center

Managed Service for Prometheus:SyncRecordingRules

Last Updated:May 09, 2024

Synchronizes the aggregation rule of a cluster to other clusters in a region.

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 whose aggregation rule you want to synchronize.

cc7a37ee31aea4ed1a059eff8034b****
TargetClustersstringYes

The IDs of clusters to which you want to synchronize the aggregation rule.

{ "cn":[ "c06ca68cd16f14f52bb07772eda***", "c33dd70a0ac184c1b879d807ab2***", "c384cf7e4dcb543e6ac8c7d4dd3***" ], "us":[ "ce30f833bc4a04a56a06b070319***" ], "jp":[ ], "ap":[ ], "gov":[ ], "finance":[ ] }
RegionIdstringYes

The ID of the region. The destination region can be the same as the source region.

cn-hangzhou

Note: The TargetClusters parameter specifies the clusters to which aggregation rule is synchronized. You must pass the parameter in the JSON format. Each element in the TargetClusters parameter is an array, which indicates a cluster ID. Example: { "cn":[], //China "eu":[], //Europe "us":[], //America "jp":[], //Japan "ap":[], //Asia Pacific "gov":[], //Alibaba Gov Cloud "finance":[] //Alibaba Finance Cloud }. Enter cluster IDs in each pair of brackets ([]).

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

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

1A9C645C-C83F-4C9D-8CCB-29BEC9E1****
Datastring

The struct returned.

{ "data":\[ "c06ca68cd16f14f52bb07772eda\*\*\*", "c33dd70a0ac184c1b879d807ab2\*\*\*", "c384cf7e4dcb543e6ac8c7d4dd3\*\*\*", "ce30f833bc4a04a56a06b070319\*\*\*" ], "message":"IDs of Clusters to which the aggregation rule failed to be synchronized", "success":true }

Note: If the value of the response parameter Data is true, the call is successful. Otherwise, the call fails. If the value of the data field is not null, the aggregation rule fails to be synchronized to some clusters. The error may occur due to cluster faults or request timeout. You need to check and troubleshoot the error before you call the API operation again.

Examples

Sample success responses

JSONformat

{
  "RequestId": "1A9C645C-C83F-4C9D-8CCB-29BEC9E1****",
  "Data": "{ \"data\":\\[ \"c06ca68cd16f14f52bb07772eda\\*\\*\\*\", \"c33dd70a0ac184c1b879d807ab2\\*\\*\\*\", \"c384cf7e4dcb543e6ac8c7d4dd3\\*\\*\\*\", \"ce30f833bc4a04a56a06b070319\\*\\*\\*\" ], \"message\":\"IDs of Clusters to which the aggregation rule failed to be synchronized\", \"success\":true }\n",
  "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.
2022-09-02Add Operationsee changesets