You can call the MoveResourceGroup operation to change the resource group of a cloud resource.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes MoveResourceGroup

The operation that you want to perform. Set the value to MoveResourceGroup.

NewResourceGroupId String Yes rg-acfm3peow3k****

The ID of the resource group to which the cloud resource instance is to be moved.

Note You can use resource groups to classify cloud resources under your Alibaba Cloud account to facilitate resource management and permission control. For more information, see What is resource management?.
RegionId String Yes cn-hangzhou

The region ID of the resource.

You can call the DescribeRegions operation to obtain the region ID.

ResourceId String Yes vpc-hp31psbg8ec3023s6****

The ID of the cloud resource that you want to move to the specified resource group.

ResourceType String Yes vpc

The type of the cloud resources managed by the resource group. Valid values:

  • vpc: Virtual Private Cloud.
  • eip: Elastic IP address.
  • bandwidthpackage: EIP Bandwidth Plan.

Response parameters

Parameter Type Example Description
RequestId String F84A05B3-7275-4C8B-8AEE-9088C639C271

The ID of the request.

Examples

Sample request

http(s)://[Endpoint]/? Action=MoveResourceGroup
&NewResourceGroupId=rg-acfm3peow3k****
&RegionId=cn-hangzhou
&ResourceId=vpc-hp31psbg8ec3023s6****
&ResourceType=1
&<Common request parameters>

Sample success responses

XML format

<MoveResourceGroupResponse>
        <RequestId>F84A05B3-7275-4C8B-8AEE-9088C639C271</RequestId>
</MoveResourceGroupResponse>

JSON format

{
	"RequestId": "F84A05B3-7275-4C8B-8AEE-9088C639C271"
}

Error codes

For a list of error codes, visit the API Error Center.