Queries instances.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListInstance

The operation that you want to perform. Set the value to ListInstance.

RegionId String Yes cn-shanghai

The ID of the region where the instance resides.

InstanceName String No test

The name of the instance.

InstanceStatus String No running

The status of an instance. Valid values: PENDING, INIT_ERROR, STARTING, RUNNING, STOPPING, STOPPED, DELETING, and DELETED.

PageNo Integer No 1

The number of the page to return.

PageSize Integer No 30

The number of entries to return on each page.

Response parameters

Parameter Type Example Description
IsSuccess Boolean true

Indicates whether the operation is successful.

Code String success

The code returned for the request.

RequestId String A2A9BA68-B264-4953-9154-CE61B1C03BA6

The ID of the request.

PageNo Integer 1

The page number of the returned page.

PageSize Integer 30

The number of entries returned per page.

Instances Array

A list of instances.

InstanceId String cri-sgedpenzw80e3m3p

The ID of the instance.

InstanceName String test

The name of the instance.

InstanceSpecification String Enterprise_Basic

The specification of the instance.

InstanceStatus String RUNNING

The status of the instance.

CreateTime String 1562849679000

The time when the instance was created.

ModifiedTime String 1562849760000

The time when the instance was last modified.

RegionId String cn-shanghai

The ID of the region where the instance resides.

Examples

Sample requests

http(s)://[Endpoint]/? Action=ListInstance
&RegionId=cn-shanghai
&PageNo=1
&PageSize=30
&<Common request parameters>

Sample success responses

JSON format

{
    "Instances":[
        {
            "InstanceName":"test",
            "ModifiedTime":1562849760000,
            "InstanceSpecification":"Enterprise_Basic",
            "InstanceId":"cri-sgedpenzw80e3m3p",
            "InstanceStatus":"RUNNING",
            "CreateTime":1562849679000,
            "RegionId":"cn-shanghai"
        }
    ],
    "IsSuccess":true,
    "PageSize":30,
    "RequestId":"A2A9BA68-B264-4953-9154-CE61B1C03BA6",
    "PageNo":1,
    "Code":"success"
}

XML format

<Instances>
    <InstanceName>test</InstanceName>
    <ModifiedTime>1562849760000</ModifiedTime>
    <InstanceSpecification>Enterprise_Basic</InstanceSpecification>
    <InstanceId>cri-sgedpenzw80e3m3p</InstanceId>
    <InstanceStatus>RUNNING</InstanceStatus>
    <CreateTime>1562849679000</CreateTime>
    <RegionId>cn-shanghai</RegionId>
</Instances>
<IsSuccess>true</IsSuccess>
<PageSize>30</PageSize>
<RequestId>A2A9BA68-B264-4953-9154-CE61B1C03BA6</RequestId>
<PageNo>1</PageNo>
<Code>success</Code>

Error codes

For a list of error codes, visit the API Error Center.