Modifying DB Instance Specifications
API Description
This API is used to modify the instance specifications.
Services will be interrupted for 5 to 10 minutes when you modify DB instance specifications. Exercise caution when performing this operation.
Restrictions
- If you want to change the specifications to other specifications of the same series, the new specifications cannot be the same as the original specifications.
- Specifications can be modified only when the DB instance status is normal.
|
Name |
Type |
IN |
Mandatory |
Description |
|---|---|---|---|---|
|
project_id |
string |
path |
Yes |
Project ID of a tenant in a region. To obtain the project ID, see Obtaining a Project ID. |
|
instance_id |
string |
path |
Yes |
Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If you do not have an instance, call the API described in Creating a DB Instance to create one. |
Request Parameters
|
Parameter |
Type |
IN |
Mandatory |
Description |
|---|---|---|---|---|
|
X-Auth-Token |
string |
header |
Yes |
User token |
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
resize |
Object |
Yes |
The specification information. For more information, see Table 4. |
|
is_delayed |
Boolean |
No |
Indicates whether to start a scheduled task. If this parameter is not transferred, the default value false is used. |
|
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.
|
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
target_type |
String |
No |
The object type:
|
|
target_id |
String |
Yes |
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_spec_code |
String |
Yes |
The resource specification code of the new specification. For details about how to obtain the value, see the response values of flavors.spec_code in Querying All Instance Specifications. |
- Request example
Modify the mongos node specifications.
{ "resize": { "target_type": "mongos", "target_id": "a742c13a284949adad177672e8a0f01cno02", "target_spec_code": "dds.mongodb.c6.large.4.mongos" } }Modify the shard node specifications.
{ "resize": { "target_type": "shard", "target_id": "aeeb40a704904977ad78993d138ec942gr02", "target_spec_code": "dds.mongodb.c6.large.4.shard" } }Modify the config node specifications.
{ "resize": { "target_type": "config", "target_id": "10a1c330537b42c1a9b3f7a5ebcda35egr02", "target_spec_code": "dds.mongodb.c6.xlarge.2.config" } }Modify the specifications of a read replica.
{ "resize" : { "target_type" : "readonly", "target_id" : "886485522d0c4a14b067446a89873962no02", "target_spec_code" : "dds.mongodb.c6.xlarge.4.rr" } }Modify specifications of a replica set or a single node instance.{ "resize": { "target_id": "aeeb40a704904977ad78993d138ec942in02", "target_spec_code": "dds.mongodb.c6.medium.4.repset" } }Forcibly change the specifications of an abnormal replica set instance.{ "resize": { "target_id": "aeeb40a704904977ad78993d138ec942in02", "target_spec_code": "dds.mongodb.c6.medium.4.repset" }, "is_force_resize": true }
Response Parameters
- Parameter description
Table 5 Parameter description Parameter
Type
Mandatory
Description
job_id
String
Yes
The task ID.
order_id
String
No
The order ID. This parameter is returned only when the specifications of a yearly/monthly DB instance are changed.
- Example response
{ "job_id": "3711e2ad-5787-49bc-a47f-3f0b066af9f5" }
Status Code
For details, see Status Code.
Error Code
For details, see Error Code.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot