Mengalihkan node primer dan sekunder untuk instans Database Apsara untuk MongoDB.
Deskripsi operasi
The instance must be running when you call this operation.
-
This operation is applicable to replica set instances and sharded cluster instances, but cannot be performed on standalone instances.
-
On replica set instances, the switch is performed between instances. On sharded cluster instances, the switch is performed between shards.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dds:SwitchDBInstanceHA |
none |
*Instance
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| DBInstanceId |
string |
Yes |
ID instans. |
dds-bpxxxxxxxx |
| NodeId |
string |
No |
ID node shard di instans kluster sharded. Catatan
Anda harus menentukan parameter ini jika Anda menyetel DBInstanceId ke ID instans kluster sharded. |
d-bpxxxxxxxx |
| RoleIds |
string |
No |
ID peran yang node primer dan sekundernya akan dialihkan. Anda dapat memanggil operasi DescribeRoleZoneInfo untuk Tampilan ID dan informasi peran node. Catatan
|
972xxxx,972xxxx |
| SwitchMode |
integer |
No |
Pengatur waktu pengalihan node primer dan sekunder. Nilai valid:
|
0 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
26BD4E5F-BDB4-47BA-B232-413AA78CFA8F |
Contoh
Respons sukses
JSONformat
{
"RequestId": "26BD4E5F-BDB4-47BA-B232-413AA78CFA8F"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidSwitchType | Specified Swtich Type is not valid. | |
| 400 | InvalidInstanceId | Specified Instance ID is not valid. | |
| 400 | HaStatusNotSupport | Current DB instance HA status does not support this operation. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.