Queries instances.
Try it now
Test
RAM authorization
Request syntax
GET /v2/openapi/listinstances HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Status |
string |
No |
The status of the instance. Valid values:
|
normal |
| MaxResults |
integer |
No |
The maximum number of instances that you want to return. Valid values: 0 to 200. If you do not configure this parameter or set this parameter to 0, the default value of 100 is used. |
100 |
| NextToken |
string |
No |
The token that determines the start position of the query. Set this parameter to the value of the NextToken parameter that is returned from the last call. Instances are returned in lexicographical order starting from the position that is specified by this parameter. The first time you call the operation, leave this parameter empty. |
CAESCG15aC1xxxxx |
| InstanceName |
string |
No |
The name of the instance. Fuzzy search is supported. |
instance |
| ResourceGroupId |
string |
No |
The resource group ID. You can query the ID on the Resource Group page in the Resource Management console. |
rg-aek24upgom6p5ri |
| InstanceNameList |
array |
No |
The names of the instances. This parameter is used to specify multiple instances that you want to query at the same time. |
|
|
string |
No |
The name of the instance. Full and exact matching is supported. |
instance-test |
|
| Tag |
array<object> |
No |
The tags of the instance. |
|
|
object |
No |
The tag of the instance. |
||
| Key |
string |
No |
The tag key. |
Owner |
| Value |
string |
No |
The tag value. |
Tester |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned struct. |
||
| RequestId |
string |
The request ID, which can be used to troubleshoot issues. |
E734979F-5A44-5993-9CE5-C23103576923 |
| TotalCount |
integer |
The total number of instances returned. |
2 |
| NextToken |
string |
The token that determines the start position of the next query. If this parameter is empty, all instances that you want to query are returned. |
CAESCG15aC1xxxxx |
| Instances |
array<object> |
The details about the instances. |
|
|
object |
The instances. |
||
| InstanceName |
string |
The name of the instance, which is used to uniquely identify the instance. |
instance-test |
| ResourceGroupId |
string |
The ID of the resource group. |
rg-acfmxh4em5jnbcd |
| RegionId |
string |
The region ID. |
cn-huhehaote |
| SPInstanceId |
string |
The instance ID. |
ots_standard_public_cn-g4t3igqjj002 |
| AliasName |
string |
The instance alias. |
instance-test |
| UserId |
string |
The user ID. |
13542356466 |
| InstanceDescription |
string |
The instance description. |
Description of the test instance. |
| InstanceSpecification |
string |
The type of the instance.
|
HYBRID |
| PaymentType |
string |
The billing method.
|
Subscription |
| StorageType |
string |
The storage type.
|
HYBRID |
| VCUQuota |
integer |
The VCU quota. |
3 |
| InstanceStatus |
string |
The status of the instance.
|
normal |
| CreateTime |
string |
The time when the instance was created. |
2019-04-07T09:19:21Z |
| IsMultiAZ |
boolean |
Indicates whether zone-redundant storage (ZRS) is enabled for the instance.
|
true |
Examples
Success response
JSON format
{
"RequestId": "E734979F-5A44-5993-9CE5-C23103576923",
"TotalCount": 2,
"NextToken": "CAESCG15aC1xxxxx",
"Instances": [
{
"InstanceName": "instance-test",
"ResourceGroupId": "rg-acfmxh4em5jnbcd",
"RegionId": "cn-huhehaote",
"SPInstanceId": "ots_standard_public_cn-g4t3igqjj002",
"AliasName": "instance-test",
"UserId": "13542356466",
"InstanceDescription": "Description of the test instance.",
"InstanceSpecification": "HYBRID",
"PaymentType": "Subscription",
"StorageType": "HYBRID",
"VCUQuota": 3,
"InstanceStatus": "normal",
"CreateTime": "2019-04-07T09:19:21Z",
"IsMultiAZ": true
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.