DescribeInstances

Updated at:

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

Operation description

Before you begin

  • When you call API operations by using Alibaba Cloud CLI, the values of request parameters of different data types must meet the format requirements. For more information, see CLI parameter format description.

Recommendations

  • You can use the DryRun request parameter to send a dry run request to check parameter validity and authorization status.

  • When performing a paged query for the first page, you only need to set MaxResults to limit the number of returned entries. The NextToken value in the response can be used as the token to query the next page. When performing a paged query for subsequent pages, set the NextToken parameter to the NextToken value returned in the previous response, and set MaxResults to limit the number of returned entries.

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 feature is retired. For more information, see Retirement notice.

vpc

SecurityGroupId

string

No

The security group to which the instance belongs.

sg-bp67acfmxazb4p****

InstanceIds

string

No

The instance IDs. The value can be a JSON array that consists of up to 100 instance IDs. Separate multiple IDs with commas (,).

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

PageNumber

integer

No

Note

This parameter is deprecated. We recommend that you use NextToken and MaxResults to perform paged query operations.

1

PageSize

integer

No

Note

This parameter is deprecated. We recommend that you use NextToken and MaxResults to perform paged query operations.

10

NextToken

string

No

The pagination token. The value is the NextToken parameter value returned from the previous API call.

caeba0bbb2be03f84eb48b699f0a4883

MaxResults

integer

No

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

Default value:

  • If you do not specify this parameter or the specified value is less than 10, the default value is 10.

  • If the specified value is greater than 100, the default value is 100.

10

InnerIpAddresses

string

No

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

Note
  • The classic network feature is retired. For more information, see Retirement notice.

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

PrivateIpAddresses

string

No

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

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

PublicIpAddresses

string

No

The public IP addresses of the instance. The value can be a JSON array that consists of up to 100 IP addresses. Separate multiple IP addresses with commas (,).

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

EipAddresses

string

No

The elastic IP addresses (EIPs) of the instance. This parameter takes effect only when InstanceNetworkType is set to vpc. The value can be a JSON array that consists of up to 100 IP addresses. Separate multiple 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 the pay-by-traffic mode, the peak inbound and outbound bandwidths are the upper limits of bandwidth and are not guaranteed. When resource contention occurs, the peak bandwidth may be limited. If your business requires guaranteed bandwidth, use the pay-by-bandwidth mode.

PayByTraffic

InstanceName

string

No

The instance name. You can use the wildcard character (*) for fuzzy search.

Test

ImageId

string

No

The image ID.

m-bp67acfmxazb4p****

Status

string

No

The instance status. Valid values:

  • Pending: The instance is being created.

  • Running: The instance is running.

  • Starting: The instance is starting.

  • Stopping: The instance is stopping.

  • Stopped: The instance is stopped.

Running

LockReason

string

No

The reason why the resource is locked. Valid values:

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

  • security: The resource is locked for security reasons.

  • Recycling: The spot instance is in the pending release state.

  • dedicatedhostfinancial: The ECS instance is locked due to overdue payments for the dedicated host.

  • refunded: The resource is locked due to a refund.

security

Filter.1.Key

string

No

The filter key used to query resources. The value must be CreationStartTime. If you specify both Filter.1.Key and Filter.1.Value, you can query resources created after a specified point in time.

CreationStartTime

Filter.2.Key

string

No

The filter key used to query resources. The value must be CreationEndTime. If you specify both Filter.2.Key and Filter.2.Value, you can query resources created before a specified point in time.

CreationEndTime

Filter.3.Key

string

No

The filter key used to query resources. The value must be ExpiredStartTime. If you specify both Filter.3.Key and Filter.3.Value, you can query resources that expire after a specified point in time.

ExpiredStartTime

Filter.4.Key

string

No

The filter key used to query resources. The value must be ExpiredEndTime. If you specify both Filter.4.Key and Filter.4.Value, you can query resources that expire before a specified point in time.

ExpiredEndTime

Filter.1.Value

string

No

The filter value used to query resources. If you specify this parameter, you must also specify the Filter.1.Key parameter. The value must be in the yyyy-MM-ddTHH:mmZ format and use the UTC+0 time zone.

2017-12-05T22:40Z

Filter.2.Value

string

No

The filter value used to query resources. If you specify this parameter, you must also specify the Filter.2.Key parameter. The value must be in the yyyy-MM-ddTHH:mmZ format and use the UTC+0 time zone.

