查询指定实例
功能介绍
通过实例ID查询实例的详细信息。
URI
GET /v2/{project_id}/instances/{instance_id}
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
instance_id |
是 |
String |
实例ID。 |
|
project_id |
是 |
String |
项目ID。获取方法请参见获取项目ID。 |
请求参数
无
响应参数
状态码: 200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
vpc_name |
String |
VPC的名称。 |
|
charging_mode |
Integer |
付费模式,0表示按需计费。 |
|
vpc_id |
String |
VPC ID。 |
|
user_name |
String |
用户名。 |
|
created_at |
String |
完成创建时间。格式为:2017-03-31T12:24:46.297Z |
|
description |
String |
实例描述。 |
|
security_group_id |
String |
安全组ID。 |
|
security_group_name |
String |
租户安全组名称。 |
|
max_memory |
Integer |
总内存,单位:MB。 |
|
used_memory |
Integer |
已使用的内存,单位:MB。 |
|
capacity |
Integer |
缓存实例的容量(G Byte)。 |
|
capacity_minor |
String |
小规格缓存实例(小于1G)的容量(G Byte)。 |
|
maintain_begin |
String |
维护时间窗开始时间,为UTC时间,格式为HH:mm:ss。 |
|
maintain_end |
String |
维护时间窗结束时间,为UTC时间,格式为HH:mm:ss。 |
|
engine |
String |
缓存实例的引擎类型。 |
|
no_password_access |
String |
是否允许免密码访问缓存实例。
|
|
ip |
String |
连接缓存实例的IP地址。如果是集群实例,返回多个IP地址,使用逗号分隔。如:192.168.0.1,192.168.0.2。 |
|
instance_backup_policy |
InstanceBackupPolicy object |
备份策略,实例类型为主备和集群时支持。 |
|
az_codes |
Array of strings |
实例所在的可用区。返回“可用区Code” |
|
available_zones |
Array of strings |
实例所在的可用区ID。返回"可用区ID"。 |
|
access_user |
String |
通过密码认证访问缓存实例的认证用户名。 |
|
instance_id |
String |
实例ID。 |
|
port |
Integer |
缓存的端口。 |
|
user_id |
String |
用户ID。 |
|
name |
String |
实例名称。 |
|
spec_code |
String |
产品规格编码 |
|
subnet_id |
String |
子网ID。 |
|
subnet_name |
String |
子网名称。 |
|
subnet_cidr |
String |
子网网段。 |
|
engine_version |
String |
缓存版本。 |
|
order_id |
String |
订单ID。 |
|
status |
String |
缓存实例的状态。详细状态说明见缓存实例状态说明。 |
|
domain_name |
String |
实例的域名。 |
|
readonly_domain_name |
String |
实例的只读域名,只有主备实例有该字段。 |
|
enable_publicip |
Boolean |
该参数暂未启用。 |
|
publicip_id |
String |
Redis缓存实例绑定的弹性IP地址的id。 该参数暂未启用,字段值为null。 |
|
publicip_address |
String |
Redis缓存实例绑定的弹性IP地址。 该参数暂未启用,字段值为null。 |
|
enable_ssl |
Boolean |
该参数暂未启用。 |
|
service_upgrade |
Boolean |
实例是否存在升级任务。
|
|
service_task_id |
String |
升级任务的ID。
|
|
backend_addrs |
String |
集群实例的后端服务地址。 |
|
features |
Features object |
实例支持特性。 |
|
domain_name_info |
DomainNameInfo object |
实例域名重建、公网解析操作相关信息。 |
|
transparent_client_ip_enable |
Boolean |
是否开启客户端IP透传。 |
|
sub_status |
String |
实例子状态。 |
|
tags |
Array of ResourceTag objects |
实例标签键值。 |
|
cpu_type |
String |
实例CPU类型,通常为x86_64或aarch64。 |
|
update_at |
String |
更新时间,形如2022-07-06T09:32:16.502Z |
|
product_type |
String |
产品类型。目前仅支持基础版,取值为:generic。 枚举值:
|
|
storage_type |
String |
存储类型:内存存储。 枚举值:
|
|
launched_at |
String |
启动时间,形如2022-07-06T09:32:16.502Z |
|
cache_mode |
String |
缓存实例类型。取值范围如下:
|
|
support_slow_log_flag |
String |
是否支持慢日志。 |
|
db_number |
Integer |
数据库数量。 |
|
replica_count |
Integer |
副本数。 |
|
sharding_count |
Integer |
集群实例分片个数。 |
|
bandwidth_info |
BandwidthInfo object |
带宽信息。 |
|
cloud_service_type_code |
String |
云服务类型编码。 |
|
cloud_resource_type_code |
String |
云资源类型编码。 |
|
inquery_spec_code |
String |
运营系统中的规格编码。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
backup_policy_id |
String |
备份策略ID。 |
|
created_at |
String |
创建时间。格式为:2022-04-11T09:45:24.790Z |
|
updated_at |
String |
更新时间。格式为:2022-04-12T02:22:03.269Z |
|
policy |
BackupPolicy object |
备份策略。 |
|
tenant_id |
String |
租户ID。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
backup_type |
String |
备份类型。
|
|
save_days |
Integer |
当backup_type设置为auto时,该参数为必填。 保留天数,单位:天,取值范围:1-7。由自动切换为手动时,保留自动备份策略信息。 |
|
periodical_backup_plan |
BackupPlan object |
备份计划,当backup_type设置为auto时,该参数为必填。由自动切换为手动时,保留自动备份策略信息。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
timezone_offset |
String |
备份的时区。该参数已废弃,没有实际作用。 |
|
backup_at |
Array of integers |
每周的周几开始备份,取值1-7,1代表周一,7代表周日。由自动切换为手动时,保留自动备份策略信息。 |
|
period_type |
String |
备份周期类型,目前支持“weekly”。由自动切换为手动时,保留自动备份策略信息。 |
|
begin_at |
String |
备份开始执行时间,该时间为UTC时间,例如“00:00-01:00”代表UTC时间0点开始执行备份。只能是整点时间段,间隔时间限定为一个小时。由自动切换为手动时,保留自动备份策略信息。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
support_acl |
Boolean |
是否支持ACL。
|
|
support_transparent_client_ip |
Boolean |
实例是否支持客户端IP透传。
|
|
support_ssl |
Boolean |
是否支持SSL。
|
|
support_audit_log |
Boolean |
是否支持审计日志。
|
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
support_public_resolve |
Boolean |
是否开启公网域名解析。
|
|
is_latest_rules |
Boolean |
当前域名是否已为最新。
|
|
zone_name |
String |
域名的区域后缀。 |
|
history_domain_names |
Array of DomainNameEntity objects |
历史域名信息。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
domain_name |
String |
实例历史域名。 |
|
is_readonly |
Boolean |
是否只读域名。
|
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
key |
String |
标签键。
|
|
value |
String |
标签值。
|
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
begin_time |
Long |
临时扩容开始时间。 |
|
end_time |
Long |
临时扩容结束时间。 |
|
current_time |
Long |
当前时间。 |
|
bandwidth |
Integer |
当前带宽,单位为Mbit/s。 |
|
next_expand_time |
Long |
下一个扩容时间。 |
|
expand_count |
Integer |
扩容数量。 |
|
expand_effect_time |
Long |
临时扩容时间间隔。 |
|
expand_interval_time |
Long |
下一次可以扩容间隔时间。 |
|
max_expand_count |
Integer |
最大扩容数量。 |
|
task_running |
Boolean |
任务是否运行。 |
请求示例
GET https://{dcs_endpoint}/v2/{project_id}/instances/{instance_id}
响应示例
状态码: 200
查询指定实例成功。
{
"publicip_id" : null,
"vpc_name" : "dcs-beta",
"charging_mode" : 0,
"vpc_id" : "5e37b3be-950a-48e1-b498-65b63d336481",
"user_name" : "clouduser",
"created_at" : "2022-08-29T08:53:47.319Z",
"description" : null,
"cache_mode" : "ha",
"security_group_id" : "securityGroupId",
"enable_ssl" : false,
"max_memory" : 128,
"publicip_address" : null,
"capacity" : 0,
"maintain_begin" : "18:00:00",
"engine" : "Redis",
"maintain_end" : "19:00:00",
"capacity_minor" : ".125",
"service_upgrade" : false,
"subnet_name" : "dcs-beta",
"no_password_access" : "true",
"service_task_id" : null,
"ip" : "192.168.0.251",
"subnet_cidr" : "192.168.0.0/24",
"used_memory" : 2,
"security_group_name" : "securityGroupId",
"instance_backup_policy" : null,
"az_codes" : [ "xx-xxxxx-xx" ],
"available_zones" : [ "d539378ec1314c85b76fefa3f7071458" ],
"access_user" : null,
"instance_id" : "a4c545cd-10b2-4efc-b0ab-a9b554ca0621",
"enable_publicip" : false,
"port" : 6379,
"user_id" : "d53977d1adfb49c5b025ba7d33a13fd7",
"domain_name" : "redis-a4c545cd-10b2-4efc-b0ab-a9b554ca0621.dcs.example.com",
"name" : "dcs-billing",
"spec_code" : "redis.ha.xu1.tiny.r2.128",
"subnet_id" : "a4112635-3ec0-471c-95c3-5cf49b9533af",
"engine_version" : "5.0",
"order_id" : null,
"status" : "RUNNING",
"features" : {
"support_acl" : true,
"support_transparent_client_ip" : true,
"support_ssl" : false,
"support_audit_log" : false
},
"domain_name_info" : {
"support_public_resolve" : true,
"is_latest_rules" : true,
"zone_name" : "dcs.example.com",
"history_domain_names" : null
},
"transparent_client_ip_enable" : true,
"sub_status" : "normal",
"cpu_type" : "x86_64",
"cloud_service_type_code" : "hws.service.type.dcs",
"cloud_resource_type_code" : "hws.resource.type.dcs3",
"inquery_spec_code" : "redis.ha.xu1.tiny.r2.128"
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
查询指定实例成功。 |
|
400 |
非法请求。 |
|
500 |
内部服务错误。 |
错误码
请参见错误码。