查询实例详情
1. 接口描述
调用 DescribeInstance 接口查询一台实例的详细信息。
2. 请求参数
参数名 | 类型 | 是否必选 | 描述 |
---|---|---|---|
Action | String | 是 | 固定取值:DescribeInstance |
InstanceUUID | String | 是 | 实例ID |
3. 返回数据
参数名 | 类型 | 说明 |
---|---|---|
InstanceInfo | InstanceInfo | 实例详细信息 |
RequestId | String | 请求ID |
4. 示例
请求示例
https://openapi.kaopuyun.com/?SignatureVersion=1.0
&Action=DescribeInstance
&Format=JSON
&InstanceUUID=ecs-3m0000gftg8m
&SignatureNonce=fad368fd-b5e3-476b-903b-2ef34e0e9fba
&Version=2014-05-26
&AccessKeyId=hfWkfqG6a794
&Signature=IcyHYfUBWSzJauAbDaqniNSNE94=
&SignatureMethod=HMAC-SHA1
&Timestamp=2023-02-25T15:29:21Z
正常返回示例
{
"RequestId" : "9132f520-b4f0-11ed-8dde-06dde3cb088a",
"InstanceInfo" : {
"EcsStatus" : "PENDING",
"InstanceUUID" : "ecs-3m0000gftg8m",
"RegionCode" : "cn-hongkong-3",
"EcsPendingStatus" : "STARTING",
"Memory" : 1,
"Cpu" : 1,
"ExpirationTime" : "2023-03-24 23:59:59",
"ImageUUID" : "img-3c0000gfge67",
"VpcAttributes" : [
{
"PrivateIpAddress" : {
"IpAddress" : "10.62.145.193"
}
}
],
"InstanceNetworkType" : "PRIVATE_NETWORK",
"InstanceName" : "957d0372-15a0-442d-b721-f9cb6097dbba",
"SerialNumber" : "ecs-3m0000gftg8m",
"CreationTime" : "2023-02-25 17:41:01",
"ZoneCode" : "cn-hongkong-3-a",
"PublicIpAddresses" : [
{
"IpAddress" : "45.158.180.69"
}
],
"DeviceAvailable" : "TRUE",
"InstanceType" : "ecs.n1.tiny",
"EipAddressInfos" : [
{
"Bandwidth" : 10,
"EipAddress" : "45.158.180.69",
"IpBindLevel" : "MAIN",
"EipUUID" : "eip-3m0000gftg8f",
"InternetChargeType" : "PAY_BY_TRAFFIC"
}
],
"HostName" : "957d0372-15a0-442d-b721-f9cb6097dbba"
}
}
5. 错误码
错误码 | 错误信息 |
---|---|
AvailableInstanceNotFound | 可用实例未找到 |
IncorrectInstanceStatus.CreateFailed | 非法实例状态--创建失败 |
IncorrectInstanceStatus.Deleted | 非法的实例状态--已删除 |
DescribeInstanceFail | 查询实例详情失败:xxx |