All Products
Search
Document Center

ApsaraMQ for RocketMQ:ListMigrations

Last Updated:Sep 24, 2026

Queries the list of migration tasks.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

rocketmq:ListMigrations

list

*All Resource

*

None None

Request syntax

GET /migrations HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

filter

string

No

The filter conditions for the query.

xx

migrationType

string

Yes

The migration type. Valid values:

  • INSTANCE_MIGRATION: instance migration

Valid values:

  • INSTANCE_MIGRATION :

    Instance migration.

INSTANCE_MIGRATION

pageNumber

integer

Yes

The page number of the page to return.

1

pageSize

integer

Yes

The number of entries to return on each page.

10

resourceGroupId

string

No

The resource group ID.

rg-acfm4goe2ckfiva

Response elements

Element

Type

Description

Example

object

Result<MyPage>

requestId

string

The request ID.

E5897B2E-C3AC-56DC-A482-F0E9E53F48D5

success

boolean

Indicates whether the request was successful.

true

data

object

The response data.

pageNumber

integer

The current page number.

1

pageSize

integer

The number of entries per page.

3

totalCount

integer

The total number of records.

1

list

array<object>

The paged data.

array<object>

The list of migration tasks.

migrationId

integer

The migration ID.

21

migrationName

string

The migration name.

xxx

migrationType

string

The migration type. Valid values:

  • INSTANCE_MIGRATION: instance migration

INSTANCE_MIGRATION

migrationStatus

string

The migration status. Valid values:

  • CREATED: Created.

  • MIGRATING: Migrating.

  • COMPLETED: Completed.

  • CANCELLED: Cancelled.

Valid values:

  • CANCELLED :

    Cancelled.

  • CREATED :

    Created.

  • COMPLETED :

    Completed.

  • MIGRATING :

    Migrating.

MIGRATING

userId

string

The user ID.

111

currentStage

object

The current migration stage.

stageType

string

The stage type. Valid values:

  • CONNECT_NETWORK: Network connection.

  • MIGRATE_METADATA: Metadata migration.

  • REPLACE_ENDPOINT: Endpoint replacement.

  • MIGRATE_MESSAGE: Message migration.

Valid values:

  • REPLACE_ENDPOINT :

    Endpoint replacement.

  • MIGRATE_METADATA :

    Metadata migration.

  • CONNECT_NETWOR :

    Network connection.

  • MIGRATE_MESSAGE :

    Message migration.

MIGRATE_METADATA

stageStatus

string

The stage status. Valid values:

  • INIT: Not started.

  • DOING: In progress.

  • DONE: Completed.

Valid values:

  • INIT :

    Not started.

  • DONE :

    Completed.

  • DOING :

    In progress.

DOING

stageData

any

The stage data.

[]

migrationSource

object

The migration source.

sourceType

string

The migration source type. Valid values:

  • EXTERNAL_INSTANCE: External instance.

  • INTERNAL_INSTANCE: Alibaba Cloud 5.0 instance.

Valid values:

  • EXTERNAL_INSTANCE :

    External instance.

  • INTERNAL_INSTANCE :

    Alibaba Cloud 5.0 instance.

EXTERNAL_INSTANCE

sourceData

any

The migration source data.

{ "clusterType":"INTERNET_NETWORK", "aclType":"NONE", "clusterName":"test", "namesrvAddrList":"47.110.248.xxx:9876"], "brokerObtainMethod":"AUTO_OBTAIN" }

migrationTarget

object

The migration target.

targetType

string

The migration target type. Valid values:

  • INTERNAL_INSTANCE: Alibaba Cloud 5.0 instance.

Valid values:

  • INTERNAL_INSTANCE :

    Alibaba Cloud 5.0 instance.

INTERNAL_INSTANCE

targetData

any

The migration target data.

{ "clusterType":"ROCKETMQ_V5", "instanceId":"rmq-cn-778429mp301", "regionId":"cn-hangzhou" }

createTime

string

The creation time, in YYYY-MM-DD HH:mm:ss format.

2022-08-01 00:00:00

updateTime

string

The modification time, in YYYY-MM-DD HH:mm:ss format.

2022-08-01 20:05:50

code

string

The error code.

MissingInstanceId

message

string

The error message.

The instance cannot be found.

httpStatusCode

integer

The HTTP status code.

200

dynamicCode

string

The dynamic error code.

InstanceId

dynamicMessage

string

The dynamic error message.

instanceId

Examples

Success response

JSON format

{
  "requestId": "E5897B2E-C3AC-56DC-A482-F0E9E53F48D5",
  "success": true,
  "data": {
    "pageNumber": 1,
    "pageSize": 3,
    "totalCount": 1,
    "list": [
      {
        "migrationId": 21,
        "migrationName": "xxx",
        "migrationType": "INSTANCE_MIGRATION",
        "migrationStatus": "MIGRATING",
        "userId": "111",
        "currentStage": {
          "stageType": "MIGRATE_METADATA",
          "stageStatus": "DOING",
          "stageData": "[]"
        },
        "migrationSource": {
          "sourceType": "EXTERNAL_INSTANCE",
          "sourceData": "{\n\"clusterType\":\"INTERNET_NETWORK\",\n\"aclType\":\"NONE\",\n\"clusterName\":\"test\",\n\"namesrvAddrList\":\"47.110.248.xxx:9876\"],\n\"brokerObtainMethod\":\"AUTO_OBTAIN\"\n}"
        },
        "migrationTarget": {
          "targetType": "INTERNAL_INSTANCE",
          "targetData": "{\n\"clusterType\":\"ROCKETMQ_V5\",\n\"instanceId\":\"rmq-cn-778429mp301\",\n\"regionId\":\"cn-hangzhou\"\n}"
        },
        "createTime": "2022-08-01 00:00:00",
        "updateTime": "2022-08-01 20:05:50"
      }
    ]
  },
  "code": "MissingInstanceId",
  "message": "The instance cannot be found.",
  "httpStatusCode": 200,
  "dynamicCode": "InstanceId",
  "dynamicMessage": "instanceId"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.