All Products
Search
Document Center

ApsaraMQ for RocketMQ:CreateDisasterRecoveryPlan

Last Updated:Jun 10, 2026

Membuat rencana pemulihan bencana.

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

rocketmq:CreateDisasterRecoveryPlan

update

*Instance

acs:rocketmq:{#regionId}:{#accountId}:instance/{#InstanceId}

None None

Sintaks permintaan

POST /disaster_recovery HTTP/1.1

Parameter permintaan

Parameter

Type

Required

Description

Example

body

object

No

Badan permintaan.

planName

string

No

The name of the Global Replicator task. You must specify this parameter.

xxx

planDesc

string

No

The description of the Global Replicator task.

xxx

planType

string

No

The type of the Global Replicator task. You must specify this parameter. For more information, see Global Replicator. Valid values:

  • ACTIVE_PASSIVE: one-way backup

  • ACTIVE_ACTIVE: two-way backup

Valid values:

  • ACTIVE_ACTIVE :

    双向备份

  • ACTIVE_PASSIVE :

    单向备份

ACTIVE_ACTIVE

instances

array<object>

No

The instances involved in the Global Replicator task. You must specify this parameter.

array<object>

No

The instance involved in the Global Replicator task.

instanceType

string

No

The instance type. Valid values:

  • ALIYUN_ROCKETMQ: ApsaraMQ for RocketMQ instance

  • EXTERNAL_ROCKETMQ: external RocketMQ instance

Valid values:

  • ALIYUN_ROCKETMQ: ApsaraMQ for RocketMQ instance

  • EXTERNAL_ROCKETMQ: external RocketMQ instance

Valid values:

  • ALIYUN_ROCKETMQ :

    阿里云 mq 实例

  • EXTERNAL_ROCKETMQ :

    外部实例

ALIYUN_ROCKETMQ

regionId

string

No

The region where the instance resides.

cn-hangzhou

instanceId

string

No

The instance ID. This parameter is required only if you set instanceType to ALIYUN_ROCKETMQ.

rmq-cn-******

instanceRole

string

No

The instance role. Valid values:

  • ACTIVE: primary instance

  • Passive: secondary instance

Valid values:

  • PASSIVE :

  • ACTIVE :

PASSIVE

authType

string

No

The authentication method. If you set instanceType to ALIYUN_ROCKETMQ and the instance is an ApsaraMQ for RocketMQ 4.0 instance, you do not need to specify this parameter.

  • NO_AUTH: no authentication

  • ACL_AUTH: access control list (ACL)-based authentication

Valid values:

  • NO_AUTH: no authentication

  • ACL_AUTH: access control list (ACL)-based authentication

Valid values:

  • NO_AUTH :

    无须认证

  • ACL_AUTH :

    acl 认证

ACL_AUTH

username

string

No

The username used for authentication. This parameter is required only if you set authType to ACL_AUTH.

xxx

password

string

No

The password used for authentication. This parameter is required only if you set authType to ACL_AUTH. If you set instanceType to ALIYUN_ROCKETMQ, you do not need to specify this parameter.

xxx

endpointUrl

string

No

The instance endpoint. This parameter is required only if you set instanceType to EXTERNAL_ROCKETMQ.

xxx

networkType

string

No

The network type. This parameter is required only if you set instanceType to EXTERNAL_ROCKETMQ. Valid values:

  • TCP_INTERNET: Internet over TCP

  • TCP_VPC: virtual private cloud (VPC) over TCP.

Valid values:

  • TCP_VPC :

    tcp 专有网络

  • TCP_INTERNET :

    tcp 公网

TCP_INTERNET

vpcId

string

No

The ID of the VPC with which the instance is associated. This parameter is required only if you set instanceType to EXTERNAL_ROCKETMQ and networkType to TCP_VPC.

vpc-wz9qt50xhtj9krb******

vSwitchId

string

No

The ID of the vSwitch with which the instance is associated. This parameter is required only if you set instanceType to EXTERNAL_ROCKETMQ and networkType to TCP_VPC.

vsw-uf6gwtbn6etadpv******

messageProperty

object

No

The message attribute. When you synchronize a message to the destination cluster, the system automatically adds the attribute to the message for SQL-based filtering.

propertyKey

string

No

The attribute key.

aaa

propertyValue

string

No

The attribute value.

bbb

securityGroupId

string

No

The ID of the security group to which the instance belongs. This parameter is required only if you set instanceType to EXTERNAL_ROCKETMQ and networkType to TCP_VPC.

sg-bp17hpmgz9******

consumerGroupId

string

No

The ID of the consumer group.

GID_DS_XXX_YYY

autoSyncCheckpoint

boolean

No

Specifies whether to enable automatic consumer progress synchronization.

Catatan

This parameter takes effect only when you set syncCheckpointEnabled to true.

Valid values:

  • true

  • false

Valid values:

  • true :

    开启

  • false :

    关闭

true

syncCheckpointEnabled

boolean

No

Specifies whether to enable consumer progress synchronization.

Valid values:

  • true

  • false

Valid values:

  • true :

    开启

  • false :

    关闭

true

Elemen respons

Element

Type

Description

Example

object

Result

requestId

string

Request ID

C7E8AE3A-219B-52EE-BE32-4036F5xxxx

success

boolean

Indicates whether the operation was successful

true

data

integer

The result, which is the backup plan ID

1234

code

string

Error code

200

message

string

Error message

xxx

httpStatusCode

integer

HTTP status code

200

dynamicCode

string

Dynamic error code

InstanceId

dynamicMessage

string

Dynamic error message

instanceId

accessDeniedDetail

string

Access denied details, provided only in scenarios where access is denied due to lack of RAM permissions

xxx

Contoh

Respons sukses

JSONformat

{
  "requestId": "C7E8AE3A-219B-52EE-BE32-4036F5xxxx",
  "success": true,
  "data": 1234,
  "code": "200",
  "message": "xxx",
  "httpStatusCode": 200,
  "dynamicCode": "InstanceId",
  "dynamicMessage": "instanceId",
  "accessDeniedDetail": "xxx"
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.