Creates a custom cluster endpoint for a PolarDB cluster.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:CreateDBClusterEndpoint |
create |
*DBCluster
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
The ID of the cluster. |
pc-************** |
| EndpointType |
string |
Yes |
The type of the custom cluster endpoint. Set the value to Custom. |
Custom |
| Nodes |
string |
No |
The nodes to add to the endpoint. Separate multiple node IDs with commas (,). By default, all nodes are added. Note
|
pi-**********,pi-********* |
| ReadWriteMode |
string |
No |
The read/write mode. Valid values:
|
ReadOnly |
| AutoAddNewNodes |
string |
No |
Specifies whether to automatically add new nodes to the endpoint. Valid values:
|
Disable |
| EndpointConfig |
string |
No |
The advanced configurations of the cluster endpoint. The value is a JSON string. You can configure the consistency level, transaction splitting, connection pool, and whether to offload reads from the primary node.
Note
|
{"ConsistLevel": "1","DistributedTransaction": "on"} |
| ClientToken |
string |
No |
A client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token is case-sensitive and cannot exceed 64 ASCII characters. |
6000170000591aed949d0f****************** |
| DBEndpointDescription |
string |
No |
The name of the custom cluster endpoint. |
test |
| SccMode |
string |
No |
Specifies whether to enable the global consistency (high-performance mode) feature for the node. Valid values:
|
on |
| PolarSccWaitTimeout |
string |
No |
The timeout period for global consistency. |
100 |
| PolarSccTimeoutAction |
string |
No |
The policy for handling global consistency read timeouts. Valid values:
|
0 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
CD35F3-F3-44CA-AFFF-BAF869****** |
Examples
Success response
JSON format
{
"RequestId": "CD35F3-F3-44CA-AFFF-BAF869******"
}
Error response
JSON format
{
"RequestId": "CD35F3-F3-44CA-AFFF-BAF869666D6B"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ClusterEndpoint.StatusNotValid | Cluster endpoint status is not valid. | The state of the cluster endpoint is invalid. |
| 400 | EndpointNum.Error | Endpoint number error. | The maximum number of endpoints is exceeded. |
| 400 | LockTimeout | The request processing has failed due to lock timeout. | Failed to process the request due to a lock timeout. |
| 403 | OperationDenied.InstanceType | The operation is not permitted due to instance type. | The operation is not allowed due to the instance type |
| 404 | EndpointConfig.Invalid | Endpoint config is invalid. | The advanced parameter of the cluster endpoint is invalid. |
| 404 | InvalidDBClusterId.NotFound | The DBClusterId provided does not exist in our records. | The specified DBClusterId parameter does not exist in the current record. |
| 404 | EndpointConfig.Conflict | Endpoint config is invalid, CausalConsistRead should be session since node SCC mode enabled. | Endpoint the configuration is invalid, the CausalConsistRead should be a session because global consistency (high performance mode) for the node is enabled. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.