Moves hosts to a different project in a batch.
Try it now
Test
RAM authorization
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID of the bastion host. Note
You can invoke the DescribeInstances operation to query this parameter. |
bastionhost-cn-st220aw**** |
| RegionId |
string |
No |
The region ID of the bastion host. Note
For the mapping between region IDs and region names, see Regions and zones. |
cn-hangzhou |
| ProjectId |
integer |
No |
The ID of the project to which the hosts currently belong. |
3 |
| TargetProjectId |
integer |
Yes |
The ID of the target project to which you want to move the hosts. Note
You can call the ListProjectsForProjectAuthorizationPrincipal operation to query this parameter. |
2 |
| HostIds |
string |
Yes |
The IDs of the hosts that you want to move. This parameter is a JSON-formatted string. You can specify up to 100 host IDs. Separate multiple host IDs with commas (,). Note
You can call the ListHosts operation to query this parameter. |
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| TotalCount |
integer |
The total number of records. |
10 |
| SuccessCount |
integer |
The number of hosts that were successfully moved. |
10 |
| Results |
array<object> |
The call results of the operation. |
|
|
object |
The call results of the operation. |
||
| AssetId |
string |
The host ID. |
16 |
| Code |
string |
The error code. A value of 200 indicates that the operation was successful. Other values indicate that the operation failed. |
200 |
| Message |
string |
The result message. |
success |
| RequestId |
string |
The request ID. |
81500666-d7f5-4143-8329-0223cc738105 |
Examples
Success response
JSON format
{
"TotalCount": 10,
"SuccessCount": 10,
"Results": [
{
"AssetId": "16",
"Code": "200",
"Message": "success"
}
],
"RequestId": "81500666-d7f5-4143-8329-0223cc738105"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.