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

Migrating Resources

Function

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

URI

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

For detailed about the parameters, see Table 1.
Table 1 Parameter in the URI

Name

Mandatory

Type

Description

enterprise_project_id

Yes

String

Specifies the ID of the target enterprise project.

You can obtain the ID by using API Querying the Enterprise Project List.

If the value of enterprise_project_id is 0, resources are migrated to enterprise project default.

Request

  • Parameter description
    Table 2 Parameters in the request

    Name

    Mandatory

    Type

    Description

    project_id

    No

    string

    Specifies the project ID. This parameter is mandatory when resource_type is set to a region-level resource.

    You can obtain the project ID from Obtaining a Project ID.

    resource_type

    Yes

    string

    Specifies the resource type.

    For details, see Resource Types Supported by EPS.

    resource_id

    Yes

    string

    Specifies the resource ID.

    For details, see Resource Types Supported by EPS.

    associated

    No

    boolean

    Specifies whether associated resources are migrated.

    The default value is false. Currently, only ECS associated EVS disks and EIPs can be migrated.

  • Example request
    POST https://{EPS 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"
    }

Status Codes

For details, see Status Code.

Error Codes

For details, see Error Codes.