2017-12-06T22:40Z

Filter.3.Value

string

No

The filter value used to query resources. If you specify this parameter, you must also specify the Filter.3.Key parameter. The value must be in the yyyy-MM-ddTHH:mmZ format and use the UTC+0 time zone.

2017-12-07T22:40Z

Filter.4.Value

string

No

The filter value used to query resources. If you specify this parameter, you must also specify the Filter.4.Key parameter. The value must be in the yyyy-MM-ddTHH:mmZ format and use the UTC+0 time zone.

2017-12-08T22:40Z

DeviceAvailable

boolean

No

Note

This parameter is in invitational preview and is not supported.

false

IoOptimized

boolean

No

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

  • true: yes.

  • false: no.

true

NeedSaleCycle

boolean

No

Note

This parameter is in invitational preview and is not supported.

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 used by the instance.

KeyPairNameTest

ResourceGroupId

string

No

The ID of the enterprise 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 High Performance Computing (HPC) cluster to which the instance belongs.

hpc-bp67acfmxazb4p****

RdmaIpAddresses

string

No

The Remote Direct Memory Access (RDMA) IP addresses of the HPC instance.

10.10.10.102

DryRun

boolean

No

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

  • true: sends a check request. The system does not query resources. The system checks whether your AccessKey pair is valid, the authorization status of the Resource Access Management (RAM) user, and whether the required parameters are specified. If the check fails, the corresponding error is returned. If the check succeeds, the DryRunOperation error code is returned.

  • false: sends a normal request. If the check succeeds, the 2XX HTTP status code is returned and resources are queried.

Default value: false.

false

HttpEndpoint

string

No

Specifies whether to enable the access channel for instance metadata. Valid values:

  • enabled: enables the access channel.

  • disabled: disables the access channel.

Default value: enabled.

Note

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

enabled

HttpTokens

string

No

Specifies whether to forcibly use the security hardening mode (IMDSv2) to access instance metadata. Valid values:

  • optional: does not forcibly use the mode.

  • required: forcibly uses the mode. After you set this value, instance metadata cannot be accessed in normal mode.

Default value: optional.

Note

For more information about the modes of accessing instance metadata, see Access modes of instance metadata.

optional

HttpPutResponseHopLimit

integer

No

Note

This parameter is not available.

0

Ipv6Address

array

No

The IPv6 address specified for the Elastic Network Interface (ENI).

string

No

The IPv6 address of the Elastic Network Interface (ENI). N indicates that multiple IPv6 addresses can be configured. 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.

Note

To improve compatibility, we recommend that you use the Tag.N.Key parameter.

keyTest

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 resource count returned cannot exceed 1,000. If you use multiple tags to filter resources, the resource count of resources that attach all the specified tags cannot exceed 1,000. If the number of resources 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

value

string

No

The tag value.

Note

To improve compatibility, we recommend that you use the Tag.N.Value parameter.

valueTest

AdditionalAttributes

array

No

The additional attributes of the instance.

META_OPTIONS

string

No

The additional attribute value. Valid values of N: 1 to 10. Valid values:

  • META_OPTIONS: instance metadata.

  • DDH_CLUSTER: dedicated host cluster.

  • NETWORK_PRIMARY_ENI_IP: secondary IP addresses of the primary ENI.

  • PRIVATE_DNS_OPTIONS: private domain name information.

  • CPU_OPTIONS_TOPOLOGY_TYPE: CPU topology type of the instance.

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

  • LOGIN_AS_NON_ROOT: whether the instance is configured to allow logons by using the ecs-user account.

  • NESTED_VIRTUALIZATION: whether nested virtualization is enabled for the instance.

  • SECURE_BOOT: whether UEFI Secure Boot is enabled for the instance.

  • CPU_PLATFORM: the CPU platform on which the instance runs. This value is valid only for instances of cross-platform instance types, which currently include only the e instance family.

META_OPTIONS

Response elements

Element

Type

Description

Example

object

NextToken

string

The pagination token returned by this call.

caeba0bbb2be03f84eb48b699f0a4883

PageSize

integer

The number of entries per page specified in the request.

10

PageNumber

integer

The page number.

1

RequestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

TotalCount

integer

The total number of instances returned.

Note

When you use the paging parameters MaxResults and NextToken to perform a paged query, the returned TotalCount value is meaningless.

1

Instances

object

Instance

array<object>

An array of instances that contains instance information.

array<object>

CreationTime

