Creates a custom cluster endpoint for a specified PolarDB cluster.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | No | CreateDBClusterEndpoint |
The operation that you want to perform. Set the value to CreateDBClusterEndpoint. |
DBClusterId | String | Yes | pc-************** |
The ID of the PolarDB cluster. |
EndpointType | String | Yes | Custom |
The type of the cluster endpoint. Set the value to Custom. |
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 (,). By default, all the nodes in the specified cluster are associated with the cluster endpoint. Note
|
ReadWriteMode | String | No | ReadOnly |
The read/write mode. Valid values:
|
AutoAddNewNodes | String | No | Disable |
Specifies whether to automatically associate newly added nodes with the cluster endpoint. Valid values:
Default value: Disable |
EndpointConfig | String | No | {"ConsistLevel": "1","DistributedTransaction": "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
|
ClientToken | String | No | 6000170000591aed949d0f****************** |
The client token that is used to ensure the idempotency of requests. If an API operation is idempotent, the API operation returns the same result for identical requests. You can use the client to generate the value. Make sure that the value is unique for different requests. The token is case-sensitive. The token can contain only ASCII characters and cannot exceed 64 characters in length. |
DBEndpointDescription | String | No | test |
The name of the custom cluster endpoint. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | CD35F3-F3-44CA-AFFF-BAF869****** |
The ID of the request. |
Examples
Sample requests
http(s)://polardb.aliyuncs.com/? Action=CreateDBClusterEndpoint
&DBClusterId=pc-**************
&EndpointType=Custom
&<Common request parameters>
Sample success responses
XML
format
<CreateDBClusterEndpointResponse>
<RequestId>CD35F3-F3-44CA-AFFF-BAF869******</RequestId>
</CreateDBClusterEndpointResponse>
JSON
format
{
"RequestId": "CD35F3-F3-44CA-AFFF-BAF869******"
}
Error codes
For a list of error codes, visit the API Error Center.