Queries the information about simple application servers in a region.
Operation description
You can call this operation to query the details of 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 limit
You can call this API operation up to 10 times per minute per account. Requests that exceed this limit are dropped and you may experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the simple application servers. | cn-hangzhou |
InstanceIds | string | No | 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 multiple server IDs with commas (,). Note
If you specify both InstanceIds and PublicIpAddresses , make sure that the specified IDs and the specified public IP addresses belong to the same simple application servers. Otherwise, an empty result is returned.
| ["2ad1ae67295445f598017499dc****", "2ad1ae67295445f598017123dc****"] |
ChargeType | string | No | The billing method of the simple application servers. Set the value to PrePaid, which indicates the subscription billing method. Default value: PrePaid. | PrePaid |
PublicIpAddresses | string | No | 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 multiple IP addresses with commas (,). Note
If you specify both InstanceIds and PublicIpAddresses , make sure that the specified IDs and the specified public IP addresses belong to the same simple application servers. Otherwise, an empty result is returned.
| ["42.1.**.**", "42.2.**.**"] |
PageNumber | integer | No | The page number. Default value: 1. | 1 |
PageSize | integer | No | The number of entries per page. Maximum value: 100. Default value: 10. | 10 |
Status | string | No | The status of the simple application server. Valid values:
| Running |
Tag | object [] | No | The tag. You can add at most 20 tags to an instance. | |
Key | string | No | The tag key. The tag key can be up to 128 characters in length, and cannot start with | test |
Value | string | No | The tag value. | 01 |
Response parameters
Examples
Sample success responses
JSON
format
{
"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****",
"DisableReason": "EXPIRED",
"Combination": false,
"CombinationInstanceId": "com-f6c9a22****45b5b8de68ad608af1ba",
"Uuid": "41f30524-5df7-49c9-9c6e-32****489001",
"ResourceSpec": {
"DiskCategory": "cloud_efficiency",
"Cpu": 2,
"Bandwidth": 5,
"DiskSize": 60,
"Memory": 2,
"Flow": 818
},
"Image": {
"OsType": "windows",
"ImageName": "test-custom-1686536882356",
"ImageVersion": "V3.5",
"ImageType": "system",
"ImageIconUrl": "https://img.alicdn.com/imgextra/i3/O****1vdh9651ReKqWNMI2I_!!6000000002136****-24-24.svg",
"ImageContact": "https://selfs****e.console.aliyun.com/ticket/createIndex"
},
"Tags": [
{
"Key": "TestKey",
"Value": "TestValue"
}
],
"Disks": [
{
"CreationTime": "2023-02-24T02:20:10Z",
"Status": "In_use",
"Device": "/dev/xvda",
"Size": 50,
"DiskName": "SystemDisk",
"DiskChargeType": "PrePaid",
"DiskType": "System",
"Category": "ESSD",
"DiskId": "d-bp14wq0149cpp2x****",
"RegionId": "cn-hangzhou",
"Remark": "remark",
"DiskTags": [
{
"Key": "TestKey",
"Value": "TestValue"
}
]
}
]
}
],
"TotalCount": 1,
"RequestId": "20758A-585D-4A41-A9B2-28DA8F4F****",
"PageSize": 10,
"PageNumber": 1
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | InvalidChargeType.ValueNotSupported | The specified parameter ChargeType is invalid. |
400 | InvalidPublicIpAddresses.ValueNotSupported | The specified parameter PublicIpAddresses is invalid. |
404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. |
500 | InternalError | An error occurred while processing your request. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-02-20 | The Error code has changed. The response structure of the API has changed | see changesets | ||||||||||||
| ||||||||||||||
2024-01-17 | The Error code has changed. The request parameters of the API has changed | see changesets | ||||||||||||
| ||||||||||||||
2023-09-18 | API Description Update. The Error code has changed | see changesets | ||||||||||||
| ||||||||||||||
2023-07-19 | The Error code has changed. The request parameters of the API has changed | see changesets | ||||||||||||
| ||||||||||||||
2023-05-25 | The Error code has changed. The response structure of the API has changed | see changesets | ||||||||||||
|