All Products
Search
Document Center

Elastic Compute Service:DescribeInstances

Last Updated:Sep 10, 2026

Queries a list of instances based on specified request conditions and retrieves the associated detailed information of the instances.

Operation description

Before you begin

  • When you invoke an API operation by using Cloud Assistant CLI, make sure that the request parameter values of different data types comply with the format requirements. For more information, see CLI parameter format overview.

Usage notes

  • Send a dry run request by using the DryRun request parameter to check the validity of parameters and authorization.

  • When you perform a paging query for the first page of results, set only MaxResults to limit the number of entries to return. The NextToken value in the response is used as the credential to query subsequent pages. When you perform a paging query for subsequent pages, set NextToken to the NextToken value obtained from the previous response and set MaxResults to limit the number of entries to return.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:DescribeInstances

list

Instance

acs:ecs:{#regionId}:{#accountId}:instance/*

Instance

acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}

  • ResourceOwner
None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the instance. You can call DescribeRegions to query the most recent region list.

cn-hangzhou

VpcId

string

No

The ID of the virtual private cloud (VPC).

v-bp67acfmxazb4p****

VSwitchId

string

No

The ID of the vSwitch.

vsw-bp67acfmxazb4p****

ZoneId

string

No

The zone ID.

cn-hangzhou-g

InstanceNetworkType

string

No

The network type of the instance. Valid values:

  • vpc: VPC.

  • classic: classic network. The classic network is no longer available. For more information, see Retirement notice.

vpc

SecurityGroupId

string

No

The ID of the security group to which the instance belongs.

sg-bp67acfmxazb4p****

InstanceIds

string

No

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

["i-bp67acfmxazb4p****", "i-bp67acfmxazb4p****", … "i-bp67acfmxazb4p****"]

PageNumber

integer

No

Note

This parameter is about to be deprecated. Use NextToken and MaxResults to complete paging query operations.

1

PageSize

integer

No

Note

This parameter is about to be deprecated. Use NextToken and MaxResults to complete paging query operations.

10

NextToken

string

No

The query token. Set the value to the NextToken value returned in the previous API call.

caeba0bbb2be03f84eb48b699f0a4883

MaxResults

integer

No

The maximum number of entries per page for a paging query. Maximum value: 100.

Default value:

  • If you do not set this parameter or set it to a value less than 10, the default value is 10.

  • If you set this parameter to a value greater than 100, the default value is 100.

10

InnerIpAddresses

string

No

The internal network IP addresses of instances with the classic network type. This parameter takes effect when InstanceNetworkType is set to classic. The value is a JSON array that consists of up to 100 IP addresses. Separate the IP addresses with commas (,).

Note

["10.1.1.1", "10.1.2.1", … "10.1.10.1"]

PrivateIpAddresses

string

No

The private IP addresses of instances with the VPC network type. This parameter takes effect when InstanceNetworkType is set to vpc. The value is a JSON array that consists of up to 100 IP addresses. Separate the IP addresses with commas (,).

["172.16.1.1", "172.16.2.1", … "172.16.10.1"]

PublicIpAddresses

string

No

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

["42.1.1.**", "42.1.2.**", … "42.1.10.**"]

EipAddresses

string

No

The elastic IP addresses (EIPs) of instances. This parameter takes effect when InstanceNetworkType is set to vpc. The value is a JSON array that consists of up to 100 IP addresses. Separate the IP addresses with commas (,).

["42.1.1.**", "42.1.2.**", … "42.1.10.**"]

InstanceChargeType

string

No

The billing method of the instance. Valid values:

  • PostPaid: pay-as-you-go.

  • PrePaid: subscription.

PostPaid

InternetChargeType

string

No

The billing method for public bandwidth. Valid values:

  • PayByBandwidth: pay-by-bandwidth.

  • PayByTraffic: pay-by-traffic.

Note

In pay-by-traffic mode, the peak inbound and outbound bandwidths are used as bandwidth upper limits and are not guaranteed. When resource contention occurs, the peak bandwidths may be limited. If you require guaranteed bandwidth for your workloads, use the pay-by-bandwidth mode.

PayByTraffic

InstanceName

string

No

The name of the instance. Fuzzy search with the asterisk (*) wildcard is supported.

Test

ImageId

string

No

The image ID.

m-bp67acfmxazb4p****

Status

string

No

The instance status. Valid values:

  • Pending: being created.

  • Running: running.

  • Starting: being started.

  • Stopping: being stopped.

  • Stopped: stopped.

Running

LockReason

string

No

