Queries instances.

Request parameters

Parameter Type Required Example Description
Action String Yes ListInstances

The operation that you want to perform.

Set the value to ListInstances.

MaxResults Integer Yes 1

The maximum number of result entries to return.

Valid values: 1 to 100
RegionId String Yes cn-hangzhou

The ID of the region where your instance resides.

NextToken String No ,

The token used to view data of the next page. This parameter is left empty for the first call.

Response parameters

Parameter Type Example Description
Data Struct

The returned data.

Instances Array of InstanceVO

An array of instances.

AutoRenewInstance Boolean false

Indicates whether the instance is automatically renewed.

ExpireTime Long 1

The expiration time.

InstanceId String 1344***

The ID of the instance.

InstanceName String 1344***

The name of the instance.

InstanceType String PROFESSIONAL

The edition of the instance.

OrderCreateTime Long 1572441939000

The time when the order was created.

OrderType String POST_PAID

The type of the order.

PrivateEndpoint String 1344***.mq-amqp.cn-hangzhou-a.aliyuncs.com

The VPC endpoint.

PublicEndpoint String 1344***.mq-amqp.cn-hangzhou-a.aliyuncs.com

The public endpoint.

Status String SERVING

The status.

SupportEIP Boolean true

Indicates whether an elastic IP address (EIP) is supported.

MaxResults Integer 1

The maximum number of returned result entries.

NextToken String ,

The token used to view data of the next page.

RequestId String CCBB1225-C392-480E-8C7F-D09AB2CD2***

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListInstances
&MaxResults=1
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<ListInstancesResponse>
      <RequestId>CCBB1225-C392-480E-8C7F-D09AB2CD2***</RequestId>
      <Data>
            <Instances>
                  <InstanceName>1344***</InstanceName>
                  <Status>SERVING</Status>
                  <OrderType>POST_PAID</OrderType>
                  <OrderCreateTime>1572441939000</OrderCreateTime>
                  <InstanceId>1344***</InstanceId>
                  <SupportEIP>true</SupportEIP>
                  <PublicEndpoint>1344***.mq-amqp.cn-hangzhou-a.aliyuncs.com</PublicEndpoint>
                  <InstanceType>PROFESSIONAL</InstanceType>
                  <ExpireTime>1</ExpireTime>
                  <AutoRenewInstance>false</AutoRenewInstance>
                  <PrivateEndpoint>1344***.mq-amqp.cn-hangzhou-a.aliyuncs.com</PrivateEndpoint>
            </Instances>
            <NextToken>,</NextToken>
            <MaxResults>1</MaxResults>
      </Data>
</ListInstancesResponse>

JSON format

{
    "RequestId": "CCBB1225-C392-480E-8C7F-D09AB2CD2***",
    "Data": {
        "Instances": {
            "InstanceName": "1344***",
            "Status": "SERVING",
            "OrderType": "POST_PAID",
            "OrderCreateTime": 1572441939000,
            "InstanceId": "1344***",
            "SupportEIP": true,
            "PublicEndpoint": "1344***.mq-amqp.cn-hangzhou-a.aliyuncs.com",
            "InstanceType": "PROFESSIONAL",
            "ExpireTime": 1,
            "AutoRenewInstance": false,
            "PrivateEndpoint": "1344***.mq-amqp.cn-hangzhou-a.aliyuncs.com"
        },
        "NextToken": ",",
        "MaxResults": 1
    }
}

Error codes

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