All Products
Search
Document Center

ENS:DescribeInstances

Last Updated:Mar 12, 2024

Queries the details of one or more Edge Node Service (ENS) instances.

Operation description

  • You can call this operation up to 800 times per second per account.
  • You can call this operation up to 100 times per second per user.
  • You can specify multiple request parameters to be queried. Specified parameters are evaluated by using the AND operator. Only the specified parameters are included in the filter conditions. However, if InstanceIds is set to an empty JSON array, it is regarded as a valid filter condition and an empty result is returned.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
EnsRegionIdstringNo

The region ID.

cn-beijing-cmcc
InstanceIdstringNo

The ID of the instance.

i-5iqczfxps7csjrxeca****
EnsRegionIdsstringNo

The IDs of the regions. The value is a JSON array that consists of up to 100 IDs. Separate multiple IDs with commas (,).

["cn-suzhou-telecom","cn-chengdu-telecom"]
InstanceIdsstringNo

The IDs of the instances. The value is a JSON array that consists of up to 100 IDs. Separate IDs with commas (,).

["i-5iqczfxps7csjrxeca07****", "i-5iqczfxps7csjrxeca07****"]]
InstanceNamestringNo

The name of the instance.

TestName
ImageIdstringNo

The ID of the image.

centos_6_08_64_20G_alibase_****
PageNumberintegerNo

The number of the page to return. Pages start from page 1.

Default value: 1.

1
PageSizestringNo

The number of entries to return on each page. The maximum value is 100.

Default value: 10.

10
StatusstringNo

The status of the instance. Valid values:

  • Running
  • Stopped
  • Expired
Running
OrderByParamsstringNo

The method that you want to use to sort instances. The value of this parameter is in the JSON format.

You can sort instances by name, expiration time, node ID, or creation time. You can specify one or more methods.

{"InstanceNameSort":"asc","ExpireTimeSort":"asc","CreationTimeSort":"desc"}}
EnsServiceIdstringNo

The ID of the edge service. You can use the ID to query information about the instances that are created in the edge service.

ens-20190730202316s****
InstanceResourceTypestringNo

The condition that you want to use to filter instances by category. Valid values:

  • EnsInstance: ENS instances that you purchase.
  • EnsService: ENS instances that belong to edge services.
  • BuildMachine: ENS instances that are configured with image builders.
  • EnsPostPaidInstance: Pay-as-you-go ENS instances that you purchase.
EnsService
SearchKeystringNo

The keyword that you use to query the logs of the service. You can specify the values of parameters such as ip, InstanceName, and InstanceId as the keyword.

Joshua
NetworkIdstringNo

The ID of the network.

n-2zeuphj08tt7q3brd****
VSwitchIdstringNo

The ID of the vSwitch.

vsw-2zeh0r1pabwtg6wcs****
SecurityGroupIdstringNo

The ID of the security group.

sg-5kyicq2kfcapxrdds6tar7jqb
IntranetIpstringNo

The internal IP address of the instance.

47.100.XX.XX
Tagsobject []No
KeystringNo

The tag key. Valid values: 1 to 20.

ValuestringNo

The tag value. Valid values: 1 to 20.

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

Codeinteger

The returned service code. 0 indicates that the request was successful.

0
PageSizeinteger

The number of entries per page.

60
PageNumberinteger

The page number.

1
RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
TotalCountinteger

The total number of entries returned.

2
Instancesobject []

The returned instance information. It is an array that consists of InstanceAttributesType data.

CreationTimestring

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.

2019-07-26T06:40:43Z
Statusstring

The status of the instance. Valid values:

  • Running
  • Expired
  • Stopped
Running
SpecNamestring

The code of the instance type.

ens.sn1.stiny
InstanceTypeFamilystring

The instance family. Valid values:

  • x86_vm: x86-based computing instance.
  • x86_pm: x86-based physical machine.
  • x86_bmi: x86-based bare metal instance.
  • x86_bm: bare metal instance with the SmartNIC.
  • pc_bmi: heterogeneous bare metal instance.
  • pc_vm: heterogeneous virtual machine.
  • arm_bmi: Arm-based computing instance.
x86_vm
InstanceResourceTypestring

The type of the instance. Valid values:

  • EnsInstance: ENS instances that you purchase.
  • EnsService: ENS instances that belong to edge services.
  • BuildMachine: ENS instances that are configured with image builders.
  • EnsPostPaidInstance: pay-as-you-go ENS instances that you purchase.
EnsService
HostNamestring

The hostname of the instance.

  • The hostname cannot start or end with a period (.) or hyphen (-). It cannot contain consecutive periods (.) or hyphens (-).
  • For a Windows instance, the hostname must be 2 to 15 characters in length and can contain letters, digits, and hyphens (-). The hostname cannot contain periods (.) or contain only digits.
  • For other operating systems: The hostname must be 2 to 64 characters in length and can contain letters, digits, and hyphens (-). It can be separated by periods (.).
testHostName
InstanceIdstring

The ID of the instance.

i-instanc****
InternetMaxBandwidthIninteger

The maximum outbound bandwidth. Unit: Mbit/s.

40
InternetMaxBandwidthOutinteger

