{"base_path":"/","components":null,"consumes":"[\"application/json\"]","definitions":{"BackupStrategyForResponse":{"description":"自动备份策略。","properties":{"keep_days":{"description":"指定备份文件的可保存天数。\n\n取值范围:0~732。该参数缺省,或取值为0,表示关闭自动备份策略。如果需要延长保留时间请联系客服人员申请,自动备份最长可以保留2562天。\n\n说明:SQL Server的HA实例不支持关闭自动备份策略。","type":"integer"},"start_time":{"description":"备份时间段。自动备份将在该时间段内触发。\n\n取值范围:非空,格式必须为hh:mm-HH:MM且有效,当前时间指UTC时间。\n\nHH取值必须比hh大1。\nmm和MM取值必须相同,且取值必须为00、15、30或45。","example":"23:00-00:00","type":"string"}},"required":["start_time","keep_days"]},"ChargeInfoResponse":{"description":"计费类型信息,支持包年包月和按需,默认为按需。","properties":{"charge_mode":{"description":"计费模式。\n\n取值范围:\n\n- prePaid:预付费,即包年/包月。\n- postPaid:后付费,即按需付费。","enum":["prePaid","postPaid"],"type":"string"}},"required":["charge_mode"]},"Datastore":{"properties":{"complete_version":{"description":"数据库完整版本号。仅在数据库引擎是”MySQL”和”PostgreSQL”时返回。","type":"string"},"type":{"description":"数据库引擎,不区分大小写:\n- MySQL\n- PostgreSQL\n- SQLServer\n- MariaDB","enum":["MySQL","PostgreSQL","SQLServer","MariaDB"],"type":"string"},"version":{"description":"数据库版本。\n- MySQL引擎支持5.6、5.7、8.0版本。取值示例:5.7。具有相应权限的用户才可使用8.0,您可联系华为云客服人员申请。\n- PostgreSQL引擎支持9.5、9.6、10、11版本。取值示例:9.6。\n- Microsoft SQL Server:仅支持2017 企业版、2017 标准版、2017 web版、2014 标准版、2014 企业版、2016 标准版、2016 企业版、2012 企业版、2012 标准版、2012 web版、2008 R2 企业版、2008 R2 web版、2014 web版、2016 web版。取值示例2014_SE。 例如:2017标准版可填写2017_SE,2017企业版可填写2017_EE,2017web版可以填写2017_WEB","type":"string"}},"required":["type","version"]},"ErrorResponse":{"properties":{"error_code":{"description":"错误码。","example":"DBS.200022","type":"string"},"error_msg":{"description":"错误消息。","example":"实例名称已存在。","type":"string"}},"required":["error_code","error_msg"]},"HaResponse":{"description":"HA配置参数,创建HA实例时使用。","properties":{"replication_mode":{"description":"备机同步参数。实例主备模式为Ha时有效。\n取值:\n- MySQL为“async”或“semisync”。\n- PostgreSQL为“async”或“sync”。\n- Microsoft SQL Server为“sync”。","enum":["async","semisync","sync"],"type":"string"}},"required":["replication_mode"]},"InstanceListResponse":{"properties":{"instances":{"items":{"$ref":"#/definitions/InstanceResponse"},"type":"array"},"total_count":{"description":"总实例数。","type":"integer"}},"required":["instances","total_count"]},"InstanceResponse":{"description":"实例信息。","properties":{"alias":{"description":"实例的备注信息。","type":"string"},"associated_with_ddm":{"description":"是否已被DDM实例关联。","type":"boolean"},"backup_strategy":{"$ref":"#/definitions/BackupStrategyForResponse"},"backup_used_space":{"description":"备份空间使用量,单位GB。\n\n该字段仅用于查询指定SQL Server实例信息时返回。","format":"double","type":"number"},"charge_info":{"$ref":"#/definitions/ChargeInfoResponse"},"cpu":{"description":"CPU大小。例如,1表示1U。","example":1,"type":"string"},"created":{"description":"创建时间,格式为“yyyy-mm-ddThh:mm:ssZ”。\n\n其中,T指某个时间的开始;Z指时区偏移量,例如北京时间偏移显示为+0800。\n\n说明:创建时返回值为空,数据库实例创建成功后该值不为空。","type":"string"},"datastore":{"$ref":"#/definitions/Datastore","description":"数据库信息。"},"db_user_name":{"description":"默认用户名。","example":"root","type":"string"},"disk_encryption_id":{"description":"用于磁盘加密的密钥ID。","type":"string"},"enable_ssl":{"description":"实例是否开启SSL,取值为\"true\"表示实例开启了SSL,取值为\"false\"表示实例未开启SSL。","type":"boolean"},"enterprise_project_id":{"description":"企业项目ID。","type":"string"},"expiration_time":{"description":"实例的到期时间,格式为“yyyy-mm-ddThh:mm:ssZ”。\n\n仅包周期场景返回。","type":"string"},"flavor_ref":{"description":"规格码。","example":"rds.mysql.s1.large","type":"string"},"ha":{"$ref":"#/definitions/HaResponse"},"id":{"description":"实例ID。","example":"5a0c7051faa0471a8e23703f1dc0f458in01","type":"string"},"maintenance_window":{"description":"可维护时间窗,为UTC时间。","type":"string"},"max_iops":{"description":"实例磁盘的最大IOPS值。\n\n当前该字段仅对于SQL Server引擎实例返回。","format":"int64","type":"integer"},"mem":{"description":"内存大小(单位:GB)。","example":80,"type":"string"},"name":{"description":"实例名称。","type":"string"},"nodes":{"items":{"$ref":"#/definitions/NodeResponse"},"type":"array"},"order_id":{"description":"订单ID,仅包周期场景返回。","type":"string"},"port":{"description":"数据库端口信息。\n\n- MySQL数据库端口设置范围为1024~65535(其中12017和33071被RDS系统占用不可设置)。\n- PostgreSQL数据库端口修改范围为2100~9500。\n- Microsoft SQL Server实例的端口设置范围为1433和2100~9500(其中5355和5985不可设置。对于2017 EE版,5050、5353和5986不可设置)。\n\n当不传该参数时,默认端口如下:\n\n- MySQL默认3306。\n- PostgreSQL默认5432。\n- Microsoft SQL Server默认1433。","example":3306,"type":"integer"},"private_dns_names":{"description":"内网域名列表","items":{"type":"string"},"type":"array"},"private_ips":{"description":"实例内网IP地址列表。弹性云服务器创建成功后该值存在,其他情况下为空字符串。","items":{"type":"string"},"type":"array"},"public_dns_names":{"description":"公网域名列表","items":{"type":"string"},"type":"array"},"public_ips":{"description":"实例外网IP地址列表。","items":{"type":"string"},"type":"array"},"read_only_by_user":{"description":"客户设置实例只读API的状态信息。仅支持RDS for MySQL引擎。 - true,表示该实例为客户设置的只读状态 - false, 表示该实例未被客户设置只读","type":"boolean"},"region":{"description":"区域ID。","type":"string"},"related_instance":{"items":{"$ref":"#/definitions/RelatedInstance"},"type":"array"},"security_group_id":{"description":"安全组ID。","type":"string"},"serverless_info":{"$ref":"#/definitions/ServerlessInfoResponse","description":"Serverless型实例的算力区间,单位RCU。"},"status":{"description":"实例状态。\n- 值为“BUILD”,表示实例正在创建。\n- 值为“ACTIVE”,表示实例正常。\n- 值为“FAILED”,表示实例异常。\n- 值为“FROZEN”,表示实例冻结。\n- 值为“MODIFYING”,表示实例正在扩容。\n- 值为“REBOOTING”,表示实例正在重启。\n- 值为“RESTORING”,表示实例正在恢复。\n- 值为“MODIFYING INSTANCE TYPE”,表示实例正在转主备。\n- 值为“SWITCHOVER”,表示实例正在主备切换。\n- 值为“MIGRATING”,表示实例正在迁移。\n- 值为“BACKING UP”,表示实例正在进行备份。\n- 值为“MODIFYING DATABASE PORT”,表示实例正在修改数据库端口。\n- 值为“STORAGE FULL”,表示实例磁盘空间满。","example":"BUILD","type":"string"},"storage_used_space":{"description":"磁盘空间使用量,单位GB。\n\n该字段仅用于查询指定SQL Server实例信息时返回。","format":"double","type":"number"},"subnet_id":{"description":"子网ID。","type":"string"},"switch_strategy":{"description":"数据库切换策略。取值为“reliability”或“availability”,分别对应于可靠性优先和可用性优先。","type":"string"},"tags":{"items":{"$ref":"#/definitions/TagResponse"},"type":"array"},"time_zone":{"description":"时区。","type":"string"},"type":{"description":"实例类型,取值为“Single”,“Ha”或“Replica”,分别对应于单机实例、主备实例、只读实例。","type":"string"},"updated":{"description":"更新时间,格式与“created”字段对应格式完全相同。\n\n说明:创建时返回值为空,数据库实例创建成功后该值不为空。","type":"string"},"volume":{"$ref":"#/definitions/VolumeForInstanceResponse","description":"实例存储信息。"},"vpc_id":{"description":"虚拟私有云ID。","type":"string"}},"required":["id","status","enable_ssl","private_ips","public_ips","type","created","updated","db_user_name","switch_strategy","maintenance_window","nodes","related_instance","name","datastore","port","backup_strategy","enterprise_project_id","disk_encryption_id","flavor_ref","volume","region","vpc_id","subnet_id","security_group_id","charge_info","time_zone","tags"]},"NodeResponse":{"description":"实例节点信息。","properties":{"availability_zone":{"description":"可用区。","example":"az1","type":"string"},"id":{"description":"节点ID。","example":"5b0fda418d9f4b51b0d188732aaf992fno01","type":"string"},"name":{"description":"节点名称。","example":"mysql_node1","type":"string"},"role":{"description":"节点类型,取值为“master”、“slave”或“readreplica”,分别对应于主节点、备节点和只读节点。","example":"master","type":"string"},"status":{"description":"节点状态。","example":"ACTIVE","type":"string"}},"required":["id","name","role","status","availability_zone"]},"RelatedInstance":{"description":"所关联的数据库实例列表。","properties":{"id":{"description":"关联实例id。","example":"e73893ef73754465a8bd2e0857bbf13ein01","type":"string"},"type":{"description":"关联实例类型。\n\n- “replica_of”对应于“主实例”。\n- “replica”对应于“只读实例”。","example":"replica","type":"string"}},"required":["id","type"]},"ServerlessInfoResponse":{"properties":{"max_compute_unit":{"description":"Serverless型实例的算力范围最大值。取值范围:0.5 ~ 8,单位:RCU。","type":"string"},"min_compute_unit":{"description":"Serverless型实例的算力范围最小值。取值范围:0.5 ~ 8,单位:RCU。","type":"string"}},"required":["min_compute_unit","max_compute_unit"]},"TagResponse":{"description":"标签信息。","properties":{"key":{"description":"标签键。","example":"rds001","type":"string"},"value":{"description":"标签值。","example":"rds001","type":"string"}},"required":["key","value"]},"VolumeForInstanceResponse":{"properties":{"size":{"description":"磁盘大小,单位为GB。","type":"integer"},"type":{"description":"磁盘类型。\n取值范围如下,区分大小写:\n- COMMON,表示SATA。\n- HIGH,表示SAS。\n- ULTRAHIGH,表示SSD。\n- ULTRAHIGHPRO,表示SSD尊享版,仅支持超高性能型尊享版。\n- CLOUDSSD,表示SSD云盘,仅支持通用型和独享型规格实例。\n- LOCALSSD,表示本地SSD。\n- ESSD,表示极速型SSD,仅支持独享型规格实例。","enum":["ULTRAHIGH","HIGH","COMMON","NVMESSD","ULTRAHIGHPRO","CLOUDSSD","LOCALSSD","ESSD"],"type":"string"}},"required":["type","size"]}},"description":null,"group_id":"b7735f867ef44182af9eb77490a46fbf","host":"rds.cn-north-4.myhuaweicloud.com","id":"ef92a878baa34431bbc003d0298561f1","info_version":"v3","method":"get","name":"ListInstances","parameters":{},"paths":{"/v3/{project_id}/instances":{"get":{"description":"查询数据库实例列表。","operationId":"ListInstances","parameters":[{"default":"application/json","in":"header","name":"Content-Type","type":"string"},{"description":"用户Token。","in":"header","name":"x-auth-token","type":"string","x-example":"******"},{"description":"语言","enum":["zh-cn","en-us"],"in":"header","name":"X-Language","type":"string","x-example":"zh-cn"},{"description":"项目ID。","in":"path","name":"project_id","required":true,"type":"string","x-example":"619d3e78f61b4be68bc5aa0b59edcf7b"},{"description":"实例ID。\n\n“\\*”为系统保留字符,如果id是以“\\*”起始,表示按照\\*后面的值模糊匹配,否则,按照id精确匹配查询。不能只传入“\\*”。","in":"query","name":"id","required":false,"type":"string"},{"description":"实例名称。\n\n“\\*”为系统保留字符,如果name是以“\\*”起始,表示按照\\*后面的值模糊匹配,否则,按照name精确匹配查询。不能只传入“\\*”。","in":"query","name":"name","type":"string"},{"description":"按照实例类型查询。取值Single、Ha、Replica,分别对应于单实例、主备实例和只读实例。","enum":["Single","Ha","Replica"],"in":"query","name":"type","type":"string"},{"description":"数据库类型,区分大小写。\n- MySQL\n- PostgreSQL\n- SQLServer\n- MariaDB","enum":["MySQL","PostgreSQL","SQLServer","MariaDB"],"in":"query","name":"datastore_type","type":"string"},{"description":"企业项目id。","in":"query","name":"eps_id","type":"string"},{"description":"虚拟私有云ID。","in":"query","name":"vpc_id","type":"string"},{"description":"子网ID。","in":"query","name":"subnet_id","type":"string"},{"description":"索引位置,偏移量。从第一条数据偏移offset条数据后开始查询,默认为0(偏移0条数据,表示从第一条数据开始查询),必须为数字,不能为负数。","in":"query","name":"offset","type":"integer"},{"description":"查询记录数。默认为100,不能为负数,最小值为1,最大值为100。","in":"query","name":"limit","type":"integer"},{"description":"根据实例标签键值对进行查询。 {key}表示标签键,不可以为空或重复。最大长度127个unicode字符。key不能为空或者空字符串,不能为空格,使用之前先trim前后半角空格。不能包含+/?#&=,%特殊字符。 {value}表示标签值,可以为空。最大长度255个unicode字符,使用之前先trim 前后半角空格。不能包含+/?#&=,%特殊字符。如果value为空,则表示any_value(查询任意value)。 如果同时使用多个标签键值对进行查询,中间使用逗号分隔开,最多包含10组。","in":"query","name":"tags","type":"string"},{"description":"查询flexusrds实例,传flexus。其他场景不传。","in":"query","name":"group_type","type":"string"}],"responses":{"200":{"description":"Success.","examples":{"application/json":{"instances":[{"backup_strategy":{"keep_days":7,"start_time":"19:00-20:00"},"charge_info":{"charge_mode":"postPaid"},"created":"2018-08-20T02:33:49+0800","datastore":{"type":"MySQL","version":"5.7"},"db_user_name":"root","disk_encryption_id":"","enable_ssl":true,"enterprise_project_id":"0","flavor_ref":"rds.mysql.s1.large","id":"ed7cc6166ec24360a5ed5c5c9c2ed726in01","maintenance_window":"02:00-06:00","name":"mysql-0820-022709-01","nodes":[{"availability_zone":"bbb","id":"06f1c2ad57604ae89e153e4d27f4e4b8no01","name":"mysql-0820-022709-01_node0","role":"master","status":"ACTIVE"}],"port":3306,"private_ips":["192.168.0.142"],"public_dns_names":["example3.com.","example4.com."],"public_ips":["10.154.219.187","10.154.219.186"],"read_only_by_user":false,"region":"aaa","related_instance":[],"security_group_id":"38815c5c-482b-450a-80b6-0a301f2afd97","status":"ACTIVE","subnet_id":"45557a98-9e17-4600-8aec-999150bc4eef","switch_strategy":"reliability","tags":[{"key":"rds001","value":"rds001"}],"time_zone":"UTC","type":"Single","updated":"2018-08-20T02:33:50+0800","volume":{"size":100,"type":"ULTRAHIGH"},"vpc_id":"b21630c1-e7d3-450d-907d-39ef5f445ae7"}],"total_count":1}},"schema":{"$ref":"#/definitions/InstanceListResponse"}},"default":{"description":"Client or server error.","schema":{"$ref":"#/definitions/ErrorResponse"}}},"summary":"查询数据库实例列表","tags":["实例管理"],"x-request-examples-description-1":"","x-request-examples-url-1":"GET https://rds.cn-north-1.myhuaweicloud.com/v3/054e292c9880d4992f02c0196d3ea468/instances","x-request-examples-url-2":"GET https://rds.cn-north-1.myhuaweicloud.com/v3/97b026aa9cc4417888c14c84a1ad9860/instances?id=ed7cc6166ec24360a5ed5c5c9c2ed726in01&name=hy&type=Ha&datastore_type=MySQL&vpc_id=19e5d45d-70fd-4a91-87e9-b27e71c9891f&subnet_id=bd51fb45-2dcb-4296-8783-8623bfe89bb7&offset=0&limit=10&tags=rds001=001,rds002=002","x-support-sdk":"Y"}}},"product_short":"RDS","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"查询数据库实例列表","tags":"实例管理","uri":null,"version":"2.0"}