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
Authorization information
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 | 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.
| ||
| ResourceId | string | No | The ID of the resource. | vpc-bp1sig0mjktx5ewx1**** |
| ResourceType | string | No | The type of the resource. | vpc |
| RegionId | string | No | The region ID of the resource. | cn-hangzhou |
| Service | string | No | The ID of the Alibaba Cloud service to which the resource belongs. | vpc |
- You can call the ListResources operation to obtain the values of the
Service,RegionId,ResourceId,ResourceGroupId, andResourceTyperequest parameters. - For more information about common request parameters, see Common parameters.
Response parameters
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 code | Error code | Error message |
|---|---|---|
| 400 | SERVICE_REGION_NO_ENDPOINT | Please input right service and region |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2024-04-11 | The Error code has changed | View Change Details |
| 2023-03-21 | The Error code has changed | View Change Details |
