华为云用户手册

  • 响应参数 表2 参数说明 参数 参数类型 描述 id String 参数模板ID。 name String 参数模板名称。 description String 参数模板描述。 engine_version String 引擎版本。 instance_mode String 部署形态。 枚举值: ha:主备版 independent:独立部署 created_at String 创建时间,格式为“yyyy-mm-ddThh:mm:ssZ”。 其中,T指某个时间的开始;Z指时区偏移量,例如北京时间偏移显示为+0800。 updated_at String 修改时间,格式为“yyyy-mm-ddThh:mm:ssZ”。 其中,T指某个时间的开始;Z指时区偏移量,例如北京时间偏移显示为+0800。 configuration_parameters Array of objects 参数详情,具体请参考 表configuration_parameters字段数据结构说明。 表3 configuration_parameters字段数据结构说明 参数 参数类型 描述 name String 特定参数名称。 value String 特定参数值。 need_restart Boolean 参数是否需要重启。 - 取值为"true",需要重启。 - 取值为"false",不需要重启。 readonly Boolean 该参数是否只读。 true:只读 false:可编辑 value_range String 参数取值范围。 data_type String 参数类型,取值为“string”、“integer”、“boolean”、“list”或“float”之一。 description String 参数描述。
  • 响应示例 查询参数模板详情成功。 { "id": "3ca44134a16d4bbab8eb701e025b19f7pr14", "name": "GaussDB_2b87a799-515", "description": "ParamGroup for instance.", "engine_version": "2.3", "instance_mode": "ha", "created_at": "2022-08-05T08:15:07+0800", "updated_at": "2022-08-09T03:06:52+0800", "configuration_parameters": [ { "name": "audit_system_object", "value": "12294", "need_restart": false, "readonly": false, "value_range": "1-65536", "data_type": "integer", "description": "该参数决定是否对GaussDB Kernel数据库对象的CREATE、DROP、ALTER操作进行审计。GaussDB Kernel数据库对象包括DATABASE、USER、schema、TABLE等。通过修改该配置参数的值,可以只审计需要的数据库对象的操作,在主备强制选主场景建议audit_system_object取最大值,所有DDL对象全部审计,不当修改该参数会导致丢失DDL审计日志,请在客服人员指导下进行修改。" } ] }
  • 请求示例 查询两个参数组模板的差异列表。 POST https://gaussdb-opengauss.cn-north-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/configurations/comparison { "source_id" : "3e9f722f27c9477089bdf576b33f9d8epr14", "target_id" : "a51fcdde022a4ea8a016a3c4671644f4pr14" }
  • 响应参数 表3 参数说明 参数 参数类型 描述 differences Array of objects 参数组之间的差异集合。 详情请参见表 differences字段数据结构说明 表4 differences字段数据结构说明 参数 参数类型 描述 name String 参数名称。 source_value String 比较参数组的参数值。 target_value String 目标参数组的参数值。
  • 请求参数 表2 参数说明 名称 是否必选 参数类型 说明 tags 是 Array of objects 需要添加的用户标签列表。 详情请参见表3。 表3 tags参数说明 名称 是否必选 参数类型 说明 key 是 String 标签键。 说明: 允许包含任意语种字母、数字、空格和_ . : = + - @特殊字符,但首尾不能含有空格,不能以_sys_开头,限制长度最长128。 value 是 String 标签值。 说明: 允许包含任意语种字母、数字、空格和_ . : / = + - @特殊字符,限制长度最长255。
  • 请求示例 创建一个用户标签,key为1,value为2。 POST https://gaussdb-opengauss.cn-north-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/tags { "tags": [{ "key":"1", "value":"2" }] }
  • 响应示例 GaussDB企业版实例: { "instance": { "id": "ad8cd1440aa94a02ae4580fcbebb3143in14", "name": "user1-v3-independent", "status": "BUILD", "datastore": { "type": "GaussDB", "version": "1.4" }, "ha": { "mode": "Enterprise", "replication_mode": "sync", "consistency": "strong" }, "port": "8000", "volume": { "type": "ULTRAHIGH", "size": 120 }, "replica_num": 3, "region": "cn-north-4", "backup_strategy": { "start_time": "17:00-18:00", "keep_days": 7 }, "flavor_ref": "gaussdb.opengauss.ee.dn.m6.2xlarge.8.in", "availability_zone": "cn-north-4a,cn-north-4a,cn-north-4a", "vpc_id": "1f011c32-2de2-4aa8-a161-9498dbcef329", "subnet_id": "54a44bec-e36f-441e-86bb-d749ace9c189", "security_group_id": "c6123999-8532-421c-9db6-e078013ff58f", "charge_info": { "charge_mode": "postPaid" } }, "job_id": "30f2790a-a5b6-4a13-a5ab-733c746609af" }
  • 请求示例 创建一个GaussDB实例,实例部署形态为分布式独立部署,按需付费,引擎版本为1.4,同一可用区下,3个协调节点,3个分片,3个副本,规格为8U64G。 https://gaussdb-opengauss.cn-north-4.myhuaweicloud.com/opengauss/v3/054b61972980d4552f0bc00ac8d3f5cd/instances { "name": "user1-v3-independent-01", "datastore": { "type": "GaussDB", "version": "1.4" }, "flavor_ref": "gaussdb.opengauss.ee.dn.m6.2xlarge.8.in", "volume": { "type": "ULTRAHIGH", "size": 120 }, "disk_encryption_id": "24ae42b5-4009-4ea2-b66a-0b211e424dab", "region": "aaa", "availability_zone": "bbb,bbb,bbb", "vpc_id": "1f011c32-2de2-4aa8-a161-9498dbcef329", "subnet_id": "54a44bec-e36f-441e-86bb-d749ace9c189", "security_group_id": "c6123999-8532-421c-9db6-e078013ff58f", "backup_strategy": { "start_time": "17:00-18:00", "keep_days": 7 }, "charge_info": { "charge_mode": "postPaid" }, "password": "xxxxxx", "configuration_id": "", "enterprise_project_id": "", "time_zone": "UTC+08:00", "ha":{ "mode":"enterprise", "consistency":"strong", "replication_mode":"sync" }, "sharding_num": 3, "coordinator_num": 3, "replica_num": 3, "port":8000, "enable_force_switch":true } 创建一个GaussDB实例,实例部署形态为分布式独立部署,包周期付费(1年),引擎版本为1.4,三个不同可用区下,3个协调节点,3个分片,3个副本,规格为8U64G。 https://gaussdb-opengauss.cn-north-4.myhuaweicloud.com/opengauss/v3/054b61972980d4552f0bc00ac8d3f5cd/instances { "name": "user1-v3-independent-02", "datastore": { "type": "GaussDB", "version": "1.4" }, "flavor_ref": "gaussdb.opengauss.ee.dn.m6.2xlarge.8.in", "volume": { "type": "ULTRAHIGH", "size": 120 }, "disk_encryption_id": "24ae42b5-4009-4ea2-b66a-0b211e424dab", "region": "aaa", "availability_zone": "bbb,ccc,ddd", "vpc_id": "1f011c32-2de2-4aa8-a161-9498dbcef329", "subnet_id": "54a44bec-e36f-441e-86bb-d749ace9c189", "security_group_id": "c6123999-8532-421c-9db6-e078013ff58f", "backup_strategy": { "start_time": "17:00-18:00", "keep_days": 7 }, "charge_info": { "charge_mode": "prePaid", "period_type": "year", "period_num": 1 }, "password": "xxxxxx", "configuration_id": "", "enterprise_project_id": "", "time_zone": "UTC+08:00", "ha":{ "mode":"enterprise", "consistency":"strong", "replication_mode":"sync" }, "sharding_num": 3, "coordinator_num": 3, "replica_num": 3, "port":8000, "enable_force_switch":true } 创建一个GaussDB实例,实例部署形态为主备版高可用(1主2备),按需付费,引擎版本为1.4,同一可用区下,规格为8U64G。 https://gaussdb-opengauss.cn-north-4.myhuaweicloud.com/opengauss/v3/054b61972980d4552f0bc00ac8d3f5cd/instances { "name": "user1-v3-ha-01", "datastore": { "type": "GaussDB", "version": "1.4" }, "flavor_ref": "gaussdb.opengauss.ee.km1.2xlarge.arm8.ha", "volume": { "type": "ULTRAHIGH", "size": 120 }, "disk_encryption_id": "24ae42b5-4009-4ea2-b66a-0b211e424dab", "region": "aaa", "availability_zone": "bbb,bbb,bbb", "vpc_id": "1f011c32-2de2-4aa8-a161-9498dbcef329", "subnet_id": "54a44bec-e36f-441e-86bb-d749ace9c189", "security_group_id": "c6123999-8532-421c-9db6-e078013ff58f", "backup_strategy": { "start_time": "17:00-18:00", "keep_days": 7 }, "charge_info": { "charge_mode": "postPaid", }, "password": "xxxxxx", "configuration_id": "", "enterprise_project_id": "", "time_zone": "UTC+08:00", "ha": { "mode": "centralization_standard", "consistency": "strong", "replication_mode": "sync" }, "replica_num": 3, "port": 8000, "enable_force_switch": true } 创建一个GaussDB实例,实例部署形态为主备版高可用(1主2备),包周期付费(1年),引擎版本为1.4,三个不同可用区下,规格为8U64G。 https://gaussdb-opengauss.cn-north-4.myhuaweicloud.com/opengauss/v3/054b61972980d4552f0bc00ac8d3f5cd/instances { "name": "user1-v3-ha-02", "datastore": { "type": "GaussDB", "version": "1.4" }, "flavor_ref": "gaussdb.opengauss.ee.km1.2xlarge.arm8.ha", "volume": { "type": "ULTRAHIGH", "size": 120 }, "disk_encryption_id": "24ae42b5-4009-4ea2-b66a-0b211e424dab", "region": "aaa", "availability_zone": "bbb,ccc,ddd", "vpc_id": "1f011c32-2de2-4aa8-a161-9498dbcef329", "subnet_id": "54a44bec-e36f-441e-86bb-d749ace9c189", "security_group_id": "c6123999-8532-421c-9db6-e078013ff58f", "backup_strategy": { "start_time": "17:00-18:00", "keep_days": 7 }, "charge_info": { "charge_mode": "prePaid", "period_type": "year", "period_num": 1 }, "password": "xxxxxx", "configuration_id": "", "enterprise_project_id": "", "time_zone": "UTC+08:00", "ha": { "mode": "centralization_standard", "consistency": "strong", "replication_mode": "sync" }, "replica_num": 3, "port": 8000, "enable_force_switch": true }
  • 响应参数 表8 响应参数 名称 参数类型 说明 instance Object 实例信息。 详情请参见表9。 job_id String 实例创建的任务ID。 仅创建按需实例时会返回该参数。 表9 instance说明 名称 参数类型 说明 id String 实例ID。 name String 实例名称。用于表示实例的名称,同一租户下,同类型的实例名称可相同。 取值范围:4~64个字符之间,必须以字母开头,不区分大小写,可以包含字母、数字、中划线或者下划线,不能包含其他的特殊字符。 status String 实例状态。如BUILD,表示创建中。 仅创建按需实例时会返回该参数。 datastore Object 数据库信息。 详情请参见表10。 ha Object 数据库部署形态。 详情请参见表11。 replica_num Integer 实例副本数。 port String 数据库端口信息,与请求参数相同。 backup_strategy Object 自动备份策略。 详情请参见表12。 enterprise_project_id String 项目标签。 flavor_ref String 规格码,取值范围:非空。 volume Object volume信息。 详情请参见表13。 region String 区域ID。 availability_zone String 可用区ID。 vpc_id String 虚拟私有云ID。 subnet_id String 子网的网络ID信息。 security_group_id String 实例所属的安全组。 charge_info Object 付费方式信息,仅支持按需。 详情请参见表14。 表10 datastore字段数据结构说明 名称 参数类型 说明 type String 数据库引擎,返回值如下: GaussDB version String 数据库版本。 表11 ha字段数据结构说明 名称 参数类型 说明 mode String GaussDB为分布式模式,取值:enterprise(企业版) ,不区分大小写。 replication_mode String 备机同步参数。 取值: GaussDB为“sync”。 说明: “sync”为同步模式。 consistency String GaussDB的预留参数:指定事务一致性类型,取值范围:strong(强一致性) | eventual(最终一致性)。 表12 backup_strategy字段数据结构说明 名称 参数类型 说明 start_time String 备份时间段。自动备份将在该时间段内触发。 取值范围:非空,格式必须为hh:mm-HH:MM且有效,当前时间指UTC时间。 HH取值必须比hh大1。 mm和MM取值必须相同,且取值必须为00、15、30或45。 取值示例: 08:15-09:15 23:00-00:00 如果请求体中不填写“backup_strategy”字段,则响应体中 “start_time”默认返回“02:00-03:00”。 keep_days Integer 指定已生成备份文件的可保存天数。 取值范围:1~732。如果请求体中不填写“backup_strategy”字段,则响应体中 “keep_days”默认返回“7”。 表13 volume字段数据结构说明 名称 参数类型 说明 type String 磁盘类型。 取值如下,区分大小写: ULTRAHIGH,表示SSD盘。 size Integer 磁盘大小。 GaussDB分布式实例创建时需指定大小:要求必须为(分片数*4GB)的倍数,取值范围:(分片数*40GB)~(分片数*16TB)。 表14 chargeInfo字段数据结构说明 名称 参数类型 说明 charge_mode String 创建类型,支持按需。
  • 响应参数 表2 参数说明 参数 参数类型 描述 quotas object 租户实例配额信息。 详情请参见表3。 表3 quotas 参数 参数类型 描述 resources Array of objects 资源列表对象。 详情请参见表4。 表4 resources 参数 参数类型 描述 type String 指定类型的配额。 instance: 表示实例的配额。 used Integer 已创建的资源个数。 quota Integer 资源最大的配额数。
  • 错误码 错误码列表: 表1 错误码列表 状态码 错误码 错误信息 描述 处理措施 400 DBS.200001 Parameter error. 参数错误。 检查传入的参数或URL是否全部正确。 400 DBS.200004 Parameter error. 参数错误。 检查传入的参数或URL是否全部正确。 400 DBS.200006 The request is null. Enter a request parameter. 请求为空,请输入请求参数。 请输入请求参数后重试。 400 DBS.200021 Invalid DB instance name. 实例名非法。 请参考对应实例名的参数说明输入符合要求的实例名后重试。 400 DBS.200023 Storage space is out of range. 卷大小超出允许范围。 检查磁盘大小的值是否正确。 400 DBS.200024 Invalid region. Region非法。 请输入正确的 Region ID。 400 DBS.200025 Invalid AZ. 可用区取值非法。 检查可用区的参数是否正确,可用区是否存在。 400 DBS.200026 Invalid storage type. 卷类型非法。 检查磁盘的类型是否正确,是否符合要求。 400 DBS.200027 Storage space must be a multiple of 10. 卷大小不是10的整数倍。 检查磁盘大小是否是10的倍数。 400 DBS.200040 The DB engine or version is not supported. 不支持的数据库类型或版本。 检查数据库引擎或版本是否支持。 400 DBS.200041 Invalid database version. 数据库版本非法。 检查数据库的版本号是否支持。 400 DBS.200042 The DB engine does not exist. 不支持的数据库类型或版本。 检查数据库类型或版本是否正确。 400 DBS.200043 Invalid synchronize model. HA同步模式非法。 检查同步模式是否正确。 400 DBS.200048 Invalid VPC ID. VPC ID非法。 检查VPC ID是否正确。 400 DBS.200049 Invalid subnet ID. 子网的网络ID非法。 检查子网ID是否正确。 400 DBS.200051 Invalid HA mode. 不合法的HA模式。 检查HA模式是否正确。 400 DBS.200052 Invalid database root password. 数据库root密码非法。 检查数据库root密码是否符合要求。 400 DBS.200053 The selected specifications do not exist. 所选规格不存在。 检查所选规格是否正确。 400 DBS.200054 Invalid specifications. 所选规格非法。 检查规格码是否正确,规格在当前可用区是否存在,规格是否支持。 400 DBS.200056 The maximum number of nodes has been reached. 节点个数达到最大值。 检查节点个数是否已达到最大值。 400 DBS.200063 Invalid cluster mode. 集群模式非法。 检查集群模式是否合法。 400 DBS.200068 This is a weak password. Please enter a strong password. 这是一个弱密码,请输入一个强度大一些的密码。 请参考对应的密码参数说明,输入符合密码复杂度要求,且强度更高的密码。 400 DBS.200085 The quota is insufficient. 配额不足。 检查配额是否充足。 400 DBS.200086 This operation is not allowed by the DB instance status. 实例状态不允许做该操作。 检查实例的状态或实例正在进行的操作是否与请求冲突。 400 DBS.200087 The number of tags added for the DB instance has reached the quota. 单个实例标签数量达到最大配额。 检查实例标签数量是否达到了最大配额。 400 DBS.200098 The tag already exists. 该资源标签已存在。 检查标签是否已存在。 400 DBS.200175 The engine version is not permitted to enable force switch. 该引擎版本不支持设置切换策略。 检查该引擎版本是否高于1.2.2。 400 DBS.200203 Failed to query the DB instance. 查询实例失败。 检查查询的实例是否存在或重试。 400 DBS.200302 Storage space must be a multiple of 10. 卷大小不是10的整数倍。 检查磁盘大小是否是10的倍数。 400 DBS.200303 The scale-up times have reached the maximum value. 扩容次数达到最大限制。 检查扩容次数是否达到最大限制。 400 DBS.200306 The new storage space must be greater than or equal to the original storage space. 扩容参数不合法。 检查扩容参数是否合法。 400 DBS.200308 The new storage space after scaling up cannot be greater than that of the primary DB instance. 备机扩容后的大小不能超过主机。 检查备机扩容后的大小是否超过了主机。 400 DBS.200405 Parameter error. 参数错误。 检查传入的参数或URL是否全部正确。 400 DBS.200461 The parameter value is out of range. 参数值超出范围。 检查参数值是否超出范围。 400 DBS.200475 New password should not equal to the old ones. 新密码不能与旧密码相同。 检查新旧密码是否符合要求。 400 DBS.200504 Invalid database version. 数据库版本非法。 检查数据库的版本号是否支持。 400 DBS.200506 Invalid KMS key ID. 密钥非法。 检查密钥是否正确。 400 DBS.200507 The KMS key is invalid or has been deleted. 密钥失效或已删除。 检查密钥是否正确。 400 DBS.200543 The job does not exist. 任务不存在。 检查任务是否正确。 400 DBS.200823 The database does not exist. 数据库不存在。 检查数据库名称是否合法。 400 DBS.200824 The database account does not exist. 数据库账号不存在。 检查数据库用户名称是否合法。 400 DBS.200825 Modifying permission is not allowed on read replicas. 不允许在只读实例上执行修改权限操作。 请确认权限后操作。 400 DBS.200943 Agent async requet failed. 调用agent异步请求失败。 请检查Agent连接是否正常。 400 DBS.201004 The backup type does not exist. 备份类型不存在。 检查备份类型。 400 DBS.201014 This operation is not allowed by the DB instance status. 实例状态不允许做该操作。 检查实例的状态或实例正在进行的操作是否与请求冲突。 400 DBS.201019 The restoration task does not exist. 恢复任务不存在。 该实例没有相关恢复任务或者不需要进行恢复后的数据确认。 400 DBS.201035 The database name must be different from the original and target database names. 输入的数据库名重复或者输入的数据库名与目标库上的重复。 检查数据库名是否正确。 400 DBS.201101 Invalid backup cycle. 备份周期非法。 检查备份周期是否正确,是否符合要求。 400 DBS.201103 Invalid backup start time. 备份开始时间非法。 检查备份开始时间是否符合要求,备份开始时间和备份结束时间的关系是否正确。 400 DBS.201106 Invalid retention days. 保留天数非法。 检查保留天数是否合法。 400 DBS.201203 The backup file does not exist. 备份文件不存在。 检查该备份是否存在,备份是否匹配实例。 400 DBS.201207 The DB engine or version is not supported. 不支持的数据库类型或版本。 检查数据库引擎或版本是否支持。 400 DBS.201208 The operation is not allowed by the backup status. 备份状态不允许。 请明确具体操作约束,按照约束进行操作。 400 DBS.201210 Invalid backup name. 备份名非法。 检查备份名称是否合法。 400 DBS.212002 Incorrect parameter group quota. 参数组配额错误。 检查参数组配额是否正确。 400 DBS.212003 Operation not allowed. 不支持此操作。 检查实例的状态或实例正在进行的操作是否与请求冲突。 400 DBS.212004 Parameter group update error. 参数组更新错误。 检查参数是否正确。 400 DBS.212005 The node does not belong to the group. 节点不属于组。 检查节点及所属组是否正确。 400 DBS.212007 The DB engine does not exist. 引擎不存在。 检查数据库引擎是否正确。 400 DBS.212008 The DB engine is not supported. 不支持的引擎。 检查数据库引擎是否支持。 400 DBS.212009 Task processing failed. 任务处理失败。 稍后请重试,或联系技术支持。 400 DBS.212010 The parameter group is being applied. 绑定正在执行。 稍后请重试。 400 DBS.212011 Application failed. 绑定失败。 重新绑定或联系技术支持。 400 DBS.212012 The parameter does not exist. 参数不存在。 检查参数是否正确。 400 DBS.212014 The node does not have a default parameter group. 节点没有默认参数组。 检查默认参数组。 400 DBS.212015 Partial success. 部分成功。 检查任务部分失败原因或联系技术支持。 400 DBS.212016 Parameter update failed. 参数更新失败。 检查参数是否正确。 400 DBS.212017 Invalid parameter. 参数非法。 检查参数是否正确。 400 DBS.212025 Update failed. 更新失败。 检查更新失败原因或联系技术支持。 400 DBS.212030 The parameter template name already exists. 参数组名已存在。 检查参数是否正确。 400 DBS.212032 The parameter template has been applied. 参数模板已被应用。 检查参数模板是否正确。 400 DBS.212037 Parameters are incorrectly set. 参数设置不正确。 检查参数设置是否正确。 400 DBS.216028 Insufficient internal resource quota. 内部资源配额不足。 检查内部资源配额。 400 DBS.216030 The queried node does not belong to the current instance. 操作节点不属于该实例。 检查操作节点信息是否正确。 400 DBS.280001 Parameter error. 参数错误。 检查参数是否正确。 400 DBS.280006 The request is null. Enter a request parameter. 请求为空,请输入请求参数。 检查请求参数是否正确。 400 DBS.280124 Invalid backup file id 备份文件ID非法 检查备份文件ID是否合法 400 DBS.280127 Invalid backup description. 备份描述不合法。 检查备份描述是否合法。 400 DBS.280128 The database information of the DB instance is not found. Check the database name to see whether the instance database information exists. 请检查数据库名,确认所填数据库名信息,找不到该实例的数据库信息。 检查数据库名称是否正确。 400 DBS.280203 This is a weak password. Please enter a strong password. 这是一个弱密码,请输入一个强度大一些的密码. 请参考对应的密码参数说明,输入符合密码复杂度要求,且强度更高的密码。 400 DBS.280204 Invalid parameter. 输入参数不合法。 检查参数是否正确。 400 DBS.280214 Invalid retention days. 保留天数非法。 检查保留天数是否合法。 400 DBS.280215 Invalid backup cycle. 备份周期非法。 检查备份周期是否合法。 400 DBS.280216 Invalid backup start time. 备份开始时间非法。 检查备份开始时间是否合法。 400 DBS.280234 Invalid DB instance name. 实例名非法。 检查实例名称是否合法。 400 DBS.280235 Invalid database type. 数据库类型非法 检查数据库类型是否正确。 400 DBS.280236 Invalid database version. 数据库版本非法。 检查数据库版本是否正确。 400 DBS.280237 Datastore not specified. Datastore为空。 检查Datastore是否合法。 400 DBS.280238 The DB engine or version is not supported. 不支持的数据库类型或版本。 检查数据库引擎或版本是否支持。 400 DBS.280239 Invalid specifications. 所选规格非法。 检查所选规格是否正确。 400 DBS.280241 Invalid storage type. 卷类型非法。 检查磁盘的类型是否正确,是否符合要求。 400 DBS.280242 Storage space is out of range. 卷大小超出允许范围。 检查磁盘大小的值是否正确。 400 DBS.280246 Invalid database root password 数据库root密码非法。 检查数据库root密码是否符合要求。 400 DBS.280250 Invalid backup retention days. 备份保留天数非法。 检查保留天数是否合法。 400 DBS.280251 Invalid backup cycle. 备份周期不合法。 检查备份周期是否符合要求。 400 DBS.280253 Invalid backup start time. 备份开始时间非法。 检查备份开始时间是否符合要求,备份开始时间和备份结束时间的关系是否正确。 400 DBS.280270 The parameter does not exist. 参数不存在。 检查参数是否正确。 400 DBS.280271 The parameter value is out of range. 参数值超出范围。 检查参数是否正确。 400 DBS.280272 The tag key must be unique. 新增标签存在重复的键值。 请检查请求参数中的标签键值。 400 DBS.280277 Invalid object name. 对象名称非法。 检查对象名称是否合法。 400 DBS.280285 Invalid AZ. 可用区取值非法。 检查可用区的参数是正确,可用区是否存在。 400 DBS.280288 Invalid FlavorRef. 规格非法。 检查规格是否合法。 400 DBS.280311 Invalid storage space size. 存储空间大小非法。 检查存储空间大小是否合法。 400 DBS.280325 Invalid storage information. 硬盘信息不合法。 检查硬盘信息是否合法。 400 DBS.280342 Invalid cluster mode. 集群模式非法。 检查集群模式是否合法。 400 DBS.280364 Invalid database port. 数据库端口号无效。 检查数据库端口号是否合法。 400 DBS.280365 Invalid billing mode. 付款模式无效。 检查传入的付款模式是否正确。 400 DBS.280402 Invalid HA mode. HA模式非法。 检查HA模式是否合法。 400 DBS.280404 Invalid DB instance ID or node ID format. 实例ID或者节点ID非法。 检查实例ID是否合法。 400 DBS.280407 Invalid node ID. 节点ID非法。 检查节点ID是否合法。 400 DBS.280416 Invalid backup end time. 备份结束时间非法。 检查备份结束时间是否合法。 400 DBS.280432 Invalid duration for yearly/monthly DB instances. 不合法的包周期时长。 请检查包周期时长是否正确。 400 DBS.280433 Invalid enterprise project ID. 不合法的企业项目ID。 检查企业项目ID是否符合要求。 400 DBS.280434 Invalid specification code. 所选规格码非法。 检查规格码是否合法。 400 DBS.280439 Invalid records. The number of records must be an integer less than or equal to 100. 无效的查询记录数,请输入小于等于100的正整数。 检查查询记录数是否合法。 400 DBS.280440 Invalid offset, please enter a non negative integer. 无效的偏移量,请输入非负整数 检查偏移量是否合法。 400 DBS.280447 Invalid time zone. 不合法的time zone。 检查时区参数是否填写正确。 400 DBS.280448 The storage type is sold out. 当前卷类型已售罄。 请创建其他卷类型或切换其他可用区或区域。 400 DBS.280449 This operation cannot be performed because the object is frozen. 不能对冻结的对象执行该操作。 解冻该实例,再重试。 400 DBS.280450 The DB instance specifications are sold out. 当前规格已售罄。 请创建其他规格集群或切换其他可用区或区域。 400 DBS.280600 Invalid coordinator node quantity. 协调节点数量非法。 检查协调节点数量是否合法。 400 DBS.280601 Invalid shard quantity. 分片数量非法。 检查分片数量是否合法。 400 DBS.280604 Invalid number of added shards for cluster capacity expansion. 扩容分片数非法。 检查扩容分片数量是否合法。 400 DBS.280618 Differential backup cycle invalid. 差异备份周期无效。 检查差异备份周期是否合法。 400 DBS.280628 Invalid replica count. 副本数非法。 检查副本数量是否合法。 400 DBS.280629 The database version does not support two-replica instances. 数据库版本不支持2副本实例。 检查副本数量是否合法,或者修改为支持的数据库版本,再重试。 400 DBS.280630 Two-replica instances can only be deployed within a single AZ. 2副本实例只支持单可用区。 检查2副本实例可用区是否合法。 400 DBS.280631 Invalid database name. 数据库名非法。 检查数据库名称是否合法。 400 DBS.280632 Invalid schema. 数据库模式非法。 检查数据库模式是否合法 400 DBS.280633 Invalid source node group. 源Node Group非法。 检查源Node Group是否合法。 400 DBS.280634 Invalid target node group. 目标Node Group非法。 检查目标Node Group是否合法。 400 DBS.280635 Invalid Solution Solution非法。 检查solution参数是否填写正确。 400 DBS.290000 Parameter error. 参数错误。 检查传入的参数或URL是否全部正确,是否符合要求。 400 DBS.290001 Parameter error. 参数错误。 检查参数是否填写正确。 403 DBS.200010 The DB instance ID or user ID may be null, or the operation is not authorized. 实例ID和用户ID可能为空,或者操作越权。 检查实例ID或用户ID是否正确,或者检查访问权限。 403 DBS.200044 Resource not found or permission denied. 访问资源不存在,或者无访问权限。 修改资源ID或者检查访问权限。 403 DBS.200174 No permission to enable force switch. 没有设置切换策略参数的权限。 检查是否有设置切换策略参数的权限。 403 DBS.200604 The DB instance ID or user ID may be null, or the operation is not authorized. 实例ID和用户ID可能为空,或者操作越权。 检查实例ID或用户ID是否正确,获取检查访问权限。 403 DBS.200810 You are not allowed to create databases on read replicas. 不能在只读实例创建数据库。 检查只读实例操作限制。 403 DBS.200819 You are not allowed to delete database users on read replicas. 不能在只读实例执行删除数据库用户。 检查只读实例操作限制。 403 DBS.280020 The account is restricted. 账户受限。 检查账号是否权限不足。 400 DBS.280800 This operation is not allowed by the cluster status. 集群状态受限,操作不允许执行。 检查集群状态是否正常。 400 DBS.280804 This operation is not allowed for primary/standby instances with kernel version 1.x 1.X内核版本不支持对主备版实例进行操作。 检查操作实例内核版本,如要必要需要升级内核版本。 400 DBS.280828 The component ID must be the standby DN ID. 组件ID必须是备DN。 检查组件ID状态,不允许传入主DN组件ID。 403 DBS.201003 Resource not found or permission denied. 访问资源不存在,或者无访问权限。 修改资源ID或者检查访问权限 403 DBS.280015 Resource not found or permission denied. 访问资源不存在,或者无访问权限。 修改资源ID或者检查访问权限 403 DBS.280056 Invalid token. Token非法。 请检查token是否正确,或者重新获取token后再试 404 DBS.200002 The DB instance does not exist. 实例不存在。 检查租户是否拥有该实例,实例名或实例ID是否正确,实例是否存在。 404 DBS.200008 The ECS information of the DB instance cannot be found. 请检查数据库,确认实例的虚拟机信息,找不到该实例的虚拟机信息。 检查实例虚拟机是否正常。 404 DBS.200013 The original DB instance does not exist. 源实例不存在。 检查源实例是否存在。 404 DBS.200045 The DB instance does not exist. 实例不存在。 查租户是否拥有该实例,实例名或实例ID是否正确,实例是否存在。 404 DBS.200050 The security group does not exist or does not belong to the VPC. 安全组不存在,或不属于该VPC。 检查安全组是否正确。 404 DBS.200408 The DB instance abnormal, no normal nodes. 实例异常,无正常节点。 检查实例或节点状态。 404 DBS.200470 The region or AZ does not exist. Region或可用区不存在。 请输入正确的 Region ID或可用区。 404 DBS.200501 The subnet does not exist or does not belong to the VPC. 子网不存在,或不属于该VPC。 检查子网是否正确。 404 DBS.200503 The VPC does not exist or does not belong to the user. VPC不存在,或不属于该用户。 检查VPC是否正确。 404 DBS.200602 The DB instance does not exist. 该实例不存在。 查租户是否拥有该实例,实例名或实例ID是否正确,实例是否存在。 404 DBS.201010 The backup file does not exist. 备份文件不存在。 检查该备份是否存在,备份是否匹配实例。 404 DBS.201028 The DB instance does not exist. 实例不存在或已删除。 查租户是否拥有该实例,实例名或实例ID是否正确,实例是否存在。 404 DBS.212001 The parameter group does not exist. 参数组不存在。 检查参数组是否存在。 404 DBS.212013 The object does not exist. 对象不存在。 请确定操作的对象存在。 404 DBS.290002 The selected specifications do not exist. 所选规格不存在。 检查所选规格是否正确。 404 DBS.290005 The DB instance does not exist. 该实例不存在。 检查租户是否拥有该实例,实例名或实例ID是否正确,实例是否存在。 404 DBS.290011 The DB instance does not exist. 实例不存在。 检查租户是否拥有该实例,实例名或实例ID是否正确,实例是否存在。 404 DBS.290013 Resource not found. 未找到资源。 检查入参是否正确,实例是否存在。 409 DBS.200011 Another operation is being performed on the DB instance or the DB instance is faulty. 该实例正在进行其它操作或该实例故障,无法执行该操作,请稍后重试。 检查实例的状态或实例正在进行的操作是否与请求冲突。 409 DBS.200019 This operation conflicts with the currently running task, please troubleshoot by yourself. 该操作与当前正在运行的任务是冲突的,请自行排查。 检查实例的状态或实例正在进行的操作是否与请求冲突。 409 DBS.200022 The DB instance name already exists. 实例名称已存在。 请输入一个与已存在的实例不相同的实例名。 409 DBS.200047 Another operation is being performed on the DB instance or the DB instance is faulty. 该实例正在进行其它操作或该实例故障,无法执行该操作,请稍后重试。 检查实例的状态或实例正在进行的操作是否与请求冲突。 409 DBS.200316 This operation cannot be performed because the DB instance status is Storage full. 当前实例状态为存储空间满,不能进行该操作。 检查实例存储空间是否已满。 409 DBS.200402 Invalid operation. 操作不合法。 检查请求是否合法。 409 DBS.200826 The database name already exists. 数据库名称已存在。 检查数据库名称是否合法。 409 DBS.200827 The database user already exists. 账号名称已存在。 检查数据库用户是否合法。 409 DBS.200828 Built-in database accounts cannot be edited. 数据库内置账号,用户不可操作。 检查用户操作权限。 409 DBS.201201 The backup name already exists. 备份名称已存在。 请确定操作的对象是否存在。 409 DBS.201202 Another operation is being performed on the DB instance or the DB instance is faulty. 该实例正在进行其它操作或该实例故障,无法执行该操作,请稍后重试。 检查实例的状态或实例正在进行的操作是否与请求冲突。 409 DBS.201205 Backup is in progress, please wait. 正在备份中,请稍等。 等待备份完成后,再重试。 409 DBS.212006 Another operation is being performed on the DB instance or the DB instance is faulty. 该实例正在进行其它操作或该实例故障,无法执行该操作,请稍后重试。 检查实例的状态或实例正在进行的操作是否与请求冲突。 409 DBS.212033 Failed to change parameter template values because the DB instance is currently being operated. 无法更改数据库实例的参数组值,因为当前正在操作数据库实例。 检查实例的状态或实例正在进行的操作是否与请求冲突。 409 DBS.280011 This operation cannot be performed because the DB instance is abnormal or has been deleted. 实例当前状态异常或已删除,不允许做该操作。 检查实例的状态是否正常或者该实例是否已经被删除了。 409 DBS.280406 Operation not allowed by the DB instance type or status. 实例类型或状态受限,操作不允许。 检查实例的状态或实例正在进行的操作是否与请求冲突。 413 DBS.200046 The number of DB instances has reached the quota. 实例数量达到配额。 检查配额。 413 DBS.290003 The number of DB instances has reached the quota. 实例数量达到配额。 检查配额。 422 DBS.212019 The parameter cannot be processed. 参数错误。 检查参数是否正确。 500 DBS.108000 Server failure. 服务器错误。 请联系客服管理员或者稍后重试。 500 DBS.108002 Server failure. 服务器错误。 请联系客服管理员或者稍后重试。 500 DBS.108005 Server failure. 服务器错误。 请联系客服管理员或者稍后重试。 500 DBS.200005 Server failure. 服务器错误。 请联系客服管理员或者稍后重试。 500 DBS.200208 Server failure. 服务器错误。 请联系客服管理员或者稍后重试。 500 DBS.200811 Failed to create the database. 创建数据库失败。 检查失败原因或联系技术支持。 500 DBS.200821 Failed to modify database user permissions. 修改数据库用户权限失败。 检查用户权限。 500 DBS.213002 Failed to process the request. 请求处理失败。 请联系客服管理员或者稍后重试。 500 DBS.213004 Failed to process the request. 请求处理失败。 请联系客服管理员或者稍后重试。 500 DBS.290006 Failed to process the request. 请求处理失败。 请联系客服管理员或者稍后重试。 500 DBS.290015 Failed to process the request. 请求处理失败。 请联系客服管理员或者稍后重试。 400 DBS.280266 Storage space must be a multiple of 10. 卷大小不是10的整数倍。 检查磁盘大小是否是10的倍数。 400 DBS.280611 Storage space must be a common multiple of 40GB and the number of shards. 所选磁盘容量大小必须为40GB和分片数的公倍数。 检查磁盘大小是否符合要求。 400 DBS.280612 Storage space excess max limit for current shard number. 所选磁盘容量大于当前分片数支持的最大值。 检查磁盘大小是否符合要求。 400 DBS.280243 Invalid region. Region非法。 请输入正确的 Region ID。 400 DBS.200505 The subnet does not exist or does not belong to the VPC. 子网不存在,或不属于该vpc。 请输入正确的子网后重试。 404 DBS.200502 The security group does not exist or does not belong to the VPC. 安全组不存在,或不属于该VPC。 请输入正确的安全组后重试。 400 DBS.200065 Invalid retention days. 保留天数非法。 检查保留天数是否合法。 400 DBS.280602 Invalid HA consistency. Ha一致性非法。 检查Ha一致性是否合法。 400 DBS.280262 Invalid synchronize model. Ha同步模式非法。 检查Ha模式是否合法。 400 DBS.200057 Invalid parameter template ID. 实例参数组的ID取值非法。 请输入正确的实例参数组ID后重试。 404 DBS.200058 The parameter template does not exist. 参数组不存在。 检查参数组是否存在。 400 DBS.200059 Invalid database port. 数据库端口号无效。 检查数据库端口号是否合法。 400 DBS.280654 The Ha instance is not supported to cancel parallel restore. 主备版实例不支持取消并行恢复。 主备版实例不支持设置并行恢复,请按照API文档在请求体中取消设置并行恢复。 400 DBS.280613 Please use specifications of data nodes. 请使用数据节点的规格。 检查数据节点规格是否正确。 404 DBS.200355 Resource not found. 未找到资源。 检查资源后重试。 400 DBS.200061 Invalid billing mode. 付款模式无效。 检查付款模式是否合法。 400 DBS.201218 The backup file is not manual. 不是手动备份文件。 选择手动备份文件进行操作。 404 DBS.280022 The DB instance does not exist. 实例不存在或已删除。 查租户是否拥有该实例,实例名或实例ID是否正确,实例是否存在。 400 DBS.280408 Invalid project id. project id 非法。 检查project id是否合法。 400 DBS.280607 Exceeding the upper limit of data nodes number in a single expand request. 超过单次数据节点扩容数量的上限。 检查单次数据节点扩容数量是否达到上限。 400 DBS.200082 The available IP addresses in the selected subnet are insufficient. 所选子网可用IP不足。 请输入正确可用的子网后重试。 400 DBS.280606 Expanding coordinator nodes and data nodes at the same time is not supported currently. 暂不支持同时扩容协调节点和数据节点。 检查扩容约束后重试。 400 DBS.280608 Exceeding the upper limit of coordinator nodes number in a single expand request. 超过单次协调节点扩容数量的上限。 检查单次协调节点扩容数量是否达到上限。 400 DBS.280609 Expand cluster request must contains at least one node type to expand. 扩容集群请求至少要包含一种要扩容的节点。 检查扩容规范后重试。 400 DBS.301024 The backup file is not normal. 备份文件状态异常。 检查该备份文件的状态。 400 DBS.280651 Failed to create all DB schemas. 创建数据库SCHEMA全部失败。 检查输入schema参数然后重试。 400 DBS.280652 Failed to create some DB schemas. 创建数据库SCHEMA部分失败。 检查输入schema参数然后重试。 400 DBS.200029 Incorrect username or password parameter. 用户名或密码参数错误。 检查输入输入用户名与密码然后重试。 400 DBS.280132 Database name not entered. 未输入数据库名称。 请输入数据库名称。 400 DBS.280661 Illegal instance specification, which does not exist or does not match the instance 非法的实例规格,该规格不存在或与实例不匹配。 请根据当前实例检查传入的规格参数。 400 DBS.280626 DR relationship established between primary and DR instances. 容灾主集群和灾备集群已存在容灾关系。 请检查容主备实例是否已经存在灾关系。 400 DBS.280638 The DR relationship does not exist. 容灾关系记录不存在。 请检查容灾关系是否存在。 400 DBS.280806 Cross-region DR operation failed. 跨region操作失败。 请检查目前region的project id是否合法。 400 DBS.280667 Invalid shard component ID. 分片组件id非法。 请检查组件ID是否合法。 400 DBS.280668 Component IDs are from the same shard. 存在同组DN分片异常。 请检查批量DN主备倒换时,多个组件ID是否来自不同组分片。 400 DBS.280676 The component ID does not belong to the current node ID. 组件id不属于当前节点id。 请检查DN主备倒换时,组件ID是否属于对应的节点ID。 400 DBS.200478 Failed to change the password. 修改密码失败。 请检查传入的密码是否正确。 400 DBS.200062 Invalid database username. 数据库用户名非法。 请输入正确的数据库用户名。 400 DBS.280653 Invalid database template. Use the template0. 数据库模板非法,建议使用template0数据库模板。 请输入正确的模板名称。 400 DBS.200064 Invalid retention days. 保留天数非法。 请输入正确的保留天数。 400 DBS.06010001 Instance status is invalid. 实例状态无效。 请检查当前的实例状态。 400 DBS.06020003 An operation that conflicts with the current operation is in progress. 与当前操作冲突的操作正在进行中。 请检查当前实例是否正在进行其他操作。 400 DBS.06020152 Incremental restoration in progress for the primary instance. Perform this operation when there is no DR relationship. 灾备实例增量恢复中,请在无容灾状态时执行该操作。 检查当前实例的容灾状态。 400 DBS.06020153 Incremental restoration failed for the DR instance. Perform this operation when there is no DR relationship. 灾备实例增量恢复失败,请在无容灾状态时执行该操作。 检查当前实例的容灾状态。 400 DBS.06020154 Promotion to primary in progress for the DR instance. Perform this operation when there is no DR relationship. 灾备实例升主中,请在无容灾状态时执行该操作。 检查当前实例的容灾状态。 400 DBS.06020175 Incremental synchronization failed for the primary instance. Perform this operation when incremental synchronization is in progress. 主实例处于增量同步失败,请在增量同步中执行该操作。 主实例处于增量同步失败,请在增量同步中执行该操作。 400 DBS.06020177 Switchover failed for the DR instance. Perform this operation when incremental restoration is in progress. 灾备实例处于主备切换失败,请在增量恢复中执行该操作。 灾备实例处于主备切换失败,请在增量恢复中执行该操作。 400 DBS.06020180 Incremental restoration failed for the DR instance. Perform this operation when incremental restoration is in progress. 灾备实例处于增量恢复失败,请在增量恢复中执行该操作。 灾备实例处于增量恢复失败,请在增量恢复中执行该操作。 400 DBS.06020161 The xlog_keep_radio field is invalid. xlog_keep_radio字段非法 xlog_keep_radio字段非法 400 DBS.06020162 This operation is not supported. 不支持此容灾操作。 不支持此容灾操作。 400 DBS.06280105 This feature is not enabled. 此功能特性未启用。 此功能特性未启用,请在运维管理平台开启相关特性白名单。 400 DBS.06010013 Parameter error: ${parameterName}/${parameterValue} 调用接口时填写的参数错误。 请重新填写为正确的参数。 400 DBS.216003 Permission denied. 没有权限。 检查账号是否权限不足。 400 DBS.06280032 New OS does not match original instance. 备份恢复到新实例,操作系统不匹配。 检查原实例操作系统是否匹配。 400 DBS.06280033 The selected deployment model of the ${resourceType} type cannot be created. 资源类型:${resourceType},暂不支持创建该部署形态的实例。 检查当前资源类型是否支持创建该形态的实例。 400 DBS.06010018 Failed to obtain the instance volume information. 获取实例磁盘信息失败。 检查获取磁盘信息的远程接口是否调用成功或者磁盘信息处理是否出现异常。 400 DBS.06010033 The current node type or role does not support this operation. 当前节点类型或角色不支持该操作。 请选择CN节点或者角色类型为只读、主、备的DN节点。 400 DBS.06010035 The component ID does not exist. 组件ID不存在。 请检查组件ID参数。 400 DBS.06010036 The pidstat system command is not supported. 不支持pidstat系统命令。 不支持pidstat系统命令。 400 DBS.06010041 None of the configuration parameter values to be modified are changed. 所有修改的配置参数值均未变化。 请填写不同于当前值的配置参数值。 403 DBS.06010037 Insufficient permissions for the KMS key. kms密钥操作权限不足。 请联系密钥管理员授权足够权限。 400 DBS.280659 Illegal number of grayscale upgrade shard, please check the parameters. 非法的灰度升级分片数,请检查传参。 非法的灰度升级分片数,请检查传参。 400 DBS.06013034 The maximum number of nodes that can be stopped must not exceed half of the total number. 停止节点数不能超过半数。 请检查实例节点类型。 400 DBS.06013039 Single node instance not support the operation. 单节点实例不支持此操作。 请检查实例节点类型。 父主题: 附录
  • 请求消息 表2 参数说明 名称 是否必选 参数类型 说明 db_name 是 String 数据库名称。 数据库名称在1到63个字符之间,由字母、数字、或下划线组成,不能包含其他特殊字符,不能以“pg”和数字开头,且不能和模板库重名。 模板库包括postgres, template0 ,template1。 users 是 Array of objects 每个元素都是与数据库相关联的账号。单次请求最多支持50个元素。详情请参见表3。 表3 users字段数据结构说明 名称 是否必选 参数类型 说明 name 是 String 数据库账号名称。 数据库账号名称在1到63个字符之间,由字母、数字、或下划线组成,不能包含其他特殊字符,不能以“pg”和数字开头,不能和系统用户名称相同且账号名称必须存在。 系统用户包括“rdsAdmin”,“rdsMetric”, “rdsBackup”, “rdsRepl”, “root”。 readonly 是 Boolean 数据库账号权限。 true:只读。 false:可读可写。 schema_name 是 String schema名称。 schema名称在1到63个字符之间,由字母、数字、或下划线组成,不能包含其他特殊字符,不能以“pg”和数字开头,不能和模板库重名,且schema名称必须存在。 模板库包括postgres, template0 ,template1,public,information_schema。
  • 请求示例 设置gaussdb_test数据库多个账号的权限。 POST https://gaussdb-opengauss.cn-north-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/{instance_id}/db-privilege { "db_name" : "gaussdb_test", "users" : [ { "name" : "rds", "readonly" : false, "schema_name" : "teste123" }, { "name" : "rds001", "readonly" : true, "schema_name" : "teste134" }, { "name" : "rds002", "readonly" : false, "schema_name" : "teste135" } ] }
  • 请求示例 切换多个DN分片的主备。 POST https://gaussdb-opengauss.cn-north-1.myhuaweicloud.com/v3/0c8243400d37468bb4aed3cc94c2911d/instances/f9b5f9b296ec6808e067in14/switch-shard { "shards": [ { "node_id": "0bc478b4d132494a8f7b804da521b4b2no14", "component_id": "dn_6001" }, { "node_id": "53dee94c50574d36a0060db0a6b644f6no14", "component_id": "dn_6004" } ] }
  • 请求参数 表2 参数说明 名称 是否必选 参数类型 说明 shards 是 Array 节点列表,支持对单个或者多个DN分片做主备切换。节点信息为将要升主的备DN分片对应的节点ID(node_id)和组件ID(component_id)。具体请参考表3。 表3 shards参数说明 名称 是否必选 参数类型 说明 node_id 是 String 将要升主的备DN的节点ID。 component_id 是 String 将要升主的备DN的组件ID。最大长度7个字符,不能为null或者空字符串,不能为空格,校验和使用之前会自动过滤掉前后空格。至少包含大写字母(A-Z),小写字母(a-z),数字(0-9),非字母数字字符(限定为_)四类字符中的三类字符。组件ID通过查询实例的组件列表获取。
  • 响应参数 表2 参数说明 参数 参数类型 描述 total_count Integer 总记录数。 instances Array of objects 回收站所有的实例信息,具体参数请参考表3。 表3 instances字段数据结构说明 参数 参数类型 描述 id String 实例ID。 name String 实例名称。 ha_mode String 部署形态。 枚举值: Ha:主备版。 Independent:独立部署。 engine_name String 引擎名称。 engine_version String 引擎版本号。 pay_model String 计费模式。 0:按需计费。 1:包年包月。 created_at String 创建时间,格式为“yyyy-mm-ddThh:mm:ssZ”。 其中,T指某个时间的开始;Z指时区偏移量,例如北京时间偏移显示为+0800。 deleted_at String 删除时间,格式为“yyyy-mm-ddThh:mm:ssZ”。 其中,T指某个时间的开始;Z指时区偏移量,例如北京时间偏移显示为+0800。 volume_type String 磁盘类型。 枚举值: high:高IO。 ultrahigh:超高IO。 essd:急速型SSD。 volume_size String 磁盘大小。 data_vip String 数据vip。 enterprise_project_id String 企业项目ID,"0"代表默认的企业项目。 enterprise_project_name String 企业项目名称。 backup_level String 备份级别。 recycle_backup_id String 备份ID。(指删除实例时产生备份信息中的备份ID)。 recycle_status String 回收站备份状态。 枚举值: Running:运行中。 Active:有效。 mode String 实例类型。 枚举值: basic:基础版。 standard:标准版。 enterprise:企业版。
  • URI GET https://{Endpoint}/v3/{project_id}/recycle-instances 表1 参数说明 参数 是否必选 参数类型 描述 project_id 是 String 租户在某一Region下的项目ID。 获取方法请参见获取项目ID。 instance_name 否 String 实例名称。 offset 否 Integer 索引位置,偏移量。从第一条数据偏移offset条数据后开始查询,默认为0(偏移0条数据,表示从第一条数据开始查询),必须为数字,不能为负数。例如:该参数指定为0,limit指定为10,则只展示第1-10条数据。 limit 否 Integer 查询记录数。默认为50,不能为负数,最小值为1,最大值为50。例如该参数设定为10,则查询结果最多只显示10条记录。
  • 响应示例 { "total_count" : 2, "instances" : [ { "id" : "21f20e55999947a9938ad0453b757e72in14", "name" : "gaussdbv5_CCv20_bms_default_1_20220827012852", "ha_mode" : "Ha", "engine_name" : "gaussdbv5", "engine_version" : "2.3.0", "pay_model" : 0, "created_at" : "2022-08-09T09:26:44.000+08:00", "deleted_at" : "2022-08-09T09:26:44.000+08:00", "volume_type" : "localssd", "volume_size" : "", "data_vip" : "25.213.0.41 / 25.213.0.188 / 25.213.0.101 / 25.213.0.82", "enterprise_project_id" : 0, "enterprise_project_name" : null, "backup_level" : null, "recycle_backup_id" : "00b755ed678e41d18c74b28e2ad41bdcbr14", "recycle_status" : "Active", "mode" : "enterprise" }, { "id" : "a9df5b52b32e4571b1b6425a78a32956in14", "name" : "ecs-lxy-backup-3", "ha_mode" : "Ha", "engine_name" : "gaussdbv5", "engine_version" : "2.3.0", "pay_model" : 0, "created_at" : "2022-08-09T09:26:44.000+08:00", "deleted_at" : "2022-08-09T09:26:44.000+08:00", "volume_type" : "ultrahigh", "volume_size" : "", "data_vip" : "173.202.10.246 / 173.202.10.205 / 173.202.10.175", "enterprise_project_id" : 0, "enterprise_project_name" : null, "backup_level" : null, "recycle_backup_id" : "ef393704ef0045d1b6226b6f2cdc48a7br14", "recycle_status" : "Active", "mode" : "enterprise" } ] }
  • 请求示例 https://gaussdb-opengauss.cn-north-1.myhuaweicloud.com/opengauss/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in14/configurations { "values": { "xxx": "10", "yyy": "OFF" } }
  • 响应消息体(可选) 该部分可选。响应消息体通常以结构化格式(如JSON或XML)返回,与响应消息头中Content-Type对应,传递除响应消息头之外的内容。 对于获取用户Token接口,返回如下消息体,为篇幅起见,这里只展示部分内容。 { "token": { "expires_at": "2019-02-13T06:52:13.855000Z", "methods": [ "password" ], "catalog": [ { "endpoints": [ { "region_id": "az-01", ...... 当接口调用出错时,会返回错误码及错误信息说明,错误响应的Body体格式如下所示。 { "error_code": "AS.0001", "error_msg": "The format of message is error" } 其中,“error_code”表示错误码,“error_msg”表示错误描述信息。
  • 响应示例 查询可应用当前参数组模板的实例列表成功。 { "total_count": 2, "instances": [ { "instance_id": "1995a67680474481b3e42ac1474e32e0in14", "instance_name": "gauss-a283" }, { "instance_id": "8303819fd8744ef69f34595e9710a33din14", "instance_name": "gauss-2423-lt-master" } ] }
  • URI GET https://{Endpoint}/v3/{project_id}/configurations/{config_id}/applicable-instances 表1 参数说明 参数 是否必选 参数类型 描述 project_id 是 String 租户在某一Region下的项目ID。 获取方法请参见获取项目ID。 config_id 是 String 参数模板ID。 offset 否 Integer 索引位置,偏移量。从第一条数据偏移offset条数据后开始查询,默认为0(偏移0条数据,表示从第一条数据开始查询),必须为数字,不能为负数。例如:该参数指定为0,limit指定为10,则只展示第1~10条数据。 limit 否 Integer 查询记录数。默认为100,不能为负数,最小值为1,最大值为100。例如该参数设定为10,则查询结果最多只显示10条记录。
  • 请求示例 创建一个GaussDB数据库,库名为gaussdb_test。 POST https://gaussdb-opengauss.cn-north-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/{instance_id}/database { "name" : "gaussdb_test", "owner" : "test", "template" : "template0", "character_set" : "UTF8", "lc_collate" : "en_US.UTF-8", "lc_ctype" : "en_US.UTF-8" }
  • URI GET https://{Endpoint}/v3.1/{project_id}/configurations?offset={offset}&limit={limit} 表1 参数说明 参数 是否必选 参数类型 描述 project_id 是 String 租户在某一Region下的项目ID。 获取方法请参见获取项目ID。 offset 否 Integer 索引位置,偏移量。从第一条数据偏移offset条数据后开始查询,默认为0(偏移0条数据,表示从第一条数据开始查询),必须为数字,不能为负数。例如:该参数指定为0,limit指定为10,则只展示第1~10条数据。 limit 否 Integer 查询记录数。默认为100,不能为负数,最小值为1,最大值为100。例如该参数设定为10,则查询结果最多只显示10条记录。
  • 响应示例 获取参数模板列表成功。 { "count": 3, "configurations": [ { "id": "b000d7c91f1749da87315700793a11d4pr14", "name": "Default-GaussDB-EE-1.0-Dist-Combined (4 replicas)", "description": "Default parameter template for GaussDB-Enterprise Edition-1.0-Distributed-combined (4 replicas)", "created": "2022-03-23 07:20:11", "updated": "2022-03-23 07:20:11", "datastore_version": "1.0", "datastore_name": "GaussDB", "ha_mode": "combined", "user_defined": false }, { "id": "8d99f260ea1b4493a1b349e7abce5c09pr14", "name": "Default-Finance-Edition-GaussDB-1.3-Combined", "description": "Default parameter template for Finance Edition GaussDB 1.3-Combined", "created": "2022-03-23 07:20:11", "updated": "2022-03-23 07:20:11", "datastore_version": "1.1", "datastore_name": "GaussDB", "ha_mode": "combined", "user_defined": false }, { "id": "0f44b65521a8414d8b8811df810d94ccpr14", "name": "Default-Finance-Disaster-GaussDB-1.3-Combined", "description": "Default parameter template for Finance Disaster GaussDB 1.3-Combined", "created": "2022-03-23 07:20:11", "updated": "2022-03-23 07:20:11", "datastore_version": "1.2", "datastore_name": "GaussDB", "ha_mode": "combined", "user_defined": false } ] }
  • 响应参数 表2 参数说明 参数 参数类型 描述 configurations Array of objects 参数模板信息,具体参数请参考表3。 count Integer 总记录数。 表3 configurations字段数据结构说明 参数 参数类型 描述 id String 参数组ID。 name String 参数组名称。 description String 参数组描述。 datastore_version String 引擎版本。 datastore_name String 引擎名称。 ha_mode String 实例类型。 created String 创建时间,格式为"yyyy-MM-dd HH:mm:ss"。 updated String 更新时间,格式为"yyyy-MM-dd HH:mm:ss"。 user_defined Boolean 是否是用户自定义参数模板: false,表示为系统默认参数模板。 true,表示为用户自定义参数模板。
  • 请求示例 查询所有实例列表 GET https://gaussdb-opengauss.cn-north-1.myhuaweicloud.com/v3.1/97b026aa9cc4417888c14c84a1ad9860/instances 根据指定条件查询实例列表 GET https://gaussdb-opengauss.cn-north-1.myhuaweicloud.com/v3.1/97b026aa9cc4417888c14c84a1ad9860/instances?id=ed7cc6166ec24360a5ed5c5c9c2ed726in14&name=hy&type=Enterprise&datastore_type=GaussDB&vpc_id=19e5d45d-70fd-4a91-87e9-b27e71c9891f&subnet_id=bd51fb45-2dcb-4296-8783-8623bfe89bb7&offset=0&limit=10
  • URI GET https://{Endpoint}/v3.1/{project_id}/instances?id={id}&name={name}&type={type}&datastore_type={datastore_type}&vpc_id={vpc_id}&subnet_id={subnet_id}&offset={offset}&limit={limit} 表1 参数说明 名称 参数类型 是否必选 说明 project_id String 是 租户在某一Region下的项目ID。 获取方法请参见获取项目ID。 id String 否 实例ID。 “*”为系统保留字符,如果id是以“*”起始,表示按照*后面的值模糊匹配,否则,按照id精确匹配查询。不能只传入“*”。 name String 否 实例名称。 “*”为系统保留字符,如果name是以“*”起始,表示按照*后面的值模糊匹配,否则,按照name精确匹配查询。不能只传入“*”。 type String 否 按照实例类型查询。目前支持取值如下: Enterprise(区分大小写),对应分布式实例(独立部署)。 Centralization_standard(区分大小写),对应主备版实例。 datastore_type String 否 数据库类型,不区分大小写。 GaussDB vpc_id String 否 虚拟私有云ID,获取方法如下:。 方法1:登录虚拟私有云服务的控制台界面,在虚拟私有云的详情页面查找VPC ID。 方法2:通过虚拟私有云服务的API接口查询,具体操作可参考查询VPC列表。 subnet_id String 否 子网的网络ID信息。 方法1:登录虚拟私有云服务的控制台界面,单击VPC下的子网,进入子网详情页面,查找网络ID。 方法2:通过虚拟私有云服务的API接口查询,具体操作可参考查询子网列表。 offset Integer 否 索引位置,偏移量。从第一条数据偏移offset条数据后开始查询,默认为0(偏移0条数据,表示从第一条数据开始查询),必须为数字,不能为负数。 limit Integer 否 查询记录数。默认为100,不能为负数,最小值为1,最大值为100。 tags String 否 根据实例标签键值对进行查询。 {key}表示标签键,最大长度127个unicode字符。key不能为空或者空字符串,不能为空格,使用之前先trim前后半角空格。不能包含+/?#&=,%特殊字符。 {value}表示标签值,可以为空。最大长度255个unicode字符,使用之前先trim 前后半角空格。不能包含+/?#&=,%特殊字符。如果value为空,则表示any_value(查询任意value)。 如果同时使用多个标签键值对进行查询,中间使用逗号分隔开,最多包含20组。 charge_mode String 否 计费模式。 取值范围: postPaid:后付费,即按需付费。 prePaid:预付费,即 包年/包月。
  • 响应示例 实例列表: { "instances": [ { "id": "b331ed66cc3249f78bc20737308c01f4in14", "status": "ACTIVE", "name": "gauss-9e88", "port": 8000, "type": "Enterprise", "ha": { "consistency": "strong", "replication_mode": "sync" }, "region": "eu-de", "datastore": { "type": "GaussDB", "version": "2.7", "complete_version": "2.7.2", "hotfix_versions": "2.7.2.1,2.7.2.2" }, "created": "2021-01-15 01:46:40 UTC", "updated": "2021-01-15 02:05:03 UTC", "volume": { "type": "ULTRAHIGH", "size": 120 }, "nodes": [ { "id": "02ebf757aaf94074855f49cc6e0e4712no14", "name": "gauss-9e88_gaussdbv5cn_2", "role": "master", "status": "ACTIVE", "availability_zone": "az2xahz", "component_names": "cn_5001:", "private_ip": "192.168.16.253" }, { "id": "0a87b8ecbfeb46aba1409cfc0f0d5c34no14", "name": "gauss-9e88_gaussdbv5cn_0", "role": "master", "status": "ACTIVE", "availability_zone": "az2xahz", "private_ip": "192.168.28.81" }, { "id": "2d9fec1ab3834936b074d63acf48b1f2no14", "name": "gauss-9e88_gaussdbv5dn3_2", "role": "master", "status": "ACTIVE", "availability_zone": "az2xahz" }, { "id": "48bb08a2d635435891ac0caa1c0bf2e3no14", "name": "gauss-9e88_gaussdbv5dn1_0", "role": "master", "status": "ACTIVE", "availability_zone": "az2xahz" }, { "id": "5df830f652204827ada32f8bc28b107eno14", "name": "gauss-9e88_gaussdbv5dn1_1", "role": "slave", "status": "ACTIVE", "component_names": "dn_6002:60011", "availability_zone": "az2xahz" }, { "id": "8a97a246cee841b38c5b47290d4c9c38no14", "name": "gauss-9e88_gaussdbv5cn_1", "role": "master", "status": "ACTIVE", "availability_zone": "az2xahz", "component_names": "cn_5003:", "private_ip": "192.168.27.52" }, { "id": "8c1a3f8eecca4d9e9974a868bb6dd942no14", "name": "gauss-9e88_gaussdbv5dn2_0", "role": "master", "status": "ACTIVE", "component_names": "dn_6004:60042", "availability_zone": "az2xahz" }, { "id": "9bd0c80b8a684cc9bd7d99dd5adffb07no14", "name": "gauss-9e88_gaussdbv5dn3_1", "role": "slave", "status": "ACTIVE", "component_names": "dn_6005:60073", "availability_zone": "az2xahz" }, { "id": "9e2a3cd541e249d4af5aa57c5d3a7f39no14", "name": "gauss-9e88_gaussdbv5dn1_2", "role": "slave", "status": "ACTIVE", "component_names": "dn_6006:60011", "availability_zone": "az2xahz" }, { "id": "b046d28989ec4ae5a1a9ab20fe65f248no14", "name": "gauss-9e88_gaussdbv5dn2_2", "role": "slave", "status": "ACTIVE", "component_names": "dn_6007:60042", "availability_zone": "az2xahz" }, { "id": "b614cc12fd3742dbb230245f88a7bf00no14", "name": "gauss-9e88_gaussdbv5dn3_0", "role": "slave", "status": "ACTIVE", "component_names": "dn_6008:60073", "availability_zone": "az2xahz" }, { "id": "caba8e88c3c84ae58202f1f589490611no14", "name": "gauss-9e88_gaussdbv5dn2_1", "role": "slave", "status": "ACTIVE", "component_names": "dn_6009:60042", "availability_zone": "az2xahz" } ], "private_ips": [ "192.168.16.253 / 192.168.28.81 / 192.168.27.52" ], "replica_num": 3, "db_user_name": "root", "vpc_id": "5f84a5c4-2f93-41de-8359-d7acedb585cc", "subnet_id": "300036af-a92f-4e9e-8e9f-7d20e7878b05", "security_group_id": "2dcfd40a-8f32-46b8-8a47-6cfab5eba163", "flavor_ref": "gaussdb.opengauss.ee.dn.m6.large.8.in", "flavor_info": { "vcpu": 2, "mem": 16 }, "switch_strategy": "Reliability", "charge_info": { "charge_mode": "postPaid" }, "backup_strategy": { "start_time": "19:00-20:00", "keep_days": 7 }, "maintenance_window": "18:00-22:00", "disk_encryption_id": "24ae42b5-4009-4ea2-b66a-0b211e424dab", "enterprise_project_id": "6e76681b-a2f5-4c5f-97c5-ba4fd3c0dfb2", "time_zone": "UTC+08:00", "instance_mode":"enterprise", "disk_usage": "0.9890", "backup_used_space": "37846" }, { "id": "226b4afcfcc84c86bf1b9cb345d3b00fin14", "status": "ACTIVE", "name": "UTS-gauss-ad53-2C3D", "port": 8000, "type": "Enterprise", "ha": { "consistency": "strong", "replication_mode": "sync" }, "region": "cn-xianhz-1", "datastore": { "type": "GaussDB", "version": "2.7", "complete_version": "2.7.2", "hotfix_versions": "2.7.2.1,2.7.2.2" }, "created": "2021-01-08 09:18:27 UTC", "updated": "2021-01-14 13:25:03 UTC", "volume": { "type": "ULTRAHIGH", "size": 120 }, "nodes": [ { "id": "07538a1def584cee99e2a5685eeab36ano14", "name": "UTS-gauss-ad53-2C3D_gaussdbv5dn3_1", "role": "slave", "status": "ACTIVE", "availability_zone": "az2xahz" }, { "id": "21f41baba1e2454f82331b7cb5aeabe5no14", "name": "UTS-gauss-ad53-2C3D_gaussdbv5dn1_2", "role": "master", "status": "ACTIVE", "component_names": "dn_6008:60042", "availability_zone": "az2xahz" }, { "id": "2909771a3b3e4e3998f9388e77d22391no14", "name": "UTS-gauss-ad53-2C3D_gaussdbv5dn1_0", "role": "slave", "status": "ACTIVE", "component_names": "dn_6007:60011", "availability_zone": "az2xahz" }, { "id": "2bd9a90a5da242a6b0743a7f597f6106no14", "name": "UTS-gauss-ad53-2C3D_gaussdbv5dn2_2", "role": "master", "status": "ACTIVE", "component_names": "dn_6006:60042", "availability_zone": "az2xahz" }, { "id": "77092f1dadb74d3ea13d28269cdd3590no14", "name": "UTS-gauss-ad53-2C3D_gaussdbv5dn3_2", "role": "master", "status": "ACTIVE", "component_names": "dn_6005:60072", "availability_zone": "az2xahz" }, { "id": "a46bfaa6d5a24355a60fce7432b964cano14", "name": "UTS-gauss-ad53-2C3D_gaussdbv5dn3_0", "role": "slave", "status": "ACTIVE", "component_names": "dn_6004:60072", "availability_zone": "az2xahz" }, { "id": "aa5277736f3844e2a7adeb9de529e2b1no14", "name": "UTS-gauss-ad53-2C3D_gaussdbv5dn2_1", "role": "slave", "status": "ACTIVE", "component_names": "dn_6003:60042", "availability_zone": "az2xahz" }, { "id": "b1d798e4ea7344dfa95032984bc6cfd7no14", "name": "UTS-gauss-ad53-2C3D_gaussdbv5cn_1", "role": "master", "status": "ACTIVE", "availability_zone": "az2xahz", "component_names": "cn_5002:", "private_ip": "192.168.29.231" }, { "id": "b9a46540186f4c0781eabaa2a79594cbno14", "name": "UTS-gauss-ad53-2C3D_gaussdbv5dn1_1", "role": "slave", "status": "ACTIVE", "component_names": "dn_6002:60011", "availability_zone": "az2xahz" }, { "id": "d283813030364060ab64371d50294977no14", "name": "UTS-gauss-ad53-2C3D_gaussdbv5dn2_0", "role": "slave", "status": "ACTIVE", "component_names": "dn_6001:60042", "availability_zone": "az2xahz" }, { "id": "eb7bce29b2284cd290405eaddc1b1a1eno14", "name": "UTS-gauss-ad53-2C3D_gaussdbv5cn_0", "role": "master", "status": "FAILED", "availability_zone": "az2xahz", "component_names": "cn_5001:", "private_ip": "192.168.30.44", "public_ip": "10.154.217.248" } ], "private_ips": [ "192.168.29.231 / 192.168.30.44" ], "public_ips": [ "10.154.217.248" ], "replica_num": 3, "db_user_name": "root", "vpc_id": "5f84a5c4-2f93-41de-8359-d7acedb585cc", "subnet_id": "300036af-a92f-4e9e-8e9f-7d20e7878b05", "security_group_id": "2dcfd40a-8f32-46b8-8a47-6cfab5eba163", "flavor_ref": "gaussdb.opengauss.ee.dn.m6.large.8.in", "flavor_info": { "vcpu": 2, "mem": 16 }, "switch_strategy": "Reliability", "charge_info": { "charge_mode": "postPaid" }, "backup_strategy": { "start_time": "18:00-19:00", "keep_days": 7 }, "maintenance_window": "18:00-22:00", "enterprise_project_id": "0", "time_zone": "UTC+08:00", "instance_mode":"enterprise", "disk_usage": "1.0000", "backup_used_space": "55824" } ], "total_count": 2 }
  • 响应示例 { "total": 1, "log_files": [{ "status": "ENABLE", "file_name": "d289e7f024d741698fb94d73316874ffin14_collector_20220506_155941.tar.gz", "start_time": "1651820343244", "end_time": "1651823943244", "file_size": "62", "file_link": "***" }] }
共100000条