public static final class CreateDBClusterEndpointRequest.Builder extends Object
public CreateDBClusterEndpointRequest.Builder autoAddNewNodes(String autoAddNewNodes)
* **Enable**: Newly added nodes are automatically associated with the cluster endpoint. * **Disable**: Newly added nodes are not automatically associated with the cluster endpoint. Default value: **Disable**.
public CreateDBClusterEndpointRequest.Builder clientToken(String clientToken)
public CreateDBClusterEndpointRequest.Builder DBClusterId(String DBClusterId)
public CreateDBClusterEndpointRequest.Builder DBEndpointDescription(String DBEndpointDescription)
public CreateDBClusterEndpointRequest.Builder endpointConfig(String endpointConfig)
* Specify the consistency level in the format of `{"ConsistLevel":"Consistency level"}`. Default value: 1. Valid values: * **0**: eventual consistency. * **1**: session consistency. * **2**: global consistency. * Specify the transaction splitting feature in the format of `{"DistributedTransaction":"Transaction splitting"}`. Valid values: * **on**: enables the transaction splitting feature. By default, the feature is enabled. * **off**: disables the transaction splitting feature. * Specify the offload reads from the primary node feature in the format of `{"MasterAcceptReads":"Offload reads from the primary node"}`. Default value: off. Valid values: * **on**: The primary node accepts read requests. * **off**: The primary node does not accept read requests. * Specify the connection pool in the format of `{"ConnectionPersist":"Connection pool"}`. Default value: off. Valid values: * **off**: disables the connection pool. * **Session**: enables the session-level connection pool. * **Transaction**: enables the transaction-level connection pool. >- You can specify the transaction splitting, connection pool, and offload reads from the primary node features for a PolarDB for MySQL cluster only if ReadWriteMode is set to ReadWrite for the cluster endpoint. >- Only PolarDB for MySQL supports global consistency. >- If the **ReadWriteMode** parameter is set to **ReadOnly**, the consistency level must be **0**. >- You can use one record to specify the consistency level, transaction splitting, connection pool, and offload reads from the primary node features, such as `{"ConsistLevel":"1","DistributedTransaction":"on","ConnectionPersist":"Session","MasterAcceptReads":"on"}`. >- The transaction splitting settings are restricted by the consistency level settings. For example, if you set the consistency level to **0**, transaction splitting cannot be enabled. If you set the consistency level to **1** or **2**, transaction splitting can be enabled.
public CreateDBClusterEndpointRequest.Builder endpointType(String endpointType)
public CreateDBClusterEndpointRequest.Builder nodes(String nodes)
>- You need to specify the node IDs for a PolarDB for MySQL cluster. >- You need to specify the role name of each node for a PolarDB for PostgreSQL cluster or a PolarDB for PostgreSQL (Compatible with Oracle) cluster. Example: `Writer, Reader1, Reader2`. >- If you set **ReadWriteMode** to **ReadOnly**, you can associate only one node with the endpoint. If the only node becomes faulty, the cluster endpoint may be unavailable for up to 1 hour. We recommend that you associate more than one node with the cluster endpoint in production environments. We recommend that you associate at least two nodes with the cluster endpoint to improve service availability. >- If you set **ReadWriteMode** to **ReadWrite**, you need to associate at least two nodes with the cluster endpoint. >- PolarDB for MySQL does not impose a limit on the types of the two nodes. If the nodes are read-only nodes, write requests are forwarded to the primary node. >- PolarDB for PostgreSQL and PolarDB for PostgreSQL (compatible with Oracle) require a primary node.
public CreateDBClusterEndpointRequest.Builder ownerAccount(String ownerAccount)
public CreateDBClusterEndpointRequest.Builder ownerId(Long ownerId)
public CreateDBClusterEndpointRequest.Builder readWriteMode(String readWriteMode)
* **ReadWrite**: receives and forwards read and write requests. Automatic read/write splitting is enabled. * **ReadOnly**: The account has the read-only permissions on the database. Default value: **ReadOnly**.
public CreateDBClusterEndpointRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public CreateDBClusterEndpointRequest.Builder resourceOwnerId(Long resourceOwnerId)
public CreateDBClusterEndpointRequest build()
Copyright © 2023. All rights reserved.