Mengubah alamat koneksi dan port instans MongoDB.
Deskripsi operasi
You can modify the connection address and port for the following instance types:
-
You can modify the connection address and port for instances that use local disks or cloud disks.
-
For sharded cluster instances, you can modify only the connection address of Mongos nodes.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dds:ModifyDBInstanceConnectionString |
update |
*Instance
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| DBInstanceId |
string |
Yes |
ID instans. Catatan
Jika Anda menentukan ID instans kluster sharded, Anda juga harus menentukan parameter NodeId. |
dds-bpxxxxxxxx |
| NodeId |
string |
No |
ID node Mongos di instans kluster sharded. Anda hanya dapat menentukan satu ID node Mongos per panggilan. Catatan
Parameter ini hanya valid jika DBInstanceId menentukan ID instans kluster sharded. |
s-bpxxxxxxxx |
| CurrentConnectionString |
string |
No |
Alamat koneksi saat ini—alamat yang akan diubah. |
s-bpxxxxxxxx.mongodb.rds.aliyuncs.com |
| NewConnectionString |
string |
No |
Alamat koneksi baru. Harus memenuhi persyaratan berikut:
Catatan
Tentukan hanya awalan alamat koneksi. Anda tidak dapat mengubah bagian apa pun selain awalan. |
aliyuntest111 |
| NewPort |
integer |
No |
Nomor Port baru. Nilai valid berkisar dari 1000 hingga 65535. Catatan
Parameter ini hanya valid jika DBInstanceId menentukan ID instans cloud disk. |
3310 |
| PortModifyOnly |
boolean |
No |
||
| NetworkType |
string |
No |
vpc |
|
| ForceModifySuffix |
boolean |
No |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
FF36A84C-0694-42D0-861D-C383E8E4FAAF |
| ModifiedConnectionString |
string |
Contoh
Respons sukses
JSONformat
{
"RequestId": "FF36A84C-0694-42D0-861D-C383E8E4FAAF",
"ModifiedConnectionString": ""
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | NewConnectionString.NotSupport | Specified newConnectionString is not supported. | |
| 400 | InvalidConnectionStringOrPort.Duplicate | Specified connection string or port already exists. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.