This topic describes how to query the details of one or more instances in a specified region.
Operation description
The details include the server name, public IP address, internal IP address, creation time, and expiration time.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
swas-open:ListInstances |
get |
Instance
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the Simple Application Server instance. |
cn-hangzhou |
| InstanceIds |
string |
No |
The IDs of the Simple Application Server instances. The value can be a JSON array of up to 100 instance IDs. Separate multiple IDs with commas (,). Note
If you specify both the |
["2ad1ae67295445f598017499dc****", "2ad1ae67295445f598017123dc****"] |
| ChargeType |
string |
No |
The billing method. Valid: PrePaid. Servers support only the subscription billing method. Default: PrePaid |
PrePaid |
| PublicIpAddresses |
string |
No |
The public IP addresses of the server. The value can be a JSON array of up to 100 public IP addresses. Separate multiple IP addresses with commas (,). Note
If you specify both the |
["42.1.**.**", "42.2.**.**"] |
| PageNumber |
integer |
No |
The page number of the list of Simple Application Server instances. Default: 1 |
1 |
| PageSize |
integer |
No |
The number of entries to return on each page. Maximum: 100. Default: 10 |
10 |
| Status |
string |
No |
The status of the instance. Valid:
|
Running |
| Tag |
array<object> |
No |
The tags of the server. |
|
|
object |
No |
A tag. |
||
| Key |
string |
No |
The key of tag N. The tag key can be up to 64 characters in length. Valid values of N: 1 to 20. |
TestKey |
| Value |
string |
No |
The value of tag N. The tag value can be up to 64 characters in length. Valid values of N: 1 to 20. |
TestValue |
| ResourceGroupId |
string |
No |
The ID of the resource group to which the server belongs. |
rg-aek2bti7cf7**** |
| InstanceName |
string |
No |
The name of the server. Fuzzy match with the asterisk (*) wildcard character is supported. |
test |
| PlanType |
string |
No |
The plan type. Valid:
Note
For more information, see Instance families. |
NORMAL |
Response parameters
|
Parameter |
Type |
Description |
Example |
|
object |
The information about the instances. |
||
| Instances |
array<object> |
An array that consists of the information about the server. |
|
|
object |
An array that consists of the information about the server. |
||
| Status |
string |
The status of the instance. Valid:
|
Running |
| CreationTime |
string |
The time when the server was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
2021-03-08T05:31:06Z |
| InnerIpAddress |
string |
The internal IP address. |
172.26.XX.XX |
| ChargeType |
string |
The billing method. |
PrePaid |
| InstanceId |
string |
The instance ID. |
2ad1ae67295445f598017499dc**** |
| PlanId |
string |
The plan ID. |
swas.s2.c2m2s50b4t08 |
| PublicIpAddress |
string |
The public IP address. |
42.1.XX.XX |
| RegionId |
string |
The region ID. |
cn-hangzhou |
| ExpiredTime |
string |
The time of expiration. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is in UTC. |
2021-05-08T16:00:00Z |
| InstanceName |
string |
The server name. |
test-InstanceName |
| BusinessStatus |
string |
The status of the server. Valid:
|
Normal |
| DdosStatus |
string |
The DDoS protection status. Valid:
|
Normal |
| ImageId |
string |
The image ID. |
fe9c66133a9d4688872869726b52**** |
| DisableReason |
string |
The reason why the server is disabled. Valid:
|
EXPIRED |
| Combination |
boolean |
Indicates whether the server is a bundle. |
false |
| CombinationInstanceId |
string |
The ID of the bundle. |
com-f6c9a22****45b5b8de68ad608af1ba |
| Uuid |
string |
The UUID of the instance. |
41f30524-5df7-49c9-9c6e-32****489001 |
| ResourceSpec |
object |
The resource specifications. |
|
| DiskCategory |
string |
The disk type. Valid:
|
ESSD |
| Cpu |
integer |
The number of vCPUs. |
2 |
| Bandwidth |
integer |
The bandwidth. Unit: Mbit/s. |
200 |
| DiskSize |
integer |
The disk size. Unit: GiB. |
60 |
| Memory |
number |
The memory size. Unit: GiB. |
2 |
| Flow |
number |
The data transfer quota.
|
818 |
| Image |
object |
The description of the image. |
|
| OsType |
string |
The OS type. |
windows |
| ImageName |
string |
The image name. |
test-custom-1686536882356 |
| ImageVersion |
string |
The image version. |
V3.5 |
| ImageType |
string |
The image type. Valid:
|
system |
| ImageIconUrl |
string |
The URL of the image icon. |
https://img.alicdn.com/imgextra/i3/O****1vdh9651ReKqWNMI2I_!!6000000002136****-24-24.svg |
| ImageContact |
string |
The image provider. |
https://selfs****e.console.aliyun.com/ticket/createIndex |
| Tags |
array<object> |
The tags of the server. |
|
|
object |
A tag. |
||
| Key |
string |
The key of the tag. |
TestKey |
| Value |
string |
The value of the tag. |
TestValue |
| Disks |
array<object> |
An array that consists of the information about the disks of the Simple Application Server instance. |
|
|
object |
The disk information. |
||
| CreationTime |
string |
The time when the instance was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
2023-02-24T02:20:10Z |
| Status |
string |
The disk status. Valid:
|
In_use |
| Device |
string |
The device name of the disk in the server. |
/dev/xvda |
| Size |
integer |
The disk size. Unit: GiB. |
50 |
| DiskName |
string |
The disk name. |
SystemDisk |
| DiskChargeType |
string |
The billing method of the disk. |
PrePaid |
| DiskType |
string |
The disk type. Valid:
|
system |
| Category |
string |
The disk type. Valid:
|
ESSD |
| DiskId |
string |
The disk ID. |
d-bp14wq0149cpp2x**** |
| RegionId |
string |
The region ID. |
cn-hangzhou |
| Remark |
string |
The remarks of the disk. |
remark |
| DiskTags |
array<object> |
The tags of the disk. |
|
|
object |
The tag information. |
||
| Key |
string |
The tag key. |
TestKey |
| Value |
string |
The tag value. |
TestValue |
| ResourceGroupId |
string |
The ID of the resource group to which the disk belongs. |
rg-aek2bti7cf7**** |
| ResourceGroupId |
string |
The ID of the resource group to which the instance belongs. |
rg-aekz7jmhg5s**** |
| NetworkAttributes |
array<object> |
The network information. |
|
|
object |
The network information. |
||
| PublicIpAddress |
string |
The public IP address. |
116.62.XX.XX |
| PrivateIpAddress |
string |
The private IP address. |
72.25.XX.XX |
| PeakBandwidth |
integer |
The peak bandwidth of the public network. Unit: Mbit/s. |
200 |
| PublicIpDdosStatus |
string |
The DDoS protection status of the public IP address. |
normal |
| PlanType |
string |
The plan type. Valid:
Note
For more information, see Instance families. |
NORMAL |
| TotalCount |
integer |
The total number of queried instances. |
1 |
| RequestId |
string |
The request ID. |
20758A-585D-4A41-A9B2-28DA8F4F**** |
| PageSize |
integer |
The number of entries returned per page. |
10 |
| PageNumber |
integer |
The page number of the list of Simple Application Server instances. |
1 |
Examples
Success response
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": "ESSD",
"Cpu": 2,
"Bandwidth": 200,
"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"
}
],
"ResourceGroupId": "rg-aek2bti7cf7****\n"
}
],
"ResourceGroupId": "rg-aekz7jmhg5s****",
"NetworkAttributes": [
{
"PublicIpAddress": "116.62.XX.XX",
"PrivateIpAddress": "72.25.XX.XX",
"PeakBandwidth": 200,
"PublicIpDdosStatus": "normal"
}
],
"PlanType": "NORMAL"
}
],
"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. | |
| 400 | InvalidPublicIpAddresses.ValueNotSupported | The specified parameter PublicIpAddresses is invalid. | |
| 500 | InternalError | An error occurred while processing your request. | |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.