Queries the details of one or more instances.
Operation description
API call frequency: 800 calls per second.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ens:DescribeInstances |
list |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| EnsRegionId |
string |
No |
The region ID. |
cn-beijing-cmcc |
| InstanceId |
string |
No |
The instance ID. |
i-5iqczfxps7csjrxeca**** |
| EnsRegionIds |
string |
No |
The list of edge zone IDs. This parameter is a formatted JSON array that contains up to 100 IDs separated by commas (,). |
["cn-suzhou-telecom","cn-chengdu-telecom"] |
| InstanceIds |
string |
No |
The list of instance IDs. This parameter is a formatted JSON array that contains up to 100 IDs separated by commas (,). |
["i-5iqczfxps7csjrxeca07****", "i-5iqczfxps7csjrxeca07****"] |
| InstanceName |
string |
No |
The instance name. |
TestName |
| ImageId |
string |
No |
The image ID. |
centos_6_08_64_20G_alibase_**** |
| PageNumber |
integer |
No |
The page number of the instance status list. The value starts from 1. |
1 |
| PageSize |
string |
No |
The number of entries per page for a paged query. Maximum value: 100. |
10 |
| Status |
string |
No |
The instance status. Valid values:
|
Running |
| OrderByParams |
string |
No |
The sorting parameter in JSON format. |
{ "InstanceNameSort": "asc", "ExpireTimeSort": "asc", "CreationTimeSort": "desc", "EnsRegionId": "desc" } |
| EnsServiceId |
string |
No |
The Edge Node Service ID. You can use this ID to query the instances created under the edge service. |
ens-20190730202316s**** |
| InstanceResourceType |
string |
No |
The filter type. Valid values: |
EnsService |
| SearchKey |
string |
No |
The search keyword. Supports parameters such as ip, InstanceName, and InstanceId. |
Joshua |
| NetworkId |
string |
No |
The network ID. |
n-2zeuphj08tt7q3brd**** |
| VSwitchId |
string |
No |
The vSwitch ID. |
vsw-2zeh0r1pabwtg6wcs**** |
| SecurityGroupId |
string |
No |
The security group ID. |
sg-5kyicq2kfcapxrdds6tar7jqb |
| IntranetIp |
string |
No |
The internal IP address. |
47.100.XX.XX |
| Tags |
array<object> |
No |
The resource tags. This operation does not return tag information. Use this parameter in combination with the APIs in the tag category. |
|
|
object |
No |
The tag set of the instance. This operation does not return tag information. Use this parameter in combination with the APIs in the tag category. |
||
| Key |
string |
No |
The tag key of the instance. Valid values of N: 1 to 20. |
tag |
| Value |
string |
No |
The tag value of the instance. Valid values of N: 1 to 20. |
2 |
| InstanceType |
string |
No |
The instance type. |
ens.se1.tiny |
| ServiceStatus |
array |
No |
The business status of the instance, which does not represent the actual running status of the instance. |
|
|
string |
No |
The service status of the instance. This does not represent the actual running status of the instance.
|
Expired |
|
| EipAddresses |
array |
No |
The list of EIP addresses used to filter instances. |
|
|
string |
No |
The list of EIP addresses used to filter instances. |
120.XX.XX.10 |
|
| VpdId |
string |
No |
The VPD network ID. |
vpd-5s7xxxxxxx |
| VpdVSwitchId |
string |
No |
The VPD vSwitch ID. |
vsw-5s7xxxxxxx |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
integer |
The business code returned. A value of 0 indicates success. |
0 |
| PageSize |
integer |
The number of entries per page that was specified in the request. |
60 |
| PageNumber |
integer |
The page number of the instance list. |
1 |
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| TotalCount |
integer |
The total number of instances returned. |
2 |
| Instances |
object |
||
| Instance |
array<object> |
An array of InstanceAttributesType objects that contains instance information. |
|
|
array<object> |
Schema of Response |
||
| CreationTime |
string |
The time when the instance was created. The time is in UTC and uses the ISO 8601 format: |
2019-07-26T06:40:43Z |
| Status |
string |
The status of the instance. Valid values:
|
Running |
| SpecName |
string |
The instance type. |
ens.sn1.stiny |
| InstanceTypeFamily |
string |
The instance type family. Valid values:
|
x86_vm |
| InstanceResourceType |
string |
The resource type of the instance. Valid values:
|
EnsService |
| HostName |
string |
The hostname of the instance.
|
testHostName |
| InstanceId |
string |
The ID of the instance. |
i-instanc**** |
| InternetMaxBandwidthIn |
integer |
The maximum inbound public bandwidth. Unit: Mbit/s. |
40 |
| InternetMaxBandwidthOut |
integer |
The maximum outbound public bandwidth. Unit: Mbit/s. |
100 |
| EnsRegionId |
string |
The ID of the instance's region. |
cn-hangzhou-telecom |
| Cpu |
string |
The number of vCPU cores. |
2 |
| ExpiredTime |
string |
The expiration time. The time is in UTC and uses the ISO 8601 format: |
2119-07-13T02:38:57Z |
| InstanceName |
string |
The name of the instance. |
i-5itef0f28t17bcdw9deu6meub |
| Disk |
integer |
The total size of the disks. Unit: MiB. |
71680 |
| OSName |
string |
The name of the image. |
centos 6.8 x86_64 |
| Memory |
integer |
The memory size. Unit: MB. |
2048 |
| ImageId |
string |
The ID of the image. |
m-**** |
| DataDisk |
object |
||
| DataDisk |
array<object> |
The information about the data disks. |
|
|
object |
The details of a data disk. |
||
| device_type |
string |
The disk category. Valid values:
|
pangu |
| disk_type |
string |
The type of the cloud disk or local disk. Valid values: system: system disk. data: data disk. |
system |
| Size |
integer |
The size of the disk. Unit: MiB. |
51200 |
| DiskName |
string |
The name of the disk. |
DiskName |
| uuid |
string |
The UUID. |
5431f898-1323-4e64-8ce1-6cad50ed**** |
| storage |
integer |
The size of the disk. Unit: MiB. |
20480 |
| DiskId |
string |
The ID of the disk. |
d-5ip4c2dhmas0vjd5u1r**** |
| Category |
string |
The category of the cloud disk or local disk. Valid values:
|
file |
| name |
string |
The name of the disk. |
name |
| DiskSize |
integer |
The size of the disk. Unit: GiB. |
100 |
| EncryptKeyId |
string |
The ID of the KMS key used for the cloud disk. |
0e478b7a-4262-4802-b8cb-00d3fxxxxx |
| Encrypted |
boolean |
Indicates whether the cloud disk is encrypted. |
true |
| PublicIpAddresses |
object |
||
| PublicIpAddress |
array<object> |
The information about the public IP addresses. |
|
|
object |
The information about the public IP addresses. |
||
| Ip |
string |
The IP address. |
119.147.xx.xx |
| GateWay |
string |
The gateway. |
119.147.xx.xx |
| Isp |
string |
The ISP. |
unicom |
| PrivateIpAddresses |
object |
||
| PrivateIpAddress |
array<object> |
The information about the private IP addresses of the instance. |
|
|
object |
|||
| Ip |
string |
The IP address. |
119.147.xx.xx |
| GateWay |
string |
The gateway. |
119.147.xx.xx |
| Isp |
string |
The ISP. |
cmcc |
| SecurityGroupIds |
object |
||
| SecurityGroupId |
array |
The security group ID. |
|
|
string |
The security group ID. |
sg-5kyicq2kfcapxrdds6ta**** |
|
| InnerIpAddress |
object |
||
| IpAddress |
array |
The private IP address of the instance. |
|
|
string |
A private IP address of the instance. |
10.170.xx.xx |
|
| PublicIpAddress |
object |
||
| IpAddress |
array |
The public IP address. |
|
|
string |
A public IP address. |
119.147.xx.xx |
|
| SystemDisk |
object |
The details of the system disk. |
|
| device_type |
string |
The disk category. Valid values:
|
pangu |
| disk_type |
string |
The type of the cloud disk or local disk. Valid values:
|
system |
| Size |
integer |
The size of the disk. Unit: MiB. |
51200 |
| DiskName |
string |
The name of the disk. |
DiskName |
| uuid |
string |
The UUID. |
5431f898-1323-4e64-8ce1-6cad50ed**** |
| storage |
integer |
The disk capacity. Unit: MiB. |
20480 |
| DiskId |
string |
The ID of the disk. |
d-5ip4c2dhmas0rn7rt0p9**** |
| Category |
string |
The category of the cloud disk or local disk. Valid values:
|
file |
| name |
string |
The name of the disk. |
DiskName |
| NetworkAttributes |
object |
The network information. |
|
| NetworkId |
string |
The network ID. |
n-2zeuphj08tt7q3brd**** |
| VSwitchId |
string |
The ID of the VSwitch. |
vsw-2zeh0r1pabwtg6wcs**** |
| PrivateIpAddress |
object |
||
| IpAddress |
array |
The information about the private IP addresses of the instance. |
|
|
string |
The private IP address of the instance. You can specify only one private IP address. The IP address must be an available address within the CIDR block of the specified VSwitch ( |
172.17.**.** |
|
| Tags |
object |
||
| Tags |
array<object> |
The tags of the instance. Important
This operation does not return tag information. To retrieve tags, you must call a dedicated tagging API. |
|
|
object |
The tag information. Important
This operation does not return tag information. To retrieve tags, you must call a dedicated tagging API. |
||
| TagValue |
string |
The value of the tag. |
value1 |
| TagKey |
string |
The key of the tag. |
key1 |
| AutoReleaseTime |
string |
The time when the instance is automatically released. |
2023-06-28T14:38:52Z |
| SpotStrategy |
string |
The bidding policy for the spot instance. |
NoSpot |
| KeyPairName |
string |
The name of the key pair. |
TestKeyPairName |
| NetworkInterfaces |
object |
||
| NetworkInterfaces |
array<object> |
A list of elastic network interfaces. |
|
|
array<object> |
Details of an elastic network interface. |
||
| Type |
string |
The type of the elastic network interface. Valid values:
|
Primary |
| MacAddress |
string |
The MAC address of the elastic network interface. |
00:16:XXX:XXX:60:0a |
| PrimaryIpAddress |
string |
The primary private IP address. |
10.XXX.XXX.25 |
| NetworkInterfaceId |
string |
The ID of the elastic network interface. |
eni-53afk8a0t5lklbi8m7j8iczdg |
| PrivateIpSets |
object |
||
| PrivateIpSet |
array<object> |
A collection of |
|
|
object |
A collection of |
||
| PrivateIpAddress |
string |
The private IP address. |
192.XXX.XXX.130 |
| Primary |
boolean |
Indicates whether the IP address is the primary private IP address. Valid values:
|
true |
| Ipv6Sets |
object |
||
| Ipv6Set |
array<object> |
A collection of IPv6 addresses assigned to the elastic network interface. |
|
|
object |
A collection of IPv6 addresses assigned to the elastic network interface. |
||
| Ipv6Address |
string |
The IPv6 address assigned to the elastic network interface. |
2605:340:cdb1:XXXX:XXXX:XXXX:XXXX:e2d6 |
| VpdVSwitchId |
string |
vsw-5s7xxxxxxx |
|
| VpdId |
string |
vpd-5s7xxxxxxx |
|
| ServiceStatus |
string |
The service status of the instance, instead of the running status. |
Expired |
| DeletionProtection |
boolean |
Examples
Success response
JSON format
{
"Code": 0,
"PageSize": 60,
"PageNumber": 1,
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"TotalCount": 2,
"Instances": {
"Instance": [
{
"CreationTime": "2019-07-26T06:40:43Z",
"Status": "Running",
"SpecName": "ens.sn1.stiny",
"InstanceTypeFamily": "x86_vm",
"InstanceResourceType": "EnsService",
"HostName": "testHostName",
"InstanceId": "i-instanc****",
"InternetMaxBandwidthIn": 40,
"InternetMaxBandwidthOut": 100,
"EnsRegionId": "cn-hangzhou-telecom",
"Cpu": "2",
"ExpiredTime": "2119-07-13T02:38:57Z",
"InstanceName": "i-5itef0f28t17bcdw9deu6meub",
"Disk": 71680,
"OSName": "centos 6.8 x86_64",
"Memory": 2048,
"ImageId": "m-****",
"DataDisk": {
"DataDisk": [
{
"device_type": "pangu",
"disk_type": "system",
"Size": 51200,
"DiskName": "DiskName",
"uuid": "5431f898-1323-4e64-8ce1-6cad50ed****",
"storage": 20480,
"DiskId": "d-5ip4c2dhmas0vjd5u1r****",
"Category": "file",
"name": "name",
"DiskSize": 100,
"EncryptKeyId": "0e478b7a-4262-4802-b8cb-00d3fxxxxx",
"Encrypted": true
}
]
},
"PublicIpAddresses": {
"PublicIpAddress": [
{
"Ip": "119.147.xx.xx",
"GateWay": "119.147.xx.xx",
"Isp": "unicom"
}
]
},
"PrivateIpAddresses": {
"PrivateIpAddress": [
{
"Ip": "119.147.xx.xx",
"GateWay": "119.147.xx.xx",
"Isp": "cmcc"
}
]
},
"SecurityGroupIds": {
"SecurityGroupId": [
"sg-5kyicq2kfcapxrdds6ta****"
]
},
"InnerIpAddress": {
"IpAddress": [
"10.170.xx.xx"
]
},
"PublicIpAddress": {
"IpAddress": [
"119.147.xx.xx"
]
},
"SystemDisk": {
"device_type": "pangu",
"disk_type": "system",
"Size": 51200,
"DiskName": "DiskName",
"uuid": "5431f898-1323-4e64-8ce1-6cad50ed****",
"storage": 20480,
"DiskId": "d-5ip4c2dhmas0rn7rt0p9****",
"Category": "file",
"name": "DiskName"
},
"NetworkAttributes": {
"NetworkId": "n-2zeuphj08tt7q3brd****",
"VSwitchId": "vsw-2zeh0r1pabwtg6wcs****",
"PrivateIpAddress": {
"IpAddress": [
"172.17.**.**"
]
}
},
"Tags": {
"Tags": [
{
"TagValue": "value1",
"TagKey": "key1"
}
]
},
"AutoReleaseTime": "2023-06-28T14:38:52Z",
"SpotStrategy": "NoSpot",
"KeyPairName": "TestKeyPairName",
"NetworkInterfaces": {
"NetworkInterfaces": [
{
"Type": "Primary",
"MacAddress": "00:16:XXX:XXX:60:0a",
"PrimaryIpAddress": "10.XXX.XXX.25",
"NetworkInterfaceId": "eni-53afk8a0t5lklbi8m7j8iczdg",
"PrivateIpSets": {
"PrivateIpSet": [
{
"PrivateIpAddress": "192.XXX.XXX.130",
"Primary": true
}
]
},
"Ipv6Sets": {
"Ipv6Set": [
{
"Ipv6Address": "2605:340:cdb1:XXXX:XXXX:XXXX:XXXX:e2d6"
}
]
},
"VpdVSwitchId": "vsw-5s7xxxxxxx",
"VpdId": "vpd-5s7xxxxxxx"
}
]
},
"ServiceStatus": "Expired",
"DeletionProtection": false
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingParameter | The input parameter domainName that is mandatory for processing this request is not supplied. | |
| 400 | InstanceIdNotFound | The input parameter instancdId that is not found. | The specified instance ID does not exist. |
| 400 | NoPermission | Permission denied. | |
| 400 | CallInterface | Call Interface Happen Error. | An error occurred when you call the operation. |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.