该接口用于执行RDS PostgreSQL上云切换,将RDS PostgreSQL提升为主库,正式提供服务。
接口说明
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
rds:ActivateMigrationTargetInstance | Write |
|
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
DBInstanceName | string | 是 | 目标实例 ID。可调用 DescribeDBInstances 接口查询。 | pgm-bp102g323jd4**** |
SwitchTime | string | 否 | 预留参数,暂不生效。 | 2022-02-25T06:57:41Z |
SwitchTimeMode | string | 否 | 切换上云时间模式。 固定配置为 0,表示立即切换。 | 0 |
ForceSwitch | string | 否 | 固定配置为 1,表示强制切换。 | 1 |
返回参数
示例
正常返回示例
JSON
格式
{
"DBInstanceName": "pgm-bp102g323jd4****",
"RequestId": "76364A52-E0AB-5CC8-9818-CF1DC482C092",
"TaskId": 440913675,
"SourceIpAddress": "172.16.XX.XX",
"SourcePort": 5432
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | IncorrectDBInstanceState | The current instance state does not support this operation. | 当前实例状态不支持此操作。 |
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. | 调用商品服务返回失败。 |
403 | IncorrectDBInstance | The current DB instance does not support this operation. | 操作失败,当前实例不支持此操作。 |
403 | IncorrectDBInstanceType | The database instance type does not support the operation. | 操作失败,当前数据库类型不支持该操作。 |
404 | InvalidDBInstanceName.NotFound | The database instance does not exist. | 数据库实例名称不存在。请确认数据名称是否正确。 |
404 | IncorrectDBInstanceLockMode | Current DB instance lock mode does not support this operation. | 操作失败,实例处于锁定状态。 |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|
暂无变更历史