该接口用于变更RDS实例的规格和存储空间等。
接口说明
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
rds:ModifyDBInstanceSpec | Write |
|
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
DBInstanceId | string | 是 | 实例ID。可调用DescribeDBInstances获取。 | rm-uf6wjk5**** |
DBInstanceClass | string | 否 | 目标实例规格,详情请参见实例规格表。您也可以调用DescribeAvailableClasses接口查询实例可变更规格。 说明
| mysql.n8.large.2c |
DBInstanceStorage | integer | 否 | 目标存储空间大小,单位:GB。每5GB进行递增,详情请参见实例规格表。您也可以调用DescribeAvailableClasses接口查询目标实例规格中可用的存储空间范围。 说明
| 100 |
PayType | string | 否 | 实例当前的付费类型,取值:
| Postpaid |
EffectiveTime | string | 否 | 生效时间,取值:
| MaintainTime |
EngineVersion | string | 否 | 数据库版本号,取值:
| 5.6 |
DBInstanceStorageType | string | 否 | 实例储存类型,取值:
如需变更存储类型,请注意:
| local_ssd |
Direction | string | 否 | 实例变配类型,取值:
说明
如果仅变更DBInstanceStorageType参数,例如将SSD云盘变更为ESSD云盘,则此参数留空。
| Up |
SourceBiz | string | 否 | 弃用参数,无需配置。 | test |
DedicatedHostGroupId | string | 否 | 专属集群ID。 | dhg-7a9**** |
ZoneId | string | 否 | 可用区ID。 | cn-hangzhou-b |
SwitchTime | string | 否 | 指定执行变配的时间。建议在业务低峰期执行变配。格式:yyyy-MM-ddTHH:mm:ssZ(UTC时间)。 说明
| 2019-07-10T13:15:12Z |
ResourceGroupId | string | 否 | 资源组ID。 | rg-acfmy**** |
UsedTime | long | 否 | SQL Server实例的弹性升级时间。单位:天。 | 3 |
ServerlessConfiguration | object | 否 | 变配Serverless实例。 | |
MaxCapacity | double | 否 | 实例RCU(Rds Capacity Unit)的自动扩缩范围最大值。取值:
说明
该参数的值必须大于等于MinCapacity,且仅支持传入整数。
| 8 |
MinCapacity | double | 否 | 实例RCU(Rds Capacity Unit)的自动扩缩范围最小值。取值:
说明
该参数的值必须小于等于MaxCapacity。
| 0.5 |
AutoPause | boolean | 否 | 否开启Serverless实例的智能暂停和启动。取值:
说明
仅MySQL和PostgreSQL的Serverless实例需设置该参数。如果10分钟无任何连接将进入暂停状态,当连接进入时会自动唤醒。
| true |
SwitchForce | boolean | 否 | 是否开启Serverless实例的强制弹性扩缩容,取值:
说明
| false |
Category | string | 否 | 实例系列,取值:
| HighAvailability |
BurstingEnabled | boolean | 否 | false | |
AutoUseCoupon | boolean | 否 | 是否使用代金券抵扣费用,取值:
| false |
TargetMinorVersion | string | 否 | 内核小版本号。 仅PostgreSQL实例需设置该参数。当变更实例规格并且报错内核小版本不支持时,需要传入内核小版本号,用于在变更实例规格时升级内核小版本。 格式: 说明
内核小版本号请参见PostgreSQL小版本Release Notes。
| rds_postgres_1200_20200830 |
返回参数
示例
正常返回示例
JSON
格式
{
"DBInstanceId": "rm-uf6wjk5****",
"RequestId": "3C5CFDEE-F774-4DED-89A2-1D76EC63C575",
"OrderId": 0
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | CannotDecreaseEssdPerfLevel | cannot decrease cloud essd performance level. | 存储类型变更校验失败,SQL Server云盘实例只能转为云盘,SSD只能升级到SSD或ESSD。 |
400 | InvalidEssdStorageSize | invalid cloud essd storage size. | 云盘存储规格有误,请检查存储规格配置。 |
400 | Postpaid.NotSupport | Postpaid not supported. | - |
400 | InvalidConcurrentOperate | System concurrent operate. | - |
400 | NotSupportReduceDiskSize | Not support reduce disk size. | 操作失败,不支持减少磁盘大小。 |
400 | IncorrectStorageType | Incorrect storage type. | - |
400 | TargetStorageLessThanBottomLine | Target storage less than bottom line | - |
400 | InstanceHasUnpaidOrder | The specified Instance has unpaid order. | - |
400 | InsufficientBalance | Open volume paid cloud database. Your account balance is less than 100 RMB. Top-up and try again. | - |
400 | InvalidDBInstanceClass.NotFound | Specified DB instance class is not found. | 当前选择的配置或规格不存在或已停售,请重新选择。 |
400 | InvalidParameter | The specified parameter "%s" is not valid. | - |
400 | InvalidAvZone.Format | Specified AvZone is not valid. | 指定的AvZone不合法,请检查该参数的正确性。 |
400 | OperationDenied.OrderUnPaid | The operation is not permitted due to the wrong Order status (Unpaid). | 操作失败,存在未支付的订单。请在账户总览中查看。 |
400 | OperationDenied.InvalidStorageSize | The storage size limit is exceeded. | 已超过磁盘空间上限,请清理磁盘空间,或扩大磁盘空间。 |
400 | InsufficientResourceCapacity | The instance cluster does not support this operation. | 该实例集群不支持此操作。 |
400 | InvalidUsedTime | The parameter usedTime is invalid. | 参数usedTime无效 |
400 | CannotChangeStorageType | Temp upgrade does not support changing storage type. | 弹性升级不可改变存储类型。 |
400 | TempUpgrade.NotSupport | The instance does not support temp upgrade. | 该实例不支持弹性升级。 |
400 | EngineNotSupported | Engine specified cannot be supported the operation. | 操作失败,当前引擎不支持此操作,请升级内核小版本。 |
400 | MaxscaleNotSupport | Maxscale not supported | 操作失败,实例不支持独享代理,请检查开通独享代理的配置信息。 |
400 | ADInstanceNotSupportThisOperation | The AD instance is not supported this operation | 加入AD域的实例不支持此操作 |
400 | BYOKInstanceNotSupportThisOperation | The BYOK instance is not supported this operation | 开启云盘加密功能的实例不支持此操作 |
400 | BYOLInstanceNotSupportThisOperation | The BYOL instance is not supported this operation | BYOL实例不支持此操作 |
400 | SSLInstanceNotSupportThisOperation | The instance opened SSL, upgrade is not this operation | 开启SSL功能的实例不支持此操作 |
400 | TDEInstanceNotSupportThisOperation | The instance opened TDE, this operation is not supported | 开启TDE功能的实例不支持此操作 |
400 | InstanceIsSnapshotBackupNotSupportThisOperation | The instance backup method is snapshot backup, this operation is not supported | 开启快照备份的实例不支持此操作 |
400 | InstanceHasReadOnlyInstanceNotSupportThisOperation | The instance has read-only instance or is read-only instance, this operation is not supported | 该实例有只读实例或者该实例是只读实例,不支持此操作 |
400 | InvalidTargetStorageType | Can not change storage type when modify instance class or storage. | - |
400 | InvalidTargetCategory | Specified classcode is not matched with current product type. | - |
400 | IncorrectDBInstanceState | Current DB instance state does not support this operation. | 当前实例状态不支持此操作。 |
400 | BackupReadInstanceModifyNotAllowed | Modify Backup Read Instance Is Not Allowed. | 不允许修改备份读取实例。 |
400 | MinorVersionNotSupport | The current database minor version does not support the operation. | 操作失败,当前小版本不支持该操作。 |
400 | LX.ARGUMENT.ILLEGAL | 变配,当前实例无有效配置 | - |
400 | ORD.S.QUERY.PROD.ERROR | An error occurred while querying the ordering information | 查询订购错误 |
400 | InvalidParameter.NotSupportDiskTypeModify | Serverless not support modify disk type! | - |
400 | InvalidParameter.NotSupportModifyServerlessConfigAndDiskTogether | Serverless not support modify serverlessconfig and disk together! | - |
400 | InvalidParameters.Malformed | One or more of the request parameters provided are not valid. | 请求参数有误,请检查接口文档 |
400 | DBInstancePayTypeNotSupport | Current instance PayType not support this operation or the param PayType not match current instance PayType. | 当前实例的付费类型不支持此操作或者参数PayType与当前实例不匹配。 |
400 | InvalidDBInstanceClass.Offline | The specified instance type is no longer provided. Please specify another instance type. | 当前所选的实例规格已下线,请更换其他实例规格。 |
400 | IncorrectTargetClasscode | The current instance type does not support this operation. | 当前规格不支持此操作。 |
400 | InvalidPayType.NotSupported | current instance pay type not support this operation. | - |
400 | nvalidStorageType.NotSupport | current storage type does not support this operation. | - |
400 | OperationDenied.DurationLimit | The duration between two operations should be greater than specified time. | - |
400 | AccountMoneyValidate.error | Insufficient funds available in the account. | 账号可用金额不足。 |
403 | IncorrectDBInstanceType | The database instance type does not support the operation. | 操作失败,当前数据库类型不支持该操作。 |
403 | OperationDenied.NotSupportedBackupMethod | When the storage is larger than 4000 GB, only snapshot backup is supported. | 当存储空间大于4000GB,仅支持快照备份。 |
403 | IncorrectReadDBInstanceDisksize | Read instance disk size must be equal or higher than primary instance. | 只读实例磁盘大小必须等于或大于主实例。 |
403 | BetaServerlessNotSupportThisAction | Beta Serverless Not Support This Feature | - |
403 | GroupReplicationNotSupport.InvalidEngineVersion | Group Replication requires the instance engine version to be 8.0. | 实例数据库版本不是MySQL 8.0,不支持组复制。 |
403 | GroupReplicationNotSupport.InvalidNodeClassCode | Group Replication requires the ClassCode of each node to be consistent. | 实例各节点间规格不一致,不支持组复制。 |
403 | GroupReplicationNotSupport.InvalidNodeNum | Group Replication is not supported, the number of nodes must be an odd number greater than or equal to 3. | 实例节点个数不是大于等于3的单数,不支持组复制。 |
403 | GroupReplicationNotSupport.InvalidXengine | Group Replication is not supported because the instance has xengine tables. | 实例存在xengine引擎表,不支持组复制。 |
403 | GroupReplicationNotSupport.MemoryTooSmall | Group Replication is not supported because the memory is too small. | 实例规格内存太小,不支持组复制。 |
403 | ARMNotSupport | ARM arch does not support this operation. | ARM架构不支持此操作。 |
403 | HostTypeNotSupport | Host type is inconsistent, please check that the original host type is the same as the target host type. | 变更前后host type不一致,请检查原host type和目标host type保持一致。 |
403 | CloudSSDNotSupport | Cloud ssd does not support this operation, please upgrade to essd. | SSD盘不支持此操作,请升级至ESSD。 |
403 | MaxscaleInstanceNotSupport | Instances with maxscale instance do not support this operation. | 带Maxscale代理的实例不支持此操作。 |
403 | ReadInstanceNotSupport | Instances with read-only do not support this operation. | 带只读的实例不支持此操作。 |
403 | UnSupportReduceDiskSize | Current instance type does not support reducing disk space. | 当前实例类型不支持降低磁盘空间。 |
403 | CloudboxInstanceNotSupport | Cloud-box instance does not support this operation. | 云盒实例不支持此操作 |
403 | ReadOnlyInstanceNotSupport | Read-only instance does not support this operation. | 只读实例不支持此操作。 |
403 | MinorVersionNotSupport | Custins minor version does not support current action. | - |
404 | InvalidClusterKms | The current instance does not authorized to access the Key Management Service. | 当前实例未授权访问密钥管理服务。 |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-08-29 | OpenAPI 错误码发生变更 | 看变更集 | ||||||||||||
| ||||||||||||||
2023-07-26 | OpenAPI 错误码发生变更,OpenAPI 入参发生变更 | 看变更集 | ||||||||||||
| ||||||||||||||
2023-07-04 | OpenAPI 错误码发生变更,OpenAPI 入参发生变更 | 看变更集 | ||||||||||||
| ||||||||||||||
2023-06-05 | OpenAPI 错误码发生变更 | 看变更集 | ||||||||||||
| ||||||||||||||
2023-05-09 | OpenAPI 错误码发生变更 | 看变更集 | ||||||||||||
| ||||||||||||||
2023-04-28 | OpenAPI 错误码发生变更 | 看变更集 | ||||||||||||
| ||||||||||||||
2023-04-19 | OpenAPI 错误码发生变更 | 看变更集 | ||||||||||||
| ||||||||||||||
2023-03-16 | OpenAPI 错误码发生变更 | 看变更集 | ||||||||||||
| ||||||||||||||
2022-12-13 | OpenAPI 错误码发生变更 | 看变更集 | ||||||||||||
| ||||||||||||||
2022-07-05 | OpenAPI 描述信息更新,OpenAPI 错误码发生变更 | 看变更集 | ||||||||||||
| ||||||||||||||
2022-06-23 | OpenAPI 错误码发生变更 | 看变更集 | ||||||||||||
| ||||||||||||||
2021-10-19 | OpenAPI 错误码发生变更,OpenAPI 入参发生变更 | 看变更集 | ||||||||||||
|