Lists the instances in a specified dedicated resource group.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eas:ListResourceInstances |
get |
*Resource
|
None | None |
Request syntax
GET /api/v2/resources/{ClusterId}/{ResourceId}/instances HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
Yes |
The ID of the region where the resource group is located. |
cn-shanghai |
| ResourceId |
string |
Yes |
The ID of the resource group. For more information, see ListResources. |
iot |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ChargeType |
string |
No |
Filters instances by billing method. Valid values:
Valid values:
|
PrePaid |
| PageNumber |
integer |
No |
The page number. The value starts from 1. The default value is 1. |
1 |
| PageSize |
integer |
No |
The number of instances to return on each page. Default value: 100. |
20 |
| InstanceName |
string |
No |
Filter by instance name. |
e-xxxx*** |
| InstanceId |
string |
No |
Filter by instance ID. For more information, see ListResourceInstances. |
i-bp1jd6x3uots****a |
| InstanceIP |
string |
No |
The IP address of the instance. |
10.224.xx.xx |
| Filter |
string |
No |
A keyword for the search. You can search by instance ID or IP address. |
10.224.xx.xx |
| InstanceStatus |
string |
No |
The status of the instance. Valid values:
|
Ready |
| Label |
object |
No |
Filter by label. |
|
|
string |
No |
Enter the label in the `{"key":"value"}` format. The value can be `null` or an empty string. This lets you filter by key only, regardless of the value. |
{"key1":"value1","key2":null} |
|
| Sort |
string |
No |
The sort field. Valid values:
|
CreateTime |
| Order |
string |
No |
The sort order. Valid values:
|
desc |
| Zone |
string |
No |
The zone of the instance. |
J |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| RequestId |
string |
The request ID. |
40325405-579C-4D82**** |
| Instances |
array |
The list of instances. |
|
| ResourceInstance |
The instance information. |
||
| PageNumber |
integer |
The page number of the returned list of instances. |
1 |
| PageSize |
integer |
The number of instances returned on each page. |
20 |
| TotalCount |
integer |
The total number of instances. |
2 |
Examples
Success response
JSON format
{
"RequestId": "40325405-579C-4D82****",
"Instances": [
{
"InstanceId": "eas-i-1800z74n30kao****",
"InstanceName": "eas01122713204*****",
"InstanceIp": "11.227.XX.XX",
"InstanceStatus": "Ready",
"InstancePhase": "",
"InstanceCpuCount": 4,
"InstanceGpuCount": 0,
"InstanceMemory": "8192M",
"InstanceSystemDiskSize": 200,
"InstanceGpuMemory": "0G",
"InstanceUsedCpu": 2.4,
"InstanceUsedGpu": 0,
"InstanceUsedMemory": "1000M",
"InstanceType": "ecs.s6-c1m2.xlarge",
"CreateTime": "2020-07-05T22:51:32Z",
"ChargeType": "PrePaid",
"ExpiredTime": "2020-08-05T22:51:32Z",
"AutoRenewal": false,
"Arch": "arm64",
"Region": "cn-hangzhou",
"Zone": "cn-hangzhou-b",
"ResourceId": "eas-r-xxxxx",
"InstanceTenantIp": "192.168.XX.XX",
"InstanceUsedGpuMemory": "470M",
"Labels": [
{
"LabelKey": "key",
"LabelValue": "value"
}
]
}
],
"PageNumber": 1,
"PageSize": 20,
"TotalCount": 2
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.