Changes the resource group to which a specified resource belongs.
Usage notes
- In the Hybrid Backup Recovery (HBR), you can use resource groups to manage resources such as backup vaults, backup clients, and SAP HANA instances.
- A resource is a cloud service entity that you create on Alibaba Cloud, such as an ECS instance, a backup vault, or an SAP HANA instance.
- You can sort resources owned by your Alibaba Cloud account into various resource groups. This facilitates resource management among multiple projects or applications within your Alibaba Cloud account and simplifies permission management.
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ChangeResourceGroup |
The operation that you want to perform. Set the value to ChangeResourceGroup. |
ResourceType | String | Yes | vault |
The type of the resource. Valid values:
|
ResourceId | String | Yes | v-0002vido6j5zyh5k**** |
The ID of the resource. The value of this parameter varies with the resource type. For example, if the ResourceType parameter is set to vault, the ResourceId parameter specifies the ID of the backup vault. |
NewResourceGroupId | String | Yes | rg-bp67acfmxazb4p**** |
The ID of the new resource group. You can view the available resource groups in the Resource Management console. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | 200 |
The HTTP status code. The status code 200 indicates that the call is successful. |
Message | String | successful |
The message that is returned. If the call is successful, "successful" is returned. If the call fails, an error message is returned. |
RequestId | String | C438054F-9088-5D1B-AED0-0EA86D9C65F4 |
The ID of the request. |
Success | Boolean | true |
Indicates whether the call is successful.
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=ChangeResourceGroup
&ResourceType=vault
&ResourceId=v-0002vido6j5zyh5k****
&NewResourceGroupId=rg-bp67acfmxazb4p****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ChangeResourceGroupResponse>
<Code>200</Code>
<Message>successful</Message>
<RequestId>C438054F-9088-5D1B-AED0-0EA86D9C65F4</RequestId>
<Success>true</Success>
</ChangeResourceGroupResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Code" : "200",
"Message" : "successful",
"RequestId" : "C438054F-9088-5D1B-AED0-0EA86D9C65F4",
"Success" : true
}
Error codes
For a list of error codes, visit the API Error Center.