The minimum inbound bandwidth. Unit: Mbit/s.

100
EnsRegionIdstring

The region ID of the instance.

cn-hangzhou-telecom
Cpustring

The number of vCPUs.

2
ExpiredTimestring

The expiration time. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2119-07-13T02:38:57Z
InstanceNamestring

The name of the virtual private cloud (VPC).

i-5itef0f28t17bcdw9deu6meub
Diskinteger

The total size of the disk. Unit: MiB.

71680
OSNamestring

The name of the image.

centos 6.8 x86_64
Memoryinteger

The memory size. Unit: MB.

2048
ImageIdstring

The ID of the image.

m-****
DataDiskobject []

Details of the data disk.

device_typestring

The extended field of the disk category. Valid values:

  • file: local disk.
  • pangu: ultra disk.
  • local_hdd: local HDD.
pangu
disk_typestring

The type of the cloud disk or local disk. Valid values:

system: system disk. data: data disk.

system
Sizeinteger

The size of the disk. Unit: MiB.

51200
DiskNamestring

The name of the disk.

DiskName
uuidstring

The UUID of the disk.

d-5itef1wtxj961mbff8xe9****
storageinteger

The size of the disk. Unit: MiB.

20480
DiskIdstring

The ID of the disk.

d-5ip4c2dhmas0vjd5u1r****
Categorystring

The category of the cloud disk or local disk. Valid values:

  • file: local disk.
  • pangu: ultra disk.
  • local_hdd: local HDD.
file
namestring

The name of the disk.

name
PublicIpAddressesobject []

Details of the public IP addresses.

Ipstring

The IP address.

119.147.xx.xx
GateWaystring

The gateway.

119.147.xx.xx
Ispstring

The Internet service provider (ISP).

unicom
PrivateIpAddressesobject []

Details of the private IP addresses.

Ipstring

The IP address.

119.147.xx.xx
GateWaystring

The gateway.

119.147.xx.xx
Ispstring

The ISP.

cmcc
SecurityGroupIdsarray

The IDs of the security groups.

string

The ID of the security group.

sg-5kyicq2kfcapxrdds6ta****
InnerIpAddressarray

The private IP addresses of the instances.

string

The private IP address of the instance.

10.170.xx.xx
PublicIpAddressarray

The public IP addresses of the instances.

string

The public IP address of the instance.

119.147.xx.xx
SystemDiskobject

Details of the system disk.

device_typestring

The extended field of the disk category. Valid values:

  • file: local disk.
  • pangu: ultra disk.
  • local_hdd: local HDD.
pangu
disk_typestring

The type of the cloud disk or local disk. Valid values:

  • system: system disk.
  • data: data disk.
system
Sizeinteger

The size of the disk. Unit: MiB.

51200
DiskNamestring

The name of the disk.

DiskName
uuidstring

The UUID of the disk.

d-5ip4c2dhmas0rn7rt0p96****
storageinteger

The size of the disk. Unit: MiB.

20480
DiskIdstring

The ID of the disk.

d-5ip4c2dhmas0rn7rt0p9****
Categorystring

The category of the cloud disk or local disk. Valid values:

  • file: local disk.
  • pangu: ultra disk.
  • local_hdd: local HDD.
file
namestring

The name of the disk.

DiskName
NetworkAttributesobject

Details of the network.

NetworkIdstring

The ID of the network.

n-2zeuphj08tt7q3brd****
VSwitchIdstring

The ID of the vSwitch.

vsw-2zeh0r1pabwtg6wcs****
PrivateIpAddressarray

Details of the private IP addresses.

string

The private IP address of the instance. If a private IP address is specified, the number of private IP addresses must be 1. The private IP address must be an available IP address in the CIDR block of the vSwitch.

172.17.**.**

Examples

Sample success responses

JSONformat

{
  "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": "d-5itef1wtxj961mbff8xe9****",
              "storage": 20480,
              "DiskId": "d-5ip4c2dhmas0vjd5u1r****",
              "Category": "file",
              "name": "name",
              "DiskSize": 0
            }
          ]
        },
        "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": "d-5ip4c2dhmas0rn7rt0p96****",
          "storage": 20480,
          "DiskId": "d-5ip4c2dhmas0rn7rt0p9****",
          "Category": "file",
          "name": "DiskName"
        },
        "NetworkAttributes": {
          "NetworkId": "n-2zeuphj08tt7q3brd****",
          "VSwitchId": "vsw-2zeh0r1pabwtg6wcs****",
          "PrivateIpAddress": {
            "IpAddress": [
              "172.17.**.**"
            ]
          }
        },
        "Tags": {
          "Tags": [
            {
              "TagValue": "",
              "TagKey": ""
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParameterThe input parameter domainName that is mandatory for processing this request is not supplied.-
400InstanceIdNotFoundThe input parameter instancdId that is not found.-
400NoPermissionPermission denied.-
400CallInterfaceCall Interface Happen Error.An error occurred when you call the operation.
400InvalidParameter.%sThe specified field %s invalid. Please check it again.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-01-25The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: Tags
Output ParametersThe response structure of the API has changed.
2024-01-04The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
Output ParametersThe response structure of the API has changed.