Skip to main content

DescribeInstances

Description

call the DescribeInstances to query the details of one or more ECS instances.

Request Method

POST

Request Path

/apsara/route/Ecs/DescribeInstances

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
InnerIpAddressesBODYstringNo["10.1.1.1", "10.1.2.1 ",… "10.1.10.1"]Intranet IP list of classic network type instances. This takes effect when InstanceNetworkType = classic. The value can be composed of multiple IP addresses to form a JSON array, which supports up to 100 IP addresses. The IP addresses are separated by commas (,).
AdditionalAttributes.NBODYrepeatlistNoMETA_OPTIONSother attribute values. The value range of n is 1~20.
PageSizeBODYintegerNo10the number of rows per page set during paging query. maximum value: 100. default value: 10.
PrivateIpAddressesBODYstringNo["172.16.1.1", "172.16.2.1 ",… "172.16.10.1"]the private IP of the VPC network type instance. When the InstanceNetworkType is set to vpc, the value can be composed of multiple IP addresses to form a JSON array. The maximum number of IP addresses is 100. The IP addresses are separated by commas (,).
ResourceGroupIdBODYstringNorg-bp67acfmxazb4p****ID of the enterprise resource group where the instance is located.
InstanceTypeFamilyBODYstringNoecs.g5the specification family of the instance.
DryRunBODYbooleanNofalsewhether to precheck only this request. Value range: true: sends a check request and does not query the resource status. Check items include whether the AccessKey is valid, the authorization status of RAM users, and whether required parameters are filled in. If the check fails, the corresponding error is returned. If the check passes, the error code DryRunOperation will be returned. false (default): sends a normal request, returns a 2XX HTTP status code after checking, and directly queries the resource status.
InstanceNetworkTypeBODYstringNovpcinstance network type. Value range: classic: Classic Network vpc: VPC
PageNumberBODYintegerNo1page number of instance status list. starting value: 1. default value: 1.
Tag.N.ValueBODYstringNoTestValuethe tag value of the instance. The value range of n is 1~20.
ImageIdBODYstringNom-bp67acfmxazb4p****mirror ID.
PublicIpAddressesBODYstringNo["42.1.1.**", "42.1.2 .**",… "42.1.10.**"]Description This parameter is not currently supported.
RdmaIpAddressesBODYstringNo10.10.10.102Rdma network IP of HPC instance.
InstanceIdsBODYstringNo["i-bp67acfmxazb4p****", "i-bp67acfmxazb4p ****",… "i-bp67acfmxazb4p****"]instance ID. The value can be composed of multiple instance IDs to form a JSON array. Up to 100 IDs are supported. The IDs are separated by commas (,).
LockReasonBODYstringNosecuritythe reason why the resource is locked.
InstanceTypeBODYstringNoecs.g5.largeinstance specification.
StatusBODYstringNoRunninginstance status. Value range: Running: Running Starting: Startup Stopping: Stopping Stopped: Stopped
KeyPairNameBODYstringNotest-KeyPairNamethe name of the SSH key pair used by the instance.
IoOptimizedBODYbooleanNotrueis it an I/O optimized instance.
Tag.N.KeyBODYstringNoTestKeythe tag key of the instance. The value range of n is 1~20.
ZoneIdBODYstringNocn-qingdao-env17-amtest11001-azone ID.
HpcClusterIdBODYstringNohpc-bp67acfmxazb4p****HPC cluster ID where the instance is located.
VSwitchIdBODYstringNovsw-bp67acfmxazb4p****switch ID.
SecurityGroupIdBODYstringNosg-bp67acfmxazb4p****The security group to which the instance belongs.
HttpEndpointBODYstringNoenabledwhether to enable the access channel of instance metadata. Value range: enabled: enabled. enabled: enabled. default value: enabled.
versionBODYstringNo2016-01-01version of api
InstanceNameBODYstringNotest-InstanceNameinstance name, which supports fuzzy search using wildcard.
HttpTokensBODYstringNooptionalwhether to force reinforcement mode (IMDSv2) when accessing instance metadata. Value range: is not mandatory. mandatory use. After this value is set, normal mode cannot access instance metadata. default value: optional.
VpcIdBODYstringNov-bp67acfmxazb4p****VPC ID.
EipAddressesBODYstringNo["42.1.1.**", "42.1.2 .**",… "42.1.10.**"]the flexible public network IP list of the instance. This parameter takes effect when InstanceNetworkType = vpc. The value can be a JSON array composed of multiple IP addresses. Up to 100 IP addresses are supported. The IP addresses are separated by commas (,).
regionIdBODYstringYesNo sample value for this parameter.region id
RegionIdBODYstringYescn-qingdao-env17-d01the region ID to which the instance belongs. You can call the DescribeRegions to view the latest Alibaba Cloud region list.

Return data

NameTypeSample valueDescription
RequestIDstring1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DCRequest id

Example

Successful Response example

{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}