All Products
Search
Document Center

Resource Management:MoveResources

更新時間:Jun 05, 2024

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****.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ResourceGroupIdstringYes

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

rg-aekzmeobk5w****
Resourcesobject []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.
ResourceIdstringNo

The ID of the resource.

vpc-bp1sig0mjktx5ewx1****
ResourceTypestringNo

The type of the resource.

vpc
RegionIdstringNo

The region ID of the resource.

cn-hangzhou
ServicestringNo

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

vpc
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 parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The ID of the request.

C00B89D3-3247-11DE-95D8-A7C01FB0AB4F
Responsesobject []

The returned results.

Servicestring

The ID of the Alibaba Cloud service.

vpc
ResourceIdstring

The ID of the resource.

vpc-bp1sig0mjktx5ewx1****
ResourceTypestring

The type of the resource.

vpc
RequestIdstring

The ID of the request.

C00B89D3-3247-11DE-95D8-A7C01FB0AB4F
Statusstring

The status of the move task. Valid values:

  • SUCCESS
  • FAIL
FAIL
ErrorCodestring

The error code returned.

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

The error message returned.

Note This parameter is returned if the resource failed to be moved.
No permissions
RegionIdstring

The region ID of the resource.

cn-hangzhou

Examples

Sample success responses

JSONformat

{
  "RequestId": "C00B89D3-3247-11DE-95D8-A7C01FB0AB4F",
  "Responses": [
    {
      "Service": "vpc",
      "ResourceId": "vpc-bp1sig0mjktx5ewx1****",
      "ResourceType": "vpc",
      "RequestId": "C00B89D3-3247-11DE-95D8-A7C01FB0AB4F",
      "Status": "FAIL",
      "ErrorCode": "NoPermission",
      "ErrorMsg": "No permissions",
      "RegionId": "cn-hangzhou"
    }
  ]
}

Error codes

HTTP status codeError codeError message
400SERVICE_REGION_NO_ENDPOINTPlease input right service and region

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-04-11The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
2023-03-21The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change