Creates a custom cluster endpoint for a PolarDB cluster.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
polardb:CreateDBClusterEndpoint | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBClusterId | string | Yes | The ID of cluster. | pc-************** |
EndpointType | string | Yes | The type of the cluster endpoint. Set the value to Custom. | Custom |
Nodes | string | No | The reader nodes that you want to associate with the endpoint. If you want to specify multiple reader nodes, separate the reader nodes with commas (,). If you do not specify this parameter, all nodes are used. Note
Writer, Reader1, Reader2 . | pi-**********,pi-********* |
ReadWriteMode | string | No | The read/write mode. Valid values:
Default value: ReadOnly. | ReadOnly |
AutoAddNewNodes | string | No | Specifies whether to enable automatic association of newly added nodes with the cluster endpoint. Valid values:
| Disable |
EndpointConfig | string | No | 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
{"ConsistLevel":"1","DistributedTransaction":"on","ConnectionPersist":"Session","MasterAcceptReads":"on"} . | {"ConsistLevel": "1","DistributedTransaction": "on"} |
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. The token is case-sensitive. | 6000170000591aed949d0f****************** |
DBEndpointDescription | string | No | The name of the custom cluster endpoint. | test |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "CD35F3-F3-44CA-AFFF-BAF869******"
}
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. |
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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-07-30 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2022-11-24 | The Error code has changed | View Change Details |
2022-09-28 | The Error code has changed | View Change Details |
2022-07-13 | The Error code has changed | View Change Details |
2022-04-25 | The Error code has changed | View Change Details |