Moves resources from one resource group to another.
This API operation allows you to move multiple resources that reside in different regions or belong to different services or resource groups to the same resource group at a time.
For more information about Alibaba Cloud services whose resources can be moved between resource groups, see the API column in Services that work with Resource Group.
Request parameters
Parameter
|
Type
|
Required
|
Example
|
Description
|
Parameter
|
Type
|
Required
|
Example
|
Description
|
Action |
String |
Yes |
MoveResources |
The operation that you want to perform. Set the value to MoveResources.
|
ResourceGroupId |
String |
Yes |
rg-aekzmeobk5w**** |
The ID of the resource group to which you want to move the resources.
|
Resources.N.ResourceId |
String |
No |
i-23v38**** |
The resource ID.
|
Resources.N.ResourceType |
String |
No |
instance |
The resource type.
You can obtain the resource type from the Resource type column in Services that work with Resource Group.
|
Resources.N.RegionId |
String |
No |
cn-hangzhou |
The region ID of the resource.
|
Resources.N.Service |
String |
No |
ecs |
The service code.
You can obtain the code from the Service code column in Services that work with Resource Group.
|
Examples
Sample requests
https:
&ResourceGroupId=rg-aekzmeobk5w****
&Resources.1.ResourceId=i-23v38****
&Resources.1.ResourceType=instance
&Resources.1.RegionId=cn-hangzhou
&Resources.1.Service=ecs
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<MoveResourcesResponse>
<RequestId>C00B89D3-3247-11DE-95D8-A7C01FB0AB4F</RequestId>
<Responses>
<Service>ecs</Service>
<ResourceId>i-23v38****</ResourceId>
<ResourceType>instance</ResourceType>
<RequestId>C00B89D3-3247-11DE-95D8-A7C01FB0AB4F</RequestId>
<Status>SUCCESS</Status>
<ErrorCode/>
<ErrorMsg/>
<RegionId>cn-hangzhou</RegionId>
</Responses>
</MoveResourcesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "C00B89D3-3247-11DE-95D8-A7C01FB0AB4F",
"Responses" : [ {
"Service" : "ecs",
"ResourceId" : "i-23v38****",
"ResourceType" : "instance",
"RequestId" : "C00B89D3-3247-11DE-95D8-A7C01FB0AB4F",
"Status" : "SUCCESS",
"ErrorCode" : "",
"ErrorMsg" : "",
"RegionId" : "cn-hangzhou"
} ]
}