ListMigrations

Updated at:

Retrieves a list of import and export 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

dataworks:*

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ProjectId

integer

Yes

The ID of the DataWorks workspace. You can log on to the DataWorks console and go to the workspace configuration page to obtain the workspace ID.

12345

MigrationType

string

Yes

The operation type of the migration task. Valid values: IMPORT and EXPORT.

Valid values:

  • IMPORT :

    Import.

  • EXPORT :

    Export.

IMPORT

Owner

string

No

The ID of the owner.

193379****

PageNumber

integer

No

The page number of the requested data. Default value: 1. Maximum value: 100.

1

PageSize

integer

No

The number of entries to return on each page. Default value: 10. Maximum value: 100.

10

Response elements

Element

Type

Description

Example

object

The response data structure.

RequestId

string

The request ID, which uniquely identifies the request.

F9198AA3-9010-53D5-9714-DC4****

Success

boolean

Indicates whether the request is successful. Valid values:

  • true: The request is successful.

  • false: The request fails.

true

Data

object

The returned data.

Migrations

array<object>

The list of migration tasks.

object

The migration task.

Id

integer

The primary key ID.

436064

Name

string

The name of the task.

test_task_1638498642279

PackageType

string

The type of the import and export package. Valid values:

  • DWMA: Standard format.

  • DATAWORKS_MODEL: Standard format.

  • DATAWORKS_V2: Apsara Stack (V3.6.1 to V3.11).

  • DATAWORKS_V3: Apsara Stack (V3.12 and later).

DWMA and DATAWORKS_MODEL are interchangeable.

DATAWORKS_MODEL

MigrationType

string

The operation type of the migration task. Valid values:

  • IMPORT

  • EXPORT

EXPORT

CreateTime

integer

The time when the migration task was created. The value is a UNIX timestamp in milliseconds.

123124123123123

UpdateTime

integer

The time when the migration task was last updated. The value is a UNIX timestamp in milliseconds.

123123123123123

CreateUser

string

The creator.

123123****

CreateUserName

string

The name of the creator.

3h1_test

UpdateUser

string

The updater.

1231****

UpdateUserName

string

The name of the updater.

3h1_test

ProjectId

integer

The ID of the DataWorks workspace to which the task belongs.

72132

TenantId

integer

The tenant ID.

16307

Status

string

The execution status of the import and export migration task. Valid values:

  • INIT: The task is in the initial state.

  • EDITING: The task is being edited.

  • RUNNING: The task is running.

  • FAILURE: The task failed.

  • SUCCESS: The task succeeded.

SUCCESS

Message

string

The error message.

An internal system error occurred. datasource kafka region is not cn-chengdu, can't open network for it

DownloadUrl

string

The download URL of the export task package. You can use this URL to download the export task.

http://geoip-sdk-user.oss-cn-zhangjiakou.aliyuncs.com/product/v1/ipv4/trace/v1.20220424123842.dex?Expires=1650780849&OSSAccessKeyId=*****&Signature=qxxxxx

Description

string

The description of the export task.

Automated Test creation

PageNumber

integer

The current page number.

1

PageSize

integer

The number of entries returned per page. Default value: 10. Maximum value: 50.

10

TotalCount

integer

The total number of records.

20

Examples

Success response

JSON format

{
  "RequestId": "F9198AA3-9010-53D5-9714-DC4****",
  "Success": true,
  "Data": {
    "Migrations": [
      {
        "Id": 436064,
        "Name": "test_task_1638498642279",
        "PackageType": "DATAWORKS_MODEL",
        "MigrationType": "EXPORT",
        "CreateTime": 123124123123123,
        "UpdateTime": 123123123123123,
        "CreateUser": "123123****",
        "CreateUserName": "3h1_test",
        "UpdateUser": "1231****",
        "UpdateUserName": "3h1_test",
        "ProjectId": 72132,
        "TenantId": 16307,
        "Status": "SUCCESS",
        "Message": "An internal system error occurred. datasource kafka region is not cn-chengdu, can't open network for it",
        "DownloadUrl": "http://geoip-sdk-user.oss-cn-zhangjiakou.aliyuncs.com/product/v1/ipv4/trace/v1.20220424123842.dex?Expires=1650780849&OSSAccessKeyId=*****&Signature=qxxxxx",
        "Description": "Automated Test creation"
      }
    ],
    "PageNumber": 1,
    "PageSize": 10,
    "TotalCount": 20
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.