The reason why the resource is locked. Valid values:

  • financial: The resource is locked due to overdue payment.

  • security: The resource is locked due to security reasons.

  • Recycling: The spot instance is locked and pending release.

  • dedicatedhostfinancial: The ECS instance is locked because the dedicated host has an overdue payment.

  • refunded: The resource is locked because a refund is made.

security

Filter.1.Key

string

No

The key of filter 1 used to query resources. Set the value to CreationStartTime. You can specify both Filter.1.Key and Filter.1.Value to query resources that were created after the specified point in time.

CreationStartTime

Filter.2.Key

string

No

The key of filter 2 used to query resources. Set the value to CreationEndTime. You can specify both Filter.2.Key and Filter.2.Value to query resources that were created before the specified point in time.

CreationEndTime

Filter.3.Key

string

No

The key of filter 3 used to query resources. Set the value to ExpiredStartTime. You can specify both Filter.3.Key and Filter.3.Value to query resources that expire after the specified point in time.

ExpiredStartTime

Filter.4.Key

string

No

The key of filter 4 used to query resources. Set the value to ExpiredEndTime. You can specify both Filter.4.Key and Filter.4.Value to query resources that expire before the specified point in time.

ExpiredEndTime

Filter.1.Value

string

No

The value of filter 1 used to query resources. When you specify this parameter, you must also specify Filter.1.Key. Specify the time in the yyyy-MM-ddTHH:mmZ format in UTC.

2017-12-05T22:40Z

Filter.2.Value

string

No

The value of filter 2 used to query resources. When you specify this parameter, you must also specify Filter.2.Key. Specify the time in the yyyy-MM-ddTHH:mmZ format in UTC.

2017-12-06T22:40Z

Filter.3.Value

string

No

The value of filter 3 used to query resources. When you specify this parameter, you must also specify Filter.3.Key. Specify the time in the yyyy-MM-ddTHH:mmZ format in UTC.

2017-12-07T22:40Z

Filter.4.Value

string

No

The value of filter 4 used to query resources. When you specify this parameter, you must also specify Filter.4.Key. Specify the time in the yyyy-MM-ddTHH:mmZ format in UTC.

2017-12-08T22:40Z

DeviceAvailable

boolean

No

Note

This parameter is in invitational preview and is not publicly available.

false

IoOptimized

boolean

No

Specifies whether the instance is I/O optimized. Valid values:

  • true: The instance is I/O optimized.

  • false: The instance is not I/O optimized.

true

NeedSaleCycle

boolean

No

Note

This parameter is in invitational preview and is not publicly available.

false

InstanceType

string

No

The instance type.

ecs.g5.large

InstanceTypeFamily

string

No

The instance family.

ecs.g5

KeyPairName

string

No

The name of the SSH key pair bound to the instance.

KeyPairNameTest

ResourceGroupId

string

No

The ID of the resource group to which the instance belongs. When you use this parameter to filter resources, the resource count cannot exceed 1,000.

Note

Filtering by the default resource group is not supported.

rg-bp67acfmxazb4p****

HpcClusterId

string

No

The ID of the HPC cluster to which the instance belongs.

hpc-bp67acfmxazb4p****

RdmaIpAddresses

string

No

The RDMA IP addresses of the HPC instance.

10.10.10.102

DryRun

boolean

No

Specifies whether to perform only a dry run. Valid values:

  • true: performs only a dry run. The system checks the request for potential issues, including invalid AccessKey pairs, unauthorized Resource Access Management (RAM) users, and missing parameter values. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.

  • false: performs a dry run and sends the request. If the request passes the dry run, a 2XX HTTP status code is returned and the operation is performed.

Default value: false.

false

HttpEndpoint

string

No

Specifies whether the access channel for instance metadata is enabled. Valid values:

  • enabled: enabled.

  • disabled: disabled.

Default value: enabled.

Note

For more information about instance metadata, see Overview of ECS instance metadata.

enabled

HttpTokens

string

No

Specifies whether to forcefully use the hardened mode (IMDSv2) when accessing instance metadata. Valid values:

  • optional: The hardened mode is not forcefully used.

  • required: The hardened mode is forcefully used. After you set this parameter to required, you cannot access instance metadata in the normal pattern.

Default value: optional.

Note

For more information about instance metadata access patterns, see Instance metadata access modes.

optional

HttpPutResponseHopLimit

integer

No

Note

This parameter is not yet available.

0

Ipv6Address

array

No

The IPv6 addresses assigned to Elastic Network Interfaces (ENIs).

string

No

The IPv6 address of the Elastic Network Interface (ENI). N specifies that you can set multiple IPv6 addresses. Valid values of N: 1 to 100.

