Query instance messages

Last Updated: Jul 25, 2017

Description

Query the detailed information of a specified instance.

Request Parameters

Name Type Required Description
Action String Yes Required parameter, with a value: DescribeInstanceAttribute.
InstanceId String Yes ID of an instance.

Return Parameters

Name Type Description
InstanceId String ID of an instance.
InstanceName String Display name of an instance.
Description String Description of an instance.
ImageId String ID of an image.
RegionId String ID of the region to which an instance belongs.
ZoneId String ID of the zone to which an instance belongs.
ClusterId String ID of the cluster to which ECS belongs.
InstanceType String Type of an instance.
HostName String Host name of an instance.
Status String Status of the instance.
OperationLocks OperationLocksType List of operation lock reasons.
SecurityGroupIds SecurityGroupIdSetType SecurityGroupIdSetType, a set of security groups to which an instance belongs.
At present, one instance can belong to only one security group.
PublicIpAddress IpAddressSetType Public IP address of an instance.
InnerIpAddress IpAddressSetType Intranet IP address of an instance.
InternetMaxBandwidthIn Integer Maximum incoming bandwidth from the public network.
InternetMaxBandwidthOut Integer Maximum outgoing bandwidth to the public network.
InternetChargeType String Internet charge type, which can be PayByBandwidth or PayByTraffic. The value is PayByBandwidth for a prepaid instance.
  • PayByTraffic: pay by traffic.
  • PayByBandwidth: pay by bandwidth.
CreationTime String Creation time, which is represented according to ISO8601, and UTC is required. Format:
YYYY-MM-DDThh:mmZ

Error Code

Error Code Description Http status code Meaning
InvalidInstanceId.NotFound The InstanceId provided does not exist in our records. 404 The specified InstanceId does not exist.
MissingParameter The input parameter InstanceId that is mandatory for processing this request is not supplied. 400 InstanceId value missing.
InternalError The request processing has failed due to some unknown error. 500 Internal error.

Examples

Request Example

  1. https://ecs.aliyuncs.com/?Action=DescribeInstanceAttribute
  2. &InstanceId=i-instance1
  3. &<Public Request Parameters>

Return Example

XML format

  1. <DescribeInstanceAttributeResponse>
  2. <InternetChargeType>PayByBandwidth</InternetChargeType>
  3. <CreationTime>2014-07-23T10:27:31Z</CreationTime>
  4. <Description></Description>
  5. <HostName>iZ111222333jZ</HostName>
  6. <ImageId>m-23vhbgzbe</ImageId>
  7. <InnerIpAddress>
  8. <IpAddress>10.171.254.1</IpAddress>
  9. </InnerIpAddress>
  10. <InstanceId>i-111222333</InstanceId>
  11. <InstanceName>iZ23r29djmjZ</InstanceName>
  12. <InstanceType>ecs.t1.small</InstanceType>
  13. <InternetMaxBandwidthIn>-1</InternetMaxBandwidthIn>
  14. <InternetMaxBandwidthOut>0</InternetMaxBandwidthOut>
  15. <ZoneId>cn-hangzhou-d</ZoneId>
  16. <OperationLocks></OperationLocks>
  17. <PublicIpAddress></PublicIpAddress>
  18. <RegionId>cn-hangzhou</RegionId>
  19. <SecurityGroupIds>
  20. <SecurityGroupId>sg-group</SecurityGroupId>
  21. </SecurityGroupIds>
  22. <SerialNumber>51d1353b-22bf-4567-a176-8b3e12e43135</SerialNumber>
  23. <Status>Running</Status>
  24. <VlanId></VlanId>
  25. <ClusterId></ClusterId>
  26. <RequestId>83EBE72D-96FC-41DB-8D5F-255B647FF705</RequestId>
  27. </DescribeInstanceAttributeResponse>

JSON format

  1. {
  2. "ClusterId": "",
  3. "CreationTime": "2014-07-23T10:27:31Z",
  4. "Description": "",
  5. "HostName": "iZ23r29djmjZ",
  6. "ImageId": "m-23vhbgzbe",
  7. "InnerIpAddress": {
  8. "IpAddress": [
  9. "10.171.254.1"
  10. ]
  11. },
  12. "InstanceId": "i-111222333",
  13. "InstanceName": "iZ111222333Z",
  14. "InstanceType": "ecs.t1.small",
  15. "InternetChargeType": "PayByBandwidth",
  16. "InternetMaxBandwidthIn": -1,
  17. "InternetMaxBandwidthOut": 0,
  18. "OperationLocks": {
  19. "OperationLock": []
  20. },
  21. "PublicIpAddress": {
  22. "IpAddress": []
  23. },
  24. "RegionId": "cn-hangzhou",
  25. "RequestId": "597F0C16-D1FB-4227-9D15-7A434285C8AA",
  26. "SecurityGroupIds": {
  27. "SecurityGroupId": [
  28. "sg-group"
  29. ]
  30. },
  31. "SerialNumber": "51d1353b-22bf-4567-a176-8b3e12e43135",
  32. "Status": "Running",
  33. "VlanId": "",
  34. "ZoneId": "cn-hangzhou-d"
  35. }
Thank you! We've received your feedback.