Updated on 2023-06-16 GMT+08:00

Creating a Migration Project

Function

This API is used to create a migration project. To create a migration project, there must be an evaluation project in the Completed state. A migration project includes the following phases: target database permission check, syntax conversion, verification, migration failure report download, and migration project deletion.

URI

POST /v1/{project_id}/migration-projects

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region.

For details about how to obtain the project ID, see Obtaining a Project ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token obtained from IAM.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

migration_project_name

Yes

String

Migration project name. The name can contain 5 to 50 characters, starts with a letter, and ends with a letter or digit. Underscores (_) and hyphens (-) are allowed. The name must be unique.

Minimum length: 5 characters

Maximum length: 50 characters

evaluation_project_id

Yes

Integer

Evaluation project ID.

target_db_info

Yes

Table 4 object

Target database information.

open_gauss_config

No

Table 5 object

Configuration items for target database GaussDB.

Table 4 TargetDBInfo

Parameter

Mandatory

Type

Description

user_name

Yes

String

Username.

password

Yes

String

User password.

service_name

Yes

String

Service name.

instance_id

Yes

String

RDS instance ID.

Table 5 GaussDBConfig

Parameter

Mandatory

Type

Description

permission_check_type

No

String

Permission check type.

Value:

  • objectowner
  • sysadmin

Response Parameters

None.

Example Request

Create a migration project named OPEN_API_MIGRATION (the target database instance ID is dxx49b0c0cc846b6a1ead4caad4cd58ein14).

POST https://{EndPoint}/v1/0ac6eb2c8000d2ee2fd9c006dededbe6/migration-projects 
 
{ 
  "migration_project_name" : "OPEN_API_MIGRATION", 
  "evaluation_project_id" : 191, 
  "target_db_info" : { 
    "user_name" : "root", 
    "password" : "password", 
    "service_name" : "ugo", 
    "instance_id" : "dxx49b0c0cc846b6a1ead4caad4cd58ein14" 
  }, 
  "open_gauss_config" : { 
    "permission_check_type" : "sysadmin" 
  } 
}

Example Response

None.

Status Codes

Status Code

Description

201

Request succeeded.

Error Codes

For details, see Error Codes.