All Products
Search
Document Center

ApsaraDB for MongoDB:MigrateAvailableZone

Last Updated:Jun 10, 2026

Memigrasikan instans Database Apsara for MongoDB ke zona tertentu.

Deskripsi operasi

  • This operation is available only for replica set instances that run MongoDB 4.2 or earlier and sharded cluster instances.

  • If you have applied for a public endpoint for the ApsaraDB for MongoDB instance, you must call the ReleasePublicNetworkAddress operation to release the public endpoint before you call the MigrateAvailableZone operation.

  • Transparent data encryption (TDE) is disabled for the ApsaraDB for MongoDB instance.

  • The source zone and the destination zone belong to the same region.

  • A vSwitch is created in the destination zone. This prerequisite must be met if the instance resides in a virtual private cloud (VPC). For more information about how to create a vSwitch, see Work with vSwitches.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

dds:MigrateAvailableZone

update

*Instance

acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

DBInstanceId

string

Yes

ID instans.

Catatan

Jika instans diterapkan di VPC, Anda harus menentukan parameter Vswitch.

dds-bp1ece71ff2f****

ZoneId

string

Yes

ID zona tujuan.

Catatan
  • Zona sumber dan zona tujuan berada di Wilayah yang sama.

  • Anda dapat memanggil operasi DescribeRegions untuk mengkueri ID zona.

cn-hangzhou-b

Vswitch

string

No

ID vSwitch di zona tujuan.

Catatan

Jika instans diterapkan di VPC, Anda harus menentukan parameter ini.

vsw-bp1buy0h9myt5i9e7****

EffectiveTime

string

No

Pengatur waktu saat instans dimigrasikan ke zona tujuan. Nilai valid:

  • Immediately: Instans segera dimigrasikan ke zona tujuan.

  • MaintainTime: Instans dimigrasikan ke zona tujuan selama Jendela pemeliharaan instans.

Nilai default: Immediately.

Immediately

SecondaryZoneId

string

No

ID zona sekunder tujuan.

cn-hangzhou-h

HiddenZoneId

string

No

ID zona tersembunyi tujuan.

cn-shanghai-n

Elemen respons

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

0FDDC511-7252-4A4A-ADDA-5CB1BF63****

Contoh

Respons sukses

JSONformat

{
  "RequestId": "0FDDC511-7252-4A4A-ADDA-5CB1BF63****"
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 InvalidEffectiveTime.Malformed Specified EffectiveTime is not valid.
400 InsType.NotSupport Specified instance type dose not support this operation.
400 IncorrectMasterDBInstanceState The Master instance state does not support this operation.
400 NetworkTypeNotSupport The network type does not support this operation.
400 OperationDenied.LockMode The operation is not permitted when the instance locked.
400 InvalidIzNo.NotSupported the Specified vpc Zone not supported.
400 IncorrectVswitchId The specified parameter 'VSwitchId' is not valid.
400 InvalidRegion_Zone_NotFound Specified Region does not exist in RDS.
400 VPCERROR.ALLOCATE_ERROR Cannot Allocate the require vpcInstances.
400 ProxyError The request processing has failed due to some unknown error, exception or failure.
400 DbInsertError Database insert error.
400 UnsupportedDBTdeStatus Specified DB TDEStatus does not support this operation.
400 InvalidZoneParam The target zone and source zone cannot be the same.
400 MigrateDBInstanceError Error in migrating available area or changing your vpc network. Please submit the work order for processing.
400 MinorVersionNotSupport Instance's MinorVersion is not supported for this API.
404 InvalidDbInstanceId.NotFound Specified instance does not exist.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.