该接口用于发起RDS PostgreSQL实例大版本升级任务。
接口说明
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
rds:UpgradeDBInstanceMajorVersion | Write |
|
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
DBInstanceClass | string | 否 | 升级后实例规格。CPU 和内存配置必须大于等于原实例规格。 例如,原实例规格 说明
RDS PG 的实例规格代码,请参见RDS PostgreSQL 主实例规格列表。
| pg.n2.medium.2c |
DBInstanceStorage | integer | 否 | 升级后实例存储空间。 单位:GB 取值范围:
说明
本地盘实例升级大版本时,支持存储空间缩容。可选择的最小存储空间,请参见升级数据库大版本。
| 20 |
PayType | string | 是 | 计费方式。固定配置为按量付费,取值 Postpaid。 说明
升级后如果需要变更实例的计费方式,请参见按量付费转包年包月。
| Postpaid |
InstanceNetworkType | string | 否 | 升级后实例网络类型。固定配置为 VPC,当前只支持专有网络实例进行大版本升级。 如果网络类型为经典网络,请先切换为专有网络。关于如何查看或切换网络类型,请参见切换网络类型。 | VPC |
SwitchTimeMode | string | 否 | 该参数与 SwitchOver 配合使用,只有 SwitchOver 参数取值为 true 时有效。表示割接时间。 取值范围:
| Immediate |
SwitchTime | string | 否 | 预留参数,无需配置。 | 2021-07-10T13:15:12Z |
SwitchOver | string | 否 | 割接配置,系统将创建一个新实例进行数据迁移。请选择迁移后是否自动切换至新实例。 取值范围:
说明
| false |
CollectStatMode | string | 否 | 选择在哪个时间点对数据库执行统计信息收集。
说明
对于不割接场景,割接前收集表示新实例开放读写前收集,割接后收集表示新实例开放读写后收集。
| After |
TargetMajorVersion | string | 否 | 升级后实例目标大版本。必须与执行升级前检查时设置的目标版本一致。 说明
可通过调用 UpgradeDBInstanceMajorVersionPrecheck 接口执行大版本升级前检查。
| 13.0 |
DBInstanceId | string | 否 | 原实例 ID。 | pgm-bp1gm3yh0ht1**** |
VPCId | string | 否 | VPC ID。可以通过 DescribeDBInstanceAttribute 接口查看原实例的 VPC ID。 | vpc-bp1opxu1zkhn00gzv**** |
VSwitchId | string | 否 |
说明
配置的目标实例交换机需要与原实例处于同一可用区。可调用 DescribeVSwitches 接口查询获取。
| vsw-bp10aqj6o4lclxdrm****,vsw-bp10aqj6o4lclxdrm**** |
PrivateIpAddress | string | 否 | 无需配置,表示目标实例的内网 IP。系统默认通过 VPCId 和 vSwitchId 自动分配。 | 172.16.XX.XX |
UsedTime | string | 否 | 预留参数,无需配置。 | 1 |
Period | string | 否 | 预留参数,无需配置。 | Month |
DBInstanceStorageType | string | 否 | 表示升级后实例的存储类型。 取值范围:
版本升级功能基于云盘快照,当前升级后支持选择的存储类型如下。
| cloud_essd |
ZoneId | string | 否 | 目标主可用区 ID。可以通过 DescribeRegions 接口查看可用区 ID。 RDS PostgreSQL 支持升级后将新的实例配置到与原实例同一地域的其他可用区。 | cn-hangzhou-h |
ZoneIdSlave1 | string | 否 | 仅当原实例为高可用系列时,该参数可配置,表示目标实例备可用区 ID。 RDS PostgreSQL 支持升级后将新的备实例配置到与原实例同一地域的其他可用区。 可以通过 DescribeRegions 接口查看可用区 ID。 | cn-hangzhou-h |
ZoneIdSlave2 | string | 否 | 预留参数,无需配置。 | cn-hangzhou-h |
返回参数
示例
正常返回示例
JSON
格式
{
"DBInstanceId": "pgm-bp1gm3yh0ht1****",
"RequestId": "006729E5-2A33-5955-89E3-651D3F44EBE6",
"OrderId": "21128667463****",
"TaskId": 416980000
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidUpgradePrecheckResult | The upgrade precheck failed. No successful precheck task found in the past 7 days | 升级前置检查失败,无七天内预检查成功任务 |
400 | TargetEngineVersion.Parameters.NotFound | targetEngineVersion is missing in the request. | 请求缺少目标数据库版本参数 |
400 | InvalidDBInstanceStorageType | The specified DBInstanceStorageType is invalid. | 指定的数据库实例存储类型无效 |
400 | InvalidInstanceNetworkType | The specified InstanceNetworkType is invalid. | 指定的实例网络类型无效 |
400 | InvalidVPCId | The specified VPCId is invalid. | 指定的虚拟专有网络无效 |
400 | InvalidDedicatedHostGroupId | The specified DedicatedHostGroupId is invalid. | 指定的专用主机组ID无效 |
400 | InvalidPayType | The specified PayType is invalid. | 指定的付款类型无效 |
400 | InvalidEngineVersion | The specified EngineVersion is invalid. | 指定的数据库版本号无效 |
400 | InvalidDBInstanceStorage | The specified DBInstanceStorage is invalid. | 指定的数据库实例存储无效 |
400 | InvalidSwitchOver | The specified SwitchOver is invalid. | 指定的割接模式无效 |
400 | PrimaryInstanceWithReadonlyNotSupport | The specified primary instance with the read-only instance does not support the operation. | 具有只读实例的指定主实例不支持此操作 |
400 | InvalidSwitchTimeMode | The specified SwitchTimeMode is invalid. | 指定的升级时间模式无效 |
400 | InvalidSwitchTime | The specified SwitchTime is invalid. | 指定的割接时间无效 |
400 | InvalidCollectStats | The specified CollectStats is invalid. | 指定的统计信息收集模式无效 |
400 | IncorrectDBInstanceState | The current instance state does not support this operation. | 当前实例状态不支持此操作。 |
400 | InvalidDBinstanceClass.ValueNotSupported | The specified parameter DBinstanceClass is invalid. | 指定的参数“实例规格”无效 |
400 | Order.ComboInstanceNotAllowOperate | A package instance is not allowed to operate independently. | 套餐实例不允许单独操作。 |
400 | Price.PricingPlanResultNotFound | Pricing plan price result not found. | 定价计划价格结果没有找到。 |
400 | Order.NoRealNameAuthentication | You have not passed the real-name authentication and do not meet the purchase conditions. Please log in to the user center for real-name authentication. | 您还未通过实名认证,不符合购买条件,请登录用户中心进行实名认证。 |
400 | InsufficientAvailableQuota | Your account quota limit is less than 0, please recharge before trying to purchase. | 您的账户可用额度小于0,请先充值后再尝试购买。 |
400 | CommodityServiceCalling.Exception | Failed to call commodity service. | 调用商品服务返回失败。 |
400 | RegionDissolvedEOM | Dear customer, Alibaba Cloud plans to optimize and adjust the current region. Cloud services in this region will cease operations. You are currently unable to operate new purchase orders. Thank you for your understanding and support. | 客户您好,阿里云计划对当前地域进行优化调整,该区域云服务将停止运营,为确保您的业务连续性及数据迁移工作的平稳过渡,您目前无法操作新购类型的订单,感谢理解与支持。 |
400 | Commodity.InvalidComponent | The module you purchased is not legal, please buy it again. | 您购买的模块不合法,请重新购买。 |
400 | RegionEndTimeDissolvedIndia | Cloud services in the India (Mumbai) region will be discontinued. Set the validity date to July 15, 2024 or earlier than July 15, 2024. | 客户您好,印度地域裁撤,购买的服务效期不能超过2024.07.15。 |
400 | RegionEndTimeDissolvedAustralia | Cloud services in the Australia (Sydney) region will be discontinued. Set the validity date to September 30, 2024 or earlier than September 30, 2024. | 客户您好,澳洲地域裁撤,购买的服务效期不能超过2024.09.30 |
400 | Price.CommoditySys | Commodity system call exception. | 商品系统调用异常。 |
400 | Pay.InsufficientBalance | Insufficient available balance. | 可用金不足。 |
400 | Order.PeriodInvalid | There is a problem with the period you selected, please choose again. | 您选购的周期有问题,请重新选购。 |
400 | pay.noCreditCard | Account not bound to credit card. | 账户未绑定信用卡。 |
400 | Order.InstHasUnpaidOrder | There is an unpaid order for the service you have purchased. Please pay or void it before placing the order. | 您选购的服务存在未支付订单,请支付或作废后再下单。 |
400 | noAvailablePaymentMethod | No payment method is specified for your account. We recommend that you add a payment method. | 没有为您的帐户指定付款方式。我们建议您添加一种付款方式。 |
400 | BasicInfoUncompleted | Your information is incomplete. Complete your information before the operation. | 您的基本信息未完善,请在操作前先完善您的基本信息。 |
400 | Risk.RiskControlRejection | Your account is abnormal, please contact customer service for details. | 您的账户出现异常,详情请联系客服。 |
400 | BasicInfoUncompleted | Your information is incomplete, Complete your information before the operation. | 您的信息不完整,请在操作前填写您的信息。 |
400 | System.SaleValidateFailed | Sales expression validation system error. | 销售表达式校验系统错误。 |
403 | OrderStatus.UnPaid | The specified db instance has unpaid order. | 实例当前存在未支付订单,请支付后重试。 |
404 | InvalidDBInstanceName.NotFound | The database instance does not exist. | 数据库实例名称不存在。请确认数据名称是否正确。 |
404 | IncorrectDBInstanceLockMode | Current DB instance lock mode does not support this operation. | 操作失败,实例处于锁定状态。 |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|