You can call this operation to modify the connection string of a MongoDB 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.

CurrentConnectionString String Yes

The current connection string, which is to be modified.

DBInstanceId String Yes dds-bpxxxxxxxx

The ID of the instance.

Note If you set this parameter to the ID of a sharded cluster instance, you must also specify the NodeId parameter.
NewConnectionString String Yes aliyuntest111

The new connection string. It must be 8 to 64 characters in length and can contain letters and digits. It must start with a lowercase letter.

Note You need only to specify the prefix of the connection string. The content other than the prefix cannot be modified.
RegionId String No cn-hangzhou

The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.

NodeId String No s-bpxxxxxxxx

The ID of the mongos in the specified sharded cluster instance. Only one mongos ID can be specified in each call.

Note This parameter is valid only if you set the DBInstanceId parameter to the ID of a sharded cluster instance.

Response parameters

Parameter Type Example Description
RequestId String FF36A84C-0694-42D0-861D-C383E8E4FAAF

The ID of the request.


Sample requests

http(s):// Action=ModifyDBInstanceConnectionString
&<Common request parameters>

Sample success responses

XML fomat


JSON format

	"RequestId": "FF36A84C-0694-42D0-861D-C383E8E4FAAF"

Error codes

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