Modifies the endpoints of a specified PolarDB cluster, including the primary endpoint, the default cluster endpoint, custom cluster endpoints, and private domain names.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No ModifyDBEndpointAddress

The operation that you want to perform. Set the value to ModifyDBEndpointAddress.

DBClusterId String Yes pc-***************

The ID of the cluster.

Note You can call the DescribeDBClusters operation to query the details of all clusters that belong to your account, such as the cluster ID.
DBEndpointId String Yes pe-****************

The ID of the endpoint.

Note You can call the DescribeDBClusterEndpoints operation to query endpoint IDs.
NetType String Yes Public

The network type of the endpoint. Valid values:

  • Public: Internet
  • Private: virtual private cloud (VPC)
ConnectionStringPrefix String No test-1

The prefix of the new endpoint. The prefix must meet the following requirements:

  • It can contain lowercase letters, digits, and hyphens (-).
  • It must start with a letter and end with a digit or a letter.
  • It must be 6 to 30 characters in length.
PrivateZoneAddressPrefix String No testprefix

The prefix of the private domain name. The prefix must meet the following requirements:

  • It can contain lowercase letters, digits, and hyphens (-).
  • It must start with a letter and end with a digit or a letter.
  • It must be 6 to 30 characters in length.
Note
  • You can bind a private domain name to each VPC-facing endpoint of a PolarDB cluster. Private domain names apply to only the VPC that you specify within the current region. Private domain names are managed through PrivateZone. You can use the CNAME record of PrivateZone to map domain names to PolarDB. You are charged a small amount of fees for this feature. For more information, see Pricing.
  • This parameter takes effect only when NetType is set to Private.
PrivateZoneName String No test.com

The name of the private zone.

Note This parameter takes effect only when NetType is set to Private.
Port String No 3306

The port number. Valid values: 3000 to 5999.

Note
  • Only PolarDB for MySQL clusters support this parameter. If you leave this parameter empty, the default port 3306 is used.

Response parameters

Parameter Type Example Description
RequestId String D0CEC6AC-7760-409A-A0D5-E6CD86******

The ID of the request.

Examples

Sample requests

http(s)://polardb.aliyuncs.com/?Action=ModifyDBEndpointAddress
&DBClusterId=pc-***************
&DBEndpointId=pe-****************
&NetType=Public
&<Common Request Parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ModifyDBEndpointAddressResponse>
<RequestId>D0CEC6AC-7760-409A-A0D5-E6CD86******</RequestId>
</ModifyDBEndpointAddressResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "D0CEC6AC-7760-409A-A0D5-E6CD86******"
}

Error codes

For a list of error codes, visit the API Error Center.