string

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

2017-12-10T04:04Z

SerialNumber

string

The serial number of the instance.

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

Status

string

The instance status.

Running

DeploymentSetId

string

The ID of the deployment set.

ds-bp67acfmxazb4p****

KeyPairName

string

The name of the key pair.

testKeyPairName

SaleCycle

string

Note

[Deprecated] This parameter is deprecated and no longer returns meaningful data.

month

SpotStrategy

string

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

  • NoSpot: normal pay-as-you-go instance

  • SpotWithPriceLimit: spot instance with a maximum price limit

  • SpotAsPriceGo: spot instance whose price is automatically set by the system up to the pay-as-you-go price

NoSpot

DeviceAvailable

boolean

Indicates whether the instance can have a data disk attached. Valid values:

  • true: The instance can have a data disk attached.

  • false: The instance cannot have a data disk attached.

true

LocalStorageCapacity

integer

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

1000

Description

string

The description of the instance.

testDescription

SpotDuration

integer

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

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

  • 0: Alibaba Cloud does not guarantee that the instance will run for 1 hour after it is created. The system automatically compares the bid price with the marketplace price and checks resource inventory to determine whether to retain or revoke the instance.

Alibaba Cloud sends you a notification through an ECS system event 5 minutes before the instance is revoked. Spot instances use per-second billing. We recommend that you select an appropriate protection period based on the execution duration of your specific tasks.

Note

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

1

InstanceNetworkType

string

The network type of the instance. Valid values:

  • vpc: The instance is connected to a virtual private cloud (VPC).

  • classic: The instance is connected to the classic network. The classic network feature has been retired. For more information, see Retirement announcement.

vpc

InstanceName

string

Instance name

InstanceNameTest

OSNameEn

string

The English name of the operating system of the instance.

CentOS 7.4 64 bit

HpcClusterId

string

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

hpc-bp67acfmxazb4p****

SpotPriceLimit

number

The maximum hourly price of the instance. This parameter supports up to three decimal places and takes effect only when the SpotStrategy parameter is set to SpotWithPriceLimit.

0.98

Memory

integer

The memory size of the instance. Unit: MiB.

16384

OSName

string

The name of the operating system of the instance.

CentOS 7.4 64-bit

DeploymentSetGroupNo

integer

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

1

ImageId

string

The ID of the image that the instance is running.

m-bp67acfmxazb4p****

VlanId

string

The VLAN ID of the instance.

Note

[Deprecated] This parameter is being deprecated. To improve compatibility, use other parameters instead.

10

ClusterId

string

The ID of the cluster to which the instance belongs.

Note

[Deprecated] This parameter is being deprecated. To improve compatibility, use other parameters instead.

c-bp67acfmxazb4p****

ClockOptions

object

PtpStatus

string

GPUSpec

string

The GPU type provided by the instance type.

NVIDIA V100

AutoReleaseTime

string

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

2017-12-10T04:04Z

DeletionProtection

boolean

The release protection attribute of the instance, which specifies whether the instance can be released through the console or the DeleteInstance API operation. Valid values:

  • true: Release protection is enabled for the instance.

  • false: Release protection is disabled for the instance.

Note

This attribute applies only to pay-as-you-go instances and restricts only manual release operations. It does not take effect on system release operations.

false

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, and inventory resources are reserved for you.

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

  • Not-applicable: The instance does not support the economical mode.

KeepCharging

GPUAmount

integer

The number of GPUs provided by the instance type.

4

HostName

string

The hostname of the instance.

testHostName

InstanceId

string

The instance ID.

i-bp67acfmxazb4p****

InternetMaxBandwidthOut

integer

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

5

InternetMaxBandwidthIn

integer

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

50

InstanceType

string

The instance type.

ecs.g5.large

InstanceChargeType

string

The billing method of the instance. Valid values:

  • PrePaid: subscription

  • PostPaid: pay-as-you-go

PostPaid

RegionId

string

The region ID of the instance.

cn-hangzhou

IoOptimized

boolean

Indicates 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

StartTime

string

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

2017-12-10T04:04Z

Cpu

integer

The number of vCPUs.

8

LocalStorageAmount

integer

The number of local storage devices attached to the instance.

2

ExpiredTime

string

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

2017-12-10T04:04Z

ResourceGroupId

string

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

rg-bp67acfmxazb4p****

InternetChargeType

string

The network billing method. Valid values:

  • PayByBandwidth: pay-by-bandwidth

  • PayByTraffic: pay-by-traffic

