Updated on 2022-08-02 GMT+08:00

Creating a Migration Project

Function

Creating a Migration Project

Constraints

The migration project name must be unique.

URI

POST /v3/migprojects

Request

Table 1 Request header parameter

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header).

Minimum length: 1 character

Maximum length: 16,384 characters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Specifies the migration project name.

Minimum length: 0 characters

Maximum length: 255 characters

description

No

String

Describes the migration project.

Minimum length: 0 characters

Maximum length: 255 characters

isdefault

No

Boolean

Specifies whether the migration project is the default project.

Default value: false

region

Yes

String

Specifies the region where the project resides.

Minimum length: 0 characters

Maximum length: 255 characters

start_target_server

No

Boolean

Specifies whether to start the target server after the migration.

Default value: true

speed_limit

No

Integer

Specifies the migration rate limit, in Mbit/s.

Minimum value: 0

Maximum value: 10000

use_public_ip

Yes

Boolean

Specifies whether to use a public IP address for migration.

Default value: true

exist_server

Yes

Boolean

Specifies whether to use an existing ECS as the target server.

Default value: true

type

Yes

String

Specifies the migration project type.

Minimum length: 0 characters

Maximum length: 255 characters

The value can be:

  • MIGRATE_BLOCK
  • MIGRATE_FILE

enterprise_project

No

String

Specifies the enterprise project name.

Default value: default

Minimum length: 0 characters

Maximum length: 255 characters

syncing

Yes

Boolean

Specifies whether to perform a continuous synchronization after the first replication or synchronization.

Default value: false

Response

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

id

String

Specifies the ID of the newly added migration project returned after the migration project is created.

Minimum length: 0 characters

Maximum length: 255 characters

Example Request

Create a migration project.

POST https://{endpoint}/v3/migprojects

{
  "name" : "N121",
  "description" : "",
  "region" : "region",
  "start_target_server" : true,
  "speed_limit" : 0,
  "use_public_ip" : true,
  "exist_server" : true,
  "isdefault" : true,
  "type" : "MIGRATE_BLOCK",
  "syncing" : false,
  "enterprise_project" : "defalut"
}

Example Response

Status code: 200

OK

{
  "id" : "6c6b6a50-6a6a-4d22-bd2c-78455ee5fxxx"
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.