All Products
Search
Document Center

Elastic Compute Service:DescribeInstanceAttribute

Last Updated:Jun 29, 2026

Queries the attribute information of a specified ECS instance.

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:DescribeInstanceAttribute

get

*Instance

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

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The ID of the instance.

i-uf6f5trc95ug8t33****

Response elements

Element

Type

Description

Example

object

Status

string

The instance status. Valid values:

  • Pending: being created.

  • Running: running.

  • Starting: being started.

  • Stopping: being stopped.

  • Stopped: stopped.

Running

SerialNumber

string

The serial number of the instance.

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

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. For more information, see ISO 8601.

2017-12-10T04:04Z

RequestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

Description

string

The description of the instance.

testDescription

InstanceName

string

Instance name

testInstanceName

InstanceNetworkType

string

The network type of the instance. Valid values:

  • vpc: virtual private cloud (VPC).

  • classic: classic network. The classic network is deprecated. For more information, see Deprecation notice.

vpc

Memory

integer

The memory size. Unit: MiB.

16384

ImageId

string

The ID of the image that the instance is running.

m-bp1h46wfpjsjastc****

ClusterId

string

The ID of the cluster to which the instance belongs.

Note

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

cls-bp67acfmxazb4p****

VlanId

string

The VLAN ID of the instance.

Note

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

10

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 resource availability in the current region.

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

KeepCharging

HostName

string

The hostname of the instance.

testHostName

InstanceId

string

The instance ID.

i-uf6f5trc95ug8t33****

InstanceType

string

The instance type of the instance.

ecs.g5.large

InternetMaxBandwidthIn

integer

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

50

InternetMaxBandwidthOut

integer

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

5

RegionId

string

The region ID of the instance.

cn-hangzhou

InstanceChargeType

string

The billing method of the instance. Valid values:

  • PrePaid: subscription.

  • PostPaid: pay-as-you-go.

PrePaid

IoOptimized

string

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

  • optimized: I/O optimized.

  • none: not I/O optimized.

optimized

Cpu

integer

The number of vCPU cores.

8

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. For more information, see ISO 8601.

2017-12-10T04:04Z

ZoneId

string

The zone ID of the instance.

cn-hangzhou-g

InternetChargeType

string

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 upper limits for bandwidths and are not guaranteed. When resource contention occurs, the peak bandwidths may be limited. If your workloads require guaranteed bandwidth, use the pay-by-bandwidth mode.

PayByTraffic

CreditSpecification

string

The running mode of the burstable instance. Valid values:

  • Standard: standard mode. For more information about instance performance, see Performance mode.

  • Unlimited: unlimited mode. For more information about instance performance, see Performance mode.

Standard

SecurityGroupIds

object

SecurityGroupId

array

The security groups to which the instance belongs.

string

The security group to which the instance belongs.

sg-bp1fg655nh68xyz9i****

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 classic network type instances.

Note

The classic network is deprecated. For more information, see Deprecation notice.

string

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

192.168.**.**

VpcAttributes

object

The VPC attributes.

VpcId

string

The VPC ID.

vpc-wz9e4e9pmbcnj6ki6****

NatIpAddress

string

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

172.17.**.**

VSwitchId

string

The vSwitch ID.

vsw-uf6ixacqz8osrwnqb****

PrivateIpAddress

object

IpAddress

array

The private IP address of the instance.

string

The private IP address of the instance.

192.168.**.**

EipAddress

object

The Elastic IP Address (EIP) binding information.

InternetChargeType

string

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 upper limits for bandwidths and are not guaranteed. When resource contention occurs, the peak bandwidths may be limited. If your workloads require guaranteed bandwidth, use the pay-by-bandwidth mode.

PayByTraffic

IpAddress

string

The EIP.

30.21.**.**

Bandwidth

integer

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

8

AllocationId

string

The ID of the EIP.

eip-wz9uilio26dfscamm****

DedicatedHostAttribute

object

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

DedicatedHostName

string

The name of the dedicated host.

ecs-autoui-create-ddh-temp

DedicatedHostId

string

The ID of the dedicated host.

dh-2ze7qrzz6lvbfhr0****

OperationLocks

object

LockReason

array<object>

The list of lock reasons.

object

The lock reason.

LockReason

string

