This API is used to query the attribute information of a specified ECS instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeInstanceAttribute |
get |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
i-uf6f5trc95ug8t33**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Status |
string |
The status of the instance. Valid values:
|
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:mm:ssZ 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 |
The instance name. |
testInstanceName |
| InstanceNetworkType |
string |
The network type of the instance. Valid values:
|
vpc |
| Memory |
integer |
The memory size of the instance. 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 removed in the future. To ensure future compatibility, we recommend that you use other parameters. |
cls-bp67acfmxazb4p**** |
| VlanId |
string |
The virtual LAN (VLAN) ID of the instance. Note
This parameter will be removed in the future. To ensure future compatibility, we recommend that you use other parameters. |
10 |
| StoppedMode |
string |
Indicates whether the system implements billing after the instance is stopped. Valid values:
|
KeepCharging |
| HostName |
string |
The hostname of the instance. |
testHostName |
| InstanceId |
string |
The instance ID |
i-uf6f5trc95ug8t33**** |
| InstanceType |
string |
The instance type. |
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 ID of the region in which the instance resides. |
cn-hangzhou |
| InstanceChargeType |
string |
The billing method of the instance. Valid values:
|
PrePaid |
| IoOptimized |
string |
Indicates whether the ECS instance is I/O optimized. Valid values:
|
optimized |
| Cpu |
integer |
The number of vCPUs. |
8 |
| ExpiredTime |
string |
The time when the instance expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. For more information, see ISO 8601. |
2017-12-10T04:04Z |
| ZoneId |
string |
The ID of the zone in which the instance resides. |
cn-hangzhou-g |
| InternetChargeType |
string |
The billing method for network usage. Valid values:
Note
When the pay-by-traffic billing method is used for network usage, the maximum inbound and outbound bandwidths are used as the upper limits of bandwidths instead of guaranteed performance specifications. In scenarios in which demands exceed resource supplies, the maximum bandwidths may not be reached. If you want guaranteed bandwidths for your instance, use the pay-by-bandwidth billing method for network usage. |
PayByTraffic |
| CreditSpecification |
string |
The performance mode of the burstable instance. Valid values:
|
Standard |
| SecurityGroupIds |
object |
||
| SecurityGroupId |
array |
The IDs of the security groups to which the instance belongs. |
|
|
string |
The IDs of the security groups to which the instance belongs. |
sg-bp1fg655nh68xyz9i**** |
|
| PublicIpAddress |
object |
||
| IpAddress |
array |
The public IP address of the instance. |
|
|
string |
The public IP address of the instance. |
121.40.**.** |
|
| InnerIpAddress |
object |
||
| IpAddress |
array |
The internal IP address of the instance located in the classic network. |
|
|
string |
The internal IP address of the instance located in the classic network. |
192.168.**.** |
|
| VpcAttributes |
object |
The VPC attributes of the instance. |
|
| VpcId |
string |
The ID of the VPC. |
vpc-wz9e4e9pmbcnj6ki6**** |
| NatIpAddress |
string |
The NAT IP address of the instance. It is used by ECS instances in different VPCs for communication. |
172.17.**.** |
| VSwitchId |
string |
The ID of the vSwitch to which the instance is connected. |
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) associated with the instance. |
|
| InternetChargeType |
string |
The billing method for network usage. Valid values:
Note
When the pay-by-traffic billing method is used for network usage, the maximum inbound and outbound bandwidths are used as the upper limits of bandwidths instead of guaranteed performance specifications. In scenarios in which demands exceed resource supplies, the maximum bandwidths may not be reached. If you want guaranteed bandwidths for your instance, use the pay-by-bandwidth billing method for network usage. |
PayByTraffic |
| IpAddress |
string |
The ID of the elastic IP address (EIP). |
30.21.**.** |
| Bandwidth |
integer |
The maximum public bandwidth of the EIP. Unit: Mbit/s. |
8 |
| AllocationId |
string |
The ID of the EIP. |
eip-wz9uilio26dfscamm**** |
| DedicatedHostAttribute |
object |
Details about the dedicated host. It is an array that consists of the DedicatedHostClusterId, DedicatedHostId, and DedicatedHostName parameters. |
|
| 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 reason why the instance was locked. Valid values:
|
|
|
object |
The reason why the instance was locked. Valid values:
|
||
| LockReason |
string |
The reason why the instance was locked. Valid values:
|
financial |
| EnableJumboFrame |
boolean |
Indicates whether the Jumbo Frame feature is enabled for the instance. Valid values:
For more information, see MTUs. |
false |
| EnableNetworkEncryption |
boolean |
Indicates whether VPC network traffic encryption is enabled for the instance. Valid values:
Note
This parameter is in invitational preview and is not publicly available yet. |
True |
| NetworkOptions |
object |
Details about network options. Note
This parameter is in invitational preview and is not publicly available. |
|
| EnableJumboFrame |
boolean |
Indicates whether the Jumbo frame attribute is enabled for the instance. Valid values:
For more information, see ECS Instance MTU. Note
This parameter is in invitational preview and is not publicly available yet. |
false |
| EnableNetworkEncryption |
boolean |
Indicates whether VPC network traffic encryption is enabled for the instance. Valid values:
Note
This parameter is in invitational preview and is not publicly available yet. |
False |
| BandwidthWeighting |
string |
The bandwidth weight. The supported values vary with instance types. You can query the bandwidth weights supported by the current instance type by using the DescribeInstanceTypes. Valid values:
Valid values:
|
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.