PayByTraffic

ZoneId

string

The zone to which the instance belongs.

cn-hangzhou-g

Recyclable

boolean

Indicates whether the instance can be reclaimed.

false

ISP

string

Note

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

null

CreditSpecification

string

The running mode of the burstable instance. Valid values:

  • Standard: The instance runs in standard mode. For more information about instance performance, see the "Standard mode" section in Overview of burstable instances.

  • Unlimited: The instance runs in unlimited mode. For more information about instance performance, see the "Unlimited mode" section in Overview of burstable instances.

Standard

InstanceTypeFamily

string

The instance family.

ecs.g5

OSType

string

The operating system type of the instance. Valid values:

  • windows: Windows Server

  • linux: Linux

linux

NetworkInterfaces

object

NetworkInterface

array<object>

The collection of elastic network interface controllers (NICs) attached to the instance.

array<object>

The collection of elastic network interface controllers (NICs) attached to the instance.

Type

string

The type of the elastic network interface controller (NIC). Valid values:

  • Primary: primary network interface controller (NIC)

  • Secondary: secondary elastic network interface controller (NIC)

Primary

MacAddress

string

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

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

PrimaryIpAddress

string

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

172.17.**.***

NetworkInterfaceId

string

The ID of the elastic network interface controller (NIC).

eni-2zeh9atclduxvf1z****

PrivateIpSets

object

PrivateIpSet

array<object>

The collection of PrivateIpSet items.

object

PrivateIpAddress

string

The private IP address of the instance.

172.17.**.**

Primary

boolean

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

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

  • false: The private 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 the HostnameType parameter is set to IpBased or InstanceIdBased.

dnsTestName

Ipv6Sets

object

Ipv6Set

array<object>

The allocated IPv6 addresses of the elastic 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 allocated IPv6 address of the elastic network interface controller (NIC).

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

Primary

boolean

Ipv4PrefixSets

object

Ipv4PrefixSet

array<object>

The allocated IPv4 prefixes of the elastic 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 allocated to the Elastic Network Interface (ENI).

192.168.*.*/28

Ipv6PrefixSets

object

Ipv6PrefixSet

array<object>

The allocated IPv6 prefixes of the elastic 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 allocated to the Elastic Network Interface (ENI).

2001:1111:*:*::/80

OperationLocks

object

LockReason

array<object>

The reasons why the instance is locked.

object

LockMsg

string

The detailed message about the instance lock.

The specified instance is locked due to financial reason.

LockReason

string

The lock type. Valid values:

  • financial: The instance is locked due to overdue payments.

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

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

  • dedicatedhostfinancial: The ECS instance is locked due to overdue payments for the dedicated host.

  • refunded: The instance is locked due to a refund.

Recycling

Tags

object

Tag

array<object>

The tags of the instance.

object

TagValue

string

The tag value of the instance.

TestValue

TagKey

string

The tag key of the instance.

TestKey

RdmaIpAddress

object

IpAddress

array

The RDMA IP addresses of the HPC instance.

string

The Remote Direct Memory Access (RDMA) IP addresses of the HPC instance.

10.10.10.102

SecurityGroupIds

object

SecurityGroupId

array

The IDs of the security groups to which the instance belongs.

string

The security group ID.

sg-bp67acfmxazb4p****

PublicIpAddress

object

IpAddress

array

The list of public IP addresses of the instance.

string

The public IP address of the instance.

121.40.**.**

InnerIpAddress

object

IpAddress

array

The list of internal network IP addresses of instances of the classic network type.

Note

The classic network feature is offline. For details, see Offline announcement.

string

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

10.170.**.**

VpcAttributes

object

The VPC attributes.

VpcId

string

The ID of the virtual private cloud (VPC).

vpc-2zeuphj08tt7q3brd****

NatIpAddress

string

The IP address of the cloud service, which is used for network interconnection between cloud services in a VPC.

172.17.**.**

VSwitchId

string

The vSwitch ID.

vsw-2zeh0r1pabwtg6wcs****

PrivateIpAddress

object

IpAddress

array

The list of private IP addresses.

string

The private IP address.

172.17.**.**

EipAddress

object

The information about the associated Elastic IP Address (EIP).

IsSupportUnassociate

boolean

Specifies whether the instance can disassociate from an EIP for Internet access.

true

InternetChargeType

string

