调用 ModifyDBInstanceSpec 接口修改实例配置。
异步请求。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
InstanceId | String | 是 | mysql-e26822cf**** | 实例 ID。 |
NodeInfo | Object[] | 否 | [
{
"NodeId": "mysql-7d1efb9f****-0","NodeType": "Primary",
"NodeSpec": "rds.mysql.1c2g",
"NodeOperateType": "Modify"
},
{
"NodeId": "mysql-7d1efb9f****-1",
"NodeType": "Secondary",
"NodeSpec": "rds.mysql.1c2g",
"NodeOperateType": "Modify"
},
{
"NodeId": "mysql-7d1efb9f****-r****",
"NodeType": "ReadOnly",
"NodeSpec": "rds.mysql.1c2g",
"NodeOperateType": "Delete"
},
{
"NodeType": "ReadOnly",
"NodeSpec": "rds.mysql.1c2g",
"NodeOperateType": "Create"
},
{
"NodeId": "mysql-7d1efb9f****-r****",
"NodeType": "ReadOnly",
"NodeSpec": "rds.mysql.1c2g",
"NodeOperateType": "Modify"
}
] | 实例规格配置。主节点和备节点有且只有 1 个,只读节点可选 0~10 个。除新增只读节点场景外,其他场景忽略 ZoneId。 说明
|
ModifyType | String | 否 | Usually | 实例规格的变更类型。取值为 Usually ,常规变配。 |
StorageType | String | 是 | LocalSSD | 实例存储类型。取值为 说明 在 ModifyDBInstanceSpec 接口中,如需设定 StorageSpace 参数,StorageType 参数为必传。 |
StorageSpace | Integer | 否 | 100 | 实例存储空间。取值范围:[20, 3000],单位为 GB,步长为 10GB。默认与当前值相同。 说明 该参数与 NodeInfo 二者必选其一,且这两个参数可同时修改。 |
SwitchType | String | 否 | Immediate | 变配类型,取值:
|
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
InstanceId | String | mysql-7d1efb9f**** | 实例 ID。 |
OrderId | String | Order71220115095297**** | 订单 ID。 |
POST /?Action=ModifyDBInstanceSpec&Version=2022-01-01 HTTP/1.1 Content-Type: application/json Host: rds.volcengineapi.com X-Date: 20211202T101010Z Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_mysql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458**** { "InstanceId": "mysql-f4cba23f****", "NodeInfo": [ { "NodeId": "mysql-f4cba23f****-0", "NodeType": "Primary", "NodeSpec": "rds.mysql.2c4g", "NodeOperateType": "Modify" }, { "NodeId": "mysql-f4cba23f****-1", "NodeType": "Secondary", "NodeSpec": "rds.mysql.2c4g", "NodeOperateType": "Modify" }, { "ZoneId": "cn-beijing-a", "NodeType": "ReadOnly", "NodeSpec": "rds.mysql.2c4g", "NodeOperateType": "Create" } ], "StorageType": "LocalSSD", "StorageSpace": 200 }
{ "ResponseMetadata": { "RequestId": "20220719173634010212035227001977AC", "Action": "ModifyDBInstanceSpec", "Version": "2022-01-01", "Service": "rds_mysql", "Region": "cn-beijing" }, "Result": { "InstanceId": "mysql-f4cba23f****", "OrderId": "Order71220115095297****" } }
更多详情,请参见错误码。