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
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
InnerIpAddresses | BODY | string | No | ["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.N | BODY | repeatlist | No | META_OPTIONS | other attribute values. The value range of n is 1~20. |
PageSize | BODY | integer | No | 10 | the number of rows per page set during paging query. maximum value: 100. default value: 10. |
PrivateIpAddresses | BODY | string | No | ["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 (,). |
ResourceGroupId | BODY | string | No | rg-bp67acfmxazb4p**** | ID of the enterprise resource group where the instance is located. |
InstanceTypeFamily | BODY | string | No | ecs.g5 | the specification family of the instance. |
DryRun | BODY | boolean | No | false | whether 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. |
InstanceNetworkType | BODY | string | No | vpc | instance network type. Value range: classic: Classic Network vpc: VPC |
PageNumber | BODY | integer | No | 1 | page number of instance status list. starting value: 1. default value: 1. |
Tag.N.Value | BODY | string | No | TestValue | the tag value of the instance. The value range of n is 1~20. |
ImageId | BODY | string | No | m-bp67acfmxazb4p**** | mirror ID. |
PublicIpAddresses | BODY | string | No | ["42.1.1.**", "42.1.2 .**",… "42.1.10.**"] | Description This parameter is not currently supported. |
RdmaIpAddresses | BODY | string | No | 10.10.10.102 | Rdma network IP of HPC instance. |
InstanceIds | BODY | string | No | ["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 (,). |
LockReason | BODY | string | No | security | the reason why the resource is locked. |
InstanceType | BODY | string | No | ecs.g5.large | instance specification. |
Status | BODY | string | No | Running | instance status. Value range: Running: Running Starting: Startup Stopping: Stopping Stopped: Stopped |
KeyPairName | BODY | string | No | test-KeyPairName | the name of the SSH key pair used by the instance. |
IoOptimized | BODY | boolean | No | true | is it an I/O optimized instance. |
Tag.N.Key | BODY | string | No | TestKey | the tag key of the instance. The value range of n is 1~20. |
ZoneId | BODY | string | No | cn-qingdao-env17-amtest11001-a | zone ID. |
HpcClusterId | BODY | string | No | hpc-bp67acfmxazb4p**** | HPC cluster ID where the instance is located. |
VSwitchId | BODY | string | No | vsw-bp67acfmxazb4p**** | switch ID. |
SecurityGroupId | BODY | string | No | sg-bp67acfmxazb4p**** | The security group to which the instance belongs. |
HttpEndpoint | BODY | string | No | enabled | whether to enable the access channel of instance metadata. Value range: enabled: enabled. enabled: enabled. default value: enabled. |
version | BODY | string | No | 2016-01-01 | version of api |
InstanceName | BODY | string | No | test-InstanceName | instance name, which supports fuzzy search using wildcard. |
HttpTokens | BODY | string | No | optional | whether 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. |
VpcId | BODY | string | No | v-bp67acfmxazb4p**** | VPC ID. |
EipAddresses | BODY | string | No | ["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 (,). |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
RegionId | BODY | string | Yes | cn-qingdao-env17-d01 | the region ID to which the instance belongs. You can call the DescribeRegions to view the latest Alibaba Cloud region list. |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
RequestID | string | 1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC | Request id |
Example
Successful Response example
{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}