2408:4321:180:1701:94c7:bc38:3bfa:****

Tag

array<object>

No

The tags.

object

No

The tags.

Key

string

No

The tag key of the instance. Valid values of N: 1 to 20.

If you use a single tag to filter resources, the number of resources with this tag cannot exceed 1,000. If you use multiple tags to filter resources, the number of resources that are attached to all specified tags cannot exceed 1,000. If the resource count exceeds 1,000, use the ListTagResources operation to query resources.

TestKey

Value

string

No

The tag value of the instance. Valid values of N: 1 to 20.

TestValue

key

string

No

The tag key.

Note

To improve compatible, use the Tag.N.Key parameter instead.

keyTest

value

string

No

The tag value.

Note

To improve compatible, use the Tag.N.Value parameter instead.

valueTest

AdditionalAttributes

array

No

The list of additional properties of the instance.

META_OPTIONS

string

No

The additional property value. Valid values of N: 1 to 5. Valid values:

  • META_OPTIONS: instance metadata.

  • DDH_CLUSTER: dedicated host cluster.

  • NETWORK_PRIMARY_ENI_IP: secondary IP addresses of the primary network interface controller (NIC).

  • PRIVATE_DNS_OPTIONS: private network domain name information.

  • CPU_OPTIONS_TOPOLOGY_TYPE: the CPU topology type of the instance.

  • CURRENT_OS_NVME_SUPPORTED: whether the current operating system supports accessing disks over the NVMe protocol.

  • LOGIN_AS_NON_ROOT: whether the instance is configured with ecs-user logon.

META_OPTIONS

Response elements

Element

Type

Description

Example

object

Instances

object

Instance

array<object>

An array of Instance objects that contains the information about the instances.

array<object>

AdditionalInfo

object

Note

This parameter is in invitational preview and is not publicly available.

EnableHighDensityMode

boolean

Note

This parameter is in invitational preview and is not publicly available.

true

ManagedHostId

string

The unique ID of the platform-managed host, such as mh-f2d3647ca21****.

mh-f2d3647ca21****

NodeSerialNumber

string

AutoReleaseTime

string

The automatic release time of the pay-as-you-go instance.

2017-12-10T04:04Z

ClockOptions

object

PtpStatus

string

ClusterId

string

The ID of the cluster to which the instance belongs.

Note

This parameter will be deprecated. To ensure compatibility, use other parameters.

c-bp67acfmxazb4p****

Cpu

integer

The number of vCPUs.

8

CpuOptions

object

The CPU configuration details.

CoreCount

integer

The number of physical CPU cores.

2

EnableVISST

boolean

EnableVRDT

boolean

NestedVirtualization

string

Indicates whether nested virtualization is enabled.

enabled

Numa

string

Note

This parameter is deprecated.

null

ThreadsPerCore

integer

The number of threads per CPU core.

2

TopologyType

string

The CPU topology type of the instance. Valid values:

  • ContinuousCoreToHTMapping: HT discrete mode.

  • DiscreteCoreToHTMapping: HT continuous mode.

DiscreteCoreToHTMapping

TurboMode

string

CreationTime

string

The time when the instance was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC+0. For more information, see ISO 8601.

2017-12-10T04:04Z

CreditSpecification

string

The running mode of the burstable instance. Valid values:

Standard

DedicatedHostAttribute

object

An array of dedicated host attributes, which consists of the dedicated host cluster ID (DedicatedHostClusterId), dedicated host ID (DedicatedHostId), and dedicated host name (DedicatedHostName).

DedicatedHostClusterId

string

The ID of the dedicated host cluster.

dc-bp67acfmxazb4h****

DedicatedHostId

string

The ID of the dedicated host.

dh-bp67acfmxazb4p****

DedicatedHostName

string

The name of the dedicated host.

testDedicatedHostName

DedicatedInstanceAttribute

object

The attributes of the instance on the dedicated host.

Affinity

string

Indicates whether the instance on the dedicated host is associated with the dedicated host. Valid values:

  • default: The instance is not associated with the dedicated host. When an instance that is in the No Fees for Stopped Instances state is restarted, the instance may be placed on another dedicated host in the automatic deployment resource pool.

  • host: The instance is associated with the dedicated host. When an instance that is in the No Fees for Stopped Instances state is restarted, the instance is still placed on the original dedicated host.

default

Tenancy

string

Indicates whether the host type of the instance is a dedicated host. Valid values:

  • default: The host type of the instance is not a dedicated host.

  • host: The host type of the instance is a dedicated host.

default

DeletionProtection

boolean

