Updated on 2024-01-09 GMT+08:00

Migrating Resources

Function

This API is used to migrate resources to a target enterprise project.

Calling Method

For details, see Calling APIs.

URI

POST /v1.0/enterprise-projects/{enterprise_project_id}/resources-migrate

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

Yes

String

ID of the target enterprise project. If enterprise_project_id is set to 0, resources are migrated to the default enterprise project.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token. EPS is a global service. Therefore, when calling the IAM API to obtain a user token, set the scope field to domain. The value of X-Subject-Token in the response header is the user token.

X-Security-Token

No

String

Security token (session token) of your temporary security credentials. If a temporary security credential is used, this header is required.

Minimum: 0

Maximum: 2048

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

project_id

No

String

Project ID. This parameter is mandatory when resource_type is set to a region-level resource.If resource_type is set to global, leave this parameter blank or leave it blank.

resource_id

Yes

String

Resource ID.

resource_type

Yes

String

Specifies the resource type. For details, see the section "Appendix - Resource Types Supported by EPS".

region_id

No

String

Specifies the region ID. This parameter is mandatory when resource_type is set to bucket.

associated

No

Boolean

Whether associated resources are migrated. Currently, only ECS associated EVS disks and EIPs can be migrated.

Default: false

Response Parameters

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Error request information.

Table 5 RespErrorMessage

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Error request information.

Table 7 RespErrorMessage

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 402

Table 8 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Error request information.

Table 9 RespErrorMessage

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 403

Table 10 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Error request information.

Table 11 RespErrorMessage

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 404

Table 12 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Error request information.

Table 13 RespErrorMessage

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 405

Table 14 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Error request information.

Table 15 RespErrorMessage

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 406

Table 16 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Error request information.

Table 17 RespErrorMessage

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 407

Table 18 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Error request information.

Table 19 RespErrorMessage

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 408

Table 20 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Error request information.

Table 21 RespErrorMessage

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 409

Table 22 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Error request information.

Table 23 RespErrorMessage

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 24 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Error request information.

Table 25 RespErrorMessage

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 501

Table 26 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Error request information.

Table 27 RespErrorMessage

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 502

Table 28 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Error request information.

Table 29 RespErrorMessage

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 503

Table 30 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Error request information.

Table 31 RespErrorMessage

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 504

Table 32 Response body parameters

Parameter

Type

Description

error

RespErrorMessage object

Error request information.

Table 33 RespErrorMessage

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

Migrating Enterprise Project Resources

POST https://{Endpoint}/v1.0/enterprise-projects/{enterprise_project_id}/resources-migrate

{
  "project_id" : "0f02faab61ab497997867b2c9ef193a2",
  "associated" : false,
  "resource_type" : "eip",
  "resource_id" : "e220166e-a6b1-4bb4-9abf-950b367212e8"
}

Example Responses

None

Status Codes

Status Code

Description

204

No Content

400

Bad Request

401

Unauthorized

402

Payment Required

403

Forbidden

404

Not Found

405

Method Not Allowed

406

Not Acceptable

407

Proxy Authentication Required

408

Request Timeout

409

Conflict

500

Internal Server Error

501

Not Implemented

502

Bad Gateway

503

Service Unavailable

504

Gateway Timeout

Error Codes

See Error Codes.