All Products
Search
Document Center

Resource Management:MoveResources

Last Updated:Aug 28, 2026

Moves resources from one resource group to another. You can move multiple resources that reside in different regions, are used by different Alibaba Cloud services, or belong to different resource groups.

Operation description

For more information about Alibaba Cloud services whose resources can be moved between resource groups, see the Supported by the API column in Alibaba Cloud services that support resource groups.

In this example, two virtual private clouds (VPCs) vpc-bp1sig0mjktx5ewx1**** and vpc-bp1visxm225pv49dz**** that reside in different regions and belong to different resource groups are moved to the resource group rg-aekzmeobk5w****.

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

resourcemanager:MoveResources

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ResourceGroupId

string

Yes

The ID of the resource group to which you want to move the resources.

rg-aekzmeobk5w****

Resources

array<object>

Yes

The resources that you want to move.

Note

You can move a maximum of 10 resources at a time. If you want to move more than 10 resources, move them in batches.

object

No

The resources that you want to move.

Note

You can move a maximum of 10 resources at a time. If you want to move more than 10 resources, move them in batches.

RegionId

string

No

The region ID of the resource.

cn-hangzhou

ResourceId

string

No

The ID of the resource.

i-23v38****

ResourceType

string

No

The type of the resource.

instance

Service

string

No

The ID of the Alibaba Cloud service to which the resource belongs.

ecs

Note
  • You can call the ListResources operation to obtain the values of the Service, RegionId, ResourceId, ResourceGroupId, and ResourceType request parameters.

  • For more information about common request parameters, see Common parameters.

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The ID of the request.

C00B89D3-3247-11DE-95D8-A7C01FB0AB4F

Responses

array<object>

The returned results.

object

Responses

ErrorCode

string

The error code returned.

Note

This parameter is returned if the resource failed to be moved.

NoPermission

ErrorMsg

string

The error message returned.

Note

This parameter is returned if the resource failed to be moved.

没权限

RegionId

string

The region ID of the resource.

cn-hangzhou

RequestId

string

The ID of the request.

C00B89D3-3247-11DE-95D8-A7C01FB0AB4F

ResourceId

string

The ID of the resource.

i-23v38****

ResourceType

string

The type of the resource.

instance

Service

string

The ID of the Alibaba Cloud service.

ecs

Status

string

The status of the move task. Valid values:

  • SUCCESS

  • FAIL

FAIL

Examples

Success response

JSON format

{
  "RequestId": "C00B89D3-3247-11DE-95D8-A7C01FB0AB4F",
  "Responses": [
    {
      "ErrorCode": "NoPermission",
      "ErrorMsg": "没权限",
      "RegionId": "cn-hangzhou",
      "RequestId": "C00B89D3-3247-11DE-95D8-A7C01FB0AB4F",
      "ResourceId": "i-23v38****",
      "ResourceType": "instance",
      "Service": "ecs",
      "Status": "FAIL"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 SERVICE_REGION_NO_ENDPOINT Please input right service and region
400 EntityExists.AssociatedTransferTask An associated transfer task is in progress. Try again later. Resources that are associated with a specific resource are being transferred to another resource group together with the specific resource. Try again later.
400 NotAllowMove.ExistsAssociatedTransferRule Associated resources cannot be transferred while the primary resource is being transferred. The Transfer Associated Resources feature is enabled, but the resources associated with the specific resource do not support this feature.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.