Restarting a DB Instance
Function
This API is used to restart a DB instance.
The DDS DB instance will be unavailable during the restart process. Exercise caution when performing this operation.
Constraints
If the instance status is not normal, the instance cannot be restarted.
URI
- Parameter description
Table 1 Parameter description Name
Mandatory
Description
project_id
Yes
Specifies the project ID of a tenant in a region.
instance_id
Yes
Specifies the DB instance ID.
Requests
- Parameter description
Table 2 Parameter description Name
Mandatory
Type
Description
target_type
No
String
Specifies the type of the object to restart.
- This parameter is mandatory when you restart one or more nodes of a cluster instance.
- Set the value to mongos if mongos nodes are restarted.
- Set the value to shard if shard nodes are restarted.
- Set the value to config if config nodes are restarted.
- This parameter is not transferred when the DB instance is restarted.
target_id
Yes
String
Specifies the ID of the object to restart.
- In a cluster instance, the value is the ID of the node to restart.
- When you restart the entire DB instance, the value is the DB instance ID.
- This parameter is mandatory when you restart one or more nodes of a cluster instance.
- Request header
POST https://DDS endpoint/v3/{project_id}/instances/{instance_id}/restart
- Example request
Restart shards.
{ "target_type":"shard", "target_id":"84e7c96b82aa4fedb3b00f98edd71ba4gr02" }
Restart configs.{ "target_type":"config", "target_id":"06439baa35c146d3a8965af59d370908gr02" }
Restart mongos.{ "target_type":"mongos", "target_id":"bd4dccbd53ae48d5bd3046bebf715079no02" }
Responses
- Parameter description
Table 3 Parameter description Name
Type
Description
job_id
String
Indicates the workflow ID.
- Response example
{ "job_id": "3711e2ad-5787-49bc-a47f-3f0b066af9f5" }
Status Code
For more information, see Status Code.
Error Code
For more information, 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