The release protection attribute of the instance. It specifies whether the instance can be released from the ECS console or by calling the DeleteInstance operation.

  • true: Release protection is enabled for the instance.

  • false: Release protection is not enabled for the instance.

Note

This attribute is applicable only to pay-as-you-go instances. It can restrict only manual release operations, not system release operations.

false

DeploymentSetGroupNo

integer

The group number of ECS instance in the deployment set when ECS instance is deployed with the spread deployment strategy.

1

DeploymentSetId

string

The ID of the deployment set.

ds-bp67acfmxazb4p****

Description

string

The description of the instance.

testDescription

DeviceAvailable

boolean

Indicates whether data cloud disks can be attached to the instance.

  • true: Data cloud disks can be attached to the instance.

  • false: Data cloud disks cannot be attached to the instance.

true

EcsCapacityReservationAttr

object

The capacity reservation-related parameters of Elastic Compute Service (ECS).

CapacityReservationId

string

The ID of the capacity reservation.

cr-bp67acfmxazb4p****

CapacityReservationPreference

string

The capacity reservation preference.

cr-bp67acfmxazb4p****

EipAddress

object

The binding information of the Elastic IP Address (EIP).

AllocationId

string

The ID of the EIP.

eip-2ze88m67qx5z****

Bandwidth

integer

The public bandwidth limit of the EIP. Unit: Mbit/s.

5

InternetChargeType

string

The billing method of the EIP for Internet usage.

  • PayByBandwidth: pay-by-bandwidth.

  • PayByTraffic: pay-by-traffic.

PayByTraffic

IpAddress

string

The EIP address.

42.112.**.**

IsSupportUnassociate

boolean

Indicates whether the Internet EIP can be disassociated from an EIP.

true

EnableNVS

boolean

ExpiredTime

string

The expiration time. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC+0. For more information, see ISO 8601.

2017-12-10T04:04Z

GPUAmount

integer

The number of GPUs for the instance type.

4

GPUSpec

string

The GPU type for the instance type.

NVIDIA V100

HibernationOptions

object

Note

This parameter is in invitational preview and is not publicly available.

Configured

boolean

Note

This parameter is in invitational preview and is not publicly available.

false

HostName

string

The hostname of the instance.

testHostName

HpcClusterId

string

The ID of the HPC cluster to which the instance belongs.

hpc-bp67acfmxazb4p****

ISP

string

Note

This parameter is in invitational preview and is not publicly available.

null

ImageId

string

The ID of the image that the instance is running.

m-bp67acfmxazb4p****

ImageOptions

object

The image-related attribute information.

CurrentOSNVMeSupported

boolean

Indicates whether the current operating system supports access to cloud disks over the NVMe protocol. Valid values:

  • true: Supported.

  • false: Not supported.

Note

This parameter is returned only when the AdditionalAttributes request parameter contains CURRENT_OS_NVME_SUPPORTED.

true

LoginAsNonRoot

boolean

Indicates whether the instance that uses this image supports logon with the ecs-user user. Valid values:

  • true: Supported.

  • false: Not supported.

false

InnerIpAddress

object

IpAddress

array

The list of internal network IP addresses of the instance in the classic network type.

Note

The classic network feature has been offline. For details, see Retirement notice.

string

The internal network IP address of the instance in the classic network type.

10.170.**.**

InstanceChargeType

string

The billing method of the instance. Valid values:

  • PrePaid: subscription.

  • PostPaid: pay-as-you-go.

PostPaid

InstanceId

string

The instance ID.

i-bp67acfmxazb4p****

InstanceName

string

Instance name

InstanceNameTest

InstanceNetworkType

string

The network type of the instance. Valid values:

  • vpc: virtual private cloud (VPC).

  • classic: classic network. The classic network has been retired. For more information, see Retirement notice.

vpc

InstanceType

string

The instance type.

ecs.g5.large

InstanceTypeFamily

string

The instance family.

ecs.g5

InternetChargeType

string

The billing method for network usage. Valid values:

  • PayByBandwidth: pay-by-bandwidth.

  • PayByTraffic: pay-by-traffic.

PayByTraffic

InternetMaxBandwidthIn

integer

The maximum inbound public bandwidth. Unit: Mbit/s.

50

InternetMaxBandwidthOut

integer

The maximum outbound public bandwidth. Unit: Mbit/s.

5

IoOptimized

boolean

Indicates whether the instance is I/O optimized.

  • true: The instance is I/O optimized.

  • false: The instance is not I/O optimized.

true

KeyPairName

string

The name of the key pair.

testKeyPairName

LocalStorageAmount

integer

The number of local storage devices attached to the instance.

