You are not logged in.
ResizeInstance
This API is used to modify the specifications of a DB instance in the same or different DB instance series.
Name | Type | IN | Mandatory | Description |
---|---|---|---|---|
x-auth-token | string | header | Yes | Specifies the user token obtained from the IAM service. |
instance_id | string | path | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances and details. If you do not have an instance, you can call the API used for creating an instance. |
project_id | string | path | Yes | Specifies the project ID of a tenant in a region. |
Name | Type | Mandatory | Description |
---|---|---|---|
resize | ResizeInstanceOption object | Yes | Specifies the specification information. |
is_auto_pay | boolean | No | Whether the order is automatically paid from your account when you change the class of a yearly/monthly DB instance. This parameter does not affect the payment mode of automatic renewal.
|
Name | Type | Mandatory | Description |
---|---|---|---|
target_type | string | No | Specifies the object type:
|
target_id | string | No | The ID of the node or instance whose specifications are to be modified. You can obtain the ID by calling the API used for querying instances. If you do not have an instance, you can call the API used for creating an instance.
|
target_ids | Array of strings | No | The IDs of the node or instance whose specifications are to be modified. You can obtain the IDs by calling the API used for querying instances. If you do not have an instance, you can call the API used for creating an instance.
|
target_spec_code | string | Yes | The resource specification code of the new specification. |
Success.
Name | Type | Description |
---|---|---|
job_id | string | Indicates the task ID. |
order_id | string | 订单ID,仅变更包年包月实例的规格时返回该参数。 |
Client or server error.
Name | Type | Description |
---|---|---|
error_code | string | Specifies the error returned when a task submission exception occurs. |
error_msg | string | Specifies the description of the error returned when a task submission exception occurs. |
Modify the mongos specifications in a cluster instance.
"POST https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances/054e292c9880d4992f02c0196d3eain02/resize"
{
"resize": {
"target_type": "mongos",
"target_id": "a742c13a284949adad177672e8a0f01cno02",
"target_spec_code": "dds.mongodb.c6.large.4.mongos"
}
}
Modify the shard specifications in a cluster instance.
"POST https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances/054e292c9880d4992f02c0196d3eain02/resize"
{
"resize": {
"target_type": "shard",
"target_id": "aeeb40a704904977ad78993d138ec942gr02",
"target_spec_code": "dds.mongodb.c6.large.4.shard"
}
}
Modify specifications of a replica set or a single node instance.
"POST https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances/054e292c9880d4992f02c0196d3eain02/resize"
{
"resize": {
"target_id": "aeeb40a704904977ad78993d138ec942in02",
"target_spec_code": "dds.mongodb.c6.medium.4.repset"
}
}
Success.
{
"job_id": "04efe8e2-9255-44ae-a98b-d87cae411890"
}