Modifies the attributes of a specified PolarDB cluster endpoint. For example, you can modify the following attributes for the specified cluster endpoint: read/write mode, consistency level, transaction splitting, offload reads from the primary node, and connection pool. You can also call the operation to specify whether newly added nodes are automatically associated with the specified cluster endpoint.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | No | ModifyDBClusterEndpoint |
The operation that you want to perform. Set the value to ModifyDBClusterEndpoint. |
DBClusterId | String | Yes | pc-************* |
The ID of the PolarDB cluster. |
DBEndpointId | String | Yes | pe-************** |
The ID of the cluster endpoint. |
Nodes | String | No | pi-**************,pi-************* |
The reader nodes to be associated with the endpoint. If you need to specify multiple reader nodes, separate the reader nodes with commas (,). If you do not specify this parameter, the predefined nodes are used by default. Note
|
ReadWriteMode | String | No | ReadWrite |
The read/write mode. Valid values:
|
AutoAddNewNodes | String | No | Enable |
Specifies whether to automatically associate newly added nodes with the cluster endpoint. Valid values:
Default value: Disable |
EndpointConfig | String | No | {"ConsistLevel":"1","DistributedTransaction":"on","MasterAcceptReads":"off","ConnectionPersist": "on"} |
The advanced configurations of the cluster endpoint. You must specify the configurations in the JSON format. You can specify the configurations of the following attributes: consistency level, transaction splitting, connection pool, and offload reads from the primary node.
Note
|
DBEndpointDescription | String | No | test |
The name of the custom cluster endpoint. Note This parameter takes effect for only custom cluster endpoints.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | CD3FA5F3-FAF3-44CA-AFFF-BAF869****** |
The ID of the request. |
Examples
Sample requests
http(s)://polardb.aliyuncs.com/? Action=ModifyDBClusterEndpoint
&DBClusterId=pc-*************
&DBEndpointId=pe-**************
&<Common request parameters>
Sample success responses
XML
format
<ModifyDBClusterEndpointResponse>
<RequestId>CD3FA5F3-FAF3-44CA-AFFF-BAF869******</RequestId>
</ModifyDBClusterEndpointResponse>
JSON
format
{
"RequestId": "CD3FA5F3-FAF3-44CA-AFFF-BAF869******"
}
Error codes
For a list of error codes, visit the API Error Center.