2

LocalStorageCapacity

integer

The storage capacity of local storage attached to the instance. Unit: GiB.

1000

Memory

integer

The memory size. Unit: MiB.

16384

MetadataOptions

object

The collection of metadata options.

HttpEndpoint

string

Indicates whether the access channel for instance metadata is enabled. Valid values:

  • enabled: The access channel is enabled.

  • disabled: The access channel is disabled.

enabled

HttpPutResponseHopLimit

integer

Note

This parameter is not publicly available.

0

HttpTokens

string

Indicates whether the China mode (IMDSv2) is forcefully used to access instance metadata. Valid values:

  • optional: The China mode (IMDSv2) is not forcefully used.

  • required: The China mode (IMDSv2) is forcefully used.

optional

InstanceMetadataTags

string

NetworkInterfaces

object

NetworkInterface

array<object>

The collection of Elastic Network Interfaces (ENIs) attached to the instance, including the network interface controller (NIC) information.

array<object>

The collection of Elastic Network Interfaces (ENIs) attached to the instance, including the network interface controller (NIC) information.

Ipv4PrefixSets

object

Ipv4PrefixSet

array<object>

The IPv4 prefix set allocated to the network interface controller (NIC). This parameter is returned only when the AdditionalAttributes.N request parameter is set to NETWORK_PRIMARY_ENI_IP.

object

Ipv4Prefix

string

The IPv4 prefix assigned to the network interface controller (NIC).

192.168.*.*/28

Ipv6PrefixSets

object

Ipv6PrefixSet

array<object>

The IPv6 prefix set allocated to the network interface controller (NIC). This parameter is returned only when the AdditionalAttributes.N request parameter is set to NETWORK_PRIMARY_ENI_IP.

object

Ipv6Prefix

string

The IPv6 prefix assigned to the network interface controller (NIC).

2001:1111:*:*::/80

Ipv6Sets

object

Ipv6Set

array<object>

The IPv6 address set allocated to the network interface controller (NIC). This parameter is returned only when the AdditionalAttributes.N request parameter is set to NETWORK_PRIMARY_ENI_IP.

object

Ipv6Address

string

The IPv6 address allocated to the network interface controller (NIC).

2408:4321:180:1701:94c7:bc38:3bfa:***

Primary

boolean

MacAddress

string

The MAC address of the network interface controller (NIC).

00:16:3e:32:b4:**

NetworkInterfaceId

string

The ID of the network interface controller (NIC).

eni-2zeh9atclduxvf1z****

PrimaryIpAddress

string

The primary private IP address of the network interface controller (NIC).

172.17.**.***

PrivateIpSets

object

PrivateIpSet

array<object>

The collection of PrivateIpSet objects.

object

Primary

boolean

Indicates whether the IP address is the primary private IP address. Valid values:

  • true: The IP address is the primary private IP address.

  • false: The IP address is not the primary private IP address.

true

PrivateDnsName

string

The private domain name of the instance.

Note

A private domain name in a fixed format is returned only when HostnameType is set to IpBased or InstanceIdBased.

dnsTestName

PrivateIpAddress

string

The private IP address of the instance.

172.17.**.**

Type

string

The type of the Elastic Network Interface (ENI). Valid values:

  • Primary: primary network interface controller (NIC).

  • Secondary: secondary ENI.

Primary

OSName

string

The name of the operating system of the instance.

CentOS 7.4 64 位

OSNameEn

string

The English name of the operating system of the instance.

CentOS 7.4 64 bit

OSType

string

The type of the operating system of the instance. Valid values:

  • windows

  • linux

linux

OperationLocks

object

LockReason

array<object>

The reasons why the instance is locked.

object

LockMsg

string

The description of the lock on the instance.

The specified instance is locked due to financial reason.

LockReason

string

The type of the lock. Valid values:

  • financial: ECS instance is locked due to overdue payment.

  • security: ECS instance is locked for security reasons.

  • Recycling: The spot instance is locked and pending release.

  • dedicatedhostfinancial: ECS instance is locked because the dedicated host has an overdue payment.

  • refunded: ECS instance is locked because a refund has been made.

Recycling

PrivateDnsNameOptions

object

The private domain name configuration of the instance.

For more information about private private domain resolution, see ECS private private domain resolution.

Note

This parameter is returned only when the AdditionalAttributes request parameter contains PRIVATE_DNS_OPTIONS.

EnableInstanceIdDnsAAAARecord

boolean

Indicates whether instance ID-based domain name-to-IPv6 resolution is enabled. Valid values:

  • true: Enabled.

  • false: Disabled.

Default value: false.

