变更云数据库MongoDB单节点实例、副本集实例和Serverless实例(仅中国站支持Serverless实例)的规格或存储空间。
接口说明
请确保在使用该接口前,已充分了解 MongoDB 产品的收费方式和和价格。
该接口仅适用于云数据库 MongoDB单节点实例、副本集实例和 Serverless 实例。如需变更分片集群实例的配置,您可以根据需求通过调用 ModifyNodeSpec 、 CreateNode 、 DeleteNode 或 ModifyNodeSpecBatch 接口来实现。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
dds:ModifyDBInstanceSpec |
update |
*Instance
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
DBInstanceId |
string |
是 |
实例 ID。 |
dds-bp1ea17b41ab**** |
DBInstanceClass |
string |
否 |
实例规格。
说明
该参数和 DBInstanceStorage 参数两者中至少配置一项。 |
dds.sn4.xlarge.1 |
DBInstanceStorage |
string |
否 |
实例的存储空间。
说明
|
50 |
OrderType |
string |
否 |
变配类型,取值说明:
说明
当实例付费方式为包年包月时,可以配置该参数。 |
UPGRADE |
AutoPay |
boolean |
否 |
实例是否自动付费,取值说明:
|
true |
BusinessInfo |
string |
否 |
业务信息。 |
{“ActivityId":"000000000"} |
ReplicationFactor |
string |
否 |
设置实例的节点个数,默认值为 3。
说明
Serverless 实例(仅支持中国站)不需要配置该参数。 |
3 |
ReadonlyReplicas |
string |
否 |
只读节点的个数,取值范围为 0~5。 如果实例的网络类型只开通了经典网络和专有网络,您需要开通公网或释放经典网络,才能变更只读节点数。 说明
您可以登录云数据库 MongoDB 控制台,在数据库连接页面查看已开通的网络类型。 |
1 |
CouponNo |
string |
否 |
是否使用优惠券,取值说明:
|
default |
EffectiveTime |
string |
否 |
变更配置的生效时间,取值说明:
|
Immediately |
ExtraParam |
string |
否 |
附加参数,取值说明:
|
async |
TargetZoneId |
string |
否 |
||
TargetSecondaryZoneId |
string |
否 |
||
TargetHiddenZoneId |
string |
否 |
||
TargetVswitchId |
string |
否 |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
|||
RequestId |
string |
请求 ID。 |
1E9F1104-19E7-59F0-AB7F-F4EBFDEA**** |
OrderId |
string |
订单 ID。 |
21012408824**** |
示例
正常返回示例
JSON
格式
{
"RequestId": "1E9F1104-19E7-59F0-AB7F-F4EBFDEA****",
"OrderId": "21012408824****"
}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
400 | MissingParameter | The input parameters DBInstanceClass and DBInstanceStorage all blank or no change. | |
400 | InvalidDBInstanceClass.ValueNotSupported | The specified parameter DBInstanceClass is not valid. | |
400 | InvalidDBInstanceStorage.ValueNotSupported | The specified parameter DBInstanceStorage is not valid. | |
400 | LX_REQUEST_TOKEN_CONFLICT | The request token is conflict. | |
400 | TradeConfirmPayError | BIZ_ERROR - degrade refund error | |
400 | PRICE.ORIGIN_PRICE_ERROR | Origin lingxiao price request error. | |
400 | ErrorInsufficientResource | There is not enough resource for your operation, requestId: %s. | 当前操作资源不足,请求id: %s。 |
403 | OperationDenied | The resource is out of usage. | The resource is out of usage. |
403 | InvaildDBInstanceClassInRegion.NotAvailable | The DBInstanceClass in the Region is not available. | |
404 | InvalidDBInstanceId.NotFound | The DBInstanceId provided does not exist in our records. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。