该接口用于获取实例详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
hologram:GetInstance |
get |
*Instance
|
无 | 无 |
请求语法
GET /api/v1/instances/{instanceId} HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| instanceId |
string |
否 |
实例 ID。该参数必填。 |
hgprecn-cn-i7m2v08uu00a |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
当前API无需请求参数
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
865A02C2-B374-5DD4-9B34-0CA15DA1AEBD |
| Instance |
object |
实例信息。 |
|
| InstanceChargeType |
string |
实例付费类型。 枚举值:
|
PrePaid |
| CommodityCode |
string |
商品 code。 枚举值:
|
hologram_combo_public_cn |
| Cpu |
integer |
CPU 核数。 |
32 |
| CreationTime |
string |
创建时间。 |
2021-02-03T13:06:06Z |
| Disk |
string |
标准存储大小。 单位:GB。 |
500 |
| Endpoints |
array<object> |
域名列表。 |
|
|
object |
域名详情。 |
||
| Endpoint |
string |
域名。 |
hgprecn-cn-uqm362o1b001-cn-hangzhou-internal.hologres.aliyuncs.com:80 |
| Type |
string |
网络类型。 枚举值:
|
Internet |
| Enabled |
boolean |
是否开启网络。 枚举值:
|
true |
| VSwitchId |
string |
虚拟交换机 ID。 |
vsw-bp1jqwp2ys6kp7tc9t983 |
| VpcId |
string |
VPC ID。 |
vpc-uf66jjber3hgvwhki3wna |
| VpcInstanceId |
string |
vpc 实例 ID。 |
hgprecn-cn-uqm362o1b001-frontend-st |
| AlternativeEndpoints |
string |
一些旧实例同时开启了 AnyTunnel 和 SingleTunnel,当从 AnyTunnel 切换到 SingleTunnel 时,会同时保留二者的 Endpoint,因此需要多一个字段保存 Endpoint。 |
hgprecn-cn-uqm362o1b001-cn-hangzhou-internal.hologres.aliyuncs.com:80 |
| ExpirationTime |
string |
到期时间。 按量付费类型没有到期时间。 |
2021-02-03T13:06:06Z |
| InstanceId |
string |
实例 ID。 |
hgpostcn-cn-tl32s6cgw00b |
| InstanceName |
string |
实例名称。 2-64 个字符,字母和汉字都算一个。 |
test |
| InstanceType |
string |
实例类型。 枚举值:
|
Standard |
| Memory |
integer |
内存。 单位:GB |
128 |
| InstanceOwner |
string |
实例所有者。 |
12345678900000 |
| InstanceStatus |
string |
实例状态。 枚举值:
|
Running |
| Version |
string |
实例版本。 |
r1.3.37 |
| SuspendReason |
string |
暂停原因。 枚举值:
|
Manual |
| Tags |
array<object> |
实例标签 |
|
|
object |
标题详情。 |
||
| Key |
string |
标签键。 |
tag |
| Value |
string |
标签值。 |
value |
| LeaderInstanceId |
string |
主实例 ID。 |
hgpostcn-cn-i7m2ncd6w002 |
| EnableHiveAccess |
string |
是否启用数据湖加速。 |
true |
| ResourceGroupId |
string |
资源组 ID。 |
rg-aekzuq7hpybze2i |
| ComputeNodeCount |
integer |
计算节点数量。 一个节点的典型配置:16 核 32G 内存。 |
2 |
| ZoneId |
string |
可用区 ID |
cn-hangzhou-h |
| ColdStorage |
integer |
冷存储容量。 单位:GB。 SSD 相当于热存,也是标准存储;HDD 相当于冷存。 |
800 |
| AutoRenewal |
string |
是否开启了自动续费。 枚举值:
|
true |
| GatewayCount |
integer |
网关节点数量。 |
2 |
| GatewayCpu |
integer |
网关 cpu 资源。 单位:core。 |
4 |
| GatewayMemory |
integer |
网关内存资源。 单位:GB。 |
16 |
| RegionId |
string |
地域 ID。 |
cn-hangzhou |
| ReplicaRole |
string |
灾备实例角色。 Active: 灾备主实例, Passive: 灾备容灾实例, PreActive: 未达终态的灾备主实例。 |
Active |
| EnableServerless |
boolean |
是否开启 ServerlessComputing 枚举值:
|
true |
| StorageType |
string |
存储类型:
|
redundant |
| Success |
boolean |
请求结果,表示此次请求是否发生异常,和业务无关。 |
true |
| ErrorCode |
string |
错误码。 |
null |
| ErrorMessage |
string |
错误信息。 |
null |
| HttpStatusCode |
string |
HTTP 状态码。 |
200 |
示例
正常返回示例
JSON格式
{
"RequestId": "865A02C2-B374-5DD4-9B34-0CA15DA1AEBD",
"Instance": {
"InstanceChargeType": "PrePaid",
"CommodityCode": "hologram_combo_public_cn",
"Cpu": 32,
"CreationTime": "2021-02-03T13:06:06Z",
"Disk": "500",
"Endpoints": [
{
"Endpoint": "hgprecn-cn-uqm362o1b001-cn-hangzhou-internal.hologres.aliyuncs.com:80",
"Type": "Internet",
"Enabled": true,
"VSwitchId": "vsw-bp1jqwp2ys6kp7tc9t983",
"VpcId": "vpc-uf66jjber3hgvwhki3wna",
"VpcInstanceId": "hgprecn-cn-uqm362o1b001-frontend-st",
"AlternativeEndpoints": "hgprecn-cn-uqm362o1b001-cn-hangzhou-internal.hologres.aliyuncs.com:80"
}
],
"ExpirationTime": "2021-02-03T13:06:06Z",
"InstanceId": "hgpostcn-cn-tl32s6cgw00b",
"InstanceName": "test",
"InstanceType": "Standard",
"Memory": 128,
"InstanceOwner": "12345678900000",
"InstanceStatus": "Running",
"Version": "r1.3.37",
"SuspendReason": "Manual",
"Tags": [
{
"Key": "tag",
"Value": "value"
}
],
"LeaderInstanceId": "hgpostcn-cn-i7m2ncd6w002",
"EnableHiveAccess": "true",
"ResourceGroupId": "rg-aekzuq7hpybze2i",
"ComputeNodeCount": 2,
"ZoneId": "cn-hangzhou-h",
"ColdStorage": 800,
"AutoRenewal": "true",
"GatewayCount": 2,
"GatewayCpu": 4,
"GatewayMemory": 16,
"RegionId": "cn-hangzhou",
"ReplicaRole": "Active",
"EnableServerless": true,
"StorageType": "redundant"
},
"Success": true,
"ErrorCode": "null",
"ErrorMessage": "null",
"HttpStatusCode": "200"
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。