ModifyRoGroupInfo

最后更新时间:2021-10-12 17:20:53

1. API Description

Domain name for API request: cdb.tencentcloudapi.com.

This API is used to update the information of a TencentDB RO group, such as configuring an instance removal policy in case of excessive delay and setting read weights of RO instances.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: ModifyRoGroupInfo.
Version Yes String Common parameter. The value used for this API: 2017-03-20.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
RoGroupId Yes String RO group ID.
RoGroupInfo No RoGroupAttr RO group details.
RoWeightValues.N No Array of RoWeightValue Weights of instances in RO group. If the weighting mode of an RO group is changed to custom mode, this parameter must be set, and a weight value needs to be set for each RO instance.
IsBalanceRoLoad No Integer Whether to rebalance the loads of read-only replicas in the RO group. Valid values: 1 (yes), 0 (no). Default value: 0. If this parameter is set to 1, connections to the read-only replicas in the RO group will be interrupted transiently. Please ensure that your application has a reconnection mechanism.

3. Output Parameters

Parameter Name Type Description
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Configuring the instance removal policy for an RO group

Input Example

https://cdb.tencentcloudapi.com/?Action=ModifyRoGroupInfo
&RoGroupId=cdbrg-iup41a4t
&RoGroupInfo.RoOfflineDelay=1
&RoGroupInfo.RoMaxDelayTime=10
&RoGroupInfo.MinRoInGroup=1
&<Common request parameters>

Output Example

{
  "Response": {
    "RequestId": "6EF60BEC-0242-43AF-BB20-270359FB54A7"
  }
}

Example2 Rebalancing the weights of instances in an RO group

Input Example

https://cdb.tencentcloudapi.com/?Action=ModifyRoGroupInfo
&RoGroupId=cdbrg-iup41a4t
&RoGroupInfo.WeightMode=custom
&RoWeightValues.0.InstanceId=cdbr0-iup41a4t
&RoWeightValues.0.Weight=30
&RoWeightValues.1.InstanceId=cdbr0-test1234
&RoWeightValues.1.Weight=70
&IsBalanceRoLoad=1
&<Common request parameters>

Output Example

{
  "Response": {
    "RequestId": "6EF60BEC-0242-43AF-BB20-270359FBQWER"
  }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation.StatusConflict Task status conflict.
InternalError.DBRecordNotExistError The database record does not exist.
InternalError.DatabaseAccessError Internal database error.
InternalError.TaskFrameError Async task error.
InvalidParameter Parameter error.
InvalidParameter.InstanceNotFound The instance does not exist.
InvalidParameterValue.InvalidParameterValueError Invalid parameter value
MissingParameter.MissingParamError Required parameters are missing.
OperationDenied.DelayReplicationRunning The operation is not allowed during the delayed replication.