The billing method of the EIP. Valid values:

  • PayByBandwidth: pay-by-bandwidth.

  • PayByTraffic: pay-by-traffic.

PayByTraffic

IpAddress

string

The EIP.

42.112.**.**

Bandwidth

integer

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

5

AllocationId

string

The ID of the EIP.

eip-2ze88m67qx5z****

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

DedicatedHostAttribute

object

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

DedicatedHostId

string

The ID of the dedicated host.

dh-bp67acfmxazb4p****

DedicatedHostName

string

The name of the dedicated host.

testDedicatedHostName

DedicatedHostClusterId

string

The ID of the dedicated host cluster.

dc-bp67acfmxazb4h****

EcsCapacityReservationAttr

object

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

CapacityReservationPreference

string

The capacity reservation preference.

cr-bp67acfmxazb4p****

CapacityReservationId

string

The ID of the capacity reservation.

cr-bp67acfmxazb4p****

DedicatedInstanceAttribute

object

The attributes of the dedicated instance.

Affinity

string

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

  • default: The instance is not associated with the dedicated host. After a pay-as-you-go instance in economical mode is restarted, it may be placed on another dedicated host in the automatic resource deployment pool.

  • host: The instance is associated with the dedicated host. After a pay-as-you-go instance in economical mode is restarted, it is still placed on the original dedicated host.

default

Tenancy

string

Specifies whether the instance is hosted on a dedicated host. Valid values:

  • default: The instance is not hosted on a dedicated host.

  • host: The instance is hosted on a dedicated host.

default

CpuOptions

object

The CPU configuration details.

Numa

string

[Deprecated]

null

CoreCount

integer

The number of physical CPU cores.

2

ThreadsPerCore

integer

The number of CPU threads per core.

2

TopologyType

string

The CPU topology type of the instance. Valid values:

  • ContinuousCoreToHTMapping: HT discrete mode.

  • DiscreteCoreToHTMapping: HT continuous mode.

DiscreteCoreToHTMapping

EnableVISST

boolean

TurboMode

string

EnableVRDT

boolean

NestedVirtualization

string

Specifies whether nested virtualization is enabled.

Valid values:

  • enabled
  • disabled

enabled

MetadataOptions

object

The metadata options.

HttpEndpoint

string

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

  • enabled: Enabled.

  • disabled: Disabled.

enabled

HttpPutResponseHopLimit

integer

Note

This parameter is not supported.

0

HttpTokens

string

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

  • optional: Not required.

  • required: Required.

optional

InstanceMetadataTags

string

ImageOptions

object

The image attributes.

LoginAsNonRoot

boolean

Specifies whether instances that use this image support logon as the ecs-user user. Valid values:

  • true: Yes.

  • false: No.

false

CurrentOSNVMeSupported

boolean

Specifies whether the current operating system supports accessing disks through the NVMe protocol. Valid values:

  • true: Yes.

  • false: No.

Note

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

true

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

PrivateDnsNameOptions

object

The private DNS name options of the instance.

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

Note

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

EnableInstanceIdDnsARecord

boolean

Specifies whether to enable or disable the resolution of instance ID-based domain names to IPv4 addresses. Valid values:

  • true: Enabled.

  • false: Disabled.

Default value: false.

false

EnableInstanceIdDnsAAAARecord

boolean

Specifies whether to enable or disable the resolution of instance ID-based domain names to IPv6 addresses. Valid values:

  • true: Enabled.

  • false: Disabled.

Default value: false.

false

EnableIpDnsARecord

boolean

Specifies whether to enable or disable the resolution of IP-based domain names to IPv4 addresses. Valid values:

  • true: Enabled.

  • false: Disabled.

Default value: false.

true

EnableIpDnsPtrRecord

boolean

Specifies whether to enable or disable the reverse resolution of IPv4 addresses to IP-based domain names. 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

AdditionalInfo

object

Note

This parameter is in invitational preview and is not supported.

EnableHighDensityMode

boolean

Note

This parameter is in invitational preview and is not supported.

true

NodeSerialNumber

string

ManagedHostId

string

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

mh-f2d3647ca21****

EnableNVS

boolean

SecurityOptions

object

EnableSecureBoot

boolean

Specifies whether to enable or disable UEFI Secure Boot. Valid values:

  • true: Enabled.

  • false: Disabled.

Note

This parameter is returned only when the request parameter AdditionalAttributes includes SECURE_BOOT.

true

Examples

Success response

JSON format

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

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.