false

EnableInstanceIdDnsARecord

boolean

Indicates whether instance ID-based domain name-to-IPv4 resolution is enabled. Valid values:

  • true: Enabled.

  • false: Disabled.

Default value: false.

false

EnableIpDnsARecord

boolean

Indicates whether IP-based domain name-to-IPv4 resolution is enabled. Valid values:

  • true: Enabled.

  • false: Disabled.

Default value: false.

true

EnableIpDnsPtrRecord

boolean

Indicates whether IPv4-to-IP-based domain name resolution is enabled. Valid values:

  • true: Enabled.

  • false: Disabled.

Default value: false.

true

HostnameType

string

The hostname type. Valid values:

  • Custom: custom.

  • IpBased: IP-based hostname.

  • InstanceIdBased: instance ID-based hostname.

Default value: Custom.

Custom

PublicIpAddress

object

IpAddress

array

The list of public IP addresses of the instance.

string

The public IP address of the instance.

121.40.**.**

RdmaIpAddress

object

IpAddress

array

The list of RDMA IP addresses of the HPC instance.

string

The RDMA IP addresses of the HPC instance.

10.10.10.102

Recyclable

boolean

Indicates whether the instance can be recycled.

false

RegionId

string

The region ID of the instance.

cn-hangzhou

ResourceGroupId

string

The ID of the resource group to which the instance belongs.

rg-bp67acfmxazb4p****

SaleCycle

string

Note

This parameter is deprecated and no longer returns meaningful data.

month

SecurityGroupIds

object

SecurityGroupId

array

The list of security group IDs of the instance.

string

The security group ID.

sg-bp67acfmxazb4p****

SecurityOptions

object

EnableSecureBoot

boolean

Indicates whether UEFI Secure Boot is enabled.

SerialNumber

string

The serial number of the instance.

51d1353b-22bf-4567-a176-8b3e12e4****

SpotDuration

integer

The protection period of the spot instance. Unit: hours. Valid values:

  • 1: After the spot instance is created, Alibaba Cloud ensures that the instance is not subject to automatic release within 1 hour. After 1 hour, the system automatically compares the bid price with the marketplace price and checks the resource inventory to determine whether to retain or revoke the instance.

  • 0: After the spot instance is created, Alibaba Cloud does not ensure that the instance runs for 1 hour. The system automatically compares the bid price with the marketplace price and checks the resource inventory to determine whether to retain or revoke the instance.

Alibaba Cloud sends an ECS system event notification 5 minutes before the instance is revoked. Spot instances are billed by second. Select an appropriate protection period based on the expected task execution duration.

Note

This parameter is returned only when SpotStrategy is set to SpotWithPriceLimit or SpotAsPriceGo.

1

SpotInterruptionBehavior

string

The interruption pattern of the spot instance when the platform initiates a spot instance interruption. Valid values:

  • Terminate: The instance is released.

  • Stop: The instance is stopped in economical mode.

Terminate

SpotPriceLimit

number

The maximum hourly price of the instance. The value supports up to three decimal places. This parameter takes effect when SpotStrategy=SpotWithPriceLimit.

0.98

SpotStrategy

string

The bidding strategy for the pay-as-you-go instance. Valid values:

  • NoSpot: The instance is a regular pay-as-you-go instance.

  • SpotWithPriceLimit: The instance is a spot instance with a maximum price limit.

  • SpotAsPriceGo: The instance is a spot instance for which the system automatically bids at up to the pay-as-you-go price.

NoSpot

StartTime

string

The most recent start time of the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC. For more information, see ISO 8601.

2017-12-10T04:04Z

Status

string

The instance status.

Running

StoppedMode

string

Indicates whether the instance continues to be billed after it is stopped. Valid values:

  • KeepCharging: The instance continues to be billed after it is stopped. Inventory resources are reserved for the instance.

  • StopCharging: The instance is not billed after it is stopped. After the instance is stopped, its resources such as vCPUs, memory, and public IP addresses are released. Whether the instance can be restarted depends on the resource availability in the current region.

  • Not-applicable: The instance does not support the No Fees for Stopped Instances feature.

KeepCharging

Tags

object

Tag

array<object>

The tags of the instance.

object

TagKey

string

The tag key of the instance.

TestKey

TagValue

string

The tag value of the instance.

TestValue

VlanId

string

The VLAN ID of the instance.

Note

This parameter will be deprecated. For better compatibility, use other parameters.

10

VpcAttributes

object

The VPC attributes of the instance.

NatIpAddress

string

The IP address of the cloud service, which is used for network connectivity between VPC-based cloud services.

