文档

DescribeInstanceAttribute - 查询实例所有属性信息

更新时间:

调用DescribeInstanceAttribute查询单个ECS实例详情。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
ecs:DescribeInstanceAttributeREAD
  • Instance
    acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}
  • ecs:tag

请求参数

名称类型必填描述示例值
InstanceIdstring

指定实例的 ID。

i-uf6f5trc95ug8t33****

返回参数

名称类型描述示例值
object
Statusstring

实例状态。取值范围:

  • Pending:创建中。
  • Running:运行中。
  • Starting:启动中。
  • Stopping:停止中。
  • Stopped:已停止。
Running
SerialNumberstring

实例序列号。

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

实例创建时间。以 ISO 8601 为标准,并使用 UTC+0 时间,格式为 yyyy-MM-ddTHH:mmZ。更多信息,请参见ISO 8601

2017-12-10T04:04Z
RequestIdstring

请求 ID。

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

实例描述。

testDescription
InstanceNamestring

实例名称。

testInstanceName
InstanceNetworkTypestring

实例网络类型。取值范围:

  • classic:经典网络。
  • vpc:专有网络 VPC。
vpc
Memoryinteger

内存大小,单位为 MiB。

16384
ImageIdstring

实例运行的镜像 ID。

m-bp1h46wfpjsjastc****
ClusterIdstring

实例所在的集群 ID。

说明 该参数即将被弃用,为提高兼容性,请尽量使用其他参数。
cls-bp67acfmxazb4p****
VlanIdstring

实例的 VLAN ID。

说明 该参数即将被弃用,为提高兼容性,请尽量使用其他参数。
10
StoppedModestring

实例停机后是否继续收费。可能值:

  • KeepCharging:停机后继续收费,为您继续保留库存资源。
  • StopCharging:停机后不收费。停机后,我们释放实例对应的资源,例如 vCPU、内存和公网 IP 等资源。重启是否成功依赖于当前地域中是否仍有资源库存。
  • Not-applicable:本实例不支持停机不收费功能。
KeepCharging
HostNamestring

实例主机名。

testHostName
InstanceIdstring

实例 ID。

i-uf6f5trc95ug8t33****
InstanceTypestring

实例的规格。

ecs.g5.large
InternetMaxBandwidthIninteger

公网入带宽最大值,单位为 Mbit/s。

50
InternetMaxBandwidthOutinteger

公网出带宽最大值,单位为 Mbit/s。

5
RegionIdstring

实例所属地域 ID。

cn-hangzhou
InstanceChargeTypestring

实例的计费方式。可能值:

  • PrePaid:包年包月。
  • PostPaid:按量付费。
PrePaid
IoOptimizedstring

是否是 I/O 优化型实例。

true
Cpuinteger

vCPU 处理器核心数量。

8
ExpiredTimestring

过期时间。以 ISO 8601 为标准,并使用 UTC+0 时间,格式为 yyyy-MM-ddTHH:mmZ。更多信息,请参见ISO 8601

2017-12-10T04:04Z
ZoneIdstring

实例所属可用区。

cn-hangzhou-g
InternetChargeTypestring

公网带宽计费方式。可能值:

  • PayByBandwidth:按固定带宽计费。
  • PayByTraffic:按使用流量计费。
说明 按使用流量计费模式下的出入带宽峰值都是带宽上限,不作为业务承诺指标。当出现资源争抢时,带宽峰值可能会受到限制。如果您的业务需要有带宽的保障,请使用按固定带宽计费模式。
PayByTraffic
CreditSpecificationstring

突发性能实例的运行模式。可能值:

  • Standard:标准模式。有关实例性能的更多信息,请参见性能模式
  • Unlimited:无性能约束模式,有关实例性能的更多信息,请参见性能模式
Standard
SecurityGroupIdsarray

实例所属安全组集合。

string

实例所属安全组集合。

sg-bp1fg655nh68xyz9i****
PublicIpAddressarray

实例公网 IP 地址。

string

实例公网 IP 地址。

121.40.**.**
InnerIpAddressarray

经典网络类型实例的内网 IP 地址。

string

经典网络类型实例的内网 IP 地址。

192.168.**.**
VpcAttributesobject

专有网络 VPC 属性。

VpcIdstring

专有网络 VPC ID。

vpc-wz9e4e9pmbcnj6ki6****
NatIpAddressstring

云产品的 IP,用于 VPC 云产品之间的网络互通。

172.17.**.**
VSwitchIdstring

虚拟交换机 ID。

vsw-uf6ixacqz8osrwnqb****
PrivateIpAddressarray

私有 IP 地址。

string

私有 IP 地址。

192.168.**.**
EipAddressobject

弹性公网 IP 绑定信息。

InternetChargeTypestring

公网带宽计费方式。可能值:

  • PayByBandwidth:按固定带宽计费。
  • PayByTraffic:按使用流量计费。
说明 按使用流量计费模式下的出入带宽峰值都是带宽上限,不作为业务承诺指标。当出现资源争抢时,带宽峰值可能会受到限制。如果您的业务需要有带宽的保障,请使用按固定带宽计费模式。
PayByTraffic
IpAddressstring

弹性公网 IP。

30.21.**.**
Bandwidthinteger

弹性公网 IP 的公网带宽限速,单位为 Mbit/s。

8
AllocationIdstring

弹性公网 IP 的 ID。

eip-wz9uilio26dfscamm****
DedicatedHostAttributeobject

由专有宿主机集群 ID(DedicatedHostClusterId)、专有宿主机 ID(DedicatedHostId)和名称(DedicatedHostName)组成的宿主机属性数组。

DedicatedHostNamestring

专有宿主机的名称。

ecs-autoui-create-ddh-temp
DedicatedHostIdstring

专有宿主机 ID。

dh-2ze7qrzz6lvbfhr0****
OperationLocksobject []

锁定类型。可能值:

  • financial:因欠费被锁定。
  • security:因安全原因被锁定。
  • Recycling:抢占式实例的待释放锁定状态。
  • dedicatedhostfinancial:因为专有宿主机欠费导致 ECS 实例被锁定。
  • refunded:因退款被锁定。
LockReasonstring

锁定类型。可能值:

  • financial:因欠费被锁定。
  • security:因安全原因被锁定。
  • Recycling:抢占式实例的待释放锁定状态。
  • dedicatedhostfinancial:因为专有宿主机欠费导致 ECS 实例被锁定。
  • refunded:因退款被锁定。
financial
EnableJumboFrameboolean

ECS 实例是否开启了 Jumbo frame 特性。 可能值:

  • true:开启。

  • false:不开启。

更多信息,请参见ECS 实例 MTU

false

示例

正常返回示例

JSON格式

{
  "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": "true",
  "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
}

错误码

HTTP status code错误码错误信息描述
404InvalidInstanceId.NotFoundThe specified InstanceId does not exist.指定的实例ID未找到。
500InternalErrorThe request processing has failed due to some unknown error.内部错误,请重试。

访问错误中心查看更多错误码。

  • 本页导读 (1)
文档反馈