Queries details about one or more simple application servers in a specified region.
Description
You can call this operation to query the details of one or more simple application servers in a specified region, including the names, public IP addresses, internal IP addresses, creation time, and expiration time of the servers.
QPS limits
The queries per second (QPS) limit for a single user for the API operation is 10 calls per minute. If the number of calls to the API operation per minute exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limit.
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
RegionId | String | Yes | cn-hangzhou |
The region ID of the simple application servers. |
InstanceIds | String | No | ["2ad1ae67295445f598017499dc****", "2ad1ae67295445f598017123dc****"] |
The IDs of the simple application servers. The value can be a JSON array that consists of up to 100 simple application server IDs. Separate the server IDs with commas (,). Note If you specify both
InstanceIds and PublicIpAddresses , make sure that each specified ID and its corresponding public IP address belong
to the same simple application server. Otherwise, an empty result is returned.
|
ChargeType | String | No | PrePaid |
The billing method of the simple application server. Set the value to PrePaid, which indicates the subscription billing method. Only the subscription billing method is supported. Default value: PrePaid. |
PublicIpAddresses | String | No | ["42.1.**.**", "42.2.**.**"] |
The public IP addresses of the simple application servers. The value can be a JSON array that consists of up to 100 IP addresses. Separate the IP addresses with commas (,). Note If you specify both
InstanceIds and PublicIpAddresses , make sure that each specified ID and its corresponding public IP address belong
to the same simple application server. Otherwise, an empty result is returned.
|
PageNumber | Integer | No | 1 |
The number of the page to return. Default value: 1. |
PageSize | Integer | No | 10 |
The number of entries to return on each page. Maximum value: 100. Default value: 10. |
Action | String | Yes | ListInstances |
The operation that you want to perform. Set the value to ListInstances. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Instances | Array of Instance |
Details about the simple application servers. |
|
Status | String | Running |
The status of the simple application server. Valid values:
|
CreationTime | String | 2021-03-08T05:31:06Z |
The time when the simple application server was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
InnerIpAddress | String | 172.26.XX.XX |
The internal IP address of the simple application server. |
ChargeType | String | PrePaid |
The billing method of the simple application server. |
InstanceId | String | 2ad1ae67295445f598017499dc**** |
The ID of the simple application server. |
PlanId | String | swas.s2.c2m2s50b4t08 |
The ID of the plan. |
PublicIpAddress | String | 42.1.XX.XX |
The public IP address. |
RegionId | String | cn-hangzhou |
The region ID of the simple application servers. |
ExpiredTime | String | 2021-05-08T16:00:00Z |
The time when the simple application server expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
InstanceName | String | test-InstanceName |
The name of the simple application server. |
BusinessStatus | String | Normal |
The status of the simple application server. Valid values:
|
DdosStatus | String | Normal |
The DDoS protection status. Valid values:
|
ImageId | String | fe9c66133a9d4688872869726b52**** |
The ID of the image. |
TotalCount | Integer | 1 |
The total number of simple application servers returned. |
RequestId | String | 20758A-585D-4A41-A9B2-28DA8F4F**** |
The ID of the request. |
PageSize | Integer | 10 |
The number of entries returned per page. |
PageNumber | Integer | 1 |
The page number of the returned page. |
Examples
Sample requests
https://swas.cn-hangzhou.aliyuncs.com/?RegionId=cn-hangzhou
&InstanceIds=["2ad1ae67295445f598017499dc****", "2ad1ae67295445f598017123dc****"]
&ChargeType=PrePaid
&PublicIpAddresses=["42.1.**.**", "42.2.**.**"]
&PageNumber=1
&PageSize=10
&Action=ListInstances
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListInstancesResponse>
<Instances>
<Status>Running</Status>
<CreationTime>2021-03-08T05:31:06Z</CreationTime>
<InnerIpAddress>172.26.XX.XX</InnerIpAddress>
<ChargeType>PrePaid</ChargeType>
<InstanceId>2ad1ae67295445f598017499dc****</InstanceId>
<PlanId>swas.s2.c2m2s50b4t08</PlanId>
<PublicIpAddress>42.1.XX.XX</PublicIpAddress>
<RegionId>cn-hangzhou</RegionId>
<ExpiredTime>2021-05-08T16:00:00Z</ExpiredTime>
<InstanceName>test-InstanceName</InstanceName>
<BusinessStatus>Normal</BusinessStatus>
<DdosStatus>Normal</DdosStatus>
<ImageId>fe9c66133a9d4688872869726b52****</ImageId>
</Instances>
<TotalCount>1</TotalCount>
<RequestId>20758A-585D-4A41-A9B2-28DA8F4F****</RequestId>
<PageSize>10</PageSize>
<PageNumber>1</PageNumber>
</ListInstancesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Instances" : [ {
"Status" : "Running",
"CreationTime" : "2021-03-08T05:31:06Z",
"InnerIpAddress" : "172.26.XX.XX",
"ChargeType" : "PrePaid",
"InstanceId" : "2ad1ae67295445f598017499dc****",
"PlanId" : "swas.s2.c2m2s50b4t08",
"PublicIpAddress" : "42.1.XX.XX",
"RegionId" : "cn-hangzhou",
"ExpiredTime" : "2021-05-08T16:00:00Z",
"InstanceName" : "test-InstanceName",
"BusinessStatus" : "Normal",
"DdosStatus" : "Normal",
"ImageId" : "fe9c66133a9d4688872869726b52****"
} ],
"TotalCount" : 1,
"RequestId" : "20758A-585D-4A41-A9B2-28DA8F4F****",
"PageSize" : 10,
"PageNumber" : 1
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidChargeType.ValueNotSupported | The specified parameter ChargeType is invalid. | The error message returned because the specified ChargeType parameter is invalid. |
400 | InvalidPublicIpAddresses.ValueNotSupported | The specified parameter PublicIpAddresses is invalid. | The error message returned because the specified PublicIpAddresses parameter is invalid. |
404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | The error message returned because the specified InstanceIds parameter is invalid. |
500 | InternalError | An error occurred while processing your request. | The error message returned because an internal error has occurred. Try again later. If the problem persists, submit a ticket. |
For a list of error codes, visit the API Error Center.