172.17.**.**

PrivateIpAddress

object

IpAddress

array

The list of private IP addresses.

string

The private IP address.

172.17.**.**

VSwitchId

string

The vSwitch ID.

vsw-2zeh0r1pabwtg6wcs****

VpcId

string

The ID of the virtual private cloud (VPC).

vpc-2zeuphj08tt7q3brd****

ZoneId

string

The zone ID of the instance.

cn-hangzhou-g

NextToken

string

The pagination token returned in this call.

caeba0bbb2be03f84eb48b699f0a4883

PageNumber

integer

The page number.

1

PageSize

integer

The number of entries per page that was specified in the request.

10

RequestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

TotalCount

integer

The total number of queried instances.

Note

When you use the MaxResults and NextToken parameters for paging query, the returned TotalCount parameter value is meaningless.

1

Examples

Success response

JSON format

{
  "Instances": {
    "Instance": [
      {
        "AdditionalInfo": {
          "EnableHighDensityMode": true,
          "ManagedHostId": "mh-f2d3647ca21****",
          "NodeSerialNumber": ""
        },
        "AutoReleaseTime": "2017-12-10T04:04Z",
        "ClockOptions": {
          "PtpStatus": ""
        },
        "ClusterId": "c-bp67acfmxazb4p****",
        "Cpu": 8,
        "CpuOptions": {
          "CoreCount": 2,
          "EnableVISST": false,
          "EnableVRDT": false,
          "NestedVirtualization": "enabled",
          "Numa": "null",
          "ThreadsPerCore": 2,
          "TopologyType": "DiscreteCoreToHTMapping",
          "TurboMode": ""
        },
        "CreationTime": "2017-12-10T04:04Z",
        "CreditSpecification": "Standard",
        "DedicatedHostAttribute": {
          "DedicatedHostClusterId": "dc-bp67acfmxazb4h****",
          "DedicatedHostId": "dh-bp67acfmxazb4p****",
          "DedicatedHostName": "testDedicatedHostName"
        },
        "DedicatedInstanceAttribute": {
          "Affinity": "default",
          "Tenancy": "default"
        },
        "DeletionProtection": false,
        "DeploymentSetGroupNo": 1,
        "DeploymentSetId": "ds-bp67acfmxazb4p****",
        "Description": "testDescription",
        "DeviceAvailable": true,
        "EcsCapacityReservationAttr": {
          "CapacityReservationId": "cr-bp67acfmxazb4p****",
          "CapacityReservationPreference": "cr-bp67acfmxazb4p****"
        },
        "EipAddress": {
          "AllocationId": "eip-2ze88m67qx5z****",
          "Bandwidth": 5,
          "InternetChargeType": "PayByTraffic",
          "IpAddress": "42.112.**.**",
          "IsSupportUnassociate": true
        },
        "EnableNVS": false,
        "ExpiredTime": "2017-12-10T04:04Z",
        "GPUAmount": 4,
        "GPUSpec": "NVIDIA V100",
        "HibernationOptions": {
          "Configured": false
        },
        "HostName": "testHostName",
        "HpcClusterId": "hpc-bp67acfmxazb4p****",
        "ISP": "null",
        "ImageId": "m-bp67acfmxazb4p****",
        "ImageOptions": {
          "CurrentOSNVMeSupported": true,
          "LoginAsNonRoot": false
        },
        "InnerIpAddress": {
          "IpAddress": [
            "10.170.**.**"
          ]
        },
        "InstanceChargeType": "PostPaid",
        "InstanceId": "i-bp67acfmxazb4p****",
        "InstanceName": "InstanceNameTest",
        "InstanceNetworkType": "vpc",
        "InstanceType": "ecs.g5.large",
        "InstanceTypeFamily": "ecs.g5",
        "InternetChargeType": "PayByTraffic",
        "InternetMaxBandwidthIn": 50,
        "InternetMaxBandwidthOut": 5,
        "IoOptimized": true,
        "KeyPairName": "testKeyPairName",
        "LocalStorageAmount": 2,
        "LocalStorageCapacity": 1000,
        "Memory": 16384,
        "MetadataOptions": {
          "HttpEndpoint": "enabled",
          "HttpPutResponseHopLimit": 0,
          "HttpTokens": "optional",
          "InstanceMetadataTags": ""
        },
        "NetworkInterfaces": {
          "NetworkInterface": [
            {
              "Ipv4PrefixSets": {
                "Ipv4PrefixSet": [
                  {
                    "Ipv4Prefix": "192.168.*.*/28"
                  }
                ]
              },
              "Ipv6PrefixSets": {
                "Ipv6PrefixSet": [
                  {
                    "Ipv6Prefix": "2001:1111:*:*::/80"
                  }
                ]
              },
              "Ipv6Sets": {
                "Ipv6Set": [
                  {
                    "Ipv6Address": "2408:4321:180:1701:94c7:bc38:3bfa:***",
                    "Primary": false
                  }
                ]
              },
              "MacAddress": "00:16:3e:32:b4:**",
              "NetworkInterfaceId": "eni-2zeh9atclduxvf1z****",
              "PrimaryIpAddress": "172.17.**.***",
              "PrivateIpSets": {
                "PrivateIpSet": [
                  {
                    "Primary": true,
                    "PrivateDnsName": "dnsTestName",
                    "PrivateIpAddress": "172.17.**.**"
                  }
                ]
              },
              "Type": "Primary"
            }
          ]
        },
        "OSName": "CentOS  7.4 64 位",
        "OSNameEn": "CentOS  7.4 64 bit",
        "OSType": "linux",
        "OperationLocks": {
          "LockReason": [
            {
              "LockMsg": "The specified instance is locked due to financial reason.",
              "LockReason": "Recycling"
            }
          ]
        },
        "PrivateDnsNameOptions": {
          "EnableInstanceIdDnsAAAARecord": false,
          "EnableInstanceIdDnsARecord": false,
          "EnableIpDnsARecord": true,
          "EnableIpDnsPtrRecord": true,
          "HostnameType": "Custom"
        },
        "PublicIpAddress": {
          "IpAddress": [
            "121.40.**.**"
          ]
        },
        "RdmaIpAddress": {
          "IpAddress": [
            "10.10.10.102"
          ]
        },
        "Recyclable": false,
        "RegionId": "cn-hangzhou",
        "ResourceGroupId": "rg-bp67acfmxazb4p****",
        "SaleCycle": "month",
        "SecurityGroupIds": {
          "SecurityGroupId": [
            "sg-bp67acfmxazb4p****"
          ]
        },
        "SecurityOptions": {
          "EnableSecureBoot": false
        },
        "SerialNumber": "51d1353b-22bf-4567-a176-8b3e12e4****",
        "SpotDuration": 1,
        "SpotInterruptionBehavior": "Terminate",
        "SpotPriceLimit": 0.98,
        "SpotStrategy": "NoSpot",
        "StartTime": "2017-12-10T04:04Z",
        "Status": "Running",
        "StoppedMode": "KeepCharging",
        "Tags": {
          "Tag": [
            {
              "TagKey": "TestKey",
              "TagValue": "TestValue"
            }
          ]
        },
        "VlanId": "10",
        "VpcAttributes": {
          "NatIpAddress": "172.17.**.**",
          "PrivateIpAddress": {
            "IpAddress": [
              "172.17.**.**"
            ]
          },
          "VSwitchId": "vsw-2zeh0r1pabwtg6wcs****",
          "VpcId": "vpc-2zeuphj08tt7q3brd****"
        },
        "ZoneId": "cn-hangzhou-g"
      }
    ]
  },
  "NextToken": "caeba0bbb2be03f84eb48b699f0a4883",
  "PageNumber": 1,
  "PageSize": 10,
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "TotalCount": 1
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidTag.Mismatch The specified Tag.n.Key and Tag.n.Value are not match. The specified Tag.N.Key and Tag.N.Value parameters do not correspond to each other.
400 InvalidTagCount The specified tags are beyond the permitted range. The number of specified tags exceeds the upper limit.
400 InvalidHpcClusterId.NotFound The specified HpcClusterId is not found. The specified HpcClusterId parameter does not exist.
400 InvalidHpcClusterId.Creating The specified HpcClusterId is creating. The specified HPC cluster is being created.
400 InternalError The request processing has failed due to some unknown error, exception or failure.
400 Throttling.PageNumberLimited Request throttled. Please use NextToken instead of PageNumber for pagination. The current request has been throttling, please use NextToken alternative PageNumber method for paging query.
404 InvalidInstanceChargeType.NotFound The InstanceChargeType does not exist in our records.
404 InvalidInternetChargeType.ValueNotSupported The specified InternetChargeType is not valid.
404 InvalidLockReason.NotFound The specified LockReason is not found. The specified lockout reason does not exist.
404 InvalidFilterKey.NotFound Invalid filter.%s. The specified Filter.N.Key is invalid.
404 InvalidFilterValue Invalid filter.%s.
404 InvalidNetworkType.NotFound The specified InstanceNetworkType is not found.
404 InvalidStatus.NotFound The specified Status is not found.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.