Modifies the endpoint or port of an ApsaraDB for Redis instance.

For more information about how to modify the endpoint or port in the ApsaraDB for Redis console, see Change the endpoint or port number of an ApsaraDB for Redis instance.


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 Yes ModifyDBInstanceConnectionString

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

RegionId String No cn-hangzhou

The region ID of the instance.

DBInstanceId String Yes r-bp1zxszhcgatnx****

The ID of the instance.

NewConnectionString String No standardredis

The prefix of the new endpoint. Specify the endpoint in the <prefix> format. The prefix must start with a lowercase letter and can contain lowercase letters and digits. The prefix can be 8 to 40 characters in length.

Note You must specify one of the NewConnectionString and Port parameters.
CurrentConnectionString String Yes r-bp1zxszhcgatnx****

The current endpoint of the instance.

Port String No 6379

The port number of the instance. Valid values: 1024 to 65535.

Note You must specify one of the NewConnectionString and Port parameters.
IPType String No Public

The network type of the endpoint. Valid values:

  • Private: internal network
  • Public: Internet

Response parameters

Parameter Type Example Description
RequestId String 1790D68A-465C-44E3-BC24-9732652961F9

The ID of the request.


Sample requests
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "1790D68A-465C-44E3-BC24-9732652961F9"

Error codes

HttpCode Error code Error message Description
400 InvalidConnectionStringOrPort.Duplicate Specified connection string or port want to be modified is the same with current net type. The error message returned because the specified endpoint or port already exists.

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