ModifyInstancesResourceGroup

1. API Description

This API is used to modify the resource group to which the instances belong.

Note

  • You can create several resource groups under one account to manage different resources. If calling DescribeInstances to query instances, you can filter the result by resourceGroupId in the response.

  • Batch operations are supported. The maximum number of instances in each request is 100.

  • Only the administrator in a team can perform this operation.

2. Input Parameters

The following request parameter list only provides API request parameters.

3. Output Parameters

4. Code Example

Move instances to the specified resource group.

POST /api/v2/vm HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: ModifyInstancesResourceGroup
<Common Request Params>

Request:
{
  "instanceIds": ["instanceId1", "instanceId2"],
  "resourceGroupId": "resourceGroup1"
}

Response:
{
  "requestId": "T4C35327C-7B13-47B8-A815-5E5213D4A9F9",
  "response": {
    "requestId": "T4C35327C-7B13-47B8-A815-5E5213D4A9F9"
  }
}

5. Developer Resources

Zenlayer Cloud API 2.0 integrates SDKs to make it easier for you to call APIs. More programming languages will be supported.

6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.​

Last updated