The reason why the instance was locked. Valid values:

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

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

  • recycling: The spot instance was locked and pending release.

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

  • refunded: The instance was locked because a refund is made for the instance.

financial

EnableJumboFrame

boolean

Indicates whether the Jumbo Frame feature is enabled for the ECS instance. Valid values:

  • true: enabled.

  • false: not enabled.

For more information, see ECS instance MTU.

false

EnableNetworkEncryption

boolean

Indicates whether VPC network traffic encryption is enabled for the instance. Valid values:

  • true: enabled.

  • false: not enabled.

Note

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

True

NetworkOptions

object

The network-related attributes.

Note

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

EnableJumboFrame

boolean

Indicates whether the Jumbo Frame feature is enabled for the instance. Valid values:

  • true: enabled.

  • false: not enabled.

For more information, see ECS instance MTU.

Note

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

false

EnableNetworkEncryption

boolean

Indicates whether VPC network traffic encryption is enabled for the instance. Valid values:

  • true: enabled.

  • false: not enabled.

Note

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

False

BandwidthWeighting

string

The bandwidth weight.

Different instance types support different values. Call DescribeInstanceTypes to query the bandwidth weight values supported by the current instance type.

Valid values:

  • Vpc-L1 :

    Vpc-L1

  • Vpc-L2 :

    Vpc-L2

  • Ebs-L1 :

    Ebs-L1

  • Ebs-L2 :

    Ebs-L2

  • Default :

    Default

Vpc-L1

Examples

Success response

JSON format

{
  "Status": "Running",
  "SerialNumber": "51d1353b-22bf-4567-a176-8b3e12e4****",
  "CreationTime": "2017-12-10T04:04Z",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
  "Description": "testDescription",
  "InstanceName": "testInstanceName",
  "InstanceNetworkType": "vpc",
  "Memory": 16384,
  "ImageId": "m-bp1h46wfpjsjastc****",
  "ClusterId": "cls-bp67acfmxazb4p****",
  "VlanId": "10",
  "StoppedMode": "KeepCharging",
  "HostName": "testHostName",
  "InstanceId": "i-uf6f5trc95ug8t33****",
  "InstanceType": "ecs.g5.large",
  "InternetMaxBandwidthIn": 50,
  "InternetMaxBandwidthOut": 5,
  "RegionId": "cn-hangzhou",
  "InstanceChargeType": "PrePaid",
  "IoOptimized": "optimized",
  "Cpu": 8,
  "ExpiredTime": "2017-12-10T04:04Z",
  "ZoneId": "cn-hangzhou-g",
  "InternetChargeType": "PayByTraffic",
  "CreditSpecification": "Standard",
  "SecurityGroupIds": {
    "SecurityGroupId": [
      "sg-bp1fg655nh68xyz9i****"
    ]
  },
  "PublicIpAddress": {
    "IpAddress": [
      "121.40.**.**"
    ]
  },
  "InnerIpAddress": {
    "IpAddress": [
      "192.168.**.**"
    ]
  },
  "VpcAttributes": {
    "VpcId": "vpc-wz9e4e9pmbcnj6ki6****",
    "NatIpAddress": "172.17.**.**",
    "VSwitchId": "vsw-uf6ixacqz8osrwnqb****",
    "PrivateIpAddress": {
      "IpAddress": [
        "192.168.**.**"
      ]
    }
  },
  "EipAddress": {
    "InternetChargeType": "PayByTraffic",
    "IpAddress": "30.21.**.**",
    "Bandwidth": 8,
    "AllocationId": "eip-wz9uilio26dfscamm****"
  },
  "DedicatedHostAttribute": {
    "DedicatedHostName": "ecs-autoui-create-ddh-temp",
    "DedicatedHostId": "dh-2ze7qrzz6lvbfhr0****"
  },
  "OperationLocks": {
    "LockReason": [
      {
        "LockReason": "financial"
      }
    ]
  },
  "EnableJumboFrame": false,
  "EnableNetworkEncryption": true,
  "NetworkOptions": {
    "EnableJumboFrame": false,
    "EnableNetworkEncryption": true,
    "BandwidthWeighting": "Vpc-L1"
  }
}

Error codes

HTTP status code

Error code

Error message

Description

500 InternalError The request processing has failed due to some unknown error.
404 InvalidInstanceId.NotFound The specified InstanceId does not exist